keli-ui 0.0.17 → 0.0.19

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/dist/keli-ui.js CHANGED
@@ -88528,7 +88528,7 @@ const useMittHook = (fieldName, mittId) => {
88528
88528
  };
88529
88529
  }
88530
88530
  const registerMitt = (func) => {
88531
- if (mittId) {
88531
+ if (mittId && emitter) {
88532
88532
  emitter.on(fieldName + mittId, (_eventData) => {
88533
88533
  if (func) {
88534
88534
  func(_eventData);
@@ -88537,7 +88537,7 @@ const useMittHook = (fieldName, mittId) => {
88537
88537
  }
88538
88538
  };
88539
88539
  const offMitt = () => {
88540
- if (mittId) {
88540
+ if (mittId && emitter) {
88541
88541
  emitter.off(fieldName + mittId);
88542
88542
  }
88543
88543
  };
@@ -88558,7 +88558,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
88558
88558
  type: Object
88559
88559
  },
88560
88560
  mittId: {
88561
- type: Object,
88561
+ type: null,
88562
88562
  required: false,
88563
88563
  default: () => null
88564
88564
  }
@@ -88616,7 +88616,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
88616
88616
  };
88617
88617
  }
88618
88618
  });
88619
- const KeFormInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3b633fda"]]);
88619
+ const KeFormInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-de127bcd"]]);
88620
88620
  KeFormInputNumber.install = (app) => {
88621
88621
  app.component(KeFormInputNumber.__name, KeFormInputNumber);
88622
88622
  };
@@ -88826,23 +88826,27 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
88826
88826
  required: false,
88827
88827
  type: Boolean
88828
88828
  },
88829
- // 数据
88830
- data: {
88831
- required: true,
88832
- default: () => {
88833
- return {};
88834
- },
88835
- type: Object
88836
- },
88837
88829
  // 页面基本配置
88838
88830
  config: {
88831
+ required: false,
88832
+ type: Object,
88833
+ default: () => {
88834
+ return {
88835
+ rowKey: "id",
88836
+ labelWidth: 100
88837
+ };
88838
+ }
88839
+ },
88840
+ // 数据
88841
+ formData: {
88839
88842
  required: true,
88840
88843
  type: Object
88841
88844
  },
88842
88845
  // 表单框架
88843
88846
  frame: {
88844
- required: true,
88845
- type: Array
88847
+ required: false,
88848
+ type: Array,
88849
+ default: () => []
88846
88850
  },
88847
88851
  // 表单验证规则
88848
88852
  formRules: {
@@ -88880,15 +88884,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
88880
88884
  type: Number
88881
88885
  },
88882
88886
  "pageIdModifiers": {},
88883
- "data": {
88884
- type: Object,
88885
- default: () => {
88886
- }
88887
+ "formData": {
88888
+ type: Object
88887
88889
  },
88888
- "dataModifiers": {},
88890
+ "formDataModifiers": {},
88889
88891
  "frame": {
88890
- required: true,
88891
- type: Array
88892
+ required: false,
88893
+ type: Array,
88894
+ default: () => []
88892
88895
  },
88893
88896
  "frameModifiers": {},
88894
88897
  "componentShowRule": {
@@ -88899,12 +88902,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
88899
88902
  },
88900
88903
  "componentShowRuleModifiers": {}
88901
88904
  }),
88902
- emits: ["update:pageId", "update:data", "update:frame", "update:componentShowRule"],
88905
+ emits: ["update:pageId", "update:formData", "update:frame", "update:componentShowRule"],
88903
88906
  setup(__props, { expose: __expose }) {
88904
88907
  const props = __props;
88905
88908
  const ruleFormRef = useTemplateRef("ruleFormRef");
88906
88909
  const pageIdRef = useModel(__props, "pageId");
88907
- const dataRef = useModel(__props, "data");
88910
+ const dataRef = useModel(__props, "formData");
88908
88911
  const frameRef = useModel(__props, "frame");
88909
88912
  const componentShowRuleModel = useModel(__props, "componentShowRule");
88910
88913
  const mittId = Math.floor(Math.random() * (99999 - 1e4 + 1)) + 1e4;
@@ -88927,7 +88930,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
88927
88930
  };
