-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小程序转成taro,Error: slot 的值必须是一个字符串 #1835
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
单单这段代码无法复现,能正确编译出来: <view class="{{['button', size ? 'button-' + size : '', type ? 'button-' + type : '', block ? 'button-block' : '', plain ? 'button-' + type + '-plain' : '', pill ? 'border-pill' : '', disable ? 'button-disable' : '']}}"
hover-class="button-hover" style="{{otherStyle}}">
<icon wx:if="{{loading}}" type="loading-circle" size="{{size}}" />
<slot></slot>
</view> |
这是一个 component 其他代码我一起贴下 、、、js 、、、json 、、、wxml |
你找到这个包的 index.js,他接受一个对象,
然后就是常规的 node.js 调试 |
想问 187行 为啥要加上 else 讲道理不要也没有关系吧 |
的确是这样,我本地的包没有编译最新的代码 |
你们下一次发版 计划在什么时候 |
今天或明天 |
问题描述
小程序转成taro,Error: slot 的值必须是一个字符串
复现步骤
1.自定义组件,用到了slot
报错信息
错误 组件转换 common/components/button/index.js
Error: slot 的值必须是一个字符串
系统信息
Taro CLI 1.2.4 environment info:
System:
OS: macOS High Sierra 10.13.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.1 - /usr/local/bin/node
Yarn: 1.9.2 - /usr/local/bin/yarn
npm: 6.4.0 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.2.4 => 1.2.4
@tarojs/plugin-babel: 1.2.4 => 1.2.4
@tarojs/plugin-csso: 1.2.4 => 1.2.4
@tarojs/plugin-sass: 1.2.4 => 1.2.4
@tarojs/plugin-uglifyjs: 1.2.4 => 1.2.4
@tarojs/router: 1.2.4 => 1.2.4
@tarojs/taro: 1.2.4 => 1.2.4
@tarojs/taro-alipay: 1.2.4 => 1.2.4
@tarojs/taro-h5: 1.2.4 => 1.2.4
@tarojs/taro-swan: 1.2.4 => 1.2.4
@tarojs/taro-weapp: 1.2.4 => 1.2.4
@tarojs/webpack-runner: 1.2.4 => 1.2.4
eslint-config-taro: 1.2.4 => 1.2.4
eslint-plugin-taro: 1.2.4 => 1.2.4
The text was updated successfully, but these errors were encountered: