page-schema-enginer-shun 1.0.15 → 1.0.18

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/index.cjs.js CHANGED
@@ -164,18 +164,16 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
164
164
  reset
165
165
  });
166
166
  return (_ctx, _cache) => {
167
- const _component_el_radio = vue.resolveComponent("el-radio");
168
- const _component_el_radio_group = vue.resolveComponent("el-radio-group");
169
167
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
170
168
  vue.createElementVNode("div", _hoisted_2$4, [
171
169
  vue.createElementVNode("span", _hoisted_3$3, vue.toDisplayString(__props.schema.label), 1),
172
- vue.createVNode(_component_el_radio_group, {
170
+ vue.createVNode(vue.unref(elementPlus.ElRadioGroup), {
173
171
  modelValue: radioData.value,
174
172
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => radioData.value = $event)
175
173
  }, {
176
174
  default: vue.withCtx(() => [
177
175
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(enumerate.value, (item) => {
178
- return vue.openBlock(), vue.createBlock(_component_el_radio, {
176
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElRadio), {
179
177
  key: item.value,
180
178
  value: item.value,
181
179
  size: "large"
@@ -195,7 +193,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
195
193
  };
196
194
  }
197
195
  });
198
- const radio = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a791fef4"]]);
196
+ const radio = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1141884d"]]);
199
197
  const _hoisted_1$9 = { class: "schema-form-input-number-container" };
200
198
  const _hoisted_2$3 = { class: "schema-form-input-number" };
201
199
  const _hoisted_3$2 = { class: "schema-form-input-number-label" };
@@ -234,11 +232,10 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
234
232
  reset
235
233
  });
236
234
  return (_ctx, _cache) => {
237
- const _component_el_input_number = vue.resolveComponent("el-input-number");
238
235
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
239
236
  vue.createElementVNode("div", _hoisted_2$3, [
240
237
  vue.createElementVNode("div", _hoisted_3$2, vue.toDisplayString(__props.schema.label), 1),
241
- vue.createVNode(_component_el_input_number, vue.mergeProps({
238
+ vue.createVNode(vue.unref(elementPlus.ElInputNumber), vue.mergeProps({
242
239
  modelValue: num.value,
243
240
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => num.value = $event)
244
241
  }, __props.schema.option, { onChange: handleChange }), null, 16, ["modelValue"])
@@ -247,7 +244,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
247
244
  };
248
245
  }
249
246
  });
250
- const inputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-44583072"]]);
247
+ const inputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-87d45394"]]);
251
248
  const _hoisted_1$8 = { class: "schema-form-select-container" };
252
249
  const _hoisted_2$2 = { class: "schema-form-select" };
253
250
  const _hoisted_3$1 = { class: "schema-form-select-label" };
@@ -293,19 +290,17 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
293
290
  reset
294
291
  });
295
292
  return (_ctx, _cache) => {
296
- const _component_el_option = vue.resolveComponent("el-option");
297
- const _component_el_select = vue.resolveComponent("el-select");
298
293
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
299
294
  vue.createElementVNode("div", _hoisted_2$2, [
300
295
  vue.createElementVNode("span", _hoisted_3$1, vue.toDisplayString(__props.schema.label), 1),
301
- vue.createVNode(_component_el_select, {
296
+ vue.createVNode(vue.unref(elementPlus.ElSelect), {
302
297
  modelValue: selectData.value,
303
298
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectData.value = $event),
304
299
  placeholder: "请选择"
305
300
  }, {
306
301
  default: vue.withCtx(() => [
307
302
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(enumerate.value, (item) => {
308
- return vue.openBlock(), vue.createBlock(_component_el_option, {
303
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
309
304
  key: item.value,
310
305
  label: item.label,
311
306
  value: item.value
@@ -320,7 +315,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
320
315
  };
321
316
  }
322
317
  });
323
- const select = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-65d85e93"]]);
318
+ const select = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-3518f453"]]);
324
319
  const formItemConfig = {
325
320
  input: {
326
321
  component: input
@@ -6602,10 +6597,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
6602
6597
  vueRouter.useRoute();
6603
6598
  useUserStore();
6604
6599
  return (_ctx, _cache) => {
6605
- const _component_el_button = vue.resolveComponent("el-button");
6606
- const _component_el_dialog = vue.resolveComponent("el-dialog");
6607
6600
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
6608
- vue.createVNode(_component_el_dialog, {
6601
+ vue.createVNode(vue.unref(elementPlus.ElDialog), {
6609
6602
  modelValue: isShow.value,
6610
6603
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isShow.value = $event),
6611
6604
  title: "新建",
@@ -6623,7 +6616,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
6623
6616
  ];
6624
6617
  }),
6625
6618
  footer: vue.withCtx(() => [
6626
- vue.createVNode(_component_el_button, {
6619
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
6627
6620
  type: "primary",
6628
6621
  onClick: submit
6629
6622
  }, {
@@ -6632,7 +6625,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
6632
6625
  ])]),
6633
6626
  _: 1
6634
6627
  }),
6635
- vue.createVNode(_component_el_button, {
6628
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
6636
6629
  type: "primary",
6637
6630
  onClick: close
6638
6631
  }, {
@@ -6648,7 +6641,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
6648
6641
  };
6649
6642
  }
6650
6643
  });
6651
- const createFormC = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-cb04a018"]]);
6644
+ const createFormC = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-5ac725c5"]]);
6652
6645
  const _hoisted_1$5 = { class: "editForm" };
6653
6646
  const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
6654
6647
  __name: "editForm",
@@ -6705,10 +6698,8 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
6705
6698
  vueRouter.useRoute();
6706
6699
  useUserStore();
6707
6700
  return (_ctx, _cache) => {
6708
- const _component_el_button = vue.resolveComponent("el-button");
6709
- const _component_el_dialog = vue.resolveComponent("el-dialog");
6710
6701
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
6711
- vue.createVNode(_component_el_dialog, {
6702
+ vue.createVNode(vue.unref(elementPlus.ElDialog), {
6712
6703
  modelValue: isDrawer.value,
6713
6704
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isDrawer.value = $event),
6714
6705
  title: "编辑",
@@ -6727,7 +6718,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
6727
6718
  ];
6728
6719
  }),
6729
6720
  footer: vue.withCtx(() => [
6730
- vue.createVNode(_component_el_button, {
6721
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
6731
6722
  type: "primary",
6732
6723
  onClick: submit
6733
6724
  }, {
@@ -7036,13 +7027,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7036
7027
  vueRouter.useRoute();
7037
7028
  useUserStore();
7038
7029
  return (_ctx, _cache) => {
7039
- const _component_el_table_column = vue.resolveComponent("el-table-column");
7040
- const _component_el_button = vue.resolveComponent("el-button");
7041
- const _component_el_table = vue.resolveComponent("el-table");
7042
- const _component_el_pagination = vue.resolveComponent("el-pagination");
7043
7030
  const _directive_loading = vue.resolveDirective("loading");
7044
7031
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
7045
- __props.schema && __props.schema.properties ? vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_table, {
7032
+ __props.schema && __props.schema.properties ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), {
7046
7033
  key: 0,
7047
7034
  data: tableData.value,
7048
7035
  style: { "width": "100%" },
@@ -7054,7 +7041,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7054
7041
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.schema.properties, (value, keyItem) => {
7055
7042
  var _a2;
7056
7043
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: keyItem }, [
7057
- ((_a2 = value.option) == null ? void 0 : _a2.visible) !== false ? (vue.openBlock(), vue.createBlock(_component_el_table_column, vue.mergeProps({
7044
+ ((_a2 = value.option) == null ? void 0 : _a2.visible) !== false ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
7058
7045
  key: 0,
7059
7046
  prop: keyItem,
7060
7047
  label: value.label
@@ -7075,7 +7062,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7075
7062
  }, 1040, ["prop", "label"])) : vue.createCommentVNode("", true)
7076
7063
  ], 64);
7077
7064
  }), 128)),
7078
- ((_a = __props.buttons) == null ? void 0 : _a.length) > 0 ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
7065
+ ((_a = __props.buttons) == null ? void 0 : _a.length) > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), {
7079
7066
  key: 0,
7080
7067
  label: "操作",
7081
7068
  align: "center",
@@ -7083,7 +7070,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7083
7070
  }, {
7084
7071
  default: vue.withCtx((scope2) => [
7085
7072
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.buttons, (item, index) => {
7086
- return vue.openBlock(), vue.createBlock(_component_el_button, vue.mergeProps({ key: index }, { ref_for: true }, item, {
7073
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), vue.mergeProps({ key: index }, { ref_for: true }, item, {
7087
7074
  onClick: ($event) => operatetionHandler({ btnConfig: item, rowData: (scope2 == null ? void 0 : scope2.row) || {} })
7088
7075
  }), {
7089
7076
  default: vue.withCtx(() => [
@@ -7102,7 +7089,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7102
7089
  [_directive_loading, loading.value]
7103
7090
  ]) : vue.createCommentVNode("", true),
7104
7091
  vue.createElementVNode("div", _hoisted_3, [
7105
- vue.createVNode(_component_el_pagination, {
7092
+ vue.createVNode(vue.unref(elementPlus.ElPagination), {
7106
7093
  layout: "total, prev, pager, next, sizes",
7107
7094
  total: total.value,
7108
7095
  "page-size": pageSize.value,
@@ -7115,7 +7102,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
7115
7102
  };
7116
7103
  }
7117
7104
  });
7118
- const SchemaTable = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-5d41e7cf"]]);
7105
+ const SchemaTable = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-af54a88b"]]);
7119
7106
  const _hoisted_1$3 = { class: "table-panel" };
7120
7107
  const _hoisted_2 = { class: "operation-panel" };
7121
7108
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
@@ -7158,16 +7145,14 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
7158
7145
  useUserStore();
7159
7146
  return (_ctx, _cache) => {
7160
7147
  var _a, _b;
7161
- const _component_el_button = vue.resolveComponent("el-button");
7162
- const _component_el_row = vue.resolveComponent("el-row");
7163
7148
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
7164
7149
  vue.createElementVNode("div", _hoisted_2, [
7165
- ((_a = vue.unref(tableConfig2)) == null ? void 0 : _a.headerButtons.length) > 0 ? (vue.openBlock(), vue.createBlock(_component_el_row, { key: 0 }, {
7150
+ ((_a = vue.unref(tableConfig2)) == null ? void 0 : _a.headerButtons.length) > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElRow), { key: 0 }, {
7166
7151
  default: vue.withCtx(() => {
7167
7152
  var _a2;
7168
7153
  return [
7169
7154
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a2 = vue.unref(tableConfig2)) == null ? void 0 : _a2.headerButtons, (buttonItem) => {
7170
- return vue.openBlock(), vue.createBlock(_component_el_button, {
7155
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), {
7171
7156
  key: buttonItem.eventKey,
7172
7157
  onClick: ($event) => onOperate({ btnConfig: buttonItem })
7173
7158
  }, {
@@ -7200,7 +7185,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
7200
7185
  };
7201
7186
  }
7202
7187
  });
7203
- const tablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-cef68da3"]]);
7188
+ const tablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-34ee246e"]]);
7204
7189
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
7205
7190
  __name: "input",
7206
7191
  props: {
@@ -7232,8 +7217,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
7232
7217
  reset
7233
7218
  });
7234
7219
  return (_ctx, _cache) => {
7235
- const _component_el_input = vue.resolveComponent("el-input");
7236
- return vue.openBlock(), vue.createBlock(_component_el_input, vue.mergeProps({
7220
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElInput), vue.mergeProps({
7237
7221
  type: "text",
7238
7222
  modelValue: dtoValue.value,
7239
7223
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dtoValue.value = $event)
@@ -7299,17 +7283,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7299
7283
  load
7300
7284
  });
7301
7285
  return (_ctx, _cache) => {
7302
- const _component_el_form_item = vue.resolveComponent("el-form-item");
7303
- const _component_el_button = vue.resolveComponent("el-button");
7304
- const _component_el_form = vue.resolveComponent("el-form");
7305
7286
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
7306
- vue.createVNode(_component_el_form, {
7287
+ vue.createVNode(vue.unref(elementPlus.ElForm), {
7307
7288
  inline: true,
7308
7289
  class: "flex items-center justify-start flex-wrap"
7309
7290
  }, {
7310
7291
  default: vue.withCtx(() => [
7311
7292
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.schema.properties, (value, key) => {
7312
- return vue.openBlock(), vue.createBlock(_component_el_form_item, {
7293
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElFormItem), {
7313
7294
  key,
7314
7295
  label: value.label
7315
7296
  }, {
@@ -7327,9 +7308,9 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7327
7308
  _: 2
7328
7309
  }, 1032, ["label"]);
7329
7310
  }), 128)),
7330
- vue.createVNode(_component_el_form_item, null, {
7311
+ vue.createVNode(vue.unref(elementPlus.ElFormItem), null, {
7331
7312
  default: vue.withCtx(() => [
7332
- vue.createVNode(_component_el_button, {
7313
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
7333
7314
  type: "primary",
7334
7315
  onClick: search
7335
7316
  }, {
@@ -7338,7 +7319,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7338
7319
  ])]),
7339
7320
  _: 1
7340
7321
  }),
7341
- vue.createVNode(_component_el_button, { onClick: reset }, {
7322
+ vue.createVNode(vue.unref(elementPlus.ElButton), { onClick: reset }, {
7342
7323
  default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
7343
7324
  vue.createTextVNode("重置", -1)
7344
7325
  ])]),
@@ -7548,14 +7529,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7548
7529
  (_a = EventHandleMap[eventKey]) == null ? void 0 : _a.call(EventHandleMap, { btnConfig, rowData });
7549
7530
  };
7550
7531
  vue.onMounted(() => {
7551
- var _a;
7552
- const inst = vue.getCurrentInstance();
7553
- const comps = ((_a = inst == null ? void 0 : inst.appContext) == null ? void 0 : _a.components) || {};
7554
- const required2 = ["ElTable", "ElTableColumn", "ElButton", "ElPagination", "ElForm", "ElDialog", "ElInput"];
7555
- const missing = required2.filter((k) => !(k in comps));
7556
- if (missing.length > 0) {
7557
- elementPlus.ElMessage.error("请在宿主应用中注册 Element Plus 并引入样式");
7558
- }
7559
7532
  });
7560
7533
  vue.provide("schemeViewData", {
7561
7534
  tableSchema,
@@ -7590,7 +7563,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7590
7563
  };
7591
7564
  }
7592
7565
  });
7593
- const schemaView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3918b3d6"]]);
7566
+ const schemaView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d797bc6e"]]);
7594
7567
  let routerClient = null;
7595
7568
  function setRouterClient(client) {
7596
7569
  routerClient = client;