gyyg-components 0.2.18 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gyyg-components.common.js +90 -90
- package/lib/gyyg-components.umd.js +90 -90
- package/lib/gyyg-components.umd.min.js +90 -90
- package/package.json +1 -1
- package/src/components/MecCheckbox/MecCheckbox.vue +18 -2
- package/src/components/MecSelect/MecSelect.vue +15 -21
- package/src/components/MecTable/MecTable.vue +1 -2
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
watch: {
|
|
77
77
|
value: {
|
|
78
78
|
handler (val) {
|
|
79
|
-
this.checkbox = [].concat(val)
|
|
79
|
+
this.checkbox = [].concat(val)
|
|
80
80
|
},
|
|
81
81
|
immediate: true
|
|
82
82
|
},
|
|
@@ -85,6 +85,10 @@ export default {
|
|
|
85
85
|
//判断options是否为promise
|
|
86
86
|
if (typeof val !== 'function' && val && !val.then) {
|
|
87
87
|
this.option = this.options;
|
|
88
|
+
let nameList = this.getNameListByIds(this.value, this.option)
|
|
89
|
+
this.inputDisabled = nameList.filter(item => {
|
|
90
|
+
return item.includes(this.checkText)
|
|
91
|
+
}).length == 0
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
deep: true,
|
|
@@ -93,7 +97,9 @@ export default {
|
|
|
93
97
|
otherValue: {
|
|
94
98
|
handler(val) {
|
|
95
99
|
this.inputValue = val;
|
|
96
|
-
|
|
100
|
+
console.log(val, 'otherValue')
|
|
101
|
+
},
|
|
102
|
+
immediate: true
|
|
97
103
|
}
|
|
98
104
|
},
|
|
99
105
|
mounted() {
|
|
@@ -101,17 +107,26 @@ export default {
|
|
|
101
107
|
if(this.options instanceof Promise) {
|
|
102
108
|
this.options.then(val => {
|
|
103
109
|
this.option = val.data || val;
|
|
110
|
+
let nameList = this.getNameListByIds(this.value, this.option)
|
|
111
|
+
this.inputDisabled = nameList.filter(item => {
|
|
112
|
+
return item.includes(this.checkText)
|
|
113
|
+
}).length == 0
|
|
104
114
|
});
|
|
105
115
|
}
|
|
106
116
|
if(typeof this.options == 'function') {
|
|
107
117
|
this.options().then(val => {
|
|
108
118
|
this.option = val.data || val;
|
|
119
|
+
let nameList = this.getNameListByIds(this.value, this.option)
|
|
120
|
+
this.inputDisabled = nameList.filter(item => {
|
|
121
|
+
return item.includes(this.checkText)
|
|
122
|
+
}).length == 0
|
|
109
123
|
});
|
|
110
124
|
}
|
|
111
125
|
|
|
112
126
|
} else {
|
|
113
127
|
this.option = this.options;
|
|
114
128
|
}
|
|
129
|
+
|
|
115
130
|
},
|
|
116
131
|
computed: {
|
|
117
132
|
checkboxAll () {
|
|
@@ -135,6 +150,7 @@ export default {
|
|
|
135
150
|
this.inputDisabled = nameList.filter(item => {
|
|
136
151
|
return item.includes(this.checkText)
|
|
137
152
|
}).length == 0
|
|
153
|
+
console.log(this.inputDisabled, 'this.inputDisabledthis.inputDisabledthis.inputDisabled')
|
|
138
154
|
},
|
|
139
155
|
// 根据 id 数组获取对应的 name 列表
|
|
140
156
|
getNameListByIds(ids, array) {
|
|
@@ -77,10 +77,21 @@ export default {
|
|
|
77
77
|
},
|
|
78
78
|
options: {
|
|
79
79
|
handler: function (val) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
if (!Array.isArray(this.options) && this.options) {
|
|
81
|
+
if(this.options instanceof Promise) {
|
|
82
|
+
this.options.then(val => {
|
|
83
|
+
this.option = val.data || val;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if(typeof this.options == 'function') {
|
|
87
|
+
this.options().then(val => {
|
|
88
|
+
this.option = val.data || val;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
} else {
|
|
93
|
+
this.option = this.options;
|
|
94
|
+
}
|
|
84
95
|
},
|
|
85
96
|
deep: true,
|
|
86
97
|
immediate: true,
|
|
@@ -98,23 +109,6 @@ export default {
|
|
|
98
109
|
this.$emit('clear')
|
|
99
110
|
}
|
|
100
111
|
},
|
|
101
|
-
mounted() {
|
|
102
|
-
if (!Array.isArray(this.options) && this.options) {
|
|
103
|
-
if(this.options instanceof Promise) {
|
|
104
|
-
this.options.then(val => {
|
|
105
|
-
this.option = val.data || val;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
if(typeof this.options == 'function') {
|
|
109
|
-
this.options().then(val => {
|
|
110
|
-
this.option = val.data || val;
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
} else {
|
|
115
|
-
this.option = this.options;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
112
|
};
|
|
119
113
|
</script>
|
|
120
114
|
|
|
@@ -86,9 +86,8 @@
|
|
|
86
86
|
|
|
87
87
|
</el-table>
|
|
88
88
|
<!-- 分页 -->
|
|
89
|
-
<div class="pagination-layout">
|
|
89
|
+
<div class="pagination-layout" v-if="page">
|
|
90
90
|
<el-pagination
|
|
91
|
-
v-if="page"
|
|
92
91
|
@size-change="handleSizeChange"
|
|
93
92
|
@current-change="handleCurrentChange"
|
|
94
93
|
:page-sizes="[10, 20, 30, 50]"
|