/** * 空的验证组件,后续如果增加业务,则更改组件 */ var manyGoodsListHtml = '
'; manyGoodsListHtml += ''; // manyGoodsListHtml += ''; manyGoodsListHtml += '
'; var select_goods_list = []; //配合商品选择器使用 Vue.component("many-goods-list", { template: manyGoodsListHtml, data: function () { return { data: this.$parent.data, list: this.$parent.data.list, goodsSources: [ // { // text: "默认", // value: "default", // icon: goodsListResourcePath + "/goods_list/img/default_icon.png", // selectedIcon: goodsListResourcePath + "/goods_list/img/default_selected_icon.png" // }, { text: "商品分类", value: "category", icon: goodsListResourcePath + "/many_goods_list/img/category_icon.png", selectedIcon: goodsListResourcePath + "/many_goods_list/img/category_selected_icon.png" }, { text : "手动选择", value : "diy", icon: goodsListResourcePath + "/many_goods_list/img/diy_icon.png", selectedIcon: goodsListResourcePath + "/many_goods_list/img/diy_selected_icon.png" } ], categoryList: [], isLoad: true, isShow: false, selectIndex: 0,//当前选中的下标 goodsCount: [6, 12, 18, 24, 30] } }, created:function() { if(!this.$parent.data.verify) this.$parent.data.verify = []; this.$parent.data.verify.push(this.verify);//加载验证方法 }, methods: { verify : function () { var res = { code : true, message : "" }; for (var i=0; i