zydx-plus 1.33.418 → 1.33.420

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": "zydx-plus",
3
- "version": "1.33.418",
3
+ "version": "1.33.420",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -59,6 +59,16 @@
59
59
  v-model="item.value" :disabled="item.disabled"/>
60
60
  <b>{{ item.tail }}</b>
61
61
  </div>
62
+ <div class="input-name" v-if="item.type === 'query'">
63
+ <div class="number-input">
64
+ <input type="text"
65
+ :placeholder="item.placeholder"
66
+ v-model="item.value" @input="queryDrop($event,item)" />
67
+ </div>
68
+ <div class="drop-down" v-if="dropData.length > 0">
69
+ <p @click="dropTap(item,item3)" v-for="item3 in dropData">{{ item3[item.column] }}</p>
70
+ </div>
71
+ </div>
62
72
  <div class="input-name" v-if="item.type === 'textarea'">
63
73
  <div style="width: 300px;height: 100px; text-align: left;font-size: 16px;">
64
74
  <zydx-textarea
@@ -134,7 +144,8 @@ export default {
134
144
  fileName: '',
135
145
  middles: this.middle,
136
146
  indent: false,
137
- timeo: 0
147
+ timeo: 0,
148
+ dropData: []
138
149
  }
139
150
  },
140
151
  props: {
@@ -226,6 +237,20 @@ export default {
226
237
  clearInterval(timeStop)
227
238
  },
228
239
  methods: {
240
+ dropTap(e,v) {
241
+ e.value = v[e.column]
242
+ this.dropData = []
243
+ },
244
+ queryDrop(e,v) {
245
+ const value = e.target.value
246
+ if(value === '') {
247
+ this.dropData = []
248
+ return
249
+ }
250
+ this.dropData = v.data.filter((x) => {
251
+ return x[v.column].indexOf(value) > -1;
252
+ });
253
+ },
229
254
  getTextareaContent() {
230
255
  return _that.$refs.textarea[0].getContent()
231
256
  },
@@ -262,7 +262,29 @@
262
262
  box-shadow: 0 1px 0 1px rgb(0 0 0 / 4%);
263
263
  overflow: hidden;
264
264
  }
265
-
265
+ .drop-down{
266
+ position: absolute;
267
+ top: 32px;
268
+ left: 0;
269
+ width: 100%;
270
+ border-left: 1px solid #ccc;
271
+ border-right: 1px solid #ccc;
272
+ border-bottom: 1px solid #ccc;
273
+ z-index: 10;
274
+ background-color: #fff;
275
+ padding: 0 10px;
276
+ max-height: 300px;
277
+ overflow: auto;
278
+ }
279
+ .drop-down>p{
280
+ text-align: left;
281
+ padding: 5px 0;
282
+ font-size: 14px;
283
+ cursor: pointer;
284
+ }
285
+ .drop-down>p:hover {
286
+ color: #dc231d;
287
+ }
266
288
  .number-input > input {
267
289
  border: 0 !important;
268
290
  box-shadow: none !important;
@@ -21,7 +21,7 @@ export default {
21
21
  default: () => []
22
22
  },
23
23
  /**
24
- **
24
+ **
25
25
  ** 是否开启手风琴模式
26
26
  */
27
27
  accordian: {
@@ -29,7 +29,7 @@ export default {
29
29
  default: false
30
30
  },
31
31
  /**
32
- **
32
+ **
33
33
  ** 选中时的颜色
34
34
  */
35
35
  active_color: {
@@ -37,7 +37,7 @@ export default {
37
37
  default: 'red'
38
38
  },
39
39
  /**
40
- **
40
+ **
41
41
  ** 下边框样式
42
42
  */
43
43
  border: {
@@ -49,7 +49,7 @@ export default {
49
49
  default: '30px'
50
50
  },
51
51
  /**
52
- **
52
+ **
53
53
  */
54
54
  default_expand_key: {
55
55
  type: Array,
@@ -139,10 +139,13 @@ export default {
139
139
  </div>
140
140
  </template>
141
141
  <template v-if="tree.icon">
142
- <template v-if="['svg', 'image'].includes(tree.icon.type)">
142
+ <template v-if="['svg'].includes(tree.icon.type)">
143
143
  <span class="tree_icon"
144
144
  v-html="tree.icon.value"></span>
145
145
  </template>
146
+ <template v-else-if="['image'].includes(tree.icon.type)">
147
+ <span class="tree_icon"><img :src="tree.icon.value"></span>
148
+ </template>
146
149
  <template v-else>
147
150
  <i :class="`iconfont tree_icon ${tree.icon.value}`"></i>
148
151
  </template>
@@ -241,6 +244,10 @@ export default {
241
244
  align-items: center;
242
245
  justify-content: center;
243
246
  }
247
+ .tree_icon img {
248
+ height: 100%;
249
+ width: 100%;
250
+ }
244
251
 
245
252
  .tree_text {
246
253
  font-size: 16px;
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.418',
86
+ version: '1.33.420',
87
87
  install,
88
88
  Calendar,
89
89
  Message,