doway-coms 2.2.30 → 2.2.32

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": "doway-coms",
3
- "version": "2.2.30",
3
+ "version": "2.2.32",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -275,6 +275,7 @@
275
275
  pullDownChange(col, rowInfo)
276
276
  }
277
277
  "
278
+ :dataSource="col.dataSource"
278
279
  />
279
280
  <BaseTreeSelect
280
281
  v-if="
@@ -1777,7 +1777,7 @@ export default {
1777
1777
  colParams['editStatuss'] = originCol.editStatuss
1778
1778
  }
1779
1779
  // 单元格输入限制
1780
- if (originCol.editStatuss) {
1780
+ if (originCol.cellEdit) {
1781
1781
  colParams['cellEdit'] = originCol.cellEdit
1782
1782
  }
1783
1783
  if (originCol.width) {
@@ -244,6 +244,12 @@ export default {
244
244
  }
245
245
  },
246
246
  props: {
247
+ dataSource: {
248
+ type: Array,
249
+ default: function() {
250
+ return []
251
+ }
252
+ },
247
253
  labelWidth: {
248
254
  type: Number,
249
255
  default: function () {
@@ -422,7 +428,14 @@ export default {
422
428
  currentValue: {
423
429
  // 动态计算currentValue的值
424
430
  get: function () {
425
- return this.value // 将props中的value赋值给currentValue
431
+ // return this.value // 将props中的value赋值给currentValue
432
+ for (let i = 0; i < this.dataSource.length; i++) {
433
+ const element = this.dataSource[i];
434
+ if (this.value === element.value) {
435
+ return element.caption
436
+ }
437
+ }
438
+ return this.value
426
439
  },
427
440
  set: function (val) {
428
441
  this.$emit('input', val) // 通过$emit触发父组件