yxuse 3.0.63 → 3.0.64

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.es6.js CHANGED
@@ -20511,7 +20511,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20511
20511
  const renderForm = (prop, index2, component) => {
20512
20512
  return createVNode(resolveComponent("el-form-item"), {
20513
20513
  "prop": "tableData." + index2 + "." + prop,
20514
- "label": " ",
20515
20514
  "rules": formTableRules.value[prop]
20516
20515
  }, _isSlot$1(component) ? component : {
20517
20516
  default: () => [component]
@@ -20573,7 +20572,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20573
20572
  if (cell == null ? void 0 : cell.render) {
20574
20573
  const renderResult = cell.render(scope.row, scope.$index, cell);
20575
20574
  const needsValidation = cell.required || cell.rules;
20576
- const isFragment = typeof (renderResult == null ? void 0 : renderResult.type) === "symbol";
20575
+ const isFragment = ["symbol", "object"].includes(typeof (renderResult == null ? void 0 : renderResult.type));
20577
20576
  if (needsValidation && isFragment) {
20578
20577
  return renderForm(cell.prop, scope.$index, renderResult);
20579
20578
  }
@@ -20583,9 +20582,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20583
20582
  return (cell == null ? void 0 : cell.slotName) && columnSlots(cell, scope);
20584
20583
  },
20585
20584
  header: (scope) => {
20586
- var _a;
20585
+ var _a, _b;
20586
+ if (cell == null ? void 0 : cell.required) {
20587
+ return createVNode("span", {
20588
+ "class": "flex items-center gap-5"
20589
+ }, [createVNode("span", {
20590
+ "class": "text-red-500"
20591
+ }, [createTextVNode("* ")]), ((_a = scope == null ? void 0 : scope.column) == null ? void 0 : _a.label) ?? ""]);
20592
+ }
20587
20593
  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 (_a = slots[cell == null ? void 0 : cell.headerSlotName]) == null ? void 0 : _a.call(slots, scope);
20594
+ if (cell == null ? void 0 : cell.headerSlotName) return (_b = slots[cell == null ? void 0 : cell.headerSlotName]) == null ? void 0 : _b.call(slots, scope);
20589
20595
  }
20590
20596
  });
20591
20597
  });
Binary file