@leevan/jtui 2.0.23 → 2.0.25
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/examples/tableTest/table-ptbg.vue +2 -2
- package/lib/jtui.common.js +64 -60
- package/lib/jtui.umd.js +64 -60
- package/lib/jtui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/jt-form-pc/JtFormPc.vue +3 -3
- package/packages/jt-table/index.vue +10 -7
- package/packages/jt-table-pc/data2.js +1 -1
package/package.json
CHANGED
|
@@ -311,7 +311,7 @@ export default {
|
|
|
311
311
|
loadData(config){
|
|
312
312
|
let _this = this;
|
|
313
313
|
let { path , childPath } = config;
|
|
314
|
-
let param = config.params || {};
|
|
314
|
+
// let param = config.params || {};
|
|
315
315
|
let multiple = config.multiple || false;
|
|
316
316
|
let checkStrictly = config.checkStrictly || false;
|
|
317
317
|
return {
|
|
@@ -321,7 +321,7 @@ export default {
|
|
|
321
321
|
async lazyLoad (node, resolve) {
|
|
322
322
|
const { level ,data:res } = node;
|
|
323
323
|
if(level === 0) {
|
|
324
|
-
const {data} = await _this.$axios.post(path + childPath,
|
|
324
|
+
const {data} = await _this.$axios.post(path + childPath,this.lazyLoadParams);
|
|
325
325
|
resolve(data.map(item => ({
|
|
326
326
|
label:item.name,
|
|
327
327
|
leaf:item.path === '-' || !item.path,
|
|
@@ -335,7 +335,7 @@ export default {
|
|
|
335
335
|
resolve();
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
const {data} = await _this.$axios.post(path + res.path,
|
|
338
|
+
const {data} = await _this.$axios.post(path + res.path,this.lazyLoadParams);
|
|
339
339
|
resolve(data.map(item => ({
|
|
340
340
|
label:item.name,
|
|
341
341
|
leaf:item.path === '-' || !item.path,
|
|
@@ -1050,6 +1050,9 @@ export default {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
},
|
|
1053
|
+
objectTxt(cellValue){
|
|
1054
|
+
return typeof cellValue == 'object' ? JSON.stringify(cellValue) : cellValue
|
|
1055
|
+
},
|
|
1053
1056
|
//枚举转换
|
|
1054
1057
|
formatEnum({ column, cellValue }) {
|
|
1055
1058
|
try {
|
|
@@ -1074,16 +1077,16 @@ export default {
|
|
|
1074
1077
|
></span>`;
|
|
1075
1078
|
}
|
|
1076
1079
|
});
|
|
1077
|
-
return str ? str : cellValue;
|
|
1080
|
+
return str ? str : this.objectTxt(cellValue);
|
|
1078
1081
|
} else {
|
|
1079
1082
|
let item = data.html.find((item) => item.value == cellValue);
|
|
1080
1083
|
return item
|
|
1081
1084
|
? `<span class="jtIcon ${item.icon}" style="color:${item.color};font-size:${item.size}px"></span>`
|
|
1082
|
-
: cellValue;
|
|
1085
|
+
: this.objectTxt(cellValue);
|
|
1083
1086
|
}
|
|
1084
1087
|
} else if (data.htmlType == "a") {
|
|
1085
1088
|
let item = data.html.find((item) => item.value == cellValue);
|
|
1086
|
-
return item ? `<a href="javascript:">${cellValue}</a>` : cellValue;
|
|
1089
|
+
return item ? `<a href="javascript:">${cellValue}</a>` : this.objectTxt(cellValue);
|
|
1087
1090
|
}else if(data.htmlType == 'tag'){
|
|
1088
1091
|
let item = data.html.find((item) => item.value == cellValue);
|
|
1089
1092
|
return item ? `<span style="
|
|
@@ -1098,17 +1101,17 @@ export default {
|
|
|
1098
1101
|
border-radius: 4px;
|
|
1099
1102
|
box-sizing: border-box;
|
|
1100
1103
|
white-space: nowrap;
|
|
1101
|
-
">${item.label}</span>` : cellValue;
|
|
1104
|
+
">${item.label}</span>` : this.objectTxt(cellValue);
|
|
1102
1105
|
}
|
|
1103
1106
|
} else if (data && "enum" in data) {
|
|
1104
1107
|
let item = data.enum.find((item) => item.value == cellValue);
|
|
1105
|
-
return item ? item.label : cellValue;
|
|
1108
|
+
return item ? item.label : this.objectTxt(cellValue);
|
|
1106
1109
|
} else {
|
|
1107
|
-
return cellValue;
|
|
1110
|
+
return this.objectTxt(cellValue);
|
|
1108
1111
|
}
|
|
1109
1112
|
} catch (error) {
|
|
1110
1113
|
console.log(error);
|
|
1111
|
-
return cellValue;
|
|
1114
|
+
return this.objectTxt(cellValue);
|
|
1112
1115
|
}
|
|
1113
1116
|
},
|
|
1114
1117
|
//全局排序自定义排序方法
|