@vipl520/dk-ui 1.0.60 → 1.0.62

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +119 -107
  3. package/dist/index.min.js +3 -3
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +3 -3
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +119 -107
  8. package/dist/web-types.json +1 -1
  9. package/es/form/src/form.vue2.mjs +1 -1
  10. package/es/form/src/form.vue2.mjs.map +1 -1
  11. package/es/form/style/index.css +1 -1
  12. package/es/form/style/index.scss +3 -3
  13. package/es/page-diy/index.d.ts +1 -0
  14. package/es/page-diy/src/page-diy.vue.d.ts +1 -0
  15. package/es/page-diy/src/page-diy.vue.mjs +118 -107
  16. package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
  17. package/es/page-diy/src/views/web/DkViewNavBar.vue.d.ts +1 -1
  18. package/es/page-diy/src/views/web/DkViewTitle.vue.d.ts +1 -1
  19. package/es/page-diy/style/dk-page-diy.css +1 -1
  20. package/es/page-diy/style/dk-page-diy.scss +29 -25
  21. package/es/page-diy/style/index.css +1 -1
  22. package/lib/form/src/form.vue2.js +1 -1
  23. package/lib/form/src/form.vue2.js.map +1 -1
  24. package/lib/form/style/index.css +1 -1
  25. package/lib/form/style/index.scss +3 -3
  26. package/lib/page-diy/index.d.ts +1 -0
  27. package/lib/page-diy/src/page-diy.vue.d.ts +1 -0
  28. package/lib/page-diy/src/page-diy.vue.js +117 -106
  29. package/lib/page-diy/src/page-diy.vue.js.map +1 -1
  30. package/lib/page-diy/src/views/web/DkViewNavBar.vue.d.ts +1 -1
  31. package/lib/page-diy/src/views/web/DkViewTitle.vue.d.ts +1 -1
  32. package/lib/page-diy/style/dk-page-diy.css +1 -1
  33. package/lib/page-diy/style/dk-page-diy.scss +29 -25
  34. package/lib/page-diy/style/index.css +1 -1
  35. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -2588,7 +2588,7 @@ var _sfc_main$19 = /* @__PURE__ */ defineComponent({
2588
2588
  "div",
2589
2589
  {
2590
2590
  style: normalizeStyle(dialogStyle.value),
2591
- class: "dk-form"
2591
+ class: "dk-form p10px"
2592
2592
  },
2593
2593
  [
2594
2594
  createVNode(unref(FormCreate), {
@@ -14206,6 +14206,7 @@ const _sfc_main$p = defineComponent({
14206
14206
  hide: true,
14207
14207
  treeData: [],
14208
14208
  },
14209
+ leftTabsName: 'component',
14209
14210
  });
14210
14211
 
14211
14212
  function cleanTreeData(node) {
@@ -15059,20 +15060,23 @@ const _hoisted_5$7 = {
15059
15060
  class: "_fc-l-count",
15060
15061
  style: {}
15061
15062
  };
15062
- const _hoisted_6$7 = /*#__PURE__*/createElementVNode("span", null, "结构", -1 /* HOISTED */);
15063
- const _hoisted_7$7 = { key: 0 };
15063
+ const _hoisted_6$7 = { class: "children-list" };
15064
+ const _hoisted_7$7 = {
15065
+ key: 0,
15066
+ class: "_fc-tree-node"
15067
+ };
15064
15068
 
15065
15069
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15066
15070
  const _component_dk_icon = resolveComponent("dk-icon");
15067
15071
  const _component_draggable = resolveComponent("draggable");
15072
+ const _component_el_tab_pane = resolveComponent("el-tab-pane");
15068
15073
  const _component_el_tree = resolveComponent("el-tree");
15074
+ const _component_el_tabs = resolveComponent("el-tabs");
15069
15075
  const _component_el_aside = resolveComponent("el-aside");
15070
15076
  const _component_el_header = resolveComponent("el-header");
15071
15077
  const _component_DragForm = resolveComponent("DragForm");
15072
15078
  const _component_preview_phone = resolveComponent("preview-phone");
15073
15079
  const _component_el_container = resolveComponent("el-container");
15074
- const _component_el_tab_pane = resolveComponent("el-tab-pane");
15075
- const _component_el_tabs = resolveComponent("el-tabs");
15076
15080
  const _component_el_dialog = resolveComponent("el-dialog");
15077
15081
  const _component_diy_cloud = resolveComponent("diy-cloud");
15078
15082
  const _component_dk_dialog = resolveComponent("dk-dialog");
@@ -15086,108 +15090,115 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15086
15090
  style: normalizeStyle(_ctx.leftAside.style)
15087
15091
  }, {
15088
15092
  default: withCtx(() => [
15089
- createElementVNode("div", _hoisted_1$i, [
15090
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
15091
- return (openBlock(), createElementBlock("div", {
15092
- key: index,
15093
- class: "_fc-l-group"
15094
- }, [
15095
- createElementVNode("h4", _hoisted_2$e, toDisplayString(item.title), 1 /* TEXT */),
15096
- createVNode(_component_draggable, {
15097
- group: { name: 'default', pull: 'clone', put: false },
15098
- sort: false,
15099
- list: item.list,
15100
- "item-key": "icon",
15101
- filter: ".not-drag",
15102
- class: "_fc-l-items"
15103
- }, {
15104
- item: withCtx(({ element }) => [
15105
- (openBlock(), createElementBlock("div", {
15106
- key: element.id,
15107
- class: normalizeClass(["_fc-l-item", element.count - (_ctx.countObj[element.name] || 0) <= 0 ? 'not-drag' : ''])
15108
- }, [
15109
- createElementVNode("div", _hoisted_3$b, [
15110
- createVNode(_component_dk_icon, {
15111
- icon: element.icon,
15112
- size: 24
15113
- }, null, 8 /* PROPS */, ["icon"])
15093
+ createVNode(_component_el_tabs, {
15094
+ modelValue: _ctx.leftTabsName,
15095
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.leftTabsName) = $event))
15096
+ }, {
15097
+ default: withCtx(() => [
15098
+ createVNode(_component_el_tab_pane, {
15099
+ label: "组件列表",
15100
+ name: "component"
15101
+ }, {
15102
+ default: withCtx(() => [
15103
+ createElementVNode("div", _hoisted_1$i, [
15104
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
15105
+ return (openBlock(), createElementBlock("div", {
15106
+ key: index,
15107
+ class: "_fc-l-group"
15108
+ }, [
15109
+ createElementVNode("h4", _hoisted_2$e, toDisplayString(item.title), 1 /* TEXT */),
15110
+ createVNode(_component_draggable, {
15111
+ group: { name: 'default', pull: 'clone', put: false },
15112
+ sort: false,
15113
+ list: item.list,
15114
+ "item-key": "icon",
15115
+ filter: ".not-drag",
15116
+ class: "_fc-l-items"
15117
+ }, {
15118
+ item: withCtx(({ element }) => [
15119
+ (openBlock(), createElementBlock("div", {
15120
+ key: element.id,
15121
+ class: normalizeClass(["_fc-l-item", element.count - (_ctx.countObj[element.name] || 0) <= 0 ? 'not-drag' : ''])
15122
+ }, [
15123
+ createElementVNode("div", _hoisted_3$b, [
15124
+ createVNode(_component_dk_icon, {
15125
+ icon: element.icon,
15126
+ size: 24
15127
+ }, null, 8 /* PROPS */, ["icon"])
15128
+ ]),
15129
+ createElementVNode("span", _hoisted_4$9, toDisplayString(element.label), 1 /* TEXT */),
15130
+ (element.count)
15131
+ ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(element.count - (_ctx.countObj[element.name] || 0)), 1 /* TEXT */))
15132
+ : createCommentVNode("v-if", true)
15133
+ ], 2 /* CLASS */))
15134
+ ]),
15135
+ _: 2 /* DYNAMIC */
15136
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
15137
+ ]))
15138
+ }), 128 /* KEYED_FRAGMENT */))
15139
+ ])
15140
+ ]),
15141
+ _: 1 /* STABLE */
15142
+ }),
15143
+ createVNode(_component_el_tab_pane, {
15144
+ label: "结构大纲",
15145
+ name: "tree"
15146
+ }, {
15147
+ default: withCtx(() => [
15148
+ createElementVNode("div", _hoisted_6$7, [
15149
+ createVNode(_component_el_tree, {
15150
+ draggable: "",
15151
+ "highlight-current": "",
15152
+ data: _ctx.treeAside.treeData,
15153
+ props: { value: 'type', label: 'type' },
15154
+ "allow-drop": _ctx.allowDrop,
15155
+ "default-expand-all": true,
15156
+ onNodeDrop: _ctx.nodeDrop,
15157
+ onNodeClick: _ctx.nodeClick
15158
+ }, {
15159
+ default: withCtx(({ data }) => [
15160
+ createElementVNode("div", {
15161
+ class: "el-tree-node-content",
15162
+ style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:#409eff' : '')
15163
+ }, [
15164
+ (data.config?.config.label)
15165
+ ? (openBlock(), createElementBlock("div", _hoisted_7$7, [
15166
+ createVNode(_component_dk_icon, {
15167
+ icon: data.config?.config.icon,
15168
+ class: "_fc-tree-icon"
15169
+ }, null, 8 /* PROPS */, ["icon"]),
15170
+ createTextVNode(" " + toDisplayString(data.config?.config.label), 1 /* TEXT */)
15171
+ ]))
15172
+ : createCommentVNode("v-if", true),
15173
+ createVNode(_component_dk_icon, {
15174
+ icon: "Close",
15175
+ class: "close-rule",
15176
+ onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
15177
+ }, null, 8 /* PROPS */, ["onClick"])
15178
+ ], 4 /* STYLE */)
15114
15179
  ]),
15115
- createElementVNode("span", _hoisted_4$9, toDisplayString(element.label), 1 /* TEXT */),
15116
- (element.count)
15117
- ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(element.count - (_ctx.countObj[element.name] || 0)), 1 /* TEXT */))
15118
- : createCommentVNode("v-if", true)
15119
- ], 2 /* CLASS */))
15120
- ]),
15121
- _: 2 /* DYNAMIC */
15122
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
15123
- ]))
15124
- }), 128 /* KEYED_FRAGMENT */))
15125
- ]),
15126
- createElementVNode("div", {
15127
- class: "children-list",
15128
- style: normalizeStyle(_ctx.treeAside.style)
15129
- }, [
15130
- createElementVNode("div", {
15131
- class: "child-title",
15132
- onClick: _cache[0] || (_cache[0] = $event => (_ctx.hideAside('tree')))
15133
- }, [
15134
- _hoisted_6$7,
15135
- createVNode(_component_dk_icon, {
15136
- icon: _ctx.treeAside.hide ? 'ArrowUp' : 'ArrowDown'
15137
- }, null, 8 /* PROPS */, ["icon"])
15180
+ _: 1 /* STABLE */
15181
+ }, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"])
15182
+ ])
15183
+ ]),
15184
+ _: 1 /* STABLE */
15185
+ })
15138
15186
  ]),
15139
- createCommentVNode(" <textarea style=\"width: 100%\">{{ treeAside.treeData }}</textarea>"),
15140
- createVNode(_component_el_tree, {
15141
- draggable: "",
15142
- "highlight-current": "",
15143
- data: _ctx.treeAside.treeData,
15144
- props: { value: 'type', label: 'type' },
15145
- "allow-drop": _ctx.allowDrop,
15146
- "default-expand-all": true,
15147
- onNodeDrop: _ctx.nodeDrop,
15148
- onNodeClick: _ctx.nodeClick
15149
- }, {
15150
- default: withCtx(({ data }) => [
15151
- createElementVNode("div", {
15152
- class: "el-tree-node-content",
15153
- style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:red' : '')
15154
- }, [
15155
- createTextVNode(toDisplayString(data.type) + " ", 1 /* TEXT */),
15156
- (data.config?.config.label)
15157
- ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(data.config?.config.label), 1 /* TEXT */))
15158
- : createCommentVNode("v-if", true),
15159
- createVNode(_component_dk_icon, {
15160
- icon: "Close",
15161
- class: "close-rule",
15162
- onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
15163
- }, null, 8 /* PROPS */, ["onClick"])
15164
- ], 4 /* STYLE */)
15165
- ]),
15166
- _: 1 /* STABLE */
15167
- }, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"]),
15168
- (!_ctx.treeAside.hide)
15169
- ? (openBlock(), createElementBlock("div", {
15170
- key: 0,
15171
- class: "aside-resizer",
15172
- onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('tree', $event))),
15173
- onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('tree'))),
15174
- onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('tree')))
15175
- }, null, 32 /* HYDRATE_EVENTS */))
15176
- : createCommentVNode("v-if", true)
15177
- ], 4 /* STYLE */),
15187
+ _: 1 /* STABLE */
15188
+ }, 8 /* PROPS */, ["modelValue"]),
15178
15189
  (!_ctx.leftAside.hide)
