- wepy组件 在百度小程序里不显示?
wepy小程序迁移百度小程序, 只有一个组件不知道, 筛选头 页面加载不显示 <view class="filter-header"> <text s-for="item, index in filterList.tsbs " s-key="index" key="{{ index }}" data-wpy-evt="20-1" bindtap="silderbarShow" data-wpytap-a="{{ item }}" style=" {{ 'text-align:' + (filterArr[index]) + ';' }}" class=" {{ [ activeType == item.tabType ? \'visible\' : \'\' ? 'visible' : '' ] }}">{{item.name}}</text> </view> _core["default"].component({ props: ['filterList', 'activeType'], data: { filterArr: ['left', 'center', 'center', 'right'] }, methods: { optionShow: function optionShow(type) { this.$emit('silderbarShow', type); } }, created: function created() { alert("1111") } }, { info: { "components": {}, "on": {} }, handlers: { '52-0': { "tap": function proxy(item) { var _vm = this; return function () { _vm.optionShow(item.tabType); }(); } } }, models: {}, refs: undefined });
2020-03-13 - 小程序往数组里添加元素
- choose:function(e){ console.log(e) var that = this; var item = e.currentTarget.dataset.item; item.isChecked = !item.isChecked; that.chooseList.push(e) console.log(that.chooseList); },
2018-06-06