iov-pro-components 0.0.25 → 0.0.26
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.
|
@@ -9308,6 +9308,38 @@ var script$j = {
|
|
|
9308
9308
|
var _this14$modelValue$ke;
|
|
9309
9309
|
return Array.isArray(_this14.modelValue[key]) ? (_this14$modelValue$ke = _this14.modelValue[key]) === null || _this14$modelValue$ke === void 0 ? void 0 : _this14$modelValue$ke.includes(option.value) : _this14.modelValue[key] === option.value;
|
|
9310
9310
|
});
|
|
9311
|
+
},
|
|
9312
|
+
/**
|
|
9313
|
+
* 通过对象的名称获取对象的引用
|
|
9314
|
+
* @param {String} compName 组件名
|
|
9315
|
+
* @time 2025-06-25 17:46:19
|
|
9316
|
+
*/
|
|
9317
|
+
getComponentRef: function getComponentRef(fieldName) {
|
|
9318
|
+
// 所有的formItems引用
|
|
9319
|
+
var formItems = [];
|
|
9320
|
+
|
|
9321
|
+
/**
|
|
9322
|
+
* 获取所有表单项对象
|
|
9323
|
+
* @param {参数类型} data 参数说明
|
|
9324
|
+
* @time 2025-06-25 17:56:00
|
|
9325
|
+
*/
|
|
9326
|
+
var _getFormItems = function getFormItems(children) {
|
|
9327
|
+
// 遍历所有的孩子节点
|
|
9328
|
+
children.forEach(function (child) {
|
|
9329
|
+
// 如果当前是表单项
|
|
9330
|
+
if (child.$options['_componentTag'] === 'ElFormItem') {
|
|
9331
|
+
formItems.push(child);
|
|
9332
|
+
} else if (child.$children.length > 0) {
|
|
9333
|
+
_getFormItems(child.$children);
|
|
9334
|
+
}
|
|
9335
|
+
});
|
|
9336
|
+
};
|
|
9337
|
+
// 遍历所有孩子节点,获取所有的表单项
|
|
9338
|
+
_getFormItems(this.$children);
|
|
9339
|
+
// 先找到当前的表单项
|
|
9340
|
+
return formItems.find(function (item) {
|
|
9341
|
+
return item.prop === fieldName;
|
|
9342
|
+
}).$children[1];
|
|
9311
9343
|
}
|
|
9312
9344
|
},
|
|
9313
9345
|
render: function render(h) {
|
|
@@ -9468,7 +9500,7 @@ var script$j = {
|
|
|
9468
9500
|
}]), [renderComponentSlots, // 循环options的数据
|
|
9469
9501
|
(_this15$getNiceOption = _this15.getNiceOptions(optionsData, itemConfig.key)) === null || _this15$getNiceOption === void 0 ? void 0 : _this15$getNiceOption.map(function (option) {
|
|
9470
9502
|
return h(Option, {
|
|
9471
|
-
"key": option.value,
|
|
9503
|
+
"key": option.key || option.value,
|
|
9472
9504
|
"attrs": {
|
|
9473
9505
|
"label": option.label,
|
|
9474
9506
|
"value": option.value
|
|
@@ -9497,7 +9529,7 @@ var script$j = {
|
|
|
9497
9529
|
}]), [// 循环options的数据
|
|
9498
9530
|
(_options$data = options.data) === null || _options$data === void 0 ? void 0 : _options$data.map(function (option) {
|
|
9499
9531
|
return h(ComponentType, {
|
|
9500
|
-
"key": option.value,
|
|
9532
|
+
"key": option.key || option.value,
|
|
9501
9533
|
"attrs": {
|
|
9502
9534
|
"label": option.value
|
|
9503
9535
|
}
|
|
@@ -9525,7 +9557,7 @@ var script$j = {
|
|
|
9525
9557
|
}]), [// 循环options的数据
|
|
9526
9558
|
(_options$data2 = options.data) === null || _options$data2 === void 0 ? void 0 : _options$data2.map(function (option) {
|
|
9527
9559
|
return h(ComponentType, {
|
|
9528
|
-
"key": option.value,
|
|
9560
|
+
"key": option.key || option.value,
|
|
9529
9561
|
"attrs": {
|
|
9530
9562
|
"label": option.value
|
|
9531
9563
|
}
|
|
@@ -19990,7 +20022,7 @@ var install = function install(Vue, componentConfig) {
|
|
|
19990
20022
|
};
|
|
19991
20023
|
var index = {
|
|
19992
20024
|
install: install,
|
|
19993
|
-
version: '0.0.
|
|
20025
|
+
version: '0.0.26',
|
|
19994
20026
|
ColumnTooltip: __vue_component__$t,
|
|
19995
20027
|
Description: __vue_component__$q,
|
|
19996
20028
|
DialogSelect: __vue_component__$p,
|