15179
15190
  ? (openBlock(), createElementBlock("div", {
15180
15191
  key: 0,
15181
15192
  class: "aside-resizer",
15182
- onMousedown: _cache[4] || (_cache[4] = $event => (_ctx.onResizerMouseDown('left', $event))),
15183
- onMouseup: _cache[5] || (_cache[5] = $event => (_ctx.onResizerMouseUp('left'))),
15184
- onMousemove: _cache[6] || (_cache[6] = $event => (_ctx.onResizerMouseMove('left')))
15193
+ onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('left', $event))),
15194
+ onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('left'))),
15195
+ onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('left')))
15185
15196
  }, null, 32 /* HYDRATE_EVENTS */))
15186
15197
  : createCommentVNode("v-if", true),
15187
15198
  createElementVNode("div", {
15188
15199
  class: "aside-toggle left-99%",
15189
15200
  style: normalizeStyle(_ctx.leftAside.hide ? 'display:block' : ''),
15190
- onClick: _cache[7] || (_cache[7] = $event => (_ctx.hideAside('left')))
15201
+ onClick: _cache[4] || (_cache[4] = $event => (_ctx.hideAside('left')))
15191
15202
  }, [
15192
15203
  createVNode(_component_dk_icon, {
15193
15204
  icon: _ctx.leftAside.hide ? 'ArrowRight' : 'ArrowLeft'
@@ -15215,7 +15226,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15215
15226
  default: withCtx(() => [
15216
15227
  withDirectives(createVNode(_component_DragForm, {
15217
15228
  api: _ctx.dragForm.api,
15218
- "onUpdate:api": _cache[8] || (_cache[8] = $event => ((_ctx.dragForm.api) = $event)),
15229
+ "onUpdate:api": _cache[5] || (_cache[5] = $event => ((_ctx.dragForm.api) = $event)),
15219
15230
  rule: _ctx.dragForm.rule,
15220
15231
  option: _ctx.dragForm.option
15221
15232
  }, null, 8 /* PROPS */, ["api", "rule", "option"]), [
@@ -15236,7 +15247,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15236
15247
  default: withCtx(() => [
15237
15248
  withDirectives(createVNode(_component_el_tabs, {
15238
15249
  modelValue: _ctx.activeTab,
15239
- "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((_ctx.activeTab) = $event))
15250
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((_ctx.activeTab) = $event))
15240
15251
  }, {
15241
15252
  default: withCtx(() => [
15242
15253
  (!!_ctx.activeRule)
@@ -15248,7 +15259,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15248
15259
  default: withCtx(() => [
15249
15260
  createVNode(_component_DragForm, {
15250
15261
  api: _ctx.propsForm.api,
15251
- "onUpdate:api": _cache[9] || (_cache[9] = $event => ((_ctx.propsForm.api) = $event)),
15262
+ "onUpdate:api": _cache[6] || (_cache[6] = $event => ((_ctx.propsForm.api) = $event)),
15252
15263
  rule: _ctx.propsForm.rule,
15253
15264
  option: _ctx.propsForm.options,
15254
15265
  "model-value": _ctx.propsForm.value,
@@ -15268,7 +15279,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15268
15279
  default: withCtx(() => [
15269
15280
  withDirectives(createVNode(_component_DragForm, {
15270
15281
  api: _ctx.dkSettingForm.api,
15271
- "onUpdate:api": _cache[10] || (_cache[10] = $event => ((_ctx.dkSettingForm.api) = $event)),
15282
+ "onUpdate:api": _cache[7] || (_cache[7] = $event => ((_ctx.dkSettingForm.api) = $event)),
15272
15283
  rule: _ctx.dkSettingForm.rule,
15273
15284
  option: _ctx.dkSettingForm.options,
15274
15285
  "model-value": _ctx.dkSettingForm.value,
@@ -15287,7 +15298,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15287
15298
  default: withCtx(() => [
15288
15299
  createVNode(_component_DragForm, {
15289
15300
  api: _ctx.dkPageForm.api,
15290
- "onUpdate:api": _cache[11] || (_cache[11] = $event => ((_ctx.dkPageForm.api) = $event)),
15301
+ "onUpdate:api": _cache[8] || (_cache[8] = $event => ((_ctx.dkPageForm.api) = $event)),
15291
15302
  rule: _ctx.dkPageForm.rule,
15292
15303
  option: _ctx.dkPageForm.options,
15293
15304
  onChange: _ctx.dkPageChange
@@ -15304,15 +15315,15 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15304
15315
  ? (openBlock(), createElementBlock("div", {
15305
15316
  key: 0,
15306
15317
  class: "aside-resizer left-0",
15307
- onMousedown: _cache[13] || (_cache[13] = $event => (_ctx.onResizerMouseDown('right', $event))),
15308
- onMouseup: _cache[14] || (_cache[14] = $event => (_ctx.onResizerMouseUp('right'))),
15309
- onMousemove: _cache[15] || (_cache[15] = $event => (_ctx.onResizerMouseMove('right')))
15318
+ onMousedown: _cache[10] || (_cache[10] = $event => (_ctx.onResizerMouseDown('right', $event))),
15319
+ onMouseup: _cache[11] || (_cache[11] = $event => (_ctx.onResizerMouseUp('right'))),
15320
+ onMousemove: _cache[12] || (_cache[12] = $event => (_ctx.onResizerMouseMove('right')))
15310
15321
  }, null, 32 /* HYDRATE_EVENTS */))
15311
15322
  : createCommentVNode("v-if", true),
15312
15323
  createElementVNode("div", {
15313
15324
  class: "aside-toggle right-99%",
15314
15325
  style: normalizeStyle(_ctx.rightAside.hide ? 'display:block' : ''),
15315
- onClick: _cache[16] || (_cache[16] = $event => (_ctx.hideAside('right')))
15326
+ onClick: _cache[13] || (_cache[13] = $event => (_ctx.hideAside('right')))
15316
15327
  }, [
15317
15328
  createVNode(_component_dk_icon, {
15318
15329
  icon: _ctx.rightAside.hide ? 'ArrowLeft' : 'ArrowRight'
@@ -15324,7 +15335,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15324
15335
  createCommentVNode(" 右边操作区结束"),
15325
15336
  createVNode(_component_el_dialog, {
15326
15337
  visible: _ctx.preview.state,
15327
- "onUpdate:visible": _cache[17] || (_cache[17] = $event => ((_ctx.preview.state) = $event)),
15338
+ "onUpdate:visible": _cache[14] || (_cache[14] = $event => ((_ctx.preview.state) = $event)),
15328
15339
  width: "375px",
15329
15340
  "append-to-body": "",
15330
15341
  style: {"min-height":"700px"}
@@ -15340,7 +15351,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
15340
15351
  }, 8 /* PROPS */, ["visible"]),
15341
15352
  createVNode(_component_dk_dialog, {
15342
15353
  modelValue: _ctx.diyCloud.show,
15343
- "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => ((_ctx.diyCloud.show) = $event)),
15354
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((_ctx.diyCloud.show) = $event)),
15344
15355
  width: "1200px",
15345
15356
  "append-to-body": "",
15346
15357
  title: "DIY模板市场",
@@ -24119,6 +24130,7 @@ const SelectProps = buildProps({
24119
24130
  default: ["bottom-start", "top-start", "right", "left"]
24120
24131
  },
24121
24132
  tagType: { ...tagProps.type, default: "info" },
24133
+ tagEffect: { ...tagProps.effect, default: "light" },
24122
24134
  ...useEmptyValuesProps,
24123
24135
  ...useAriaProps(["ariaLabel"])
24124
24136
  });
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "dk",
5
- "version": "1.0.59",
5
+ "version": "1.0.61",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
@@ -195,7 +195,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
195
195
  "div",
196
196
  {
197
197
  style: normalizeStyle(dialogStyle.value),
198
- class: "dk-form"
198
+ class: "dk-form p10px"
199
199
  },
200
200
  [
201
201
  createVNode(unref(FormCreate), {
@@ -1 +1 @@
1
- {"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM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;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form p10px\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAAC,OAAQA,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,IAAA,CAAK,MAAS,GAAA;AAAA,UACZ,IAAM,EAAA,GAAA;AAAA,UACN,QAAUA,EAAAA,MAAAA;AAAA,UACV,KAAO,EAAA,WAAA;AAAA,SACT,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,WAAW,KAAM,EAAA,CAAA;AAIpC,IAAM,MAAAC,QAAA,GAAS,SAASC,MAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,OAAO,GAAI,EAAA,CAAA;AACjB,IAAM,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAM,MAAA,aAAA,GAAgB,IAAI,KAAK,CAAA,CAAA;AAE/B,IAAM,MAAA,UAAA,GAAa,IAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,UAAA,GAAa,SAAS,OAAO,EAAE,GAAGD,QAAQ,EAAA,GAAG,KAAM,CAAA,WAAA,EAAc,CAAA,CAAA,CAA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ACvB,CAAA,CAAA;AAAA,OACE,MAAA;AACL,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,OACxB;AACA,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAA,SAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- .dk-form .form-help{margin-top:4px;margin-bottom:0;font-size:12px;line-height:1.5;color:#888}.dk-form .el-form-item__content{display:block}
1
+ .dk-form .form-help{margin-top:4px;margin-bottom:0;font-size:12px;line-height:1.5;color:#888}
@@ -7,7 +7,7 @@
7
7
  color: #888;
8
8
  }
9
9
 
10
- .el-form-item__content {
11
- display: block;
12
- }
10
+ //.el-form-item__content {
11
+ // display: block;
12
+ //}
13
13
  }
@@ -322,6 +322,7 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
322
322
  hide: boolean;
323
323
  treeData: never[];
324
324
  }>;
325
+ leftTabsName: import("vue").Ref<string>;
325
326
  }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
326
327
  type: {
327
328
  type: StringConstructor;
@@ -322,6 +322,7 @@ declare const _default: import("vue").DefineComponent<{
322
322
  hide: boolean;
323
323
  treeData: never[];
324
324
  }>;
325
+ leftTabsName: import("vue").Ref<string>;
325
326
  }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
326
327
  type: {
327
328
  type: StringConstructor;