瀏覽代碼

多列填写空格3245

zhouna 5 年之前
父節點
當前提交
f4839e1d4b
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 3 3
      config/index.js
  2. 4 3
      src/common/MultSelect.vue

+ 3 - 3
config/index.js

@@ -5,9 +5,9 @@
 const path = require('path')
 // const proxy_path = 'http://192.168.2.236:80';
 // const proxy_path = 'http://192.168.2.236:5050';
-// const proxy_path = 'http://192.168.2.241:5050';
+const proxy_path = 'http://192.168.2.241:5050';
 // const proxy_path = 'http://223.93.170.82:23650';
-const proxy_path = 'http://223.93.170.82:24182';
+// const proxy_path = 'http://223.93.170.82:24182';
 
 module.exports = {
   dev: {
@@ -23,7 +23,7 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
+    port: 8083, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: true,
     errorOverlay: true,
     notifyOnErrors: true,

+ 4 - 3
src/common/MultSelect.vue

@@ -60,10 +60,11 @@ export default {
       let detailList = this.result;
       let currItem = detailList[index];
       currItem.value = val;
-      if(val){
+      const notNull=val.match(/\S/g);
+      if(notNull){
         this.sure=true;
       }else{
-        if(detailList.findIndex((it)=>it.value)!==-1){
+        if(detailList.findIndex((it)=>(it.value||'').match(/\S/g))!==-1){
           this.sure=true;
         }else{
           this.sure=false;
@@ -112,7 +113,7 @@ export default {
         const msg = getExpStr(text);
         const msgp = getExpStr(textp);
         if(result[i].name.indexOf("${")!==-1){
-          if(result[i].value){
+          if((result[i].value||'').match(/\S/g)){
             tmpResult.push(msg.prefix+(result[i].value||"")+msg.suffix);
             tmpResultp.push(msgp.prefix+(result[i].value||"")+msgp.suffix);
           }