Commit 4107d6c4a57cf48bddc50307d2e22df3f8f2f912

Authored by luffyzhao
1 parent 7468f04d

修改select默认value为0不能选定的Bug

Showing 2 changed files with 2 additions and 3 deletions   Show diff stats
package.json
... ... @@ -74,7 +74,7 @@
74 74 "cross-env": "^5.1.3",
75 75 "css-loader": "^0.28.10",
76 76 "eslint": "^3.19.0",
77   - "eslint-plugin-vue": "^2.1.0",
  77 + "eslint-plugin-vue": "2.1.0",
78 78 "extract-text-webpack-plugin": "^2.1.2",
79 79 "file-loader": "^1.1.11",
80 80 "friendly-errors-webpack-plugin": "^1.6.1",
... ... @@ -109,7 +109,7 @@
109 109 "vue-router": "^3.0.1",
110 110 "vue-style-loader": "^4.0.2",
111 111 "vue-template-compiler": "^2.5.16",
112   - "webpack": "^3.11.0",
  112 + "webpack": "3.11.0",
113 113 "webpack-dev-server": "^2.11.1",
114 114 "webpack-merge": "^3.0.0"
115 115 },
... ...
src/components/select/select.vue
... ... @@ -410,7 +410,6 @@
410 410 getInitialValue(){
411 411 const {multiple, value} = this;
412 412 let initialValue = Array.isArray(value) ? value : [value];
413   - if (!multiple && (typeof initialValue[0] === 'undefined' || (String(initialValue[0]).trim() === '' && !Number.isFinite(initialValue[0])))) initialValue = [];
414 413 return initialValue.filter((item) => {
415 414 return Boolean(item) || item === 0
416 415 });
... ...