eoss-ui 0.7.88 → 0.7.90
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/data-table.js +22 -18
- package/lib/eoss-ui.common.js +36 -27
- package/lib/index.js +1 -1
- package/lib/select.js +13 -8
- package/package.json +1 -1
- package/packages/data-table/src/column.vue +16 -12
- package/packages/data-table/src/main.vue +1840 -1840
- package/packages/select/src/main.vue +13 -8
- package/src/index.js +1 -1
package/lib/select.js
CHANGED
|
@@ -4716,7 +4716,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
4716
4716
|
},
|
|
4717
4717
|
symbol: {
|
|
4718
4718
|
type: String,
|
|
4719
|
-
default: '
|
|
4719
|
+
default: ','
|
|
4720
4720
|
},
|
|
4721
4721
|
plain: Boolean,
|
|
4722
4722
|
where: Object,
|
|
@@ -5185,8 +5185,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
5185
5185
|
if (!this.hide) {
|
|
5186
5186
|
if (this.readonly) {
|
|
5187
5187
|
var dom = [];
|
|
5188
|
-
|
|
5189
|
-
|
|
5188
|
+
var models = this.models ? JSON.parse(JSON.stringify(this.models)) : '';
|
|
5189
|
+
if (typeof models === 'string' && models.includes(',')) {
|
|
5190
|
+
models = models.split(',');
|
|
5191
|
+
}
|
|
5192
|
+
if (Array.isArray(models)) {
|
|
5193
|
+
dom = models.map(function (item) {
|
|
5190
5194
|
if (util["a" /* default */].isObject(item)) {
|
|
5191
5195
|
if (!item[_this8.label] && !item.label) {
|
|
5192
5196
|
return _this8.getLabel(value[_this8.valKey], data);
|
|
@@ -5195,15 +5199,16 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
5195
5199
|
}
|
|
5196
5200
|
return _this8.getLabel(item, _this8.results);
|
|
5197
5201
|
});
|
|
5198
|
-
} else if (util["a" /* default */].isObject(
|
|
5199
|
-
if (!
|
|
5200
|
-
dom = [this.getLabel(
|
|
5202
|
+
} else if (util["a" /* default */].isObject(models)) {
|
|
5203
|
+
if (!models[this.label] && !models.label) {
|
|
5204
|
+
dom = [this.getLabel(models[this.valKey], this.results)];
|
|
5201
5205
|
} else {
|
|
5202
|
-
dom = [
|
|
5206
|
+
dom = [models[this.label] || models.label];
|
|
5203
5207
|
}
|
|
5204
5208
|
} else {
|
|
5205
|
-
dom = [this.getLabel(
|
|
5209
|
+
dom = [this.getLabel(models, this.results)];
|
|
5206
5210
|
}
|
|
5211
|
+
console.log('dom', dom);
|
|
5207
5212
|
return h('div', {
|
|
5208
5213
|
class: [{
|
|
5209
5214
|
'es-plain': this.plain,
|
package/package.json
CHANGED
|
@@ -816,14 +816,18 @@ export default {
|
|
|
816
816
|
const field = this.field || this.prop;
|
|
817
817
|
let data = this.option;
|
|
818
818
|
let str = '';
|
|
819
|
-
|
|
819
|
+
let column = rows[field] ? JSON.parse(JSON.stringify(rows[field])) : '';
|
|
820
|
+
if (typeof column == 'string' && column.includes(',')) {
|
|
821
|
+
column = column.split(',');
|
|
822
|
+
}
|
|
823
|
+
if (util.isObject(column)) {
|
|
820
824
|
str =
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
} else if (Array.isArray(
|
|
826
|
-
const vals =
|
|
825
|
+
column[this.labelKey] ||
|
|
826
|
+
column['name'] ||
|
|
827
|
+
column['label'] ||
|
|
828
|
+
column['shortName'];
|
|
829
|
+
} else if (Array.isArray(column)) {
|
|
830
|
+
const vals = column.map((item) => {
|
|
827
831
|
if (util.isObject(item)) {
|
|
828
832
|
return (
|
|
829
833
|
item[this.labelKey] ||
|
|
@@ -838,21 +842,21 @@ export default {
|
|
|
838
842
|
return item;
|
|
839
843
|
}
|
|
840
844
|
});
|
|
841
|
-
str = vals.join(this.symbol ? this.symbol : '
|
|
845
|
+
str = vals.join(this.symbol ? this.symbol : ',');
|
|
842
846
|
} else {
|
|
843
847
|
if (this.valueToString) {
|
|
844
|
-
const vals =
|
|
848
|
+
const vals = column.split(',').map((item) => {
|
|
845
849
|
if (data && data.length && util.isObject(data[0])) {
|
|
846
850
|
return this.getLabel(data, item);
|
|
847
851
|
}
|
|
848
852
|
return item;
|
|
849
853
|
});
|
|
850
|
-
str = vals.join(this.symbol ? this.symbol : '
|
|
854
|
+
str = vals.join(this.symbol ? this.symbol : ',');
|
|
851
855
|
} else {
|
|
852
856
|
if (data && data.length && util.isObject(data[0])) {
|
|
853
|
-
str = this.getLabel(data,
|
|
857
|
+
str = this.getLabel(data, column);
|
|
854
858
|
} else {
|
|
855
|
-
str =
|
|
859
|
+
str = column;
|
|
856
860
|
}
|
|
857
861
|
}
|
|
858
862
|
}
|