diff --git a/src/pages/activity/useActivityStepThree.vue b/src/pages/activity/useActivityStepThree.vue index 5fce1f0..e72c700 100644 --- a/src/pages/activity/useActivityStepThree.vue +++ b/src/pages/activity/useActivityStepThree.vue @@ -21,6 +21,7 @@ @on-change="onChange" v-model="isSelect"> 0) { - that.orginShopList.forEach((item) => { - if (item.label.indexOf(keyword) >= 0) { - that.shopList.push(item); + that.shopList.forEach((item) => { + if (item.label.indexOf(keyword) == -1) { + item.hide = true } }); } else { - that.shopList = that.orginShopList; + that.shopList.forEach((item) => { + item.hide = false + }); } + this.isSelect = this._.filter(this.isSelect, item => item) + console.log(that.shopList) }, onChange (data) { let _this = this; - if (data.length === this.isSelect.length) { + data = this._.filter(data, item => item) + if (data.length === this.shopListData.length) { this.indeterminate = false; this.allSelect = true; } else if (data.length > 0) { diff --git a/src/pages/activity/useActivityStepTwo.vue b/src/pages/activity/useActivityStepTwo.vue index 2827f95..d797993 100644 --- a/src/pages/activity/useActivityStepTwo.vue +++ b/src/pages/activity/useActivityStepTwo.vue @@ -21,6 +21,7 @@ @on-change="onChange" v-model="checkCompanys"> 0) { - that.orginCompanyList.forEach((item) => { - if (item.label.indexOf(keyword) >= 0) { - that.companyList.push(item); + that.companyList.forEach((item) => { + if (item.label.indexOf(keyword) == -1) { + item.hide = true; } }); } else { - that.companyList = that.orginCompanyList; + that.companyList.forEach((item) => { + item.hide = false + }); } + this.$forceUpdate(); + console.log(1, that.companyList) }, getCompanyInfo () { let that = this; diff --git a/vue.config.js b/vue.config.js index d646141..7539a16 100644 --- a/vue.config.js +++ b/vue.config.js @@ -6,11 +6,11 @@ module.exports = { // publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './', /* history模式 */ - publicPath: process.env.NODE_ENV === "production" ? "/dist/" : "/", + publicPath: process.env.NODE_ENV === 'production' ? '/dist/' : '/', /* 输出文件目录:在npm run build时,生成文件的目录名称 */ - outputDir: "dist", + outputDir: 'dist', /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ - assetsDir: "assets", + assetsDir: 'assets', /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ productionSourceMap: false, /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ @@ -22,7 +22,7 @@ module.exports = { /* 自动打开浏览器 */ open: false, /* 设置为0.0.0.0则所有的地址均能访问 */ - host: "0.0.0.0", + host: '0.0.0.0', port: 8311, https: false, hotOnly: false, @@ -31,8 +31,8 @@ module.exports = { // proxy: 'http://192.168.1.123:8312/' // proxy: 'http://192.168.31.177:8312/' // proxy: 'http://localhost:8312/' - proxy: "http://111.231.218.44:8080/", - // proxy: "http://localhost:8080/", + // proxy: "http://111.231.218.44:8080/", + proxy: 'http://localhost:8080/', // proxy: 'http://jdxdev.vipgz4.idcfengye.com/' }, chainWebpack: (config) => { @@ -47,4 +47,4 @@ module.exports = { // remUnit: 40, // }); }, -}; +}