yxuse 3.0.63 → 3.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs6.js.map +1 -1
- package/lib/index.es6.js +14 -9
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es6.js.map +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.es6.js
CHANGED
|
@@ -20411,13 +20411,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20411
20411
|
columns.value = typeof props.columns === "function" ? await props.columns() : props.columns;
|
|
20412
20412
|
columns.value.forEach((col) => {
|
|
20413
20413
|
var _a, _b;
|
|
20414
|
-
if (
|
|
20415
|
-
if (["select", "cascader"].includes(col.renderType) && ((_a = col == null ? void 0 : col.config) == null ? void 0 : _a.loadOptions)) {
|
|
20416
|
-
loadOptions(col.config);
|
|
20417
|
-
}
|
|
20418
|
-
if (col.required || ((_b = col.rules) == null ? void 0 : _b.length)) {
|
|
20414
|
+
if (col.required || ((_a = col.rules) == null ? void 0 : _a.length)) {
|
|
20419
20415
|
isFormTable.value = true;
|
|
20420
20416
|
}
|
|
20417
|
+
if ((col == null ? void 0 : col.renderType) && ["select", "cascader"].includes(col == null ? void 0 : col.renderType) && ((_b = col == null ? void 0 : col.config) == null ? void 0 : _b.loadOptions)) {
|
|
20418
|
+
loadOptions(col.config);
|
|
20419
|
+
}
|
|
20421
20420
|
});
|
|
20422
20421
|
if (isFormTable.value) {
|
|
20423
20422
|
getRules();
|
|
@@ -20511,7 +20510,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20511
20510
|
const renderForm = (prop, index2, component) => {
|
|
20512
20511
|
return createVNode(resolveComponent("el-form-item"), {
|
|
20513
20512
|
"prop": "tableData." + index2 + "." + prop,
|
|
20514
|
-
"label": " ",
|
|
20515
20513
|
"rules": formTableRules.value[prop]
|
|
20516
20514
|
}, _isSlot$1(component) ? component : {
|
|
20517
20515
|
default: () => [component]
|
|
@@ -20573,7 +20571,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20573
20571
|
if (cell == null ? void 0 : cell.render) {
|
|
20574
20572
|
const renderResult = cell.render(scope.row, scope.$index, cell);
|
|
20575
20573
|
const needsValidation = cell.required || cell.rules;
|
|
20576
|
-
const isFragment = typeof (renderResult == null ? void 0 : renderResult.type)
|
|
20574
|
+
const isFragment = ["symbol", "object"].includes(typeof (renderResult == null ? void 0 : renderResult.type));
|
|
20577
20575
|
if (needsValidation && isFragment) {
|
|
20578
20576
|
return renderForm(cell.prop, scope.$index, renderResult);
|
|
20579
20577
|
}
|
|
@@ -20583,9 +20581,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20583
20581
|
return (cell == null ? void 0 : cell.slotName) && columnSlots(cell, scope);
|
|
20584
20582
|
},
|
|
20585
20583
|
header: (scope) => {
|
|
20586
|
-
var _a;
|
|
20584
|
+
var _a, _b;
|
|
20585
|
+
if (cell == null ? void 0 : cell.required) {
|
|
20586
|
+
return createVNode("span", {
|
|
20587
|
+
"class": "flex items-center gap-5"
|
|
20588
|
+
}, [createVNode("span", {
|
|
20589
|
+
"class": "text-red-500"
|
|
20590
|
+
}, [createTextVNode("* ")]), ((_a = scope == null ? void 0 : scope.column) == null ? void 0 : _a.label) ?? ""]);
|
|
20591
|
+
}
|
|
20587
20592
|
if (cell == null ? void 0 : cell.headerRender) return cell == null ? void 0 : cell.headerRender(scope.row);
|
|
20588
|
-
if (cell == null ? void 0 : cell.headerSlotName) return (
|
|
20593
|
+
if (cell == null ? void 0 : cell.headerSlotName) return (_b = slots[cell == null ? void 0 : cell.headerSlotName]) == null ? void 0 : _b.call(slots, scope);
|
|
20589
20594
|
}
|
|
20590
20595
|
});
|
|
20591
20596
|
});
|
package/lib/index.es6.js.gz
CHANGED
|
Binary file
|