{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\components\\inputSearch\\InputSearch.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\inputSearch\\InputSearch.vue","mtime":1667326394419},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n props: {\n url: String,\n inputSearchValue: String,\n placeholder: String,\n value: String\n },\n data: function data() {\n return {\n restaurants: [],\n inputValue: ''\n };\n },\n methods: {\n handleSelect: function handleSelect(item) {\n this.inputValue = item.value;\n },\n querySearch: function querySearch(queryString, cb) {\n var restaurants = this.restaurants;\n var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; // 调用 callback 返回建议列表的数据\n\n cb(results);\n },\n createFilter: function createFilter(queryString) {\n return function (restaurant) {\n return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;\n };\n },\n loadAll: function loadAll() {\n var _this = this;\n\n var arr = [];\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n }\n };\n this.$http.post('${yhxt}' + this.url, params).then(function (res) {\n res.data.rows.forEach(function (item) {\n arr.push({\n value: item[_this.inputSearchValue],\n id: item.id\n });\n });\n arr = _this.unlink(arr);\n });\n return arr;\n },\n unlink: function unlink(arr) {\n for (var i = 0; i < arr.length - 1; i++) {\n for (var j = i + 1; j < arr.length; j++) {\n if (arr[i].value == arr[j].value) {\n arr.splice(j, 1); //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--\n\n j--;\n }\n }\n }\n\n return arr;\n }\n },\n watch: {\n value: function value(newValue, oldValue) {\n this.inputValue = newValue;\n }\n },\n mounted: function mounted() {\n this.restaurants = this.loadAll();\n }\n};",null]}