88928
88931
  const validateForm = async () => {
88929
88932
  if (props.formSaveVerifyJs !== null && props.formSaveVerifyJs !== void 0) {
88930
- const err = props.formSaveVerifyJs(props.data);
88933
+ const err = props.formSaveVerifyJs(dataRef.value);
88931
88934
  if (err) {
88932
88935
  msgTips.alert({
88933
88936
  msg: err,
@@ -89002,7 +89005,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
89002
89005
  ref: ruleFormRef,
89003
89006
  "label-position": __props.config.labelPosition ? __props.config.labelPosition : "right",
89004
89007
  "label-width": __props.config.labelWidth && __props.config.labelWidth > 0 ? __props.config.labelWidth : "auto",
89005
- model: __props.data,
89008
+ model: dataRef.value,
89006
89009
  rules: __props.formRules,
89007
89010
  style: normalizeStyle({
89008
89011
  height: props.embeddedTableList && props.embeddedTableList.length > 0 ? "60%" : "100%"
@@ -89172,7 +89175,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
89172
89175
  };
89173
89176
  }
89174
89177
  });
89175
- const FormRenderClient = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-25e7ca41"]]);
89178
+ const FormRenderClient = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-30b23a37"]]);
89176
89179
  const _hoisted_1 = { class: "van-doc-demo-block__title" };
89177
89180
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
89178
89181
  __name: "FormRenderMobile",
@@ -89182,22 +89185,26 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
89182
89185
  type: Boolean
89183
89186
  },
89184
89187
  // 数据
89185
- data: {
89188
+ formData: {
89186
89189
  required: true,
89187
- default: () => {
89188
- return {};
89189
- },
89190
89190
  type: Object
89191
89191
  },
89192
89192
  // 页面基本配置
89193
89193
  config: {
89194
- required: true,
89195
- type: Object
89194
+ required: false,
89195
+ type: Object,
89196
+ default: () => {
89197
+ return {
89198
+ rowKey: "id",
89199
+ labelWidth: 100
89200
+ };
89201
+ }
89196
89202
  },
89197
89203
  // 表单框架
89198
89204
  frame: {
89199
- required: true,
89200
- type: Array
89205
+ required: false,
89206
+ type: Array,
89207
+ default: () => []
89201
89208
  },
89202
89209
  // 表单验证规则
89203
89210
  formRules: {
@@ -89243,7 +89250,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
89243
89250
  "dataModifiers": {},
89244
89251
  "frame": {
89245
89252
  required: true,
89246
- type: Array
89253
+ type: Array,
89254
+ default: () => []
89247
89255
  },
89248
89256
  "frameModifiers": {},
89249
89257
  "componentShowRule": {
@@ -89411,7 +89419,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
89411
89419
  };
89412
89420
  }
89413
89421
  });
89414
- const FormRenderMobile = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-125f5b9a"]]);
89422
+ const FormRenderMobile = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-121f69cc"]]);
89415
89423
  const KeFormRender = isMobileDevice.value ? FormRenderMobile : FormRenderClient;
89416
89424
  KeFormRender.install = (app) => {
89417
89425
  app.component(KeFormRender.__name, KeFormRender);
@@ -89816,7 +89824,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
89816
89824
  type: String
89817
89825
  },
89818
89826
  mittId: {
89819
- type: Object,
89827
+ type: null,
89820
89828
  required: false,
89821
89829
  default: () => null
89822
89830
  }
@@ -89900,7 +89908,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
89900
89908
  type: String
89901
89909
  },
89902
89910
  mittId: {
89903
- type: Object,
89911
+ type: null,
89904
89912
  required: false,
89905
89913
  default: () => null
89906
89914
  }
@@ -90220,7 +90228,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
90220
90228
  type: Object
90221
90229
  },
90222
90230
  mittId: {
90223
- type: Object,
90231
+ type: null,
90224
90232
  required: false,
90225
90233
  default: () => null
90226
90234
  }