vxe-table 3.5.0-beta.0 → 3.5.0-beta.3
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/helper/vetur/attributes.json +30 -10
- package/helper/vetur/tags.json +7 -2
- package/lib/form/src/form-item.js +2 -2
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +32 -53
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +14 -11
- package/lib/form/src/render.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +410 -441
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +16 -5
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +1 -1
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +2 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +3 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +3 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +184 -188
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +42 -73
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +14 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/utils.js +0 -13
- package/lib/tools/utils.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +51 -28
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +1 -1
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +13 -8
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/package.json +1 -1
- package/packages/form/src/form-item.js +2 -2
- package/packages/form/src/form.js +12 -25
- package/packages/form/src/render.js +7 -7
- package/packages/select/src/select.js +14 -5
- package/packages/table/src/body.js +3 -3
- package/packages/table/src/cell.js +3 -3
- package/packages/table/src/column.js +3 -1
- package/packages/table/src/columnInfo.js +1 -0
- package/packages/table/src/methods.js +34 -50
- package/packages/table/src/table.js +34 -67
- package/packages/table/src/util.js +11 -0
- package/packages/tools/utils.js +0 -11
- package/packages/tooltip/src/tooltip.js +44 -25
- package/packages/v-x-e-table/src/conf.js +13 -8
- package/styles/select.scss +1 -1
- package/styles/tooltip.scss +1 -1
- package/types/table.d.ts +6 -6
package/lib/index.umd.js
CHANGED
|
@@ -8430,7 +8430,7 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8430
8430
|
// name: ''
|
|
8431
8431
|
// },
|
|
8432
8432
|
// rowConfig: {
|
|
8433
|
-
// keyField: '
|
|
8433
|
+
// keyField: '_X_ROW_KEY' // 行数据的唯一主键字段名
|
|
8434
8434
|
// },
|
|
8435
8435
|
radioConfig: {
|
|
8436
8436
|
// trigger: 'default'
|
|
@@ -8440,10 +8440,9 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8440
8440
|
// trigger: 'default',
|
|
8441
8441
|
strict: true
|
|
8442
8442
|
},
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
// },
|
|
8443
|
+
tooltipConfig: {
|
|
8444
|
+
enterable: true
|
|
8445
|
+
},
|
|
8447
8446
|
validConfig: {
|
|
8448
8447
|
showMessage: true,
|
|
8449
8448
|
message: 'default'
|
|
@@ -8472,7 +8471,7 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8472
8471
|
parentField: 'parentId',
|
|
8473
8472
|
children: 'children',
|
|
8474
8473
|
hasChild: 'hasChild',
|
|
8475
|
-
mapChildren: '
|
|
8474
|
+
mapChildren: '_X_ROW_CHILD',
|
|
8476
8475
|
indent: 20,
|
|
8477
8476
|
showIcon: true
|
|
8478
8477
|
},
|
|
@@ -8639,12 +8638,15 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8639
8638
|
},
|
|
8640
8639
|
form: {
|
|
8641
8640
|
// preventSubmit: false,
|
|
8641
|
+
// size: null,
|
|
8642
|
+
// colon: false,
|
|
8642
8643
|
validConfig: {
|
|
8643
8644
|
showMessage: true,
|
|
8644
8645
|
autoPos: true
|
|
8645
8646
|
},
|
|
8646
|
-
|
|
8647
|
-
|
|
8647
|
+
tooltipConfig: {
|
|
8648
|
+
enterable: true
|
|
8649
|
+
},
|
|
8648
8650
|
titleAsterisk: true
|
|
8649
8651
|
},
|
|
8650
8652
|
input: {
|
|
@@ -8669,6 +8671,9 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8669
8671
|
select: {
|
|
8670
8672
|
// size: null,
|
|
8671
8673
|
// transfer: false,
|
|
8674
|
+
// optionConfig: {
|
|
8675
|
+
// keyField: '_X_OPTION_KEY'
|
|
8676
|
+
// },
|
|
8672
8677
|
multiCharOverflow: 8
|
|
8673
8678
|
},
|
|
8674
8679
|
toolbar: {// size: null,
|
|
@@ -8751,7 +8756,7 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
8751
8756
|
|
|
8752
8757
|
|
|
8753
8758
|
function getLog(message, params) {
|
|
8754
|
-
return "[vxe-table v".concat("3.5.0-beta.
|
|
8759
|
+
return "[vxe-table v".concat("3.5.0-beta.3", "] ").concat(conf.i18n(message, params));
|
|
8755
8760
|
}
|
|
8756
8761
|
|
|
8757
8762
|
function outLog(type) {
|
|
@@ -8957,10 +8962,6 @@ function eqEmptyValue(cellValue) {
|
|
|
8957
8962
|
}
|
|
8958
8963
|
function getFuncText(content) {
|
|
8959
8964
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(content) ? content() : conf.translate ? conf.translate(content) : content;
|
|
8960
|
-
} // 行主键 key
|
|
8961
|
-
|
|
8962
|
-
function getRowkey($xetable) {
|
|
8963
|
-
return $xetable.rowOpts.keyField || $xetable.rowId || '_X_ID';
|
|
8964
8965
|
} // 获取所有的列,排除分组
|
|
8965
8966
|
|
|
8966
8967
|
function getColumnList(columns) {
|
|
@@ -8978,12 +8979,6 @@ var UtilTools = {
|
|
|
8978
8979
|
getLastZIndex: function getLastZIndex() {
|
|
8979
8980
|
return lastZindex;
|
|
8980
8981
|
},
|
|
8981
|
-
getRowkey: getRowkey,
|
|
8982
|
-
// 行主键 value
|
|
8983
|
-
getRowid: function getRowid($xetable, row) {
|
|
8984
|
-
var rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, getRowkey($xetable));
|
|
8985
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(rowid) ? '' : encodeURIComponent(rowid);
|
|
8986
|
-
},
|
|
8987
8982
|
getColumnList: getColumnList,
|
|
8988
8983
|
getClass: function getClass(property, params) {
|
|
8989
8984
|
return property ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(property) ? property(params) : property : '';
|
|
@@ -10030,7 +10025,7 @@ function _t(key, args) {
|
|
|
10030
10025
|
var v = 'v3';
|
|
10031
10026
|
var VXETable = {
|
|
10032
10027
|
v: v,
|
|
10033
|
-
version: "3.5.0-beta.
|
|
10028
|
+
version: "3.5.0-beta.3",
|
|
10034
10029
|
reg: reg,
|
|
10035
10030
|
use: use,
|
|
10036
10031
|
setup: setup,
|
|
@@ -10056,15 +10051,70 @@ var Icon = {
|
|
|
10056
10051
|
install: function install() {}
|
|
10057
10052
|
};
|
|
10058
10053
|
/* harmony default export */ var packages_icon = (Icon);
|
|
10054
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
10055
|
+
var es_object_keys = __webpack_require__("b64b");
|
|
10056
|
+
|
|
10057
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
10058
|
+
var es_array_filter = __webpack_require__("4de4");
|
|
10059
|
+
|
|
10060
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
|
10061
|
+
var es_object_get_own_property_descriptor = __webpack_require__("e439");
|
|
10062
|
+
|
|
10063
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
|
10064
|
+
var es_object_get_own_property_descriptors = __webpack_require__("dbb4");
|
|
10065
|
+
|
|
10066
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
10067
|
+
|
|
10068
|
+
|
|
10069
|
+
|
|
10070
|
+
|
|
10071
|
+
|
|
10072
|
+
|
|
10073
|
+
|
|
10074
|
+
|
|
10075
|
+
function ownKeys(object, enumerableOnly) {
|
|
10076
|
+
var keys = Object.keys(object);
|
|
10077
|
+
|
|
10078
|
+
if (Object.getOwnPropertySymbols) {
|
|
10079
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
10080
|
+
|
|
10081
|
+
if (enumerableOnly) {
|
|
10082
|
+
symbols = symbols.filter(function (sym) {
|
|
10083
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
10084
|
+
});
|
|
10085
|
+
}
|
|
10086
|
+
|
|
10087
|
+
keys.push.apply(keys, symbols);
|
|
10088
|
+
}
|
|
10089
|
+
|
|
10090
|
+
return keys;
|
|
10091
|
+
}
|
|
10092
|
+
|
|
10093
|
+
function _objectSpread2(target) {
|
|
10094
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
10095
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
10096
|
+
|
|
10097
|
+
if (i % 2) {
|
|
10098
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
10099
|
+
_defineProperty(target, key, source[key]);
|
|
10100
|
+
});
|
|
10101
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
10102
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
10103
|
+
} else {
|
|
10104
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
10105
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
10106
|
+
});
|
|
10107
|
+
}
|
|
10108
|
+
}
|
|
10109
|
+
|
|
10110
|
+
return target;
|
|
10111
|
+
}
|
|
10059
10112
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
|
|
10060
10113
|
var es_number_constructor = __webpack_require__("a9e3");
|
|
10061
10114
|
|
|
10062
10115
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.js
|
|
10063
10116
|
var es_map = __webpack_require__("4ec9");
|
|
10064
10117
|
|
|
10065
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
10066
|
-
var es_array_filter = __webpack_require__("4de4");
|
|
10067
|
-
|
|
10068
10118
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
|
|
10069
10119
|
var es_array_includes = __webpack_require__("caad");
|
|
10070
10120
|
|
|
@@ -10143,6 +10193,7 @@ var columnInfo_ColumnInfo = /*#__PURE__*/function () {
|
|
|
10143
10193
|
exportMethod: _vm.exportMethod,
|
|
10144
10194
|
footerExportMethod: _vm.footerExportMethod,
|
|
10145
10195
|
titleHelp: _vm.titleHelp,
|
|
10196
|
+
titlePrefix: _vm.titlePrefix,
|
|
10146
10197
|
// 自定义参数
|
|
10147
10198
|
params: _vm.params,
|
|
10148
10199
|
// 渲染属性
|
|
@@ -10233,7 +10284,7 @@ var es_promise = __webpack_require__("e6cf");
|
|
|
10233
10284
|
|
|
10234
10285
|
|
|
10235
10286
|
|
|
10236
|
-
var
|
|
10287
|
+
var getRowid = utils.getRowid;
|
|
10237
10288
|
var browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.browse();
|
|
10238
10289
|
var reClsMap = {};
|
|
10239
10290
|
|
|
@@ -10348,7 +10399,7 @@ var DomTools = {
|
|
|
10348
10399
|
var bodyElem = tableBody ? tableBody.$el : null;
|
|
10349
10400
|
|
|
10350
10401
|
if (bodyElem) {
|
|
10351
|
-
var trElem = bodyElem.querySelector("[rowid=\"".concat(
|
|
10402
|
+
var trElem = bodyElem.querySelector("[rowid=\"".concat(getRowid($xetable, row), "\"]"));
|
|
10352
10403
|
|
|
10353
10404
|
if (trElem) {
|
|
10354
10405
|
var bodyHeight = bodyElem.clientHeight;
|
|
@@ -10551,6 +10602,15 @@ function restoreScrollListener(scrollElem) {
|
|
|
10551
10602
|
if (scrollElem && scrollElem._onscroll) {
|
|
10552
10603
|
scrollElem.onscroll = scrollElem._onscroll;
|
|
10553
10604
|
}
|
|
10605
|
+
} // 行主键 key
|
|
10606
|
+
|
|
10607
|
+
function getRowkey($xetable) {
|
|
10608
|
+
return $xetable.rowOpts.keyField || $xetable.rowId || '_X_ROW_KEY';
|
|
10609
|
+
} // 行主键 value
|
|
10610
|
+
|
|
10611
|
+
function util_getRowid($xetable, row) {
|
|
10612
|
+
var rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, getRowkey($xetable));
|
|
10613
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(rowid) ? '' : encodeURIComponent(rowid);
|
|
10554
10614
|
}
|
|
10555
10615
|
|
|
10556
10616
|
function getPaddingLeftRightSize(elem) {
|
|
@@ -10802,7 +10862,7 @@ function renderLine(h, _vm, $xetable, params) {
|
|
|
10802
10862
|
fullAllDataRowIdData = $xetable.fullAllDataRowIdData;
|
|
10803
10863
|
var slots = column.slots,
|
|
10804
10864
|
treeNode = column.treeNode;
|
|
10805
|
-
var rowid =
|
|
10865
|
+
var rowid = util_getRowid($xetable, row);
|
|
10806
10866
|
var rest = fullAllDataRowIdData[rowid];
|
|
10807
10867
|
var rLevel = 0;
|
|
10808
10868
|
var rIndex = 0;
|
|
@@ -11150,7 +11210,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
11150
11210
|
};
|
|
11151
11211
|
}
|
|
11152
11212
|
|
|
11153
|
-
var rowid =
|
|
11213
|
+
var rowid = util_getRowid($xetable, row);
|
|
11154
11214
|
var rest = fullAllDataRowIdData[rowid];
|
|
11155
11215
|
var rowLevel = rest ? rest.level : 0;
|
|
11156
11216
|
var seq = rest ? rest.seq : -1;
|
|
@@ -11907,61 +11967,6 @@ if (browse.isDoc) {
|
|
|
11907
11967
|
trailing: false
|
|
11908
11968
|
}), false);
|
|
11909
11969
|
}
|
|
11910
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
11911
|
-
var es_object_keys = __webpack_require__("b64b");
|
|
11912
|
-
|
|
11913
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
|
11914
|
-
var es_object_get_own_property_descriptor = __webpack_require__("e439");
|
|
11915
|
-
|
|
11916
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
|
11917
|
-
var es_object_get_own_property_descriptors = __webpack_require__("dbb4");
|
|
11918
|
-
|
|
11919
|
-
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
function ownKeys(object, enumerableOnly) {
|
|
11929
|
-
var keys = Object.keys(object);
|
|
11930
|
-
|
|
11931
|
-
if (Object.getOwnPropertySymbols) {
|
|
11932
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
11933
|
-
|
|
11934
|
-
if (enumerableOnly) {
|
|
11935
|
-
symbols = symbols.filter(function (sym) {
|
|
11936
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11937
|
-
});
|
|
11938
|
-
}
|
|
11939
|
-
|
|
11940
|
-
keys.push.apply(keys, symbols);
|
|
11941
|
-
}
|
|
11942
|
-
|
|
11943
|
-
return keys;
|
|
11944
|
-
}
|
|
11945
|
-
|
|
11946
|
-
function _objectSpread2(target) {
|
|
11947
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
11948
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
11949
|
-
|
|
11950
|
-
if (i % 2) {
|
|
11951
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
11952
|
-
_defineProperty(target, key, source[key]);
|
|
11953
|
-
});
|
|
11954
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
11955
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
11956
|
-
} else {
|
|
11957
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
11958
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
11959
|
-
});
|
|
11960
|
-
}
|
|
11961
|
-
}
|
|
11962
|
-
|
|
11963
|
-
return target;
|
|
11964
|
-
}
|
|
11965
11970
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
|
|
11966
11971
|
var es_string_trim = __webpack_require__("498a");
|
|
11967
11972
|
|
|
@@ -11983,9 +11988,9 @@ var es_array_sort = __webpack_require__("4e82");
|
|
|
11983
11988
|
function renderHelpIcon(h, params) {
|
|
11984
11989
|
var $table = params.$table,
|
|
11985
11990
|
column = params.column;
|
|
11986
|
-
var
|
|
11987
|
-
return
|
|
11988
|
-
class: ['vxe-cell-help-icon',
|
|
11991
|
+
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
11992
|
+
return titlePrefix ? [h('i', {
|
|
11993
|
+
class: ['vxe-cell-help-icon', titlePrefix.icon || conf.icon.TABLE_HELP],
|
|
11989
11994
|
on: {
|
|
11990
11995
|
mouseenter: function mouseenter(evnt) {
|
|
11991
11996
|
$table.triggerHeaderHelpEvent(evnt, params);
|
|
@@ -12927,9 +12932,7 @@ var Cell = {
|
|
|
12927
12932
|
|
|
12928
12933
|
|
|
12929
12934
|
|
|
12930
|
-
var
|
|
12931
|
-
methods_getRowkey = utils.getRowkey,
|
|
12932
|
-
methods_setCellValue = utils.setCellValue,
|
|
12935
|
+
var methods_setCellValue = utils.setCellValue,
|
|
12933
12936
|
hasChildrenList = utils.hasChildrenList,
|
|
12934
12937
|
methods_getColumnList = utils.getColumnList;
|
|
12935
12938
|
var methods_calcHeight = dom.calcHeight,
|
|
@@ -13364,7 +13367,7 @@ var Methods = {
|
|
|
13364
13367
|
|
|
13365
13368
|
var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
|
|
13366
13369
|
tableData.forEach(function (row, $index) {
|
|
13367
|
-
var rowid =
|
|
13370
|
+
var rowid = util_getRowid(_this3, row);
|
|
13368
13371
|
var rest = fullDataRowIdData[rowid];
|
|
13369
13372
|
|
|
13370
13373
|
if (rest) {
|
|
@@ -13641,11 +13644,11 @@ var Methods = {
|
|
|
13641
13644
|
tableFullTreeData = this.tableFullTreeData;
|
|
13642
13645
|
var fullDataRowIdData = this.fullDataRowIdData,
|
|
13643
13646
|
fullAllDataRowIdData = this.fullAllDataRowIdData;
|
|
13644
|
-
var rowkey =
|
|
13647
|
+
var rowkey = getRowkey(this);
|
|
13645
13648
|
var isLazy = treeConfig && treeOpts.lazy;
|
|
13646
13649
|
|
|
13647
13650
|
var handleCache = function handleCache(row, index, items, path, parent, nodes) {
|
|
13648
|
-
var rowid =
|
|
13651
|
+
var rowid = util_getRowid(_this10, row);
|
|
13649
13652
|
var seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
13650
13653
|
var level = nodes ? nodes.length - 1 : 0;
|
|
13651
13654
|
|
|
@@ -13706,13 +13709,13 @@ var Methods = {
|
|
|
13706
13709
|
var transform = treeOpts.transform,
|
|
13707
13710
|
children = treeOpts.children,
|
|
13708
13711
|
mapChildren = treeOpts.mapChildren;
|
|
13709
|
-
var rest = fullAllDataRowIdData[
|
|
13712
|
+
var rest = fullAllDataRowIdData[util_getRowid(this, row)];
|
|
13710
13713
|
var parentLevel = rest ? rest.level : 0;
|
|
13711
13714
|
return this.createData(childRecords).then(function (rows) {
|
|
13712
13715
|
if (keepSource) {
|
|
13713
|
-
var rowid =
|
|
13716
|
+
var rowid = util_getRowid(_this11, row);
|
|
13714
13717
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
|
|
13715
|
-
return rowid ===
|
|
13718
|
+
return rowid === util_getRowid(_this11, item);
|
|
13716
13719
|
}, treeOpts);
|
|
13717
13720
|
|
|
13718
13721
|
if (matchObj) {
|
|
@@ -13721,7 +13724,7 @@ var Methods = {
|
|
|
13721
13724
|
}
|
|
13722
13725
|
|
|
13723
13726
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
|
|
13724
|
-
var rowid =
|
|
13727
|
+
var rowid = util_getRowid(_this11, childRow);
|
|
13725
13728
|
var rest = {
|
|
13726
13729
|
row: childRow,
|
|
13727
13730
|
rowid: rowid,
|
|
@@ -13900,7 +13903,7 @@ var Methods = {
|
|
|
13900
13903
|
var fullDataRowIdData = this.fullDataRowIdData;
|
|
13901
13904
|
|
|
13902
13905
|
if (row) {
|
|
13903
|
-
var rowid =
|
|
13906
|
+
var rowid = util_getRowid(this, row);
|
|
13904
13907
|
var rest = fullDataRowIdData[rowid];
|
|
13905
13908
|
|
|
13906
13909
|
if (rest) {
|
|
@@ -14001,7 +14004,7 @@ var Methods = {
|
|
|
14001
14004
|
treeConfig = this.treeConfig,
|
|
14002
14005
|
treeOpts = this.treeOpts,
|
|
14003
14006
|
expandOpts = this.expandOpts;
|
|
14004
|
-
var rowkey =
|
|
14007
|
+
var rowkey = getRowkey(this);
|
|
14005
14008
|
this.tableFullColumn.forEach(function (column) {
|
|
14006
14009
|
var property = column.property,
|
|
14007
14010
|
editRender = column.editRender;
|
|
@@ -14213,7 +14216,7 @@ var Methods = {
|
|
|
14213
14216
|
|
|
14214
14217
|
if (keepSource) {
|
|
14215
14218
|
var oRow, property;
|
|
14216
|
-
var rowid =
|
|
14219
|
+
var rowid = util_getRowid(this, row); // 新增的数据不需要检测
|
|
14217
14220
|
|
|
14218
14221
|
if (!fullDataRowIdData[rowid]) {
|
|
14219
14222
|
return false;
|
|
@@ -14222,7 +14225,7 @@ var Methods = {
|
|
|
14222
14225
|
if (treeConfig) {
|
|
14223
14226
|
var children = treeOpts.children;
|
|
14224
14227
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
|
|
14225
|
-
return rowid ===
|
|
14228
|
+
return rowid === util_getRowid(_this16, item);
|
|
14226
14229
|
}, treeOpts);
|
|
14227
14230
|
row = Object.assign({}, row, _defineProperty({}, children, null));
|
|
14228
14231
|
|
|
@@ -14612,7 +14615,7 @@ var Methods = {
|
|
|
14612
14615
|
|
|
14613
14616
|
if (treeConfig) {
|
|
14614
14617
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path) {
|
|
14615
|
-
var rowid =
|
|
14618
|
+
var rowid = util_getRowid(_this18, row);
|
|
14616
14619
|
var allrest = fullAllDataRowIdData[rowid];
|
|
14617
14620
|
var seq = path.map(function (num, i) {
|
|
14618
14621
|
return i % 2 === 0 ? Number(num) + 1 : '.';
|
|
@@ -14641,7 +14644,7 @@ var Methods = {
|
|
|
14641
14644
|
});
|
|
14642
14645
|
} else {
|
|
14643
14646
|
afterFullData.forEach(function (row, index) {
|
|
14644
|
-
var rowid =
|
|
14647
|
+
var rowid = util_getRowid(_this18, row);
|
|
14645
14648
|
var allrest = fullAllDataRowIdData[rowid];
|
|
14646
14649
|
var seq = index + 1;
|
|
14647
14650
|
|
|
@@ -14680,7 +14683,7 @@ var Methods = {
|
|
|
14680
14683
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(rowOrRowid)) {
|
|
14681
14684
|
rowid = rowOrRowid;
|
|
14682
14685
|
} else {
|
|
14683
|
-
rowid =
|
|
14686
|
+
rowid = util_getRowid(this, rowOrRowid);
|
|
14684
14687
|
}
|
|
14685
14688
|
|
|
14686
14689
|
if (rowid) {
|
|
@@ -15561,14 +15564,7 @@ var Methods = {
|
|
|
15561
15564
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
15562
15565
|
tableColumn = fixedColumn;
|
|
15563
15566
|
} else {
|
|
15564
|
-
tableColumn = visibleColumn;
|
|
15565
|
-
// if (mergeList.length && !isMergeLeftFixedExceeded && fixedType === 'left') {
|
|
15566
|
-
// tableColumn = fixedColumn
|
|
15567
|
-
// } else if (mergeList.length && !isMergeRightFixedExceeded && fixedType === 'right') {
|
|
15568
|
-
// tableColumn = fixedColumn
|
|
15569
|
-
// } else {
|
|
15570
|
-
// tableColumn = visibleColumn
|
|
15571
|
-
// }
|
|
15567
|
+
tableColumn = visibleColumn;
|
|
15572
15568
|
}
|
|
15573
15569
|
} else {
|
|
15574
15570
|
tableColumn = visibleColumn;
|
|
@@ -15596,14 +15592,7 @@ var Methods = {
|
|
|
15596
15592
|
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
15597
15593
|
tableColumn = fixedColumn;
|
|
15598
15594
|
} else {
|
|
15599
|
-
tableColumn = visibleColumn;
|
|
15600
|
-
// if (mergeFooterList.length && !isMergeFooterLeftFixedExceeded && fixedType === 'left') {
|
|
15601
|
-
// tableColumn = fixedColumn
|
|
15602
|
-
// } else if (mergeFooterList.length && !isMergeFooterRightFixedExceeded && fixedType === 'right') {
|
|
15603
|
-
// tableColumn = fixedColumn
|
|
15604
|
-
// } else {
|
|
15605
|
-
// tableColumn = visibleColumn
|
|
15606
|
-
// }
|
|
15595
|
+
tableColumn = visibleColumn;
|
|
15607
15596
|
}
|
|
15608
15597
|
} else {
|
|
15609
15598
|
tableColumn = visibleColumn;
|
|
@@ -15897,6 +15886,8 @@ var Methods = {
|
|
|
15897
15886
|
|
|
15898
15887
|
if (isEsc) {
|
|
15899
15888
|
this.preventEvent(evnt, 'event.keydown', null, function () {
|
|
15889
|
+
_this27.emitEvent('keydown-start', {}, evnt);
|
|
15890
|
+
|
|
15900
15891
|
if (keyboardConfig && mouseConfig && mouseOpts.area && _this27.handleKeyboardEvent) {
|
|
15901
15892
|
_this27.handleKeyboardEvent(evnt);
|
|
15902
15893
|
} else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
@@ -15924,6 +15915,8 @@ var Methods = {
|
|
|
15924
15915
|
}
|
|
15925
15916
|
|
|
15926
15917
|
_this27.emitEvent('keydown', {}, evnt);
|
|
15918
|
+
|
|
15919
|
+
_this27.emitEvent('keydown-end', {}, evnt);
|
|
15927
15920
|
});
|
|
15928
15921
|
}
|
|
15929
15922
|
},
|
|
@@ -16246,21 +16239,9 @@ var Methods = {
|
|
|
16246
16239
|
this.updateCellAreas();
|
|
16247
16240
|
this.recalculate(true);
|
|
16248
16241
|
},
|
|
16249
|
-
handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
|
|
16250
|
-
var _this29 = this;
|
|
16251
|
-
|
|
16252
|
-
var tooltipOpts = this.tooltipOpts;
|
|
16253
|
-
setTimeout(function () {
|
|
16254
|
-
if (!_this29.tooltipActive) {
|
|
16255
|
-
_this29.closeTooltip();
|
|
16256
|
-
}
|
|
16257
|
-
}, tooltipOpts.leaveDelay);
|
|
16258
|
-
return false;
|
|
16259
|
-
},
|
|
16260
16242
|
handleTargetEnterEvent: function handleTargetEnterEvent(isClear) {
|
|
16261
16243
|
var $tooltip = this.$refs.tooltip;
|
|
16262
16244
|
clearTimeout(this.tooltipTimeout);
|
|
16263
|
-
this.tooltipActive = true;
|
|
16264
16245
|
|
|
16265
16246
|
if (isClear) {
|
|
16266
16247
|
this.closeTooltip();
|
|
@@ -16271,11 +16252,10 @@ var Methods = {
|
|
|
16271
16252
|
}
|
|
16272
16253
|
},
|
|
16273
16254
|
handleTargetLeaveEvent: function handleTargetLeaveEvent() {
|
|
16274
|
-
var
|
|
16255
|
+
var _this29 = this;
|
|
16275
16256
|
|
|
16276
16257
|
var tooltipOpts = this.tooltipOpts;
|
|
16277
16258
|
var $tooltip = this.$refs.tooltip;
|
|
16278
|
-
this.tooltipActive = false;
|
|
16279
16259
|
|
|
16280
16260
|
if ($tooltip) {
|
|
16281
16261
|
$tooltip.setActived(false);
|
|
@@ -16283,10 +16263,10 @@ var Methods = {
|
|
|
16283
16263
|
|
|
16284
16264
|
if (tooltipOpts.enterable) {
|
|
16285
16265
|
this.tooltipTimeout = setTimeout(function () {
|
|
16286
|
-
$tooltip =
|
|
16266
|
+
$tooltip = _this29.$refs.tooltip;
|
|
16287
16267
|
|
|
16288
16268
|
if ($tooltip && !$tooltip.isActived()) {
|
|
16289
|
-
|
|
16269
|
+
_this29.closeTooltip();
|
|
16290
16270
|
}
|
|
16291
16271
|
}, tooltipOpts.leaveDelay);
|
|
16292
16272
|
} else {
|
|
@@ -16295,19 +16275,24 @@ var Methods = {
|
|
|
16295
16275
|
},
|
|
16296
16276
|
triggerHeaderHelpEvent: function triggerHeaderHelpEvent(evnt, params) {
|
|
16297
16277
|
var column = params.column;
|
|
16298
|
-
var
|
|
16278
|
+
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
16299
16279
|
|
|
16300
|
-
if (
|
|
16280
|
+
if (titlePrefix.content || titlePrefix.message) {
|
|
16301
16281
|
var $refs = this.$refs,
|
|
16302
16282
|
tooltipStore = this.tooltipStore;
|
|
16303
|
-
var
|
|
16304
|
-
var content = getFuncText(titleHelp.content || titleHelp.message);
|
|
16283
|
+
var content = getFuncText(titlePrefix.content || titlePrefix.message);
|
|
16305
16284
|
this.handleTargetEnterEvent(true);
|
|
16306
16285
|
tooltipStore.visible = true;
|
|
16286
|
+
tooltipStore.currOpts = _objectSpread2(_objectSpread2({}, titlePrefix), {}, {
|
|
16287
|
+
content: null
|
|
16288
|
+
});
|
|
16289
|
+
this.$nextTick(function () {
|
|
16290
|
+
var $tooltip = $refs.tooltip;
|
|
16307
16291
|
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16292
|
+
if ($tooltip) {
|
|
16293
|
+
$tooltip.open(evnt.currentTarget, content);
|
|
16294
|
+
}
|
|
16295
|
+
});
|
|
16311
16296
|
}
|
|
16312
16297
|
},
|
|
16313
16298
|
|
|
@@ -16393,7 +16378,6 @@ var Methods = {
|
|
|
16393
16378
|
var showAll = tooltipOpts.showAll,
|
|
16394
16379
|
enabled = tooltipOpts.enabled,
|
|
16395
16380
|
contentMethod = tooltipOpts.contentMethod;
|
|
16396
|
-
var tooltip = $refs.tooltip;
|
|
16397
16381
|
var customContent = contentMethod ? contentMethod(params) : null;
|
|
16398
16382
|
var useCustom = contentMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(customContent);
|
|
16399
16383
|
var content = useCustom ? customContent : (column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim();
|
|
@@ -16403,12 +16387,16 @@ var Methods = {
|
|
|
16403
16387
|
Object.assign(tooltipStore, {
|
|
16404
16388
|
row: row,
|
|
16405
16389
|
column: column,
|
|
16406
|
-
visible: true
|
|
16390
|
+
visible: true,
|
|
16391
|
+
currOpts: null
|
|
16407
16392
|
});
|
|
16393
|
+
this.$nextTick(function () {
|
|
16394
|
+
var $tooltip = $refs.tooltip;
|
|
16408
16395
|
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16396
|
+
if ($tooltip) {
|
|
16397
|
+
$tooltip.open(isCellOverflow ? overflowElem : tipElem || overflowElem, utils.formatText(content));
|
|
16398
|
+
}
|
|
16399
|
+
});
|
|
16412
16400
|
}
|
|
16413
16401
|
|
|
16414
16402
|
return this.$nextTick();
|
|
@@ -16438,7 +16426,8 @@ var Methods = {
|
|
|
16438
16426
|
row: null,
|
|
16439
16427
|
column: null,
|
|
16440
16428
|
content: null,
|
|
16441
|
-
visible: false
|
|
16429
|
+
visible: false,
|
|
16430
|
+
currOpts: null
|
|
16442
16431
|
});
|
|
16443
16432
|
|
|
16444
16433
|
if (tooltip) {
|
|
@@ -16516,14 +16505,14 @@ var Methods = {
|
|
|
16516
16505
|
* @param {Boolean} value 是否选中
|
|
16517
16506
|
*/
|
|
16518
16507
|
setCheckboxRow: function setCheckboxRow(rows, value) {
|
|
16519
|
-
var
|
|
16508
|
+
var _this30 = this;
|
|
16520
16509
|
|
|
16521
16510
|
if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(rows)) {
|
|
16522
16511
|
rows = [rows];
|
|
16523
16512
|
}
|
|
16524
16513
|
|
|
16525
16514
|
rows.forEach(function (row) {
|
|
16526
|
-
return
|
|
16515
|
+
return _this30.handleSelectRow({
|
|
16527
16516
|
row: row
|
|
16528
16517
|
}, !!value);
|
|
16529
16518
|
});
|
|
@@ -16547,7 +16536,7 @@ var Methods = {
|
|
|
16547
16536
|
* value 选中true 不选false 半选-1
|
|
16548
16537
|
*/
|
|
16549
16538
|
handleSelectRow: function handleSelectRow(_ref6, value) {
|
|
16550
|
-
var
|
|
16539
|
+
var _this31 = this;
|
|
16551
16540
|
|
|
16552
16541
|
var row = _ref6.row;
|
|
16553
16542
|
var selection = this.selection,
|
|
@@ -16579,7 +16568,7 @@ var Methods = {
|
|
|
16579
16568
|
return half === item;
|
|
16580
16569
|
});
|
|
16581
16570
|
|
|
16582
|
-
|
|
16571
|
+
_this31.handleCheckboxReserveRow(row, value);
|
|
16583
16572
|
}
|
|
16584
16573
|
}, treeOpts);
|
|
16585
16574
|
} // 如果存在父节点,更新父节点状态
|
|
@@ -16651,7 +16640,7 @@ var Methods = {
|
|
|
16651
16640
|
return half === item;
|
|
16652
16641
|
});
|
|
16653
16642
|
|
|
16654
|
-
|
|
16643
|
+
_this31.handleCheckboxReserveRow(row, value);
|
|
16655
16644
|
}
|
|
16656
16645
|
}, treeOpts);
|
|
16657
16646
|
} // 如果存在父节点,更新父节点状态
|
|
@@ -16755,7 +16744,7 @@ var Methods = {
|
|
|
16755
16744
|
* @param {Boolean} value 是否选中
|
|
16756
16745
|
*/
|
|
16757
16746
|
setAllCheckboxRow: function setAllCheckboxRow(value) {
|
|
16758
|
-
var
|
|
16747
|
+
var _this32 = this;
|
|
16759
16748
|
|
|
16760
16749
|
var afterFullData = this.afterFullData,
|
|
16761
16750
|
treeConfig = this.treeConfig,
|
|
@@ -16868,11 +16857,11 @@ var Methods = {
|
|
|
16868
16857
|
if (reserve) {
|
|
16869
16858
|
if (value) {
|
|
16870
16859
|
selectRows.forEach(function (row) {
|
|
16871
|
-
checkboxReserveRowMap[
|
|
16860
|
+
checkboxReserveRowMap[util_getRowid(_this32, row)] = row;
|
|
16872
16861
|
});
|
|
16873
16862
|
} else {
|
|
16874
16863
|
afterFullData.forEach(function (row) {
|
|
16875
|
-
return
|
|
16864
|
+
return _this32.handleCheckboxReserveRow(row, false);
|
|
16876
16865
|
});
|
|
16877
16866
|
}
|
|
16878
16867
|
}
|
|
@@ -17000,7 +16989,7 @@ var Methods = {
|
|
|
17000
16989
|
|
|
17001
16990
|
|
|
17002
16991
|
if (radioOpts.reserve && radioReserveRow) {
|
|
17003
|
-
var rowid =
|
|
16992
|
+
var rowid = util_getRowid(this, radioReserveRow);
|
|
17004
16993
|
|
|
17005
16994
|
if (fullDataRowIdData[rowid]) {
|
|
17006
16995
|
this.setRadioRow(fullDataRowIdData[rowid].row);
|
|
@@ -17047,14 +17036,14 @@ var Methods = {
|
|
|
17047
17036
|
treeOpts = this.treeOpts;
|
|
17048
17037
|
|
|
17049
17038
|
if (radioOpts.reserve && radioReserveRow) {
|
|
17050
|
-
var rowid =
|
|
17039
|
+
var rowid = util_getRowid(this, radioReserveRow);
|
|
17051
17040
|
|
|
17052
17041
|
if (isFull) {
|
|
17053
17042
|
if (!fullDataRowIdData[rowid]) {
|
|
17054
17043
|
return radioReserveRow;
|
|
17055
17044
|
}
|
|
17056
17045
|
} else {
|
|
17057
|
-
var rowkey =
|
|
17046
|
+
var rowkey = getRowkey(this);
|
|
17058
17047
|
|
|
17059
17048
|
if (treeConfig) {
|
|
17060
17049
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(afterFullData, function (row) {
|
|
@@ -17092,7 +17081,7 @@ var Methods = {
|
|
|
17092
17081
|
* 获取复选框保留选中的行
|
|
17093
17082
|
*/
|
|
17094
17083
|
getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
|
|
17095
|
-
var
|
|
17084
|
+
var _this33 = this;
|
|
17096
17085
|
|
|
17097
17086
|
var fullDataRowIdData = this.fullDataRowIdData,
|
|
17098
17087
|
afterFullData = this.afterFullData,
|
|
@@ -17107,11 +17096,11 @@ var Methods = {
|
|
|
17107
17096
|
|
|
17108
17097
|
if (treeConfig) {
|
|
17109
17098
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterFullData, function (row) {
|
|
17110
|
-
afterFullIdMaps[
|
|
17099
|
+
afterFullIdMaps[util_getRowid(_this33, row)] = 1;
|
|
17111
17100
|
}, treeOpts);
|
|
17112
17101
|
} else {
|
|
17113
17102
|
afterFullData.forEach(function (row) {
|
|
17114
|
-
afterFullIdMaps[
|
|
17103
|
+
afterFullIdMaps[util_getRowid(_this33, row)] = 1;
|
|
17115
17104
|
});
|
|
17116
17105
|
}
|
|
17117
17106
|
|
|
@@ -17141,7 +17130,7 @@ var Methods = {
|
|
|
17141
17130
|
checkboxOpts = this.checkboxOpts;
|
|
17142
17131
|
|
|
17143
17132
|
if (checkboxOpts.reserve) {
|
|
17144
|
-
var rowid =
|
|
17133
|
+
var rowid = util_getRowid(this, row);
|
|
17145
17134
|
|
|
17146
17135
|
if (checked) {
|
|
17147
17136
|
checkboxReserveRowMap[rowid] = row;
|
|
@@ -17177,7 +17166,7 @@ var Methods = {
|
|
|
17177
17166
|
* 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
|
|
17178
17167
|
*/
|
|
17179
17168
|
clearCheckboxRow: function clearCheckboxRow() {
|
|
17180
|
-
var
|
|
17169
|
+
var _this34 = this;
|
|
17181
17170
|
|
|
17182
17171
|
var tableFullData = this.tableFullData,
|
|
17183
17172
|
treeConfig = this.treeConfig,
|
|
@@ -17200,7 +17189,7 @@ var Methods = {
|
|
|
17200
17189
|
|
|
17201
17190
|
if (reserve) {
|
|
17202
17191
|
tableFullData.forEach(function (row) {
|
|
17203
|
-
return
|
|
17192
|
+
return _this34.handleCheckboxReserveRow(row, false);
|
|
17204
17193
|
});
|
|
17205
17194
|
}
|
|
17206
17195
|
|
|
@@ -17226,7 +17215,7 @@ var Methods = {
|
|
|
17226
17215
|
}
|
|
17227
17216
|
|
|
17228
17217
|
if (reserve) {
|
|
17229
|
-
var rowkey =
|
|
17218
|
+
var rowkey = getRowkey(this);
|
|
17230
17219
|
this.radioReserveRow = _defineProperty({}, rowkey, rowid);
|
|
17231
17220
|
}
|
|
17232
17221
|
}
|
|
@@ -17287,7 +17276,7 @@ var Methods = {
|
|
|
17287
17276
|
|
|
17288
17277
|
if (rowOpts.isCurrent || this.highlightCurrentRow) {
|
|
17289
17278
|
if ($el) {
|
|
17290
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.querySelectorAll("[rowid=\"".concat(
|
|
17279
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.querySelectorAll("[rowid=\"".concat(util_getRowid(this, row), "\"]")), function (elem) {
|
|
17291
17280
|
return addClass(elem, 'row--current');
|
|
17292
17281
|
});
|
|
17293
17282
|
}
|
|
@@ -17360,7 +17349,7 @@ var Methods = {
|
|
|
17360
17349
|
afterFullData = this.afterFullData;
|
|
17361
17350
|
|
|
17362
17351
|
if (selectRow) {
|
|
17363
|
-
var rowid =
|
|
17352
|
+
var rowid = util_getRowid(this, selectRow);
|
|
17364
17353
|
|
|
17365
17354
|
if (isFull) {
|
|
17366
17355
|
if (!fullDataRowIdData[rowid]) {
|
|
@@ -17368,7 +17357,7 @@ var Methods = {
|
|
|
17368
17357
|
}
|
|
17369
17358
|
} else {
|
|
17370
17359
|
if (treeConfig) {
|
|
17371
|
-
var rowkey =
|
|
17360
|
+
var rowkey = getRowkey(this);
|
|
17372
17361
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(afterFullData, function (row) {
|
|
17373
17362
|
return rowid === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, rowkey);
|
|
17374
17363
|
}, treeOpts);
|
|
@@ -17396,7 +17385,7 @@ var Methods = {
|
|
|
17396
17385
|
},
|
|
17397
17386
|
setHoverRow: function setHoverRow(row) {
|
|
17398
17387
|
var $el = this.$el;
|
|
17399
|
-
var rowid =
|
|
17388
|
+
var rowid = util_getRowid(this, row);
|
|
17400
17389
|
this.clearHoverRow();
|
|
17401
17390
|
|
|
17402
17391
|
if ($el) {
|
|
@@ -17491,13 +17480,13 @@ var Methods = {
|
|
|
17491
17480
|
* 如果存在规则,则校验
|
|
17492
17481
|
*/
|
|
17493
17482
|
handleChangeCell: function handleChangeCell(evnt, params) {
|
|
17494
|
-
var
|
|
17483
|
+
var _this35 = this;
|
|
17495
17484
|
|
|
17496
17485
|
this.checkValidate('blur').catch(function (e) {
|
|
17497
17486
|
return e;
|
|
17498
17487
|
}).then(function () {
|
|
17499
|
-
|
|
17500
|
-
return
|
|
17488
|
+
_this35.handleActived(params, evnt).then(function () {
|
|
17489
|
+
return _this35.checkValidate('change');
|
|
17501
17490
|
}).catch(function (e) {
|
|
17502
17491
|
return e;
|
|
17503
17492
|
});
|
|
@@ -17600,7 +17589,7 @@ var Methods = {
|
|
|
17600
17589
|
* 如果是双击模式,则激活为编辑状态
|
|
17601
17590
|
*/
|
|
17602
17591
|
triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
|
|
17603
|
-
var
|
|
17592
|
+
var _this36 = this;
|
|
17604
17593
|
|
|
17605
17594
|
var editStore = this.editStore,
|
|
17606
17595
|
editConfig = this.editConfig,
|
|
@@ -17615,15 +17604,15 @@ var Methods = {
|
|
|
17615
17604
|
this.checkValidate('blur').catch(function (e) {
|
|
17616
17605
|
return e;
|
|
17617
17606
|
}).then(function () {
|
|
17618
|
-
|
|
17619
|
-
return
|
|
17607
|
+
_this36.handleActived(params, evnt).then(function () {
|
|
17608
|
+
return _this36.checkValidate('change');
|
|
17620
17609
|
}).catch(function (e) {
|
|
17621
17610
|
return e;
|
|
17622
17611
|
});
|
|
17623
17612
|
});
|
|
17624
17613
|
} else if (editOpts.mode === 'cell') {
|
|
17625
17614
|
this.handleActived(params, evnt).then(function () {
|
|
17626
|
-
return
|
|
17615
|
+
return _this36.checkValidate('change');
|
|
17627
17616
|
}).catch(function (e) {
|
|
17628
17617
|
return e;
|
|
17629
17618
|
});
|
|
@@ -17634,7 +17623,7 @@ var Methods = {
|
|
|
17634
17623
|
this.emitEvent('cell-dblclick', params, evnt);
|
|
17635
17624
|
},
|
|
17636
17625
|
handleDefaultSort: function handleDefaultSort() {
|
|
17637
|
-
var
|
|
17626
|
+
var _this37 = this;
|
|
17638
17627
|
|
|
17639
17628
|
var sortConfig = this.sortConfig,
|
|
17640
17629
|
sortOpts = this.sortOpts;
|
|
@@ -17651,7 +17640,7 @@ var Methods = {
|
|
|
17651
17640
|
order = item.order;
|
|
17652
17641
|
|
|
17653
17642
|
if (field && order) {
|
|
17654
|
-
var column =
|
|
17643
|
+
var column = _this37.getColumnByField(field);
|
|
17655
17644
|
|
|
17656
17645
|
if (column && column.sortable) {
|
|
17657
17646
|
column.order = order;
|
|
@@ -17694,7 +17683,7 @@ var Methods = {
|
|
|
17694
17683
|
}
|
|
17695
17684
|
},
|
|
17696
17685
|
sort: function sort(sortConfs, sortOrder) {
|
|
17697
|
-
var
|
|
17686
|
+
var _this38 = this;
|
|
17698
17687
|
|
|
17699
17688
|
var sortOpts = this.sortOpts;
|
|
17700
17689
|
var multiple = sortOpts.multiple,
|
|
@@ -17727,7 +17716,7 @@ var Methods = {
|
|
|
17727
17716
|
var column = field;
|
|
17728
17717
|
|
|
17729
17718
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(field)) {
|
|
17730
|
-
column =
|
|
17719
|
+
column = _this38.getColumnByField(field);
|
|
17731
17720
|
}
|
|
17732
17721
|
|
|
17733
17722
|
if (column && (column.sortable || column.remoteSort)) {
|
|
@@ -17736,7 +17725,7 @@ var Methods = {
|
|
|
17736
17725
|
}
|
|
17737
17726
|
|
|
17738
17727
|
if (orders.indexOf(order) === -1) {
|
|
17739
|
-
order = getNextSortOrder(
|
|
17728
|
+
order = getNextSortOrder(_this38, column);
|
|
17740
17729
|
}
|
|
17741
17730
|
|
|
17742
17731
|
if (column.order !== order) {
|
|
@@ -17886,7 +17875,7 @@ var Methods = {
|
|
|
17886
17875
|
* @param {Row} row 行对象
|
|
17887
17876
|
*/
|
|
17888
17877
|
reloadRowExpand: function reloadRowExpand(row) {
|
|
17889
|
-
var
|
|
17878
|
+
var _this39 = this;
|
|
17890
17879
|
|
|
17891
17880
|
var expandOpts = this.expandOpts,
|
|
17892
17881
|
expandLazyLoadeds = this.expandLazyLoadeds;
|
|
@@ -17894,7 +17883,7 @@ var Methods = {
|
|
|
17894
17883
|
|
|
17895
17884
|
if (lazy && expandLazyLoadeds.indexOf(row) === -1) {
|
|
17896
17885
|
this.clearRowExpandLoaded(row).then(function () {
|
|
17897
|
-
return
|
|
17886
|
+
return _this39.handleAsyncRowExpand(row);
|
|
17898
17887
|
});
|
|
17899
17888
|
}
|
|
17900
17889
|
|
|
@@ -17971,28 +17960,28 @@ var Methods = {
|
|
|
17971
17960
|
return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
|
|
17972
17961
|
},
|
|
17973
17962
|
handleAsyncRowExpand: function handleAsyncRowExpand(row) {
|
|
17974
|
-
var
|
|
17963
|
+
var _this40 = this;
|
|
17975
17964
|
|
|
17976
17965
|
var rest = this.fullAllDataRowMap.get(row);
|
|
17977
17966
|
return new Promise(function (resolve) {
|
|
17978
|
-
|
|
17967
|
+
_this40.expandLazyLoadeds.push(row);
|
|
17979
17968
|
|
|
17980
|
-
|
|
17981
|
-
$table:
|
|
17969
|
+
_this40.expandOpts.loadMethod({
|
|
17970
|
+
$table: _this40,
|
|
17982
17971
|
row: row,
|
|
17983
|
-
rowIndex:
|
|
17984
|
-
$rowIndex:
|
|
17972
|
+
rowIndex: _this40.getRowIndex(row),
|
|
17973
|
+
$rowIndex: _this40.getVMRowIndex(row)
|
|
17985
17974
|
}).catch(function (e) {
|
|
17986
17975
|
return e;
|
|
17987
17976
|
}).then(function () {
|
|
17988
17977
|
rest.expandLoaded = true;
|
|
17989
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(
|
|
17978
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(_this40.expandLazyLoadeds, function (item) {
|
|
17990
17979
|
return item === row;
|
|
17991
17980
|
});
|
|
17992
17981
|
|
|
17993
|
-
|
|
17982
|
+
_this40.rowExpandeds.push(row);
|
|
17994
17983
|
|
|
17995
|
-
resolve(
|
|
17984
|
+
resolve(_this40.$nextTick().then(_this40.recalculate));
|
|
17996
17985
|
});
|
|
17997
17986
|
});
|
|
17998
17987
|
},
|
|
@@ -18005,7 +17994,7 @@ var Methods = {
|
|
|
18005
17994
|
* @param {Boolean} expanded 是否展开
|
|
18006
17995
|
*/
|
|
18007
17996
|
setRowExpand: function setRowExpand(rows, expanded) {
|
|
18008
|
-
var
|
|
17997
|
+
var _this41 = this;
|
|
18009
17998
|
|
|
18010
17999
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
18011
18000
|
expandLazyLoadeds = this.expandLazyLoadeds,
|
|
@@ -18038,8 +18027,8 @@ var Methods = {
|
|
|
18038
18027
|
columnIndex: columnIndex,
|
|
18039
18028
|
$columnIndex: $columnIndex,
|
|
18040
18029
|
row: row,
|
|
18041
|
-
rowIndex:
|
|
18042
|
-
$rowIndex:
|
|
18030
|
+
rowIndex: _this41.getRowIndex(row),
|
|
18031
|
+
$rowIndex: _this41.getVMRowIndex(row)
|
|
18043
18032
|
});
|
|
18044
18033
|
}) : rows;
|
|
18045
18034
|
|
|
@@ -18050,7 +18039,7 @@ var Methods = {
|
|
|
18050
18039
|
var isLoad = lazy && !rest.expandLoaded && expandLazyLoadeds.indexOf(row) === -1;
|
|
18051
18040
|
|
|
18052
18041
|
if (isLoad) {
|
|
18053
|
-
lazyRests.push(
|
|
18042
|
+
lazyRests.push(_this41.handleAsyncRowExpand(row));
|
|
18054
18043
|
} else {
|
|
18055
18044
|
rowExpandeds.push(row);
|
|
18056
18045
|
}
|
|
@@ -18064,7 +18053,7 @@ var Methods = {
|
|
|
18064
18053
|
|
|
18065
18054
|
if (reserve) {
|
|
18066
18055
|
validRows.forEach(function (row) {
|
|
18067
|
-
return
|
|
18056
|
+
return _this41.handleRowExpandReserve(row, expanded);
|
|
18068
18057
|
});
|
|
18069
18058
|
}
|
|
18070
18059
|
}
|
|
@@ -18085,7 +18074,7 @@ var Methods = {
|
|
|
18085
18074
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
18086
18075
|
*/
|
|
18087
18076
|
clearRowExpand: function clearRowExpand() {
|
|
18088
|
-
var
|
|
18077
|
+
var _this42 = this;
|
|
18089
18078
|
|
|
18090
18079
|
var expandOpts = this.expandOpts,
|
|
18091
18080
|
rowExpandeds = this.rowExpandeds,
|
|
@@ -18096,13 +18085,13 @@ var Methods = {
|
|
|
18096
18085
|
|
|
18097
18086
|
if (reserve) {
|
|
18098
18087
|
tableFullData.forEach(function (row) {
|
|
18099
|
-
return
|
|
18088
|
+
return _this42.handleRowExpandReserve(row, false);
|
|
18100
18089
|
});
|
|
18101
18090
|
}
|
|
18102
18091
|
|
|
18103
18092
|
return this.$nextTick().then(function () {
|
|
18104
18093
|
if (isExists) {
|
|
18105
|
-
|
|
18094
|
+
_this42.recalculate();
|
|
18106
18095
|
}
|
|
18107
18096
|
});
|
|
18108
18097
|
},
|
|
@@ -18115,7 +18104,7 @@ var Methods = {
|
|
|
18115
18104
|
expandOpts = this.expandOpts;
|
|
18116
18105
|
|
|
18117
18106
|
if (expandOpts.reserve) {
|
|
18118
|
-
var rowid =
|
|
18107
|
+
var rowid = util_getRowid(this, row);
|
|
18119
18108
|
|
|
18120
18109
|
if (expanded) {
|
|
18121
18110
|
rowExpandedReserveRowMap[rowid] = row;
|
|
@@ -18181,7 +18170,7 @@ var Methods = {
|
|
|
18181
18170
|
* @param {Row} row 行对象
|
|
18182
18171
|
*/
|
|
18183
18172
|
reloadTreeExpand: function reloadTreeExpand(row) {
|
|
18184
|
-
var
|
|
18173
|
+
var _this43 = this;
|
|
18185
18174
|
|
|
18186
18175
|
var treeOpts = this.treeOpts,
|
|
18187
18176
|
treeLazyLoadeds = this.treeLazyLoadeds;
|
|
@@ -18191,15 +18180,15 @@ var Methods = {
|
|
|
18191
18180
|
|
|
18192
18181
|
if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
|
|
18193
18182
|
this.clearTreeExpandLoaded(row).then(function () {
|
|
18194
|
-
return
|
|
18183
|
+
return _this43.handleAsyncTreeExpandChilds(row);
|
|
18195
18184
|
}).then(function () {
|
|
18196
18185
|
if (transform) {
|
|
18197
|
-
|
|
18186
|
+
_this43.handleVirtualTreeToList();
|
|
18198
18187
|
|
|
18199
|
-
return
|
|
18188
|
+
return _this43.handleTableData();
|
|
18200
18189
|
}
|
|
18201
18190
|
}).then(function () {
|
|
18202
|
-
return
|
|
18191
|
+
return _this43.recalculate();
|
|
18203
18192
|
});
|
|
18204
18193
|
}
|
|
18205
18194
|
|
|
@@ -18260,7 +18249,7 @@ var Methods = {
|
|
|
18260
18249
|
this.setAllTreeExpand(true);
|
|
18261
18250
|
} else if (expandRowKeys) {
|
|
18262
18251
|
var defExpandeds = [];
|
|
18263
|
-
var rowkey =
|
|
18252
|
+
var rowkey = getRowkey(this);
|
|
18264
18253
|
expandRowKeys.forEach(function (rowid) {
|
|
18265
18254
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
|
|
18266
18255
|
return rowid === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(item, rowkey);
|
|
@@ -18275,7 +18264,7 @@ var Methods = {
|
|
|
18275
18264
|
}
|
|
18276
18265
|
},
|
|
18277
18266
|
handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
|
|
18278
|
-
var
|
|
18267
|
+
var _this44 = this;
|
|
18279
18268
|
|
|
18280
18269
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
18281
18270
|
treeExpandeds = this.treeExpandeds,
|
|
@@ -18289,7 +18278,7 @@ var Methods = {
|
|
|
18289
18278
|
return new Promise(function (resolve) {
|
|
18290
18279
|
treeLazyLoadeds.push(row);
|
|
18291
18280
|
loadMethod({
|
|
18292
|
-
$table:
|
|
18281
|
+
$table: _this44,
|
|
18293
18282
|
row: row
|
|
18294
18283
|
}).catch(function () {
|
|
18295
18284
|
return [];
|
|
@@ -18304,29 +18293,29 @@ var Methods = {
|
|
|
18304
18293
|
}
|
|
18305
18294
|
|
|
18306
18295
|
if (childRecords) {
|
|
18307
|
-
|
|
18296
|
+
_this44.loadTreeChildren(row, childRecords).then(function (childRows) {
|
|
18308
18297
|
if (childRows.length && treeExpandeds.indexOf(row) === -1) {
|
|
18309
18298
|
treeExpandeds.push(row);
|
|
18310
18299
|
} // 如果当前节点已选中,则展开后子节点也被选中
|
|
18311
18300
|
|
|
18312
18301
|
|
|
18313
|
-
if (!checkStrictly &&
|
|
18314
|
-
|
|
18302
|
+
if (!checkStrictly && _this44.isCheckedByCheckboxRow(row)) {
|
|
18303
|
+
_this44.setCheckboxRow(childRows, true);
|
|
18315
18304
|
}
|
|
18316
18305
|
|
|
18317
|
-
|
|
18306
|
+
_this44.$nextTick().then(function () {
|
|
18318
18307
|
if (transform) {
|
|
18319
|
-
return
|
|
18308
|
+
return _this44.handleTableData();
|
|
18320
18309
|
}
|
|
18321
18310
|
}).then(function () {
|
|
18322
|
-
return
|
|
18311
|
+
return _this44.recalculate();
|
|
18323
18312
|
}).then(function () {
|
|
18324
18313
|
return resolve();
|
|
18325
18314
|
});
|
|
18326
18315
|
});
|
|
18327
18316
|
} else {
|
|
18328
|
-
|
|
18329
|
-
return
|
|
18317
|
+
_this44.$nextTick().then(function () {
|
|
18318
|
+
return _this44.recalculate();
|
|
18330
18319
|
}).then(function () {
|
|
18331
18320
|
return resolve();
|
|
18332
18321
|
});
|
|
@@ -18362,7 +18351,7 @@ var Methods = {
|
|
|
18362
18351
|
* @returns
|
|
18363
18352
|
*/
|
|
18364
18353
|
handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
|
|
18365
|
-
var
|
|
18354
|
+
var _this45 = this;
|
|
18366
18355
|
|
|
18367
18356
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
18368
18357
|
tableFullData = this.tableFullData,
|
|
@@ -18410,7 +18399,7 @@ var Methods = {
|
|
|
18410
18399
|
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1; // 是否使用懒加载
|
|
18411
18400
|
|
|
18412
18401
|
if (isLoad) {
|
|
18413
|
-
result.push(
|
|
18402
|
+
result.push(_this45.handleAsyncTreeExpandChilds(row));
|
|
18414
18403
|
} else {
|
|
18415
18404
|
if (row[children] && row[children].length) {
|
|
18416
18405
|
treeExpandeds.push(row);
|
|
@@ -18426,7 +18415,7 @@ var Methods = {
|
|
|
18426
18415
|
|
|
18427
18416
|
if (reserve) {
|
|
18428
18417
|
validRows.forEach(function (row) {
|
|
18429
|
-
return
|
|
18418
|
+
return _this45.handleTreeExpandReserve(row, expanded);
|
|
18430
18419
|
});
|
|
18431
18420
|
}
|
|
18432
18421
|
|
|
@@ -18440,14 +18429,14 @@ var Methods = {
|
|
|
18440
18429
|
* @returns
|
|
18441
18430
|
*/
|
|
18442
18431
|
handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
|
|
18443
|
-
var
|
|
18432
|
+
var _this46 = this;
|
|
18444
18433
|
|
|
18445
18434
|
return this.handleBaseTreeExpand(rows, expanded).then(function () {
|
|
18446
|
-
|
|
18435
|
+
_this46.handleVirtualTreeToList();
|
|
18447
18436
|
|
|
18448
|
-
return
|
|
18437
|
+
return _this46.handleTableData();
|
|
18449
18438
|
}).then(function () {
|
|
18450
|
-
return
|
|
18439
|
+
return _this46.recalculate();
|
|
18451
18440
|
});
|
|
18452
18441
|
},
|
|
18453
18442
|
|
|
@@ -18492,7 +18481,7 @@ var Methods = {
|
|
|
18492
18481
|
* 手动清空树形节点的展开状态,数据会恢复成未展开的状态
|
|
18493
18482
|
*/
|
|
18494
18483
|
clearTreeExpand: function clearTreeExpand() {
|
|
18495
|
-
var
|
|
18484
|
+
var _this47 = this;
|
|
18496
18485
|
|
|
18497
18486
|
var treeOpts = this.treeOpts,
|
|
18498
18487
|
treeExpandeds = this.treeExpandeds,
|
|
@@ -18504,19 +18493,19 @@ var Methods = {
|
|
|
18504
18493
|
|
|
18505
18494
|
if (reserve) {
|
|
18506
18495
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(tableFullData, function (row) {
|
|
18507
|
-
return
|
|
18496
|
+
return _this47.handleTreeExpandReserve(row, false);
|
|
18508
18497
|
}, treeOpts);
|
|
18509
18498
|
}
|
|
18510
18499
|
|
|
18511
18500
|
return this.handleTableData().then(function () {
|
|
18512
18501
|
if (transform) {
|
|
18513
|
-
|
|
18502
|
+
_this47.handleVirtualTreeToList();
|
|
18514
18503
|
|
|
18515
|
-
return
|
|
18504
|
+
return _this47.handleTableData();
|
|
18516
18505
|
}
|
|
18517
18506
|
}).then(function () {
|
|
18518
18507
|
if (isExists) {
|
|
18519
|
-
|
|
18508
|
+
_this47.recalculate();
|
|
18520
18509
|
}
|
|
18521
18510
|
});
|
|
18522
18511
|
},
|
|
@@ -18529,7 +18518,7 @@ var Methods = {
|
|
|
18529
18518
|
treeOpts = this.treeOpts;
|
|
18530
18519
|
|
|
18531
18520
|
if (treeOpts.reserve) {
|
|
18532
|
-
var rowid =
|
|
18521
|
+
var rowid = util_getRowid(this, row);
|
|
18533
18522
|
|
|
18534
18523
|
if (expanded) {
|
|
18535
18524
|
treeExpandedReserveRowMap[rowid] = row;
|
|
@@ -18646,18 +18635,18 @@ var Methods = {
|
|
|
18646
18635
|
},
|
|
18647
18636
|
// 计算可视渲染相关数据
|
|
18648
18637
|
computeScrollLoad: function computeScrollLoad() {
|
|
18649
|
-
var
|
|
18638
|
+
var _this48 = this;
|
|
18650
18639
|
|
|
18651
18640
|
return this.$nextTick().then(function () {
|
|
18652
|
-
var sYOpts =
|
|
18653
|
-
sXOpts =
|
|
18654
|
-
scrollXLoad =
|
|
18655
|
-
scrollYLoad =
|
|
18656
|
-
scrollXStore =
|
|
18657
|
-
scrollYStore =
|
|
18641
|
+
var sYOpts = _this48.sYOpts,
|
|
18642
|
+
sXOpts = _this48.sXOpts,
|
|
18643
|
+
scrollXLoad = _this48.scrollXLoad,
|
|
18644
|
+
scrollYLoad = _this48.scrollYLoad,
|
|
18645
|
+
scrollXStore = _this48.scrollXStore,
|
|
18646
|
+
scrollYStore = _this48.scrollYStore; // 计算 X 逻辑
|
|
18658
18647
|
|
|
18659
18648
|
if (scrollXLoad) {
|
|
18660
|
-
var _computeVirtualX3 = computeVirtualX(
|
|
18649
|
+
var _computeVirtualX3 = computeVirtualX(_this48),
|
|
18661
18650
|
visibleXSize = _computeVirtualX3.visibleSize;
|
|
18662
18651
|
|
|
18663
18652
|
var offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
|
|
@@ -18665,13 +18654,13 @@ var Methods = {
|
|
|
18665
18654
|
scrollXStore.visibleSize = visibleXSize;
|
|
18666
18655
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
18667
18656
|
|
|
18668
|
-
|
|
18657
|
+
_this48.updateScrollXData();
|
|
18669
18658
|
} else {
|
|
18670
|
-
|
|
18659
|
+
_this48.updateScrollXSpace();
|
|
18671
18660
|
} // 计算 Y 逻辑
|
|
18672
18661
|
|
|
18673
18662
|
|
|
18674
|
-
var _computeVirtualY = computeVirtualY(
|
|
18663
|
+
var _computeVirtualY = computeVirtualY(_this48),
|
|
18675
18664
|
rowHeight = _computeVirtualY.rowHeight,
|
|
18676
18665
|
visibleYSize = _computeVirtualY.visibleSize;
|
|
18677
18666
|
|
|
@@ -18683,14 +18672,14 @@ var Methods = {
|
|
|
18683
18672
|
scrollYStore.visibleSize = visibleYSize;
|
|
18684
18673
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
18685
18674
|
|
|
18686
|
-
|
|
18675
|
+
_this48.updateScrollYData();
|
|
18687
18676
|
} else {
|
|
18688
|
-
|
|
18677
|
+
_this48.updateScrollYSpace();
|
|
18689
18678
|
}
|
|
18690
18679
|
|
|
18691
|
-
|
|
18680
|
+
_this48.rowHeight = rowHeight;
|
|
18692
18681
|
|
|
18693
|
-
|
|
18682
|
+
_this48.$nextTick(_this48.updateStyle);
|
|
18694
18683
|
});
|
|
18695
18684
|
},
|
|
18696
18685
|
handleTableColumn: function handleTableColumn() {
|
|
@@ -18700,8 +18689,14 @@ var Methods = {
|
|
|
18700
18689
|
this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
|
|
18701
18690
|
},
|
|
18702
18691
|
updateScrollXData: function updateScrollXData() {
|
|
18703
|
-
this
|
|
18704
|
-
|
|
18692
|
+
var _this49 = this;
|
|
18693
|
+
|
|
18694
|
+
this.tableColumn = [];
|
|
18695
|
+
this.$nextTick(function () {
|
|
18696
|
+
_this49.handleTableColumn();
|
|
18697
|
+
|
|
18698
|
+
_this49.updateScrollXSpace();
|
|
18699
|
+
});
|
|
18705
18700
|
},
|
|
18706
18701
|
// 更新横向 X 可视渲染上下剩余空间大小
|
|
18707
18702
|
updateScrollXSpace: function updateScrollXSpace() {
|
|
@@ -18757,8 +18752,14 @@ var Methods = {
|
|
|
18757
18752
|
}
|
|
18758
18753
|
},
|
|
18759
18754
|
updateScrollYData: function updateScrollYData() {
|
|
18760
|
-
this
|
|
18761
|
-
|
|
18755
|
+
var _this50 = this;
|
|
18756
|
+
|
|
18757
|
+
this.tableData = [];
|
|
18758
|
+
this.$nextTick(function () {
|
|
18759
|
+
_this50.handleTableData();
|
|
18760
|
+
|
|
18761
|
+
_this50.updateScrollYSpace();
|
|
18762
|
+
});
|
|
18762
18763
|
},
|
|
18763
18764
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
18764
18765
|
updateScrollYSpace: function updateScrollYSpace() {
|
|
@@ -18804,7 +18805,7 @@ var Methods = {
|
|
|
18804
18805
|
* @param {Number} scrollTop 上距离
|
|
18805
18806
|
*/
|
|
18806
18807
|
scrollTo: function scrollTo(scrollLeft, scrollTop) {
|
|
18807
|
-
var
|
|
18808
|
+
var _this51 = this;
|
|
18808
18809
|
|
|
18809
18810
|
var $refs = this.$refs;
|
|
18810
18811
|
var tableBody = $refs.tableBody,
|
|
@@ -18825,7 +18826,7 @@ var Methods = {
|
|
|
18825
18826
|
if (this.scrollXLoad || this.scrollYLoad) {
|
|
18826
18827
|
return new Promise(function (resolve) {
|
|
18827
18828
|
return setTimeout(function () {
|
|
18828
|
-
return resolve(
|
|
18829
|
+
return resolve(_this51.$nextTick());
|
|
18829
18830
|
}, 50);
|
|
18830
18831
|
});
|
|
18831
18832
|
}
|
|
@@ -18876,7 +18877,7 @@ var Methods = {
|
|
|
18876
18877
|
* @param {Row} row 行对象
|
|
18877
18878
|
*/
|
|
18878
18879
|
scrollToTreeRow: function scrollToTreeRow(row) {
|
|
18879
|
-
var
|
|
18880
|
+
var _this52 = this;
|
|
18880
18881
|
|
|
18881
18882
|
var tableFullData = this.tableFullData,
|
|
18882
18883
|
treeConfig = this.treeConfig,
|
|
@@ -18891,15 +18892,15 @@ var Methods = {
|
|
|
18891
18892
|
if (matchObj) {
|
|
18892
18893
|
var nodes = matchObj.nodes;
|
|
18893
18894
|
nodes.forEach(function (row, index) {
|
|
18894
|
-
if (index < nodes.length - 1 && !
|
|
18895
|
-
rests.push(
|
|
18895
|
+
if (index < nodes.length - 1 && !_this52.isTreeExpandByRow(row)) {
|
|
18896
|
+
rests.push(_this52.setTreeExpand(row, true));
|
|
18896
18897
|
}
|
|
18897
18898
|
});
|
|
18898
18899
|
}
|
|
18899
18900
|
}
|
|
18900
18901
|
|
|
18901
18902
|
return Promise.all(rests).then(function () {
|
|
18902
|
-
return dom.rowToVisible(
|
|
18903
|
+
return dom.rowToVisible(_this52, row);
|
|
18903
18904
|
});
|
|
18904
18905
|
},
|
|
18905
18906
|
|
|
@@ -18963,29 +18964,29 @@ var Methods = {
|
|
|
18963
18964
|
* 如果单元格配置了校验规则,则会进行校验
|
|
18964
18965
|
*/
|
|
18965
18966
|
updateStatus: function updateStatus(scope, cellValue) {
|
|
18966
|
-
var
|
|
18967
|
+
var _this53 = this;
|
|
18967
18968
|
|
|
18968
18969
|
var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(cellValue);
|
|
18969
18970
|
return this.$nextTick().then(function () {
|
|
18970
|
-
var $refs =
|
|
18971
|
-
editRules =
|
|
18972
|
-
validStore =
|
|
18971
|
+
var $refs = _this53.$refs,
|
|
18972
|
+
editRules = _this53.editRules,
|
|
18973
|
+
validStore = _this53.validStore;
|
|
18973
18974
|
|
|
18974
18975
|
if (scope && $refs.tableBody && editRules) {
|
|
18975
18976
|
var row = scope.row,
|
|
18976
18977
|
column = scope.column;
|
|
18977
18978
|
var type = 'change';
|
|
18978
18979
|
|
|
18979
|
-
if (
|
|
18980
|
-
var cell =
|
|
18980
|
+
if (_this53.hasCellRules(type, row, column)) {
|
|
18981
|
+
var cell = _this53.getCell(row, column);
|
|
18981
18982
|
|
|
18982
18983
|
if (cell) {
|
|
18983
|
-
return
|
|
18984
|
+
return _this53.validCellRules(type, row, column, cellValue).then(function () {
|
|
18984
18985
|
if (customVal && validStore.visible) {
|
|
18985
18986
|
methods_setCellValue(row, column, cellValue);
|
|
18986
18987
|
}
|
|
18987
18988
|
|
|
18988
|
-
|
|
18989
|
+
_this53.clearValidate();
|
|
18989
18990
|
}).catch(function (_ref8) {
|
|
18990
18991
|
var rule = _ref8.rule;
|
|
18991
18992
|
|
|
@@ -18993,7 +18994,7 @@ var Methods = {
|
|
|
18993
18994
|
methods_setCellValue(row, column, cellValue);
|
|
18994
18995
|
}
|
|
18995
18996
|
|
|
18996
|
-
|
|
18997
|
+
_this53.showValidTooltip({
|
|
18997
18998
|
rule: rule,
|
|
18998
18999
|
row: row,
|
|
18999
19000
|
column: column,
|
|
@@ -19014,7 +19015,7 @@ var Methods = {
|
|
|
19014
19015
|
* @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
|
|
19015
19016
|
*/
|
|
19016
19017
|
setMergeCells: function setMergeCells(merges) {
|
|
19017
|
-
var
|
|
19018
|
+
var _this54 = this;
|
|
19018
19019
|
|
|
19019
19020
|
if (this.spanMethod) {
|
|
19020
19021
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
@@ -19022,7 +19023,7 @@ var Methods = {
|
|
|
19022
19023
|
|
|
19023
19024
|
setMerges(this, merges, this.mergeList, this.afterFullData);
|
|
19024
19025
|
return this.$nextTick().then(function () {
|
|
19025
|
-
return
|
|
19026
|
+
return _this54.updateCellAreas();
|
|
19026
19027
|
});
|
|
19027
19028
|
},
|
|
19028
19029
|
|
|
@@ -19031,7 +19032,7 @@ var Methods = {
|
|
|
19031
19032
|
* @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
|
|
19032
19033
|
*/
|
|
19033
19034
|
removeMergeCells: function removeMergeCells(merges) {
|
|
19034
|
-
var
|
|
19035
|
+
var _this55 = this;
|
|
19035
19036
|
|
|
19036
19037
|
if (this.spanMethod) {
|
|
19037
19038
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
@@ -19039,7 +19040,7 @@ var Methods = {
|
|
|
19039
19040
|
|
|
19040
19041
|
var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
|
|
19041
19042
|
return this.$nextTick().then(function () {
|
|
19042
|
-
|
|
19043
|
+
_this55.updateCellAreas();
|
|
19043
19044
|
|
|
19044
19045
|
return rest;
|
|
19045
19046
|
});
|
|
@@ -19063,7 +19064,7 @@ var Methods = {
|
|
|
19063
19064
|
this.setMergeFooterItems(this.mergeFooterItems);
|
|
19064
19065
|
},
|
|
19065
19066
|
setMergeFooterItems: function setMergeFooterItems(merges) {
|
|
19066
|
-
var
|
|
19067
|
+
var _this56 = this;
|
|
19067
19068
|
|
|
19068
19069
|
if (this.footerSpanMethod) {
|
|
19069
19070
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
@@ -19071,11 +19072,11 @@ var Methods = {
|
|
|
19071
19072
|
|
|
19072
19073
|
setMerges(this, merges, this.mergeFooterList, null);
|
|
19073
19074
|
return this.$nextTick().then(function () {
|
|
19074
|
-
return
|
|
19075
|
+
return _this56.updateCellAreas();
|
|
19075
19076
|
});
|
|
19076
19077
|
},
|
|
19077
19078
|
removeMergeFooterItems: function removeMergeFooterItems(merges) {
|
|
19078
|
-
var
|
|
19079
|
+
var _this57 = this;
|
|
19079
19080
|
|
|
19080
19081
|
if (this.footerSpanMethod) {
|
|
19081
19082
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
@@ -19083,7 +19084,7 @@ var Methods = {
|
|
|
19083
19084
|
|
|
19084
19085
|
var rest = removeMerges(this, merges, this.mergeFooterList, null);
|
|
19085
19086
|
return this.$nextTick().then(function () {
|
|
19086
|
-
|
|
19087
|
+
_this57.updateCellAreas();
|
|
19087
19088
|
|
|
19088
19089
|
return rest;
|
|
19089
19090
|
});
|
|
@@ -19150,7 +19151,7 @@ var Methods = {
|
|
|
19150
19151
|
*************************/
|
|
19151
19152
|
getCell: function getCell(row, column) {
|
|
19152
19153
|
var $refs = this.$refs;
|
|
19153
|
-
var rowid =
|
|
19154
|
+
var rowid = util_getRowid(this, row);
|
|
19154
19155
|
var bodyElem = $refs["".concat(column.fixed || 'table', "Body")] || $refs.tableBody;
|
|
19155
19156
|
|
|
19156
19157
|
if (bodyElem && bodyElem.$el) {
|
|
@@ -19254,6 +19255,7 @@ funcs.forEach(function (name) {
|
|
|
19254
19255
|
|
|
19255
19256
|
|
|
19256
19257
|
|
|
19258
|
+
|
|
19257
19259
|
|
|
19258
19260
|
|
|
19259
19261
|
/**
|
|
@@ -19354,7 +19356,7 @@ function handleUupdateResize(_vm) {
|
|
|
19354
19356
|
height: [Number, String],
|
|
19355
19357
|
// 表格的最大高度
|
|
19356
19358
|
maxHeight: [Number, String],
|
|
19357
|
-
//
|
|
19359
|
+
// 已废弃,被 column-config.resizable 替换
|
|
19358
19360
|
resizable: {
|
|
19359
19361
|
type: Boolean,
|
|
19360
19362
|
default: function _default() {
|
|
@@ -19426,35 +19428,35 @@ function handleUupdateResize(_vm) {
|
|
|
19426
19428
|
return conf.table.showHeader;
|
|
19427
19429
|
}
|
|
19428
19430
|
},
|
|
19429
|
-
//
|
|
19431
|
+
// 已废弃,被 row-config.isCurrent 替换
|
|
19430
19432
|
highlightCurrentRow: {
|
|
19431
19433
|
type: Boolean,
|
|
19432
19434
|
default: function _default() {
|
|
19433
19435
|
return conf.table.highlightCurrentRow;
|
|
19434
19436
|
}
|
|
19435
19437
|
},
|
|
19436
|
-
//
|
|
19438
|
+
// 已废弃,被 row-config.isHover 替换
|
|
19437
19439
|
highlightHoverRow: {
|
|
19438
19440
|
type: Boolean,
|
|
19439
19441
|
default: function _default() {
|
|
19440
19442
|
return conf.table.highlightHoverRow;
|
|
19441
19443
|
}
|
|
19442
19444
|
},
|
|
19443
|
-
//
|
|
19445
|
+
// 已废弃,被 column-config.isCurrent 替换
|
|
19444
19446
|
highlightCurrentColumn: {
|
|
19445
19447
|
type: Boolean,
|
|
19446
19448
|
default: function _default() {
|
|
19447
19449
|
return conf.table.highlightCurrentColumn;
|
|
19448
19450
|
}
|
|
19449
19451
|
},
|
|
19450
|
-
//
|
|
19452
|
+
// 已废弃,被 column-config.isHover 替换
|
|
19451
19453
|
highlightHoverColumn: {
|
|
19452
19454
|
type: Boolean,
|
|
19453
19455
|
default: function _default() {
|
|
19454
19456
|
return conf.table.highlightHoverColumn;
|
|
19455
19457
|
}
|
|
19456
19458
|
},
|
|
19457
|
-
//
|
|
19459
|
+
// 已废弃,直接删除
|
|
19458
19460
|
highlightCell: Boolean,
|
|
19459
19461
|
// 是否显示表尾合计
|
|
19460
19462
|
showFooter: Boolean,
|
|
@@ -19763,6 +19765,13 @@ function handleUupdateResize(_vm) {
|
|
|
19763
19765
|
insertList: [],
|
|
19764
19766
|
removeList: []
|
|
19765
19767
|
},
|
|
19768
|
+
// 存放 tooltip 相关信息
|
|
19769
|
+
tooltipStore: {
|
|
19770
|
+
row: null,
|
|
19771
|
+
column: null,
|
|
19772
|
+
visible: false,
|
|
19773
|
+
currOpts: null
|
|
19774
|
+
},
|
|
19766
19775
|
// 存放数据校验相关信息
|
|
19767
19776
|
validStore: {
|
|
19768
19777
|
visible: false,
|
|
@@ -19858,15 +19867,10 @@ function handleUupdateResize(_vm) {
|
|
|
19858
19867
|
return Object.assign({}, conf.table.checkboxConfig, this.checkboxConfig);
|
|
19859
19868
|
},
|
|
19860
19869
|
tooltipOpts: function tooltipOpts() {
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
|
|
19865
|
-
if (opts.enterable) {
|
|
19866
|
-
opts.leaveMethod = this.handleTooltipLeaveMethod;
|
|
19867
|
-
}
|
|
19868
|
-
|
|
19869
|
-
return opts;
|
|
19870
|
+
return Object.assign({}, conf.tooltip, conf.table.tooltipConfig, this.tooltipConfig);
|
|
19871
|
+
},
|
|
19872
|
+
tipConfig: function tipConfig() {
|
|
19873
|
+
return _objectSpread2(_objectSpread2({}, this.tooltipOpts), this.tooltipStore.currOpts);
|
|
19870
19874
|
},
|
|
19871
19875
|
validTipOpts: function validTipOpts() {
|
|
19872
19876
|
return Object.assign({
|
|
@@ -19999,55 +20003,7 @@ function handleUupdateResize(_vm) {
|
|
|
19999
20003
|
}
|
|
20000
20004
|
|
|
20001
20005
|
return false;
|
|
20002
|
-
}
|
|
20003
|
-
// const { mergeList, columnStore, visibleColumn } = this
|
|
20004
|
-
// const { leftList } = columnStore
|
|
20005
|
-
// const lastFCIndex = visibleColumn.indexOf(leftList[leftList.length - 1])
|
|
20006
|
-
// for (let i = 0, len = mergeList.length; i < len; i++) {
|
|
20007
|
-
// const item = mergeList[i]
|
|
20008
|
-
// if (item.col <= lastFCIndex && item.col + item.colspan > lastFCIndex) {
|
|
20009
|
-
// return true
|
|
20010
|
-
// }
|
|
20011
|
-
// }
|
|
20012
|
-
// return false
|
|
20013
|
-
// },
|
|
20014
|
-
// isMergeRightFixedExceeded () {
|
|
20015
|
-
// const { mergeList, columnStore, visibleColumn } = this
|
|
20016
|
-
// const { rightList } = columnStore
|
|
20017
|
-
// const firstFCIndex = visibleColumn.indexOf(rightList[0])
|
|
20018
|
-
// for (let i = 0, len = mergeList.length; i < len; i++) {
|
|
20019
|
-
// const item = mergeList[i]
|
|
20020
|
-
// if (item.col < firstFCIndex && item.col + item.colspan >= firstFCIndex) {
|
|
20021
|
-
// return true
|
|
20022
|
-
// }
|
|
20023
|
-
// }
|
|
20024
|
-
// return false
|
|
20025
|
-
// },
|
|
20026
|
-
// isMergeFooterLeftFixedExceeded () {
|
|
20027
|
-
// const { mergeFooterList, columnStore, visibleColumn } = this
|
|
20028
|
-
// const { leftList } = columnStore
|
|
20029
|
-
// const lastFCIndex = visibleColumn.indexOf(leftList[leftList.length - 1])
|
|
20030
|
-
// for (let i = 0, len = mergeFooterList.length; i < len; i++) {
|
|
20031
|
-
// const item = mergeFooterList[i]
|
|
20032
|
-
// if (item.col <= lastFCIndex && item.col + item.colspan > lastFCIndex) {
|
|
20033
|
-
// return true
|
|
20034
|
-
// }
|
|
20035
|
-
// }
|
|
20036
|
-
// return false
|
|
20037
|
-
// },
|
|
20038
|
-
// isMergeFooterRightFixedExceeded () {
|
|
20039
|
-
// const { mergeFooterList, columnStore, visibleColumn } = this
|
|
20040
|
-
// const { rightList } = columnStore
|
|
20041
|
-
// const firstFCIndex = visibleColumn.indexOf(rightList[0])
|
|
20042
|
-
// for (let i = 0, len = mergeFooterList.length; i < len; i++) {
|
|
20043
|
-
// const item = mergeFooterList[i]
|
|
20044
|
-
// if (item.col < firstFCIndex && item.col + item.colspan >= firstFCIndex) {
|
|
20045
|
-
// return true
|
|
20046
|
-
// }
|
|
20047
|
-
// }
|
|
20048
|
-
// return false
|
|
20049
|
-
// }
|
|
20050
|
-
|
|
20006
|
+
}
|
|
20051
20007
|
},
|
|
20052
20008
|
watch: {
|
|
20053
20009
|
data: function data(value) {
|
|
@@ -20152,8 +20108,6 @@ function handleUupdateResize(_vm) {
|
|
|
20152
20108
|
scrollXStore: {},
|
|
20153
20109
|
// 存放纵向 Y 虚拟滚动相关信息
|
|
20154
20110
|
scrollYStore: {},
|
|
20155
|
-
// 存放 tooltip 相关信息
|
|
20156
|
-
tooltipStore: {},
|
|
20157
20111
|
// 表格宽度
|
|
20158
20112
|
tableWidth: 0,
|
|
20159
20113
|
// 表格高度
|
|
@@ -20324,7 +20278,6 @@ function handleUupdateResize(_vm) {
|
|
|
20324
20278
|
highlightHoverColumn = this.highlightHoverColumn,
|
|
20325
20279
|
editConfig = this.editConfig,
|
|
20326
20280
|
validTipOpts = this.validTipOpts,
|
|
20327
|
-
tooltipOpts = this.tooltipOpts,
|
|
20328
20281
|
initStore = this.initStore,
|
|
20329
20282
|
columnStore = this.columnStore,
|
|
20330
20283
|
filterStore = this.filterStore,
|
|
@@ -20506,7 +20459,7 @@ function handleUupdateResize(_vm) {
|
|
|
20506
20459
|
*/
|
|
20507
20460
|
hasTip ? h('vxe-tooltip', {
|
|
20508
20461
|
ref: 'tooltip',
|
|
20509
|
-
props:
|
|
20462
|
+
props: this.tipConfig
|
|
20510
20463
|
}) : _e(),
|
|
20511
20464
|
/**
|
|
20512
20465
|
* 校验提示
|
|
@@ -26443,7 +26396,8 @@ function getOptUniqueId() {
|
|
|
26443
26396
|
}
|
|
26444
26397
|
|
|
26445
26398
|
function getOptkey(_vm) {
|
|
26446
|
-
|
|
26399
|
+
var optionOpts = _vm.optionOpts;
|
|
26400
|
+
return optionOpts.keyField || _vm.optionId || '_X_OPTION_KEY';
|
|
26447
26401
|
}
|
|
26448
26402
|
|
|
26449
26403
|
function getOptid(_vm, option) {
|
|
@@ -26587,7 +26541,9 @@ function renderOption(h, _vm, list, group) {
|
|
|
26587
26541
|
optionKey = _vm.optionKey,
|
|
26588
26542
|
value = _vm.value,
|
|
26589
26543
|
multiple = _vm.multiple,
|
|
26590
|
-
currentValue = _vm.currentValue
|
|
26544
|
+
currentValue = _vm.currentValue,
|
|
26545
|
+
optionOpts = _vm.optionOpts;
|
|
26546
|
+
var useKey = optionOpts.useKey;
|
|
26591
26547
|
return list.map(function (option, cIndex) {
|
|
26592
26548
|
var slots = option.slots;
|
|
26593
26549
|
var isVisible = !isGroup || isOptionVisible(option);
|
|
@@ -26596,7 +26552,7 @@ function renderOption(h, _vm, list, group) {
|
|
|
26596
26552
|
var optid = getOptid(_vm, option);
|
|
26597
26553
|
var defaultSlot = slots ? slots.default : null;
|
|
26598
26554
|
return isVisible ? h('div', {
|
|
26599
|
-
key: optionKey ? optid : cIndex,
|
|
26555
|
+
key: useKey || optionKey ? optid : cIndex,
|
|
26600
26556
|
class: ['vxe-select-option', option.className, {
|
|
26601
26557
|
'is--disabled': isDisabled,
|
|
26602
26558
|
'is--selected': multiple ? value && value.indexOf(optionValue) > -1 : value === optionValue,
|
|
@@ -26628,14 +26584,16 @@ function renderOptgroup(h, _vm) {
|
|
|
26628
26584
|
var optionKey = _vm.optionKey,
|
|
26629
26585
|
visibleGroupList = _vm.visibleGroupList,
|
|
26630
26586
|
groupLabelField = _vm.groupLabelField,
|
|
26631
|
-
groupOptionsField = _vm.groupOptionsField
|
|
26587
|
+
groupOptionsField = _vm.groupOptionsField,
|
|
26588
|
+
optionOpts = _vm.optionOpts;
|
|
26589
|
+
var useKey = optionOpts.useKey;
|
|
26632
26590
|
return visibleGroupList.map(function (group, gIndex) {
|
|
26633
26591
|
var slots = group.slots;
|
|
26634
26592
|
var optid = getOptid(_vm, group);
|
|
26635
26593
|
var isGroupDisabled = group.disabled;
|
|
26636
26594
|
var defaultSlot = slots ? slots.default : null;
|
|
26637
26595
|
return h('div', {
|
|
26638
|
-
key: optionKey ? optid : gIndex,
|
|
26596
|
+
key: useKey || optionKey ? optid : gIndex,
|
|
26639
26597
|
class: ['vxe-optgroup', group.className, {
|
|
26640
26598
|
'is--disabled': isGroupDisabled
|
|
26641
26599
|
}],
|
|
@@ -26695,6 +26653,7 @@ function select_renderOpts(h, _vm) {
|
|
|
26695
26653
|
optionProps: Object,
|
|
26696
26654
|
optionGroups: Array,
|
|
26697
26655
|
optionGroupProps: Object,
|
|
26656
|
+
optionConfig: Object,
|
|
26698
26657
|
className: [String, Function],
|
|
26699
26658
|
size: {
|
|
26700
26659
|
type: String,
|
|
@@ -26703,12 +26662,14 @@ function select_renderOpts(h, _vm) {
|
|
|
26703
26662
|
}
|
|
26704
26663
|
},
|
|
26705
26664
|
emptyText: String,
|
|
26665
|
+
// 已废弃,被 option-config.keyField 替换
|
|
26706
26666
|
optionId: {
|
|
26707
26667
|
type: String,
|
|
26708
26668
|
default: function _default() {
|
|
26709
26669
|
return conf.select.optionId;
|
|
26710
26670
|
}
|
|
26711
26671
|
},
|
|
26672
|
+
// 已废弃,被 option-config.useKey 替换
|
|
26712
26673
|
optionKey: Boolean,
|
|
26713
26674
|
transfer: {
|
|
26714
26675
|
type: Boolean,
|
|
@@ -26761,6 +26722,9 @@ function select_renderOpts(h, _vm) {
|
|
|
26761
26722
|
groupOptionsField: function groupOptionsField() {
|
|
26762
26723
|
return this.groupPropsOpts.options || 'options';
|
|
26763
26724
|
},
|
|
26725
|
+
optionOpts: function optionOpts() {
|
|
26726
|
+
return Object.assign({}, conf.select.optionConfig, this.optionConfig);
|
|
26727
|
+
},
|
|
26764
26728
|
isGroup: function isGroup() {
|
|
26765
26729
|
return this.fullGroupList.some(function (item) {
|
|
26766
26730
|
return item.options && item.options.length;
|
|
@@ -32007,8 +31971,10 @@ var column_props = {
|
|
|
32007
31971
|
exportMethod: Function,
|
|
32008
31972
|
// 表尾单元格数据导出方法
|
|
32009
31973
|
footerExportMethod: Function,
|
|
32010
|
-
//
|
|
31974
|
+
// 已废弃,被 titlePrefix 替换
|
|
32011
31975
|
titleHelp: Object,
|
|
31976
|
+
// 标题帮助图标配置项
|
|
31977
|
+
titlePrefix: Object,
|
|
32012
31978
|
// 单元格值类型
|
|
32013
31979
|
cellType: String,
|
|
32014
31980
|
// 单元格渲染配置项
|
|
@@ -35820,7 +35786,35 @@ function showTip(_vm) {
|
|
|
35820
35786
|
return _vm.updatePlacement();
|
|
35821
35787
|
}
|
|
35822
35788
|
|
|
35823
|
-
|
|
35789
|
+
function tooltip_renderContent(h, _vm) {
|
|
35790
|
+
var $scopedSlots = _vm.$scopedSlots,
|
|
35791
|
+
useHTML = _vm.useHTML,
|
|
35792
|
+
tipContent = _vm.tipContent;
|
|
35793
|
+
|
|
35794
|
+
if ($scopedSlots.content) {
|
|
35795
|
+
return h('div', {
|
|
35796
|
+
key: 1,
|
|
35797
|
+
class: 'vxe-table--tooltip-content'
|
|
35798
|
+
}, $scopedSlots.content.call(this, {}));
|
|
35799
|
+
}
|
|
35800
|
+
|
|
35801
|
+
if (useHTML) {
|
|
35802
|
+
return h('div', {
|
|
35803
|
+
key: 2,
|
|
35804
|
+
class: 'vxe-table--tooltip-content',
|
|
35805
|
+
domProps: {
|
|
35806
|
+
innerHTML: tipContent
|
|
35807
|
+
}
|
|
35808
|
+
});
|
|
35809
|
+
}
|
|
35810
|
+
|
|
35811
|
+
return h('div', {
|
|
35812
|
+
key: 3,
|
|
35813
|
+
class: 'vxe-table--tooltip-content'
|
|
35814
|
+
}, utils.formatText(tipContent));
|
|
35815
|
+
}
|
|
35816
|
+
|
|
35817
|
+
/* harmony default export */ var tooltip = ({
|
|
35824
35818
|
name: 'VxeTooltip',
|
|
35825
35819
|
mixins: [size],
|
|
35826
35820
|
props: {
|
|
@@ -35843,7 +35837,11 @@ function showTip(_vm) {
|
|
|
35843
35837
|
return conf.tooltip.theme;
|
|
35844
35838
|
}
|
|
35845
35839
|
},
|
|
35846
|
-
content:
|
|
35840
|
+
content: {
|
|
35841
|
+
type: [String, Number],
|
|
35842
|
+
default: null
|
|
35843
|
+
},
|
|
35844
|
+
useHTML: Boolean,
|
|
35847
35845
|
zIndex: [String, Number],
|
|
35848
35846
|
isArrow: {
|
|
35849
35847
|
type: Boolean,
|
|
@@ -35861,14 +35859,13 @@ function showTip(_vm) {
|
|
|
35861
35859
|
default: function _default() {
|
|
35862
35860
|
return conf.tooltip.leaveDelay;
|
|
35863
35861
|
}
|
|
35864
|
-
}
|
|
35865
|
-
leaveMethod: Function
|
|
35862
|
+
}
|
|
35866
35863
|
},
|
|
35867
35864
|
data: function data() {
|
|
35868
35865
|
return {
|
|
35869
35866
|
isUpdate: false,
|
|
35870
35867
|
visible: false,
|
|
35871
|
-
|
|
35868
|
+
tipContent: '',
|
|
35872
35869
|
tipActive: false,
|
|
35873
35870
|
tipTarget: null,
|
|
35874
35871
|
tipZindex: 0,
|
|
@@ -35881,7 +35878,7 @@ function showTip(_vm) {
|
|
|
35881
35878
|
},
|
|
35882
35879
|
watch: {
|
|
35883
35880
|
content: function content(value) {
|
|
35884
|
-
this.
|
|
35881
|
+
this.tipContent = value;
|
|
35885
35882
|
},
|
|
35886
35883
|
value: function value(_value) {
|
|
35887
35884
|
if (!this.isUpdate) {
|
|
@@ -35910,7 +35907,7 @@ function showTip(_vm) {
|
|
|
35910
35907
|
value = this.value;
|
|
35911
35908
|
var parentNode = $el.parentNode;
|
|
35912
35909
|
var target;
|
|
35913
|
-
this.
|
|
35910
|
+
this.tipContent = content;
|
|
35914
35911
|
this.tipZindex = utils.nextZIndex();
|
|
35915
35912
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.children, function (elem, index) {
|
|
35916
35913
|
if (index > 1) {
|
|
@@ -35962,7 +35959,6 @@ function showTip(_vm) {
|
|
|
35962
35959
|
var $scopedSlots = this.$scopedSlots,
|
|
35963
35960
|
vSize = this.vSize,
|
|
35964
35961
|
theme = this.theme,
|
|
35965
|
-
message = this.message,
|
|
35966
35962
|
tipActive = this.tipActive,
|
|
35967
35963
|
isArrow = this.isArrow,
|
|
35968
35964
|
visible = this.visible,
|
|
@@ -35982,16 +35978,14 @@ function showTip(_vm) {
|
|
|
35982
35978
|
style: tipStore.style,
|
|
35983
35979
|
ref: 'tipWrapper',
|
|
35984
35980
|
on: on
|
|
35985
|
-
}, [h('div', {
|
|
35986
|
-
class: 'vxe-table--tooltip-content'
|
|
35987
|
-
}, $scopedSlots.content ? $scopedSlots.content.call(this, {}) : message), h('div', {
|
|
35981
|
+
}, [tooltip_renderContent(h, this), h('div', {
|
|
35988
35982
|
class: 'vxe-table--tooltip-arrow',
|
|
35989
35983
|
style: tipStore.arrowStyle
|
|
35990
35984
|
})].concat($scopedSlots.default ? $scopedSlots.default.call(this, {}) : []));
|
|
35991
35985
|
},
|
|
35992
35986
|
methods: {
|
|
35993
|
-
open: function open(target,
|
|
35994
|
-
return this.toVisible(target || this.target,
|
|
35987
|
+
open: function open(target, content) {
|
|
35988
|
+
return this.toVisible(target || this.target, content);
|
|
35995
35989
|
},
|
|
35996
35990
|
close: function close() {
|
|
35997
35991
|
this.tipTarget = null;
|
|
@@ -36019,15 +36013,15 @@ function showTip(_vm) {
|
|
|
36019
36013
|
this.tipZindex = utils.nextZIndex();
|
|
36020
36014
|
}
|
|
36021
36015
|
},
|
|
36022
|
-
toVisible: function toVisible(target,
|
|
36016
|
+
toVisible: function toVisible(target, content) {
|
|
36023
36017
|
if (target) {
|
|
36024
36018
|
var trigger = this.trigger,
|
|
36025
36019
|
enterDelay = this.enterDelay;
|
|
36026
36020
|
this.tipActive = true;
|
|
36027
36021
|
this.tipTarget = target;
|
|
36028
36022
|
|
|
36029
|
-
if (
|
|
36030
|
-
this.
|
|
36023
|
+
if (content) {
|
|
36024
|
+
this.tipContent = content;
|
|
36031
36025
|
}
|
|
36032
36026
|
|
|
36033
36027
|
if (enterDelay && trigger === 'hover') {
|
|
@@ -36087,25 +36081,20 @@ function showTip(_vm) {
|
|
|
36087
36081
|
wrapperMouseenterEvent: function wrapperMouseenterEvent() {
|
|
36088
36082
|
this.tipActive = true;
|
|
36089
36083
|
},
|
|
36090
|
-
wrapperMouseleaveEvent: function wrapperMouseleaveEvent(
|
|
36084
|
+
wrapperMouseleaveEvent: function wrapperMouseleaveEvent() {
|
|
36091
36085
|
var _this4 = this;
|
|
36092
36086
|
|
|
36093
|
-
var
|
|
36094
|
-
trigger = this.trigger,
|
|
36087
|
+
var trigger = this.trigger,
|
|
36095
36088
|
enterable = this.enterable,
|
|
36096
36089
|
leaveDelay = this.leaveDelay;
|
|
36097
36090
|
this.tipActive = false;
|
|
36098
36091
|
|
|
36099
|
-
if (
|
|
36100
|
-
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
|
|
36104
|
-
|
|
36105
|
-
_this4.close();
|
|
36106
|
-
}
|
|
36107
|
-
}, leaveDelay);
|
|
36108
|
-
}
|
|
36092
|
+
if (enterable && trigger === 'hover') {
|
|
36093
|
+
setTimeout(function () {
|
|
36094
|
+
if (!_this4.tipActive) {
|
|
36095
|
+
_this4.close();
|
|
36096
|
+
}
|
|
36097
|
+
}, leaveDelay);
|
|
36109
36098
|
}
|
|
36110
36099
|
}
|
|
36111
36100
|
}
|
|
@@ -36115,10 +36104,10 @@ function showTip(_vm) {
|
|
|
36115
36104
|
|
|
36116
36105
|
|
|
36117
36106
|
|
|
36118
|
-
var Tooltip = Object.assign(
|
|
36107
|
+
var Tooltip = Object.assign(tooltip, {
|
|
36119
36108
|
install: function install(Vue) {
|
|
36120
36109
|
v_x_e_table._tooltip = 1;
|
|
36121
|
-
Vue.component(
|
|
36110
|
+
Vue.component(tooltip.name, tooltip);
|
|
36122
36111
|
}
|
|
36123
36112
|
});
|
|
36124
36113
|
/* harmony default export */ var packages_tooltip = (Tooltip);
|
|
@@ -36225,6 +36214,7 @@ function assemItem(_vm) {
|
|
|
36225
36214
|
|
|
36226
36215
|
|
|
36227
36216
|
|
|
36217
|
+
|
|
36228
36218
|
function renderPrefixIcon(h, titlePrefix) {
|
|
36229
36219
|
return h('span', {
|
|
36230
36220
|
class: 'vxe-form--item-title-prefix'
|
|
@@ -36242,7 +36232,8 @@ function render_renderSuffixIcon(h, titleSuffix) {
|
|
|
36242
36232
|
}
|
|
36243
36233
|
|
|
36244
36234
|
function renderTitle(h, _vm, item) {
|
|
36245
|
-
var data = _vm.data
|
|
36235
|
+
var data = _vm.data,
|
|
36236
|
+
tooltipOpts = _vm.tooltipOpts;
|
|
36246
36237
|
var slots = item.slots,
|
|
36247
36238
|
field = item.field,
|
|
36248
36239
|
itemRender = item.itemRender,
|
|
@@ -36260,11 +36251,9 @@ function renderTitle(h, _vm, item) {
|
|
|
36260
36251
|
|
|
36261
36252
|
if (titlePrefix) {
|
|
36262
36253
|
titVNs.push(titlePrefix.content || titlePrefix.message ? h('vxe-tooltip', {
|
|
36263
|
-
props: {
|
|
36264
|
-
content: getFuncText(titlePrefix.content || titlePrefix.message)
|
|
36265
|
-
|
|
36266
|
-
theme: titlePrefix.theme
|
|
36267
|
-
}
|
|
36254
|
+
props: _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipOpts), titlePrefix), {}, {
|
|
36255
|
+
content: getFuncText(titlePrefix.content || titlePrefix.message)
|
|
36256
|
+
})
|
|
36268
36257
|
}, [renderPrefixIcon(h, titlePrefix)]) : renderPrefixIcon(h, titlePrefix));
|
|
36269
36258
|
}
|
|
36270
36259
|
|
|
@@ -36278,11 +36267,9 @@ function renderTitle(h, _vm, item) {
|
|
|
36278
36267
|
|
|
36279
36268
|
if (titleSuffix) {
|
|
36280
36269
|
fixVNs.push(titleSuffix.content || titleSuffix.message ? h('vxe-tooltip', {
|
|
36281
|
-
props: {
|
|
36282
|
-
content: getFuncText(titleSuffix.content || titleSuffix.message)
|
|
36283
|
-
|
|
36284
|
-
theme: titleSuffix.theme
|
|
36285
|
-
}
|
|
36270
|
+
props: _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipOpts), titlePrefix), {}, {
|
|
36271
|
+
content: getFuncText(titleSuffix.content || titleSuffix.message)
|
|
36272
|
+
})
|
|
36286
36273
|
}, [render_renderSuffixIcon(h, titleSuffix)]) : render_renderSuffixIcon(h, titleSuffix));
|
|
36287
36274
|
}
|
|
36288
36275
|
|
|
@@ -36318,7 +36305,6 @@ function renderTitle(h, _vm, item) {
|
|
|
36318
36305
|
|
|
36319
36306
|
|
|
36320
36307
|
|
|
36321
|
-
|
|
36322
36308
|
|
|
36323
36309
|
|
|
36324
36310
|
var form_Rule = /*#__PURE__*/function () {
|
|
@@ -36398,7 +36384,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36398
36384
|
collapseAll = _vm.collapseAll,
|
|
36399
36385
|
validOpts = _vm.validOpts,
|
|
36400
36386
|
allTitleOverflow = _vm.titleOverflow;
|
|
36401
|
-
return itemList.map(function (item
|
|
36387
|
+
return itemList.map(function (item) {
|
|
36402
36388
|
var slots = item.slots,
|
|
36403
36389
|
title = item.title,
|
|
36404
36390
|
folding = item.folding,
|
|
@@ -36474,9 +36460,9 @@ function renderItems(h, _vm, itemList) {
|
|
|
36474
36460
|
|
|
36475
36461
|
var ons = showTooltip ? {
|
|
36476
36462
|
mouseenter: function mouseenter(evnt) {
|
|
36477
|
-
_vm.
|
|
36463
|
+
_vm.triggerTitleTipEvent(evnt, params);
|
|
36478
36464
|
},
|
|
36479
|
-
mouseleave: _vm.
|
|
36465
|
+
mouseleave: _vm.handleTitleTipLeaveEvent
|
|
36480
36466
|
} : {};
|
|
36481
36467
|
return h('div', {
|
|
36482
36468
|
class: ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : null, className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className(params) : className : '', {
|
|
@@ -36486,7 +36472,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36486
36472
|
'is--active': !itemVisibleMethod || itemVisibleMethod(params),
|
|
36487
36473
|
'is--error': showError
|
|
36488
36474
|
}],
|
|
36489
|
-
key:
|
|
36475
|
+
key: item.id
|
|
36490
36476
|
}, [h('div', {
|
|
36491
36477
|
class: 'vxe-form--item-inner'
|
|
36492
36478
|
}, [title || slots && slots.title ? h('div', {
|
|
@@ -36586,6 +36572,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36586
36572
|
}
|
|
36587
36573
|
},
|
|
36588
36574
|
validConfig: Object,
|
|
36575
|
+
tooltipConfig: Object,
|
|
36589
36576
|
customLayout: {
|
|
36590
36577
|
type: Boolean,
|
|
36591
36578
|
default: function _default() {
|
|
@@ -36599,7 +36586,6 @@ function renderItems(h, _vm, itemList) {
|
|
|
36599
36586
|
staticItems: [],
|
|
36600
36587
|
formItems: [],
|
|
36601
36588
|
tooltipTimeout: null,
|
|
36602
|
-
tooltipActive: false,
|
|
36603
36589
|
tooltipStore: {
|
|
36604
36590
|
item: null,
|
|
36605
36591
|
visible: false
|
|
@@ -36616,15 +36602,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36616
36602
|
return Object.assign({}, conf.form.validConfig, this.validConfig);
|
|
36617
36603
|
},
|
|
36618
36604
|
tooltipOpts: function tooltipOpts() {
|
|
36619
|
-
|
|
36620
|
-
leaveDelay: 300
|
|
36621
|
-
}, conf.form.tooltipConfig, this.tooltipConfig);
|
|
36622
|
-
|
|
36623
|
-
if (opts.enterable) {
|
|
36624
|
-
opts.leaveMethod = this.handleTooltipLeaveMethod;
|
|
36625
|
-
}
|
|
36626
|
-
|
|
36627
|
-
return opts;
|
|
36605
|
+
return Object.assign({}, conf.tooltip, conf.form.tooltipConfig, this.tooltipConfig);
|
|
36628
36606
|
}
|
|
36629
36607
|
},
|
|
36630
36608
|
watch: {
|
|
@@ -36688,9 +36666,10 @@ function renderItems(h, _vm, itemList) {
|
|
|
36688
36666
|
/**
|
|
36689
36667
|
* 工具提示
|
|
36690
36668
|
*/
|
|
36691
|
-
hasUseTooltip ? h('vxe-tooltip',
|
|
36692
|
-
ref: 'tooltip'
|
|
36693
|
-
|
|
36669
|
+
hasUseTooltip ? h('vxe-tooltip', {
|
|
36670
|
+
ref: 'tooltip',
|
|
36671
|
+
props: tooltipOpts
|
|
36672
|
+
}) : _e()]);
|
|
36694
36673
|
},
|
|
36695
36674
|
methods: {
|
|
36696
36675
|
callSlot: function callSlot(slotFunc, params, h) {
|
|
@@ -36825,17 +36804,6 @@ function renderItems(h, _vm, itemList) {
|
|
|
36825
36804
|
$event: evnt
|
|
36826
36805
|
});
|
|
36827
36806
|
},
|
|
36828
|
-
handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
|
|
36829
|
-
var _this5 = this;
|
|
36830
|
-
|
|
36831
|
-
var tooltipOpts = this.tooltipOpts;
|
|
36832
|
-
setTimeout(function () {
|
|
36833
|
-
if (!_this5.tooltipActive) {
|
|
36834
|
-
_this5.closeTooltip();
|
|
36835
|
-
}
|
|
36836
|
-
}, tooltipOpts.leaveDelay);
|
|
36837
|
-
return false;
|
|
36838
|
-
},
|
|
36839
36807
|
closeTooltip: function closeTooltip() {
|
|
36840
36808
|
var tooltipStore = this.tooltipStore;
|
|
36841
36809
|
var $tooltip = this.$refs.tooltip;
|
|
@@ -36853,7 +36821,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36853
36821
|
|
|
36854
36822
|
return this.$nextTick();
|
|
36855
36823
|
},
|
|
36856
|
-
|
|
36824
|
+
triggerTitleTipEvent: function triggerTitleTipEvent(evnt, params) {
|
|
36857
36825
|
var item = params.item;
|
|
36858
36826
|
var tooltipStore = this.tooltipStore;
|
|
36859
36827
|
var $tooltip = this.$refs.tooltip;
|
|
@@ -36861,8 +36829,10 @@ function renderItems(h, _vm, itemList) {
|
|
|
36861
36829
|
var content = (overflowElem.textContent || '').trim();
|
|
36862
36830
|
var isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
|
|
36863
36831
|
clearTimeout(this.tooltipTimeout);
|
|
36864
|
-
|
|
36865
|
-
|
|
36832
|
+
|
|
36833
|
+
if (tooltipStore.item !== item) {
|
|
36834
|
+
this.closeTooltip();
|
|
36835
|
+
}
|
|
36866
36836
|
|
|
36867
36837
|
if (content && isCellOverflow) {
|
|
36868
36838
|
Object.assign(tooltipStore, {
|
|
@@ -36875,12 +36845,11 @@ function renderItems(h, _vm, itemList) {
|
|
|
36875
36845
|
}
|
|
36876
36846
|
}
|
|
36877
36847
|
},
|
|
36878
|
-
|
|
36879
|
-
var
|
|
36848
|
+
handleTitleTipLeaveEvent: function handleTitleTipLeaveEvent() {
|
|
36849
|
+
var _this5 = this;
|
|
36880
36850
|
|
|
36881
36851
|
var tooltipOpts = this.tooltipOpts;
|
|
36882
36852
|
var $tooltip = this.$refs.tooltip;
|
|
36883
|
-
this.tooltipActive = false;
|
|
36884
36853
|
|
|
36885
36854
|
if ($tooltip) {
|
|
36886
36855
|
$tooltip.setActived(false);
|
|
@@ -36888,10 +36857,10 @@ function renderItems(h, _vm, itemList) {
|
|
|
36888
36857
|
|
|
36889
36858
|
if (tooltipOpts.enterable) {
|
|
36890
36859
|
this.tooltipTimeout = setTimeout(function () {
|
|
36891
|
-
$tooltip =
|
|
36860
|
+
$tooltip = _this5.$refs.tooltip;
|
|
36892
36861
|
|
|
36893
36862
|
if ($tooltip && !$tooltip.isActived()) {
|
|
36894
|
-
|
|
36863
|
+
_this5.closeTooltip();
|
|
36895
36864
|
}
|
|
36896
36865
|
}, tooltipOpts.leaveDelay);
|
|
36897
36866
|
} else {
|
|
@@ -36922,7 +36891,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36922
36891
|
return this.beginValidate(item ? [item] : [], '', callback);
|
|
36923
36892
|
},
|
|
36924
36893
|
beginValidate: function beginValidate(itemList, type, callback) {
|
|
36925
|
-
var
|
|
36894
|
+
var _this6 = this;
|
|
36926
36895
|
|
|
36927
36896
|
var data = this.data,
|
|
36928
36897
|
formRules = this.rules,
|
|
@@ -36937,7 +36906,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36937
36906
|
var field = item.field;
|
|
36938
36907
|
|
|
36939
36908
|
if (field) {
|
|
36940
|
-
itemValids.push(
|
|
36909
|
+
itemValids.push(_this6.validItemRules(type || 'all', field).then(function () {
|
|
36941
36910
|
item.errRule = null;
|
|
36942
36911
|
}).catch(function (_ref2) {
|
|
36943
36912
|
var rule = _ref2.rule,
|
|
@@ -36948,7 +36917,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36948
36917
|
data: data,
|
|
36949
36918
|
field: field,
|
|
36950
36919
|
property: field,
|
|
36951
|
-
$form:
|
|
36920
|
+
$form: _this6
|
|
36952
36921
|
};
|
|
36953
36922
|
|
|
36954
36923
|
if (!validRest[field]) {
|
|
@@ -36968,7 +36937,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36968
36937
|
}
|
|
36969
36938
|
}).catch(function () {
|
|
36970
36939
|
return new Promise(function (resolve) {
|
|
36971
|
-
|
|
36940
|
+
_this6.showErrTime = setTimeout(function () {
|
|
36972
36941
|
itemList.forEach(function (item) {
|
|
36973
36942
|
if (item.errRule) {
|
|
36974
36943
|
item.showError = true;
|
|
@@ -36977,8 +36946,8 @@ function renderItems(h, _vm, itemList) {
|
|
|
36977
36946
|
}, 20);
|
|
36978
36947
|
|
|
36979
36948
|
if (validOpts.autoPos) {
|
|
36980
|
-
|
|
36981
|
-
|
|
36949
|
+
_this6.$nextTick(function () {
|
|
36950
|
+
_this6.handleFocus(validFields);
|
|
36982
36951
|
});
|
|
36983
36952
|
}
|
|
36984
36953
|
|
|
@@ -37014,7 +36983,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
37014
36983
|
* trigger=change 触发方式
|
|
37015
36984
|
*/
|
|
37016
36985
|
validItemRules: function validItemRules(validType, property, val) {
|
|
37017
|
-
var
|
|
36986
|
+
var _this7 = this;
|
|
37018
36987
|
|
|
37019
36988
|
var data = this.data,
|
|
37020
36989
|
formRules = this.rules;
|
|
@@ -37040,7 +37009,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
37040
37009
|
data: data,
|
|
37041
37010
|
field: property,
|
|
37042
37011
|
property: property,
|
|
37043
|
-
$form:
|
|
37012
|
+
$form: _this7
|
|
37044
37013
|
});
|
|
37045
37014
|
|
|
37046
37015
|
if (customValid) {
|
|
@@ -37087,11 +37056,11 @@ function renderItems(h, _vm, itemList) {
|
|
|
37087
37056
|
});
|
|
37088
37057
|
},
|
|
37089
37058
|
handleFocus: function handleFocus(fields) {
|
|
37090
|
-
var
|
|
37059
|
+
var _this8 = this;
|
|
37091
37060
|
|
|
37092
37061
|
var $el = this.$el;
|
|
37093
37062
|
fields.some(function (property, index) {
|
|
37094
|
-
var item =
|
|
37063
|
+
var item = _this8.getItemByField(property);
|
|
37095
37064
|
|
|
37096
37065
|
if (item && isEnableConf(item.itemRender)) {
|
|
37097
37066
|
var itemRender = item.itemRender;
|
|
@@ -37133,17 +37102,17 @@ function renderItems(h, _vm, itemList) {
|
|
|
37133
37102
|
* 如果单元格配置了校验规则,则会进行校验
|
|
37134
37103
|
*/
|
|
37135
37104
|
updateStatus: function updateStatus(scope, itemValue) {
|
|
37136
|
-
var
|
|
37105
|
+
var _this9 = this;
|
|
37137
37106
|
|
|
37138
37107
|
var property = scope.property;
|
|
37139
37108
|
|
|
37140
37109
|
if (property) {
|
|
37141
37110
|
this.validItemRules('change', property, itemValue).then(function () {
|
|
37142
|
-
|
|
37111
|
+
_this9.clearValidate(property);
|
|
37143
37112
|
}).catch(function (_ref3) {
|
|
37144
37113
|
var rule = _ref3.rule;
|
|
37145
37114
|
|
|
37146
|
-
var item =
|
|
37115
|
+
var item = _this9.getItemByField(property);
|
|
37147
37116
|
|
|
37148
37117
|
if (item) {
|
|
37149
37118
|
item.showError = true;
|
|
@@ -37274,9 +37243,9 @@ var form_item_renderItem = function renderItem(h, _vm, item, slots) {
|
|
|
37274
37243
|
|
|
37275
37244
|
var ons = showTooltip ? {
|
|
37276
37245
|
mouseenter: function mouseenter(evnt) {
|
|
37277
|
-
_vm.
|
|
37246
|
+
_vm.triggerTitleTipEvent(evnt, params);
|
|
37278
37247
|
},
|
|
37279
|
-
mouseleave: _vm.
|
|
37248
|
+
mouseleave: _vm.handleTitleTipLeaveEvent
|
|
37280
37249
|
} : {};
|
|
37281
37250
|
return h('div', {
|
|
37282
37251
|
class: ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : null, className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className(params) : className : '', {
|