xianniu-ui 0.3.0 → 0.3.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -48,10 +48,15 @@
48
48
  class="xn-search--row_col"
49
49
  >
50
50
  <el-select
51
+ style="width:100%"
51
52
  v-model="form.value[idx].modelVal"
52
53
  :placeholder="item.placeholder || '请选择' + item.label"
53
54
  :clearable="item.clearable || true"
54
55
  filterable
56
+ :remote="isRemote(item.remote)"
57
+ :reserve-keyword="isRemote(item.remote)"
58
+ :default-first-option="isRemote(item.remote)"
59
+ :remote-method="item.remote"
55
60
  >
56
61
  <el-option
57
62
  v-for="(itemData, idxData) in item.data"
@@ -128,6 +133,11 @@ export default {
128
133
  },
129
134
  },
130
135
  computed: {
136
+ isRemote(){
137
+ return (val)=>{
138
+ return val && typeof val === 'function'
139
+ }
140
+ },
131
141
  _formData() {
132
142
  return this.formData;
133
143
  },
@@ -237,7 +247,7 @@ export default {
237
247
  const row =
238
248
  this.formData && this.formData.find((item) => item.label === key);
239
249
  this.$set(row, "data", data);
240
- },
250
+ }
241
251
  },
242
252
  };
243
253
  </script>