vue.js里想用weui的picker,也引入了weui.js,为什么报错weui is not defined?<template> <div class="wrap"> <a href="javascript:;" class="weui-btn weui-btn_default" id="showPicker"》单列选择器</a> </div></template><script>import weuiJs from '../weui-js/weui.js'export default { methods: { checkPicker: function () { weui.picker([{ label: '飞机票', value: 0 }, { label: '火车票', value: 1 }, { label: '的士票', value: 2 },{ label: '公交票 (disabled)', disabled: true, value: 3 }, { label: '其他', value: 4 }], { onChange: function (result) { console.log(result); }, onConfirm: function (result) { console.log(result); } }); } }}</script>
添加回答
举报
0/150
提交
取消