zzz-pc-view 0.0.7 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zzz-pc-view",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "main": "src/index.umd.js",
5
5
  "module": "src/index.es.js",
6
6
  "types": "src/index.d.ts",
@@ -21,12 +21,12 @@ export declare const editTypeMap: {
21
21
  * 创建操作的配置。
22
22
  * @type {Object}
23
23
  * @property {EditTypeEnum.CREATE} id - 操作的ID,对应EditTypeEnum.CREATE。
24
- * @property {() => string} getLabel - 获取操作标签的函数,返回'新增'。
24
+ * @property {string} label - 操作的标签,为'新增'。
25
25
  * @property {string} method - 操作的HTTP方法,为'POST'。
26
26
  */
27
27
  readonly 1: {
28
28
  readonly id: EditTypeEnum.CREATE;
29
- readonly getLabel: () => string;
29
+ readonly label: "新增";
30
30
  readonly method: "POST";
31
31
  };
32
32
  /**
@@ -160,7 +160,7 @@ export declare class CurdApi<T extends object = object, P extends PaginationResp
160
160
  * @param {EditTypeId} saveTypeId - 保存类型的 ID。
161
161
  * @returns {Promise<any>} - 返回一个包含保存结果的 Promise。
162
162
  */
163
- save(data: T, saveTypeId: EditTypeId): httpRequest.HttpRequestPromise<unknown>;
163
+ save(data: T, saveTypeId: EditTypeId): httpRequest.HttpRequestPromise<T>;
164
164
  /**
165
165
  * 删除数据。
166
166
  * @param {T} data - 包含 ID 的数据对象。
package/src/index.es.js CHANGED
@@ -2802,7 +2802,7 @@ const editTypeMap = {
2802
2802
  * 创建操作的配置。
2803
2803
  * @type {Object}
2804
2804
  * @property {EditTypeEnum.CREATE} id - 操作的ID,对应EditTypeEnum.CREATE。
2805
- * @property {() => string} getLabel - 获取操作标签的函数,返回'新增'。
2805
+ * @property {string} label - 操作的标签,为'新增'。
2806
2806
  * @property {string} method - 操作的HTTP方法,为'POST'。
2807
2807
  */
2808
2808
  [
@@ -2810,7 +2810,7 @@ const editTypeMap = {
2810
2810
  /* CREATE */
2811
2811
  ]: {
2812
2812
  id: 1,
2813
- getLabel: () => "新增",
2813
+ label: "新增",
2814
2814
  method: "POST"
2815
2815
  },
2816
2816
  /**
@@ -9604,7 +9604,7 @@ class CurdViewHandler extends CurdHandler {
9604
9604
  const _hoisted_1$4 = { class: "flex column wrapper data-wrapper" };
9605
9605
  const _hoisted_2$1 = { class: "flex flex-wrap gap-10 data-wrapper-header" };
9606
9606
  const _hoisted_3$1 = { class: "flex gap-10 data-wrapper-footer" };
9607
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
9607
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
9608
9608
  __name: "DataWrapperView",
9609
9609
  props: {
9610
9610
  bodyViewClass: {}
@@ -9672,7 +9672,7 @@ const useModelValueBridgeComputed = (props, emit) => computed({
9672
9672
  emit("change", value);
9673
9673
  }
9674
9674
  });
9675
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9675
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
9676
9676
  __name: "VSlotView",
9677
9677
  props: {
9678
9678
  component: {},
@@ -9695,7 +9695,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9695
9695
  };
9696
9696
  }
9697
9697
  });
9698
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9698
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
9699
9699
  __name: "CurdTableView",
9700
9700
  props: {
9701
9701
  viewHandler: {}
@@ -9755,7 +9755,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9755
9755
  ref_for: true
9756
9756
  }, column.colProps || unref(emptyObject2)), {
9757
9757
  default: withCtx(({ row }) => [
9758
- (openBlock(), createBlock(resolveDynamicComponent(column.component || _sfc_main$9), mergeProps({
9758
+ (openBlock(), createBlock(resolveDynamicComponent(column.component || _sfc_main$a), mergeProps({
9759
9759
  viewHandler: _ctx.viewHandler,
9760
9760
  model: row,
9761
9761
  prop: column.propertyKey,
@@ -9772,7 +9772,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9772
9772
  }
9773
9773
  });
9774
9774
  const _hoisted_1$3 = { key: 0 };
9775
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9775
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
9776
9776
  __name: "FilterView",
9777
9777
  props: {
9778
9778
  viewHandler: {},
@@ -9813,7 +9813,7 @@ const _hoisted_2 = { class: "flex-1 fit-size" };
9813
9813
  const _hoisted_3 = { class: "curd-list-aside" };
9814
9814
  const _hoisted_4 = { class: "flex-1 fit-size curd-list-content" };
9815
9815
  const _hoisted_5 = { class: "curd-list-aside" };
9816
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9816
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
9817
9817
  __name: "CurdView",
9818
9818
  props: {
9819
9819
  viewHandler: {}
@@ -9822,10 +9822,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9822
9822
  return (_ctx, _cache) => {
9823
9823
  const _component_el_card = resolveComponent("el-card");
9824
9824
  const _directive_loading = resolveDirective("loading");
9825
- return openBlock(), createBlock(_sfc_main$a, null, {
9825
+ return openBlock(), createBlock(_sfc_main$b, null, {
9826
9826
  header: withCtx(() => [
9827
9827
  renderSlot(_ctx.$slots, "header-before"),
9828
- _ctx.viewHandler.displayFilterConfigMap[unref(ZDecorators).FilterKey.PositionEnum.TOP] ? (openBlock(), createBlock(_sfc_main$7, {
9828
+ _ctx.viewHandler.displayFilterConfigMap[unref(ZDecorators).FilterKey.PositionEnum.TOP] ? (openBlock(), createBlock(_sfc_main$8, {
9829
9829
  key: 0,
9830
9830
  "view-handler": _ctx.viewHandler,
9831
9831
  position: unref(ZDecorators).FilterKey.PositionEnum.TOP
@@ -9846,7 +9846,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9846
9846
  default: withCtx(() => [
9847
9847
  _ctx.viewHandler.displayFilterConfigMap[unref(ZDecorators).FilterKey.PositionEnum.LEFT] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
9848
9848
  createElementVNode("div", _hoisted_3, [
9849
- createVNode(_sfc_main$7, {
9849
+ createVNode(_sfc_main$8, {
9850
9850
  "view-handler": _ctx.viewHandler,
9851
9851
  position: unref(ZDecorators).FilterKey.PositionEnum.LEFT
9852
9852
  }, null, 8, ["view-handler", "position"])
@@ -9855,7 +9855,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9855
9855
  ], 64)) : createCommentVNode("", true),
9856
9856
  withDirectives((openBlock(), createElementBlock("div", _hoisted_4, [
9857
9857
  renderSlot(_ctx.$slots, "content", {}, () => [
9858
- createVNode(_sfc_main$8, { "view-handler": _ctx.viewHandler }, null, 8, ["view-handler"])
9858
+ createVNode(_sfc_main$9, { "view-handler": _ctx.viewHandler }, null, 8, ["view-handler"])
9859
9859
  ])
9860
9860
  ])), [
9861
9861
  [_directive_loading, _ctx.viewHandler.listLoadStatus]
@@ -9863,7 +9863,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9863
9863
  _ctx.viewHandler.displayFilterConfigMap[unref(ZDecorators).FilterKey.PositionEnum.RIGHT] ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
9864
9864
  _cache[1] || (_cache[1] = createElementVNode("div", { class: "curd-list-divider" }, null, -1)),
9865
9865
  createElementVNode("div", _hoisted_5, [
9866
- createVNode(_sfc_main$7, {
9866
+ createVNode(_sfc_main$8, {
9867
9867
  "view-handler": _ctx.viewHandler,
9868
9868
  position: unref(ZDecorators).FilterKey.PositionEnum.RIGHT
9869
9869
  }, null, 8, ["view-handler", "position"])
@@ -9880,10 +9880,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9880
9880
  });
9881
9881
  const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9882
9882
  __proto__: null,
9883
- CurdView: _sfc_main$6,
9883
+ CurdView: _sfc_main$7,
9884
9884
  CurdViewHandler
9885
9885
  }, Symbol.toStringTag, { value: "Module" }));
9886
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
9886
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
9887
9887
  __name: "SelectView",
9888
9888
  props: {
9889
9889
  options: {},
@@ -9917,7 +9917,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
9917
9917
  };
9918
9918
  }
9919
9919
  });
9920
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9920
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
9921
9921
  __name: "VModelView",
9922
9922
  props: {
9923
9923
  component: {},
@@ -9927,7 +9927,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9927
9927
  },
9928
9928
  setup(__props) {
9929
9929
  const props = __props;
9930
- const mappingComputed = useMappingOption(props, _sfc_main$5, ElInput);
9930
+ const mappingComputed = useMappingOption(props, _sfc_main$6, ElInput);
9931
9931
  const modelValueBridgeComputed = computed({
9932
9932
  get: () => props.model[props.prop],
9933
9933
  set: (value) => {
@@ -9943,7 +9943,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9943
9943
  };
9944
9944
  }
9945
9945
  });
9946
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9946
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9947
9947
  __name: "RadioButtonGroupView",
9948
9948
  props: {
9949
9949
  options: {},
@@ -9977,7 +9977,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9977
9977
  };
9978
9978
  }
9979
9979
  });
9980
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
9980
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
9981
9981
  __name: "RadioGroupView",
9982
9982
  props: {
9983
9983
  options: {},
@@ -10011,16 +10011,51 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10011
10011
  };
10012
10012
  }
10013
10013
  });
10014
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10015
+ __name: "CheckboxGroupView",
10016
+ props: {
10017
+ options: {},
10018
+ primaryKeyConfig: {},
10019
+ nameKeyConfig: {},
10020
+ modelValue: {}
10021
+ },
10022
+ emits: ["update:modelValue", "change"],
10023
+ setup(__props, { emit: __emit }) {
10024
+ const props = __props;
10025
+ const emit = __emit;
10026
+ const modelValueBridgeComputed = useModelValueBridgeComputed(props, emit);
10027
+ return (_ctx, _cache) => {
10028
+ const _component_el_checkbox = resolveComponent("el-checkbox");
10029
+ const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
10030
+ return openBlock(), createBlock(_component_el_checkbox_group, {
10031
+ modelValue: unref(modelValueBridgeComputed),
10032
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValueBridgeComputed) ? modelValueBridgeComputed.value = $event : null)
10033
+ }, {
10034
+ default: withCtx(() => [
10035
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
10036
+ return openBlock(), createBlock(_component_el_checkbox, {
10037
+ key: item[_ctx.primaryKeyConfig.propertyKey],
10038
+ label: item[_ctx.nameKeyConfig.propertyKey],
10039
+ value: item[_ctx.primaryKeyConfig.propertyKey]
10040
+ }, null, 8, ["label", "value"]);
10041
+ }), 128))
10042
+ ]),
10043
+ _: 1
10044
+ }, 8, ["modelValue"]);
10045
+ };
10046
+ }
10047
+ });
10014
10048
  const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10015
10049
  __proto__: null,
10016
- RadioButtonGroupView: _sfc_main$3,
10017
- RadioGroupView: _sfc_main$2,
10018
- SelectView: _sfc_main$5,
10019
- VModelView: _sfc_main$4
10050
+ CheckboxGroupView: _sfc_main$2,
10051
+ RadioButtonGroupView: _sfc_main$4,
10052
+ RadioGroupView: _sfc_main$3,
10053
+ SelectView: _sfc_main$6,
10054
+ VModelView: _sfc_main$5
10020
10055
  }, Symbol.toStringTag, { value: "Module" }));
10021
10056
  const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10022
10057
  __proto__: null,
10023
- VSlotView: _sfc_main$9
10058
+ VSlotView: _sfc_main$a
10024
10059
  }, Symbol.toStringTag, { value: "Module" }));
10025
10060
  const _export_sfc = (sfc, props) => {
10026
10061
  const target = sfc.__vccOpts || sfc;
@@ -10054,7 +10089,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10054
10089
  });
10055
10090
  const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10056
10091
  __proto__: null,
10057
- DataWrapper: _sfc_main$a,
10092
+ DataWrapper: _sfc_main$b,
10058
10093
  Main: _sfc_main
10059
10094
  }, Symbol.toStringTag, { value: "Module" }));
10060
10095
  const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({