data: { showActionsheet: false , groups: [ { text: '示例菜单' , value: 1 }, { text: '示例菜单' , value: 2 }, { text: '负向菜单' , type: 'warn' , value: 3 } ] }, onLoad: function () { console.log( '代码片段是一种迷你、可分享的小程序或小游戏项目,可用于分享小程序和小游戏的开发经验、展示组件和 API 的使用、复现开发问题和 Bug 等。可点击以下链接查看代码片段的详细文档:' ) console.log( 'https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/devtools.html' ) "https://developers.weixin.qq.com/s/kU6KAHmR7ocS" }, close: function () { this .setData({ showActionsheet: false }) }, btnClick(e) { console.log(e) this .close() }, showActionSheet: function (){ this .setData({ showActionsheet: true }) } }) |
json:
{ "usingComponents" : { "mp-actionsheet" : "/actionsheet/actionsheet" } } |
wxml:
< mp-actionSheet bindactiontap = "btnClick" show = "{{showActionsheet}}" actions = "{{groups}}" title = "这是一个标题,可以为一行或者两行。" > </ mp-actionSheet > < button bindtap = "showActionSheet" >这是一个按钮</ button > |
官方,你们的actionsheet在ios上面不显示,望修复
json文件中的引入文件内容是什么?
项目地址,这里提供的是有效的,你看下
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using npm@6.13.0
3 info using node@v8.11.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle weui-miniprogram@0.1.12~predev: weui-miniprogram@0.1.12
6 info lifecycle weui-miniprogram@0.1.12~dev: weui-miniprogram@0.1.12
7 verbose lifecycle weui-miniprogram@0.1.12~dev: unsafe-perm in lifecycle true
8 verbose lifecycle weui-miniprogram@0.1.12~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/weijiezhou/WeChatProjects/weui/weui-miniprogram/node_modules/.bin:/usr/local/opt/php@7.2/sbin:/usr/local/opt/php@7.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/openssl
9 verbose lifecycle weui-miniprogram@0.1.12~dev: CWD: /Users/weijiezhou/WeChatProjects/weui/weui-miniprogram
10 silly lifecycle weui-miniprogram@0.1.12~dev: Args: [ '-c', 'gulp dev --develop' ]
11 silly lifecycle weui-miniprogram@0.1.12~dev: Returned: code: 1 signal: null
12 info lifecycle weui-miniprogram@0.1.12~dev: Failed to exec dev script
13 verbose stack Error: weui-miniprogram@0.1.12 dev: `gulp dev --develop`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid weui-miniprogram@0.1.12
15 verbose cwd /Users/weijiezhou/WeChatProjects/weui/weui-miniprogram
16 verbose Darwin 17.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v8.11.1
19 verbose npm v6.13.0
20 error code ELIFECYCLE
21 error errno 1
22 error weui-miniprogram@0.1.12 dev: `gulp dev --develop`
22 error Exit status 1
23 error Failed at the weui-miniprogram@0.1.12 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
还补充了一个loading的扩展组件BUG,我估计其他组件应该有同样的问题,就是JS代码无法控制组件的显示、隐藏等动态操作。希望官方严格测试下。
新的代码片段:https://developers.weixin.qq.com/s/fkhWLHmr7Bc8