3h1-ui 2.3.0 → 2.4.0

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.
Files changed (3) hide show
  1. package/es/index.js +27 -17
  2. package/lib/index.js +27 -17
  3. package/package.json +3 -3
package/es/index.js CHANGED
@@ -15715,30 +15715,35 @@ const Description = /* @__PURE__ */ defineComponent({
15715
15715
  });
15716
15716
  const innerProps = ref(null);
15717
15717
  const setDescProps = (props3) => {
15718
- innerProps.value = props3;
15718
+ innerProps.value = {
15719
+ ...innerProps.value,
15720
+ ...props3
15721
+ };
15719
15722
  };
15720
- const rows = getProps.value.schema.map((item) => {
15721
- var _a2, _b;
15722
- return createVNode("div", {
15723
- "class": `${prefixCls2}-row`,
15724
- "style": {
15725
- flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
15726
- }
15727
- }, [createVNode("span", {
15728
- "style": {
15729
- width: `${getProps.value.labelWidth}px`
15730
- },
15731
- "class": `${prefixCls2}-label`
15732
- }, [slots[`${item.field}Label`] ? slots[`${item.field}Label`]() : item.label, ((_b = getProps.value) == null ? void 0 : _b.isShowColon) ? ":" : ""]), createVNode("span", {
15733
- "class": `${prefixCls2}-value`
15734
- }, [slots[`${item.field}Value`] ? slots[`${item.field}Value`]() : getProps.value.data[item.field]])]);
15723
+ const rows = computed(() => {
15724
+ return getProps.value.schema.map((item) => {
15725
+ var _a2, _b;
15726
+ return createVNode("div", {
15727
+ "class": `${prefixCls2}-row`,
15728
+ "style": {
15729
+ flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
15730
+ }
15731
+ }, [createVNode("span", {
15732
+ "style": {
15733
+ width: `${getProps.value.labelWidth}px`
15734
+ },
15735
+ "class": `${prefixCls2}-label`
15736
+ }, [slots[`${item.field}Label`] ? slots[`${item.field}Label`]() : item.label, ((_b = getProps.value) == null ? void 0 : _b.isShowColon) ? ":" : ""]), createVNode("span", {
15737
+ "class": `${prefixCls2}-value`
15738
+ }, [slots[`${item.field}Value`] ? slots[`${item.field}Value`]() : getProps.value.data[item.field]])]);
15739
+ });
15735
15740
  });
15736
15741
  emit("register", {
15737
15742
  setDescProps
15738
15743
  });
15739
15744
  return () => createVNode("div", {
15740
15745
  "class": `${prefixCls2}-wrapper`
15741
- }, [rows]);
15746
+ }, [rows.value]);
15742
15747
  }
15743
15748
  });
15744
15749
  function useDescription(props2) {
@@ -20241,6 +20246,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20241
20246
  ];
20242
20247
  })
20243
20248
  ]),
20249
+ header: withCtx(() => [
20250
+ renderSlot(_ctx.$slots, `${column.field}Header`, normalizeProps(guardReactiveProps({ column })), () => [
20251
+ createTextVNode(toDisplayString(column.title), 1)
20252
+ ])
20253
+ ]),
20244
20254
  _: 2
20245
20255
  }, 1040, ["edit-render"]);
20246
20256
  }), 128)),
package/lib/index.js CHANGED
@@ -15717,30 +15717,35 @@ const Description = /* @__PURE__ */ vue.defineComponent({
15717
15717
  });
15718
15718
  const innerProps = vue.ref(null);
15719
15719
  const setDescProps = (props3) => {
15720
- innerProps.value = props3;
15720
+ innerProps.value = {
15721
+ ...innerProps.value,
15722
+ ...props3
15723
+ };
15721
15724
  };
15722
- const rows = getProps.value.schema.map((item) => {
15723
- var _a2, _b;
15724
- return vue.createVNode("div", {
15725
- "class": `${prefixCls2}-row`,
15726
- "style": {
15727
- flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
15728
- }
15729
- }, [vue.createVNode("span", {
15730
- "style": {
15731
- width: `${getProps.value.labelWidth}px`
15732
- },
15733
- "class": `${prefixCls2}-label`
15734
- }, [slots[`${item.field}Label`] ? slots[`${item.field}Label`]() : item.label, ((_b = getProps.value) == null ? void 0 : _b.isShowColon) ? ":" : ""]), vue.createVNode("span", {
15735
- "class": `${prefixCls2}-value`
15736
- }, [slots[`${item.field}Value`] ? slots[`${item.field}Value`]() : getProps.value.data[item.field]])]);
15725
+ const rows = vue.computed(() => {
15726
+ return getProps.value.schema.map((item) => {
15727
+ var _a2, _b;
15728
+ return vue.createVNode("div", {
15729
+ "class": `${prefixCls2}-row`,
15730
+ "style": {
15731
+ flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
15732
+ }
15733
+ }, [vue.createVNode("span", {
15734
+ "style": {
15735
+ width: `${getProps.value.labelWidth}px`
15736
+ },
15737
+ "class": `${prefixCls2}-label`
15738
+ }, [slots[`${item.field}Label`] ? slots[`${item.field}Label`]() : item.label, ((_b = getProps.value) == null ? void 0 : _b.isShowColon) ? ":" : ""]), vue.createVNode("span", {
15739
+ "class": `${prefixCls2}-value`
15740
+ }, [slots[`${item.field}Value`] ? slots[`${item.field}Value`]() : getProps.value.data[item.field]])]);
15741
+ });
15737
15742
  });
15738
15743
  emit("register", {
15739
15744
  setDescProps
15740
15745
  });
15741
15746
  return () => vue.createVNode("div", {
15742
15747
  "class": `${prefixCls2}-wrapper`
15743
- }, [rows]);
15748
+ }, [rows.value]);
15744
15749
  }
15745
15750
  });
15746
15751
  function useDescription(props2) {
@@ -20243,6 +20248,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20243
20248
  ];
20244
20249
  })
20245
20250
  ]),
20251
+ header: vue.withCtx(() => [
20252
+ vue.renderSlot(_ctx.$slots, `${column.field}Header`, vue.normalizeProps(vue.guardReactiveProps({ column })), () => [
20253
+ vue.createTextVNode(vue.toDisplayString(column.title), 1)
20254
+ ])
20255
+ ]),
20246
20256
  _: 2
20247
20257
  }, 1040, ["edit-render"]);
20248
20258
  }), 128)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -31,8 +31,8 @@
31
31
  "vue-types": "^5.0.2",
32
32
  "vxe-table": "^4.3.6",
33
33
  "xe-utils": "^3.5.7",
34
- "@shy-plugins/use": "1.0.3",
35
- "@shy-plugins/utils": "1.0.14"
34
+ "@shy-plugins/utils": "1.0.14",
35
+ "@shy-plugins/use": "1.0.3"
36
36
  },
37
37
  "types": "es/ui/index.d.ts",
38
38
  "devDependencies": {