yxuse 3.0.61 → 3.0.63
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 -3
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es6.js.map +1 -1
- package/package.json +1 -1
- package/types/components/YxTable/type.d.ts +1 -1
package/lib/index.es6.js
CHANGED
|
@@ -20506,8 +20506,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20506
20506
|
default: () => [_slot]
|
|
20507
20507
|
});
|
|
20508
20508
|
if (!isFormCell) return component;
|
|
20509
|
+
return renderForm(prop, $index, component);
|
|
20510
|
+
};
|
|
20511
|
+
const renderForm = (prop, index2, component) => {
|
|
20509
20512
|
return createVNode(resolveComponent("el-form-item"), {
|
|
20510
|
-
"prop": "tableData." +
|
|
20513
|
+
"prop": "tableData." + index2 + "." + prop,
|
|
20511
20514
|
"label": " ",
|
|
20512
20515
|
"rules": formTableRules.value[prop]
|
|
20513
20516
|
}, _isSlot$1(component) ? component : {
|
|
@@ -20532,7 +20535,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20532
20535
|
rules[item.prop] = [...rules[item == null ? void 0 : item.prop] || [], ...item.rules];
|
|
20533
20536
|
}
|
|
20534
20537
|
};
|
|
20535
|
-
columns.value.filter((cell) => (cell == null ? void 0 : cell.renderType) && ((cell == null ? void 0 : cell.required) || (cell == null ? void 0 : cell.rules))).forEach((form) => {
|
|
20538
|
+
columns.value.filter((cell) => ((cell == null ? void 0 : cell.renderType) || (cell == null ? void 0 : cell.render)) && ((cell == null ? void 0 : cell.required) || (cell == null ? void 0 : cell.rules))).forEach((form) => {
|
|
20536
20539
|
var _a;
|
|
20537
20540
|
(_a = form.children) == null ? void 0 : _a.forEach(handleRule);
|
|
20538
20541
|
handleRule(form);
|
|
@@ -20567,7 +20570,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20567
20570
|
if ((cell == null ? void 0 : cell.renderType) && (cell == null ? void 0 : cell.renderType) !== "operate") {
|
|
20568
20571
|
return dynamicComponent(cell, scope);
|
|
20569
20572
|
}
|
|
20570
|
-
if (cell == null ? void 0 : cell.render)
|
|
20573
|
+
if (cell == null ? void 0 : cell.render) {
|
|
20574
|
+
const renderResult = cell.render(scope.row, scope.$index, cell);
|
|
20575
|
+
const needsValidation = cell.required || cell.rules;
|
|
20576
|
+
const isFragment = typeof (renderResult == null ? void 0 : renderResult.type) === "symbol";
|
|
20577
|
+
if (needsValidation && isFragment) {
|
|
20578
|
+
return renderForm(cell.prop, scope.$index, renderResult);
|
|
20579
|
+
}
|
|
20580
|
+
return renderResult;
|
|
20581
|
+
}
|
|
20571
20582
|
if (children && (children == null ? void 0 : children.length) > 0) return renderColumn(children);
|
|
20572
20583
|
return (cell == null ? void 0 : cell.slotName) && columnSlots(cell, scope);
|
|
20573
20584
|
},
|
package/lib/index.es6.js.gz
CHANGED
|
Binary file
|