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