gyyg-components 0.2.19 → 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/package.json
CHANGED
|
@@ -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]"
|