@vipl520/dk-ui 1.0.13 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +115 -78
  3. package/dist/index.min.js +3 -3
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +5 -5
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +115 -78
  8. package/dist/web-types.json +1 -1
  9. package/es/hot-area-input/style/index.scss +0 -1
  10. package/es/page-diy/index.d.ts +18 -0
  11. package/es/page-diy/src/components/DragBox.vue.mjs +1 -0
  12. package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
  13. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  14. package/es/page-diy/src/components/PreviewPhone.vue2.mjs +26 -4
  15. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  16. package/es/page-diy/src/config/rule/min/common/DkMinBlank.d.ts +1 -1
  17. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs +1 -1
  18. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs.map +1 -1
  19. package/es/page-diy/src/config/rule/min/common/index.d.ts +2 -2
  20. package/es/page-diy/src/config/rule/min/index.d.ts +2 -2
  21. package/es/page-diy/src/page-diy.vue.d.ts +18 -0
  22. package/es/page-diy/src/page-diy.vue.mjs +2 -2
  23. package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
  24. package/es/page-diy/src/props.d.ts +8 -0
  25. package/es/page-diy/src/props.mjs +8 -0
  26. package/es/page-diy/src/props.mjs.map +1 -1
  27. package/es/page-diy/src/views/min/DkMinBlank.vue.d.ts +5 -5
  28. package/es/page-diy/src/views/min/DkMinBlank.vue.mjs +2 -2
  29. package/es/page-diy/src/views/min/DkMinBlank.vue.mjs.map +1 -1
  30. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +2 -1
  31. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
  32. package/es/page-diy/style/drag-tool.css +1 -1
  33. package/es/page-diy/style/drag-tool.scss +2 -1
  34. package/es/page-diy/style/index.css +1 -1
  35. package/es/select/src/select.vue2.mjs +1 -1
  36. package/es/select/src/select.vue2.mjs.map +1 -1
  37. package/es/style-border-input/src/style-border-input.vue2.mjs +49 -45
  38. package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
  39. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs +3 -2
  40. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
  41. package/lib/hot-area-input/style/index.scss +0 -1
  42. package/lib/page-diy/index.d.ts +18 -0
  43. package/lib/page-diy/src/components/DragBox.vue.js +1 -0
  44. package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
  45. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  46. package/lib/page-diy/src/components/PreviewPhone.vue2.js +26 -4
  47. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  48. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.d.ts +1 -1
  49. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js +1 -1
  50. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js.map +1 -1
  51. package/lib/page-diy/src/config/rule/min/common/index.d.ts +2 -2
  52. package/lib/page-diy/src/config/rule/min/index.d.ts +2 -2
  53. package/lib/page-diy/src/page-diy.vue.d.ts +18 -0
  54. package/lib/page-diy/src/page-diy.vue.js +2 -2
  55. package/lib/page-diy/src/page-diy.vue.js.map +1 -1
  56. package/lib/page-diy/src/props.d.ts +8 -0
  57. package/lib/page-diy/src/props.js +8 -0
  58. package/lib/page-diy/src/props.js.map +1 -1
  59. package/lib/page-diy/src/views/min/DkMinBlank.vue.d.ts +5 -5
  60. package/lib/page-diy/src/views/min/DkMinBlank.vue.js +2 -2
  61. package/lib/page-diy/src/views/min/DkMinBlank.vue.js.map +1 -1
  62. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +2 -1
  63. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
  64. package/lib/page-diy/style/drag-tool.css +1 -1
  65. package/lib/page-diy/style/drag-tool.scss +2 -1
  66. package/lib/page-diy/style/index.css +1 -1
  67. package/lib/select/src/select.vue2.js +1 -1
  68. package/lib/select/src/select.vue2.js.map +1 -1
  69. package/lib/style-border-input/src/style-border-input.vue2.js +49 -45
  70. package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
  71. package/lib/style-shadow-input/src/style-shadow-input.vue2.js +3 -2
  72. package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
  73. package/package.json +1 -1
@@ -27,6 +27,14 @@ const pageDiyProps = {
27
27
  loading: {
28
28
  type: Boolean,
29
29
  default: void 0
30
+ },
31
+ rightAsideWidth: {
32
+ type: String,
33
+ default: "300px"
34
+ },
35
+ leftAsideWidth: {
36
+ type: String,
37
+ default: "285px"
30
38
  }
31
39
  // 'menu', 'height', 'config', 'mask', 'locale', 'loading'
32
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../src/page-diy/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const pageDiyProps = {\n // DIY 类型 分别为:web(网页)、min(小程序)\n type: {\n type: String,\n default: 'min',\n },\n menu: {\n type: Object,\n default: null,\n },\n height: {\n type: String,\n default: '',\n },\n config: {\n type: Object,\n default: () => {\n return {}\n },\n },\n mask: {\n type: String,\n default: undefined,\n },\n loading: {\n type: Boolean,\n default: undefined,\n },\n // 'menu', 'height', 'config', 'mask', 'locale', 'loading'\n}\n\nexport type PageDiyProps = ExtractPropTypes<typeof pageDiyProps>\n"],"names":[],"mappings":";;AAEO,MAAM,YAAe,GAAA;AAAA;AAAA,EAE1B,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA;AAEF;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../src/page-diy/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const pageDiyProps = {\n // DIY 类型 分别为:web(网页)、min(小程序)\n type: {\n type: String,\n default: 'min',\n },\n menu: {\n type: Object,\n default: null,\n },\n height: {\n type: String,\n default: '',\n },\n config: {\n type: Object,\n default: () => {\n return {}\n },\n },\n mask: {\n type: String,\n default: undefined,\n },\n loading: {\n type: Boolean,\n default: undefined,\n },\n rightAsideWidth: {\n type: String,\n default: '300px',\n },\n leftAsideWidth: {\n type: String,\n default: '285px',\n },\n // 'menu', 'height', 'config', 'mask', 'locale', 'loading'\n}\n\nexport type PageDiyProps = ExtractPropTypes<typeof pageDiyProps>\n"],"names":[],"mappings":";;AAEO,MAAM,YAAe,GAAA;AAAA;AAAA,EAE1B,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAAA;AAEF;;;;"}
@@ -1,14 +1,14 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  height: {
3
- default: string;
4
- type: StringConstructor;
3
+ default: number;
4
+ type: (StringConstructor | NumberConstructor)[];
5
5
  };
6
6
  }, any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
7
  height: {
8
- default: string;
9
- type: StringConstructor;
8
+ default: number;
9
+ type: (StringConstructor | NumberConstructor)[];
10
10
  };
11
11
  }>>, {
12
- height: string;
12
+ height: string | number;
13
13
  }, {}>;
14
14
  export default _default;
@@ -9,8 +9,8 @@ const _sfc_main = {
9
9
  name: 'DkMinBlank',
10
10
  props: {
11
11
  height: {
12
- default: '',
13
- type: String,
12
+ default: 20,
13
+ type: [String, Number],
14
14
  },
15
15
  },
16
16
  data() {
@@ -1 +1 @@
1
- {"version":3,"file":"DkMinBlank.vue.js","sources":["../../../../../src/page-diy/src/views/min/DkMinBlank.vue"],"sourcesContent":["<template>\n <div :style=\"{ height: height + 'px' }\" style=\"width: 100%\"></div>\n</template>\n\n<script>\nexport default {\n name: 'DkMinBlank',\n props: {\n height: {\n default: '',\n type: String,\n },\n },\n data() {\n return {}\n },\n computed: {},\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_createElementBlock","_normalizeStyle"],"mappings":";;;;;;;AAKA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,YAAY;AAClB,EAAA,KAAK,EAAE;AACL,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;GACF;AACD,EAAA,IAAI,GAAG;AACL,IAAA,OAAO,EAAC;GACT;EACD,QAAQ,EAAE,EAAE;EACZ,OAAO,GAAG,EAAE;EACZ,OAAO,EAAE,EAAE;AACb,EAAA;;;2BAlBEA,sBAAkE,CAAA,KAAA,EAAA;IAA5D,KAAK,EAAAC,kBAAA,CAAA,CAAA,EAAA,MAAA,EAAY,MAAM,CAAA,MAAA,GAAA,IAAA,EAAA,EAAW,CAAmB,OAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;;;;;"}
1
+ {"version":3,"file":"DkMinBlank.vue.js","sources":["../../../../../src/page-diy/src/views/min/DkMinBlank.vue"],"sourcesContent":["<template>\n <div :style=\"{ height: height + 'px' }\" style=\"width: 100%\"></div>\n</template>\n\n<script>\nexport default {\n name: 'DkMinBlank',\n props: {\n height: {\n default: 20,\n type: [String, Number],\n },\n },\n data() {\n return {}\n },\n computed: {},\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_createElementBlock","_normalizeStyle"],"mappings":";;;;;;;AAKA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,YAAY;AAClB,EAAA,KAAK,EAAE;AACL,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;AACX,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;GACF;AACD,EAAA,IAAI,GAAG;AACL,IAAA,OAAO,EAAC;GACT;EACD,QAAQ,EAAE,EAAE;EACZ,OAAO,GAAG,EAAE;EACZ,OAAO,EAAE,EAAE;AACb,EAAA;;;2BAlBEA,sBAAkE,CAAA,KAAA,EAAA;IAA5D,KAAK,EAAAC,kBAAA,CAAA,CAAA,EAAA,MAAA,EAAY,MAAM,CAAA,MAAA,GAAA,IAAA,EAAA,EAAW,CAAmB,OAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;;;;;"}
@@ -104,7 +104,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
104
104
  ? (vue.openBlock(), vue.createElementBlock("img", {
105
105
  key: 0,
106
106
  src: $props.hotData.background,
107
- alt: ""
107
+ alt: "",
108
+ style: {"width":"100%"}
108
109
  }, null, 8 /* PROPS */, _hoisted_2))
109
110
  : (vue.openBlock(), vue.createBlock(_component_el_empty, {
110
111
  key: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"DkMinHotArea.vue.js","sources":["../../../../../src/page-diy/src/views/min/DkMinHotArea.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"dk-min-area\">\n <img v-if=\"hotData.background\" :src=\"hotData.background\" alt=\"\" />\n <el-empty v-else description=\"请上传背景图\"></el-empty>\n <div\n v-for=\"(view, index) in views\"\n :key=\"index\"\n :style=\"{ position: 'absolute', ...view.css, background: showMask ? '#0008' : '#0004' }\"\n >\n <!-- 可以在这里放置热图链接或覆盖层 -->\n <div :style=\"{ width: view.css.width, height: view.css.height }\" class=\"hot-item\">\n {{ index + 1 }}\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { onMounted, ref, onUnmounted, watch } from 'vue'\n\nexport default {\n name: 'DkMinHotArea',\n props: {\n hotData: {\n default: () => ({}),\n type: Object,\n },\n showMask: {\n default: false,\n type: Boolean,\n },\n },\n setup(props) {\n const el = ref(null)\n let ro = null\n const containerWidth = ref(0)\n\n const views = ref([])\n\n // const\n onMounted(() => {\n ro = new (window.ResizeObserver || ResizeObserver)(handleResize)\n ro.observe(el.value)\n // 初始化容器宽度\n containerWidth.value = el.value.clientWidth\n // 计算并转换热图区域的位置和尺寸\n adjustHotspots()\n })\n\n onUnmounted(() => {\n if (ro) {\n ro.disconnect()\n }\n })\n\n watch(\n () => props.hotData.views,\n () => {\n adjustHotspots()\n },\n {\n deep: true,\n }\n )\n\n function handleResize(entries) {\n entries.forEach((entry) => {\n if (entry.target === el.value) {\n containerWidth.value = entry.contentRect.width\n adjustHotspots()\n }\n })\n }\n\n function adjustHotspots() {\n views.value = JSON.parse(JSON.stringify(props.hotData.views))\n // 根据容器宽度调整热图区域的位置与尺寸\n views.value.forEach((view) => {\n const { left, top, width: originalWidth, height: originalHeight } = view.css\n // 计算实际宽度和高度,假设按比例缩放\n const actualWidth = Math.round(originalWidth * (containerWidth.value / props.hotData.width))\n const actualHeight = Math.round(originalHeight * (containerWidth.value / props.hotData.width))\n\n // 计算实际left和top\n const actualLeft = Math.round(left * (containerWidth.value / props.hotData.width))\n const actualTop = Math.round(top * (containerWidth.value / props.hotData.width))\n // 更新视图样式\n view.css = {\n ...view.css,\n left: actualLeft + 'px',\n top: actualTop + 'px',\n width: actualWidth + 'px',\n height: actualHeight + 'px',\n }\n })\n }\n\n return {\n el,\n containerWidth,\n views,\n }\n },\n}\n</script>\n"],"names":["ref","onMounted","onUnmounted","watch","_openBlock","_createElementBlock","_createBlock","_Fragment","_renderList","_normalizeStyle","_createCommentVNode","_createElementVNode"],"mappings":";;;;;;;AAoBA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,cAAc;AACpB,EAAA,KAAK,EAAE;AACL,IAAA,OAAO,EAAE;AACP,MAAA,OAAO,EAAE,OAAO,EAAE,CAAC;MACnB,IAAI,EAAE,MAAM;KACb;AACD,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;GACF;EACD,KAAK,CAAC,KAAK,EAAE;AACX,IAAA,MAAM,EAAG,GAAEA,OAAG,CAAC,IAAI,EAAA;AACnB,IAAA,IAAI,K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AAE;;0BAC/DC,eAAiD,CAAA,mBAAA,EAAA;;AAAhC,UAAA,WAAW,EAAC,QAAQ;;AACrC,KAAAF,aAAA,CAAA,IAAA,CAAA,EAAAC,sBAAA,CASME,YARoB,EAAA,IAAA,EAAAC,cAAA,CAAA,MAAA,CAAA,KAAK,EAArB,CAAA,IAAI,EAAE,KAAK,KAAA;+BADrBH,sBASM,CAAA,KAAA,EAAA;AAPH,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,KAAK,EAA6BI,kBAAA,CAAA,EAAA,QAAA,EAAA,UAAA,EAAA,GAAA,IAAI,CAAC,GAAG,cAAc,MAAQ,CAAA,QAAA,GAAA,OAAA,GAAA,OAAA,EAAA,CAAA;;QAEjEC,sBAAwB,CAAA,mBAAA,CAAA;QACxBC,sBAEM,CAAA,KAAA,EAAA;UAFA,KAAK,EAAAF,kBAAA,CAAA,EAAA,KAAA,EAAW,IAAI,CAAC,GAAG,CAAC,KAAK,EAAA,MAAA,EAAU,IAAI,CAAC,GAAG,CAAC,MAAM,EAAA,CAAA;AAAI,UAAA,KAAK,EAAC,UAAU;+BAC5E,KAAK,GAAA,CAAA,CAAA,EAAA,CAAA,mBAAA;;;;;;;;;"}
1
+ {"version":3,"file":"DkMinHotArea.vue.js","sources":["../../../../../src/page-diy/src/views/min/DkMinHotArea.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"dk-min-area\">\n <img v-if=\"hotData.background\" :src=\"hotData.background\" alt=\"\" style=\"width: 100%\" />\n <el-empty v-else description=\"请上传背景图\"></el-empty>\n <div\n v-for=\"(view, index) in views\"\n :key=\"index\"\n :style=\"{ position: 'absolute', ...view.css, background: showMask ? '#0008' : '#0004' }\"\n >\n <!-- 可以在这里放置热图链接或覆盖层 -->\n <div :style=\"{ width: view.css.width, height: view.css.height }\" class=\"hot-item\">\n {{ index + 1 }}\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { onMounted, ref, onUnmounted, watch } from 'vue'\n\nexport default {\n name: 'DkMinHotArea',\n props: {\n hotData: {\n default: () => ({}),\n type: Object,\n },\n showMask: {\n default: false,\n type: Boolean,\n },\n },\n setup(props) {\n const el = ref(null)\n let ro = null\n const containerWidth = ref(0)\n\n const views = ref([])\n\n // const\n onMounted(() => {\n ro = new (window.ResizeObserver || ResizeObserver)(handleResize)\n ro.observe(el.value)\n // 初始化容器宽度\n containerWidth.value = el.value.clientWidth\n // 计算并转换热图区域的位置和尺寸\n adjustHotspots()\n })\n\n onUnmounted(() => {\n if (ro) {\n ro.disconnect()\n }\n })\n\n watch(\n () => props.hotData.views,\n () => {\n adjustHotspots()\n },\n {\n deep: true,\n }\n )\n\n function handleResize(entries) {\n entries.forEach((entry) => {\n if (entry.target === el.value) {\n containerWidth.value = entry.contentRect.width\n adjustHotspots()\n }\n })\n }\n\n function adjustHotspots() {\n views.value = JSON.parse(JSON.stringify(props.hotData.views))\n // 根据容器宽度调整热图区域的位置与尺寸\n views.value.forEach((view) => {\n const { left, top, width: originalWidth, height: originalHeight } = view.css\n // 计算实际宽度和高度,假设按比例缩放\n const actualWidth = Math.round(originalWidth * (containerWidth.value / props.hotData.width))\n const actualHeight = Math.round(originalHeight * (containerWidth.value / props.hotData.width))\n\n // 计算实际left和top\n const actualLeft = Math.round(left * (containerWidth.value / props.hotData.width))\n const actualTop = Math.round(top * (containerWidth.value / props.hotData.width))\n // 更新视图样式\n view.css = {\n ...view.css,\n left: actualLeft + 'px',\n top: actualTop + 'px',\n width: actualWidth + 'px',\n height: actualHeight + 'px',\n }\n })\n }\n\n return {\n el,\n containerWidth,\n views,\n }\n },\n}\n</script>\n"],"names":["ref","onMounted","onUnmounted","watch","_openBlock","_createElementBlock","_createBlock","_Fragment","_renderList","_normalizeStyle","_createCommentVNode","_createElementVNode"],"mappings":";;;;;;;AAoBA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,cAAc;AACpB,EAAA,KAAK,EAAE;AACL,IAAA,OAAO,EAAE;AACP,MAAA,OAAO,EAAE,OAA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,EAAA,QAAAC,aAAA,EAAA,EAAAC,sBAAA,CAaM,OAbN,UAaM,EAAA;AAZO,IAAA,CAAA,MAAA,CAAA,OAAO,CAAC,UAAU;0BAA7BA,sBAAsF,CAAA,KAAA,EAAA;;UAAtD,GAAG,EAAE,MAAO,CAAA,OAAA,CAAC,UAAU;AAAE,UAAA,GAAG,EAAC,EAAE;AAAC,UAAA,KAAmB,EAAnB,CAAmB,OAAA,CAAA,MAAA,CAAA;;0BACnFC,eAAiD,CAAA,mBAAA,EAAA;;AAAhC,UAAA,WAAW,EAAC,QAAQ;;AACrC,KAAAF,aAAA,CAAA,IAAA,CAAA,EAAAC,sBAAA,CASME,YARoB,EAAA,IAAA,EAAAC,cAAA,CAAA,MAAA,CAAA,KAAK,EAArB,CAAA,IAAI,EAAE,KAAK,KAAA;+BADrBH,sBASM,CAAA,KAAA,EAAA;AAPH,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,KAAK,EAA6BI,kBAAA,CAAA,EAAA,QAAA,EAAA,UAAA,EAAA,GAAA,IAAI,CAAC,GAAG,cAAc,MAAQ,CAAA,QAAA,GAAA,OAAA,GAAA,OAAA,EAAA,CAAA;;QAEjEC,sBAAwB,CAAA,mBAAA,CAAA;QACxBC,sBAEM,CAAA,KAAA,EAAA;UAFA,KAAK,EAAAF,kBAAA,CAAA,EAAA,KAAA,EAAW,IAAI,CAAC,GAAG,CAAC,KAAK,EAAA,MAAA,EAAU,IAAI,CAAC,GAAG,CAAC,MAAM,EAAA,CAAA;AAAI,UAAA,KAAK,EAAC,UAAU;+BAC5E,KAAK,GAAA,CAAA,CAAA,EAAA,CAAA,mBAAA;;;;;;;;;"}
@@ -1 +1 @@
1
- .drag-tool{padding:2px 0;position:relative;min-height:30px;box-sizing:border-box;word-wrap:break-word;word-break:break-all;margin:var(--margin);outline:var(--showDashed) dashed #a2d1ff}.drag-tool:hover{outline:2px dashed #a2d1ff}.drag-tool .drag-tool{margin:5px}.drag-tool+.drag-tool{margin-top:5px}.drag-tool .drag-content{overflow:hidden}.drag-tool .drag-content .drag-tool .del{right:0;top:0}.drag-tool .drag-r{display:block}.drag-tool .drag-r{position:absolute;right:2px;bottom:2px;z-index:1200}.drag-tool .drag-l{position:absolute;top:0;left:0;z-index:1904}.drag-tool .drag-btn{height:18px;width:18px;color:#fff;background-color:#666;text-align:center;line-height:20px;padding-bottom:1px;float:left;cursor:pointer;justify-content:center;display:none;opacity:.5}.drag-tool .drag-btn+.drag-btn{margin-left:2px}.drag-tool .drag-btn:hover{background-color:var(--el-color-primary);opacity:1}.drag-tool .drag-btn-danger{background-color:var(--el-color-danger)!important}.drag-tool .drag-btn i{font-size:13px}.drag-tool .drag-mask{z-index:1199;position:absolute;top:0;left:0;right:0;bottom:0}.drag-tool.active{outline:2px solid #409eff}.drag-tool.active>.drag-r .drag-btn{display:block}.drag-tool.active>.drag-l .drag-btn{display:block}.drag-tool.active>.del{display:block}.drag-tool.active>.op{display:block}
1
+ .drag-tool{padding:var(--padding);position:relative;min-height:30px;box-sizing:border-box;word-wrap:break-word;word-break:break-all;margin:var(--margin);outline:var(--showDashed) dashed #a2d1ff;overflow:var(--overflow)}.drag-tool:hover{outline:2px dashed #a2d1ff}.drag-tool .drag-tool{margin:5px}.drag-tool+.drag-tool{margin-top:5px}.drag-tool .drag-content{overflow:hidden}.drag-tool .drag-content .drag-tool .del{right:0;top:0}.drag-tool .drag-r{display:block}.drag-tool .drag-r{position:absolute;right:2px;bottom:2px;z-index:1200}.drag-tool .drag-l{position:absolute;top:0;left:0;z-index:1904}.drag-tool .drag-btn{height:18px;width:18px;color:#fff;background-color:#666;text-align:center;line-height:20px;padding-bottom:1px;float:left;cursor:pointer;justify-content:center;display:none;opacity:.5}.drag-tool .drag-btn+.drag-btn{margin-left:2px}.drag-tool .drag-btn:hover{background-color:var(--el-color-primary);opacity:1}.drag-tool .drag-btn-danger{background-color:var(--el-color-danger)!important}.drag-tool .drag-btn i{font-size:13px}.drag-tool .drag-mask{z-index:1199;position:absolute;top:0;left:0;right:0;bottom:0}.drag-tool.active{outline:2px solid #409eff}.drag-tool.active>.drag-r .drag-btn{display:block}.drag-tool.active>.drag-l .drag-btn{display:block}.drag-tool.active>.del{display:block}.drag-tool.active>.op{display:block}
@@ -1,6 +1,6 @@
1
1
  /* stylelint-disable */
2
2
  .drag-tool {
3
- padding: 2px 0;
3
+ padding: var(--padding);
4
4
  position: relative;
5
5
  min-height: 30px;
6
6
  box-sizing: border-box;
@@ -8,6 +8,7 @@
8
8
  word-break: break-all;
9
9
  margin: var(--margin);
10
10
  outline: var(--showDashed) dashed #a2d1ff;
11
+ overflow: var(--overflow);
11
12
  //cursor: move;
12
13
  &:hover {
13
14
  outline: 2px dashed #a2d1ff;
@@ -1 +1 @@
1
- @charset "UTF-8";.dk-page-diy{min-width:1000px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy .drag-box{min-height:50px}.dk-page-diy ._fc-l,.dk-page-diy ._fc-m,.dk-page-diy ._fc-r{background:#fff;box-sizing:border-box;height:calc(100vh - 180px);position:relative}.dk-page-diy ._fc-l::-webkit-scrollbar,.dk-page-diy ._fc-m::-webkit-scrollbar,.dk-page-diy ._fc-r::-webkit-scrollbar{display:none}.dk-page-diy ._fc-l{overflow:inherit!important;display:flex;flex:0 0 auto;flex-direction:column;top:0}.dk-page-diy ._fc-l ._fc-l-group{padding:0 12px}.dk-page-diy ._fc-l ._fc-l-title{font-weight:600;font-size:14px;margin:18px 0 5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy ._fc-l ._fc-l-item{display:inline-block;background:#fff;color:#000;min-width:70px;width:80px;height:70px;line-height:1;text-align:center;transition:all .2s ease;cursor:pointer;border-radius:6px;position:relative}.dk-page-diy ._fc-l ._fc-l-item.not-drag{cursor:not-allowed;background:#f6f6f6!important;color:#000!important}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-name{font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-count{background-color:#409eff;border-radius:10px;color:#fff;display:inline-block;font-size:12px;height:18px;line-height:18px;padding:0 6px;text-align:center;white-space:nowrap;border:1px solid #fff;position:absolute;top:5px;right:20px;z-index:1;transform:translateY(-50%) translateX(100%)}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-icon{padding:10px 5px 12px}.dk-page-diy ._fc-l ._fc-l-item:hover{background:#409eff;color:#fff}.dk-page-diy ._fc-l.item-box ._fc-l-groups{height:calc(100vh - 220px);overflow:auto;flex:1 1 0%}.dk-page-diy ._fc-l.item-box ._fc-l-groups::-webkit-scrollbar{display:none}.dk-page-diy ._fc-l.item-box ._fc-l-groups ._fc-l-items ._fc-l-item{margin:5px;width:76px;box-shadow:1px 1px 4px rgba(0,0,0,.1019607843)}.dk-page-diy ._fc-l:hover .aside-toggle{display:block}.dk-page-diy ._fc-l .children-list{width:100%;position:relative;background:#fff;bottom:0;overflow:auto;z-index:2}.dk-page-diy ._fc-l .children-list .child-title{cursor:pointer;text-align:center;font-size:14px;padding:4px;position:-webkit-sticky;position:sticky;z-index:2;top:0;background:#fff;border-top:1px solid #eaecef;border-right:0}.dk-page-diy ._fc-l .children-list .child-title .dk-icon{position:absolute;right:10px}.dk-page-diy ._fc-l .children-list .child-title .dk-icon:hover{color:#409eff!important}.dk-page-diy ._fc-l .children-list .el-tree-node .close-rule{position:absolute;right:0;display:none;padding:0 10px}.dk-page-diy ._fc-l .children-list .el-tree-node .close-rule:hover{color:#409eff!important}.dk-page-diy ._fc-l .children-list .el-tree-node:hover .close-rule{display:inline-flex}.dk-page-diy ._fc-l .children-list .aside-resizer{width:100%;height:4px;margin:-2px 0;cursor:n-resize;z-index:3}.dk-page-diy ._fc-l .children-list::-webkit-scrollbar{display:none}.dk-page-diy ._fc-m{background:#ebeced;width:100%}.dk-page-diy ._fc-m ._fc-m-tools{background:#fff;height:40px;align-items:center;display:flex;justify-content:flex-end;border:1px solid #ececec;border-top:0 none}.dk-page-diy ._fc-m ._fc-m-drag{overflow:auto;box-sizing:border-box}.dk-page-diy ._fc-m .form-create ._fc-l-item{background:#409eff;width:100%;height:30px;overflow:hidden;transition:all .3s ease;display:flex;justify-content:center;align-items:center;color:#fff}.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-count,.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-icon,.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-name{display:none}.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen:after{content:"放在这里";color:#fff;font-size:14px}.dk-page-diy ._fc-m .form-create ._fc-l-item ._fc-l-icon{margin:0 10px}.dk-page-diy ._fc-r{width:calc(100% - 800px);overflow:inherit!important}.dk-page-diy ._fc-r .el-tabs__nav-wrap{padding:0 20px}.dk-page-diy ._fc-r .el-tabs__nav{width:100%}.dk-page-diy ._fc-r .el-tabs__item{width:33%;text-align:center}.dk-page-diy ._fc-r .el-tabs__content{padding:0 20px;height:calc(100vh - 235px);overflow:auto}.dk-page-diy ._fc-r .el-tabs__content::-webkit-scrollbar{width:5px}.dk-page-diy ._fc-r .el-tabs__nav-wrap::after{height:1px;background-color:#ececec}.dk-page-diy ._fc-r ._fc-r-tabs{display:flex;cursor:pointer;padding:0;border-bottom:1px solid #ececec}.dk-page-diy ._fc-r ._fc-r-tab{height:40px;box-sizing:border-box;line-height:40px;display:inline-block;list-style:none;font-size:14px;font-weight:600;color:#303133;position:relative;flex:1;text-align:center}.dk-page-diy ._fc-r ._fc-r-tab.active{color:#409eff;border-bottom:2px solid #409eff}.dk-page-diy ._fc-r:hover .aside-toggle{display:block}.dk-page-diy ._fc-r .el-form-item__content{display:block}.dk-page-diy ._fc-r .el-form-item__content .form-help{line-height:1.5;margin-top:4px;color:#888;font-size:12px}.dk-page-diy ._fc-m-drag,.dk-page-diy .draggable-drag{min-height:630px;height:100%;position:relative}.dk-page-diy ._fc-m-drag .chosen,.dk-page-diy .draggable-drag .chosen{opacity:1!important}.dk-page-diy .aside-resizer{cursor:ew-resize;height:100%;margin:0 -2px;position:absolute;top:0;width:4px;z-index:1;right:0}.dk-page-diy .aside-resizer:hover{background:rgba(204,204,204,.5)}.dk-page-diy .aside-toggle{background:inherit;cursor:pointer;padding:20px 5px;position:absolute;top:50%;transform:translateY(-50%);z-index:1;display:none}.dk-page-diy .drag-tool{padding:2px 0;position:relative;min-height:30px;box-sizing:border-box;word-wrap:break-word;word-break:break-all;margin:var(--margin);outline:var(--showDashed) dashed #a2d1ff}.dk-page-diy .drag-tool:hover{outline:2px dashed #a2d1ff}.dk-page-diy .drag-tool .drag-tool{margin:5px}.dk-page-diy .drag-tool+.drag-tool{margin-top:5px}.dk-page-diy .drag-tool .drag-content{overflow:hidden}.dk-page-diy .drag-tool .drag-content .drag-tool .del{right:0;top:0}.dk-page-diy .drag-tool .drag-r{display:block}.dk-page-diy .drag-tool .drag-r{position:absolute;right:2px;bottom:2px;z-index:1200}.dk-page-diy .drag-tool .drag-l{position:absolute;top:0;left:0;z-index:1904}.dk-page-diy .drag-tool .drag-btn{height:18px;width:18px;color:#fff;background-color:#666;text-align:center;line-height:20px;padding-bottom:1px;float:left;cursor:pointer;justify-content:center;display:none;opacity:.5}.dk-page-diy .drag-tool .drag-btn+.drag-btn{margin-left:2px}.dk-page-diy .drag-tool .drag-btn:hover{background-color:var(--el-color-primary);opacity:1}.dk-page-diy .drag-tool .drag-btn-danger{background-color:var(--el-color-danger)!important}.dk-page-diy .drag-tool .drag-btn i{font-size:13px}.dk-page-diy .drag-tool .drag-mask{z-index:1199;position:absolute;top:0;left:0;right:0;bottom:0}.dk-page-diy .drag-tool.active{outline:2px solid #409eff}.dk-page-diy .drag-tool.active>.drag-r .drag-btn{display:block}.dk-page-diy .drag-tool.active>.drag-l .drag-btn{display:block}.dk-page-diy .drag-tool.active>.del{display:block}.dk-page-diy .drag-tool.active>.op{display:block}.dk-page-diy .preview-phone{overflow:auto;box-shadow:inset 0 2px 5px 1px rgba(62,62,62,.0901960784);height:100%}.dk-page-diy .preview-phone::-webkit-scrollbar{width:8px}.dk-page-diy .preview-phone .phone{background:#fff;width:375px;margin:20px auto;box-shadow:0 5px 10px rgba(0,0,0,.2);min-height:700px}.dk-page-diy .preview-phone .phone .phone-header{height:75px;margin-bottom:1px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy .preview-phone .phone .phone-header img{width:100%}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top{display:flex;align-items:flex-start;justify-content:space-between;height:30px;font-size:12px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-time{margin:10px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-time span{margin-right:5px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-bangs{background:#000;width:200px;height:30px;border-bottom-right-radius:20px;border-bottom-left-radius:20px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-battery{margin:10px;display:flex;align-items:center;height:18px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-battery img{margin-left:5px}.dk-page-diy .preview-phone .phone .phone-header .phone-title{display:flex;justify-content:space-between;align-items:center;height:40px}.dk-page-diy .preview-phone .phone .phone-header .phone-title .phone-title-icon{margin:5px}.dk-page-diy .preview-phone .phone .phone-header-min{background-image:url(https://demo-saas.site.niucloud.com/admin/assets/diy_preview_head-8c072698.png);background-repeat:no-repeat;background-position:center;background-size:cover;position:relative}.dk-page-diy .preview-phone .phone .phone-header-min .close-button{position:absolute;top:34px;right:27px}.dk-page-diy .preview-phone .phone .phone-header-min .close-button:hover .close-button-mask{background:rgba(0,0,0,.0666666667)}.dk-page-diy .preview-phone .phone .phone-header-min .close-button .close-button-mask{width:20px;height:20px;border-radius:100%;cursor:pointer}.dk-page-diy .preview-phone .phone .phone-header-min .more-button-mask{position:absolute;top:34px;right:70px;width:25px;cursor:pointer;border-radius:40px;height:20px}.dk-page-diy .preview-phone .phone .phone-header-min .more-button-mask:hover{background:rgba(0,0,0,.0666666667)}.dk-page-diy .preview-phone .phone .phone-body{background:#f5f5f5;background-size:100% auto!important;overflow:visible;background-repeat:no-repeat;background-origin:initial;background-clip:initial}.dk-page-diy .preview-phone .phone .phone-body .ghost{box-shadow:var(--el-box-shadow)}.dk-page-diy .dk-view-bullet-chat{height:30px;line-height:30px;color:#fff;background:rgba(0,0,0,.6);border-radius:100px}.dk-page-diy .dk-view-bullet-chat .bullet-content{display:flex;align-items:center;height:20px;margin:5px;font-size:12px}.dk-page-diy .dk-view-bullet-chat .bullet-content img{width:20px;height:20px;border-radius:100%}.dk-page-diy .dk-view-bullet-chat .bullet-content span{padding:0 5px}.dk-page-diy .dk-view-common-btn .btn{display:flex;align-items:center;justify-content:center}.dk-page-diy .dk-view-common-btn .btn .van-icon{font-size:1.2em}.dk-page-diy .dk-view-common-btn .f-btn{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.dk-page-diy .dk-view-common-btn .f-btn .image-content{display:inherit}.dk-page-diy .dk-view-common-btn .f-btn .f-btn-content{display:flex;align-items:center;justify-content:center;border-radius:100%}.dk-page-diy .dk-view-common-btn .f-img{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.dk-page-diy .dk-view-image.dk-mobile-image-default{display:flex;flex-direction:column}.dk-page-diy .dk-view-image.dk-mobile-image-default .van-image{display:block}.dk-page-diy .dk-view-image.dk-mobile-image-default .dk-mobile-image-content{display:block}.dk-page-diy .dk-view-image.dk-mobile-image-slide{width:100%;overflow-x:scroll;white-space:nowrap}.dk-page-diy .dk-view-image.dk-mobile-image-slide .dk-mobile-image-content{position:relative;display:inline-block;margin-right:10px;vertical-align:top}.dk-page-diy .dk-view-image .dk-mobile-image-content{position:relative;overflow:hidden}.dk-page-diy .dk-view-image .dk-mobile-image-content:last-child{margin:0!important}.dk-page-diy .dk-view-image .dk-mobile-image-content .text-type-footer{text-align:center;height:48px;line-height:48px}.dk-page-diy .dk-view-image .dk-mobile-image-content .text-type-default{color:#fff;text-align:center;position:absolute;background:linear-gradient(180deg,transparent,rgba(0,0,0,.75));bottom:0;height:48px;line-height:48px;width:100%}.dk-page-diy .dk-view-dialog .preview{display:flex;align-items:center;justify-content:center;height:40px;text-align:center;background:#fff}.dk-page-diy .dk-view-music{width:100%;display:flex;align-items:center;justify-content:center}.dk-page-diy .dk-view-music .dk-music-icon{background:#fff;border-radius:100%;border:2px solid #fff;font-weight:800;box-sizing:content-box;color:#f56c6c}.dk-page-diy .dk-view-music .dk-music-img{border-radius:100%}.dk-page-diy .dk-view-music .changeRight{-webkit-animation-name:changeRight;animation-name:changeRight}.dk-page-diy .dk-view-music .changeLeft{-webkit-animation-name:changeLeft;animation-name:changeLeft}@-webkit-keyframes changeRight{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(180deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes changeRight{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(180deg)}100%{-webkit-transform:rotate(360deg)}}@-webkit-keyframes changeLeft{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(-180deg)}100%{-webkit-transform:rotate(-360deg)}}@keyframes changeLeft{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(-180deg)}100%{-webkit-transform:rotate(-360deg)}}.dk-page-diy .dk-view-swipe .image{width:100%}.dk-page-diy .dk-view-tabbar .van-tabbar,.dk-page-diy .dk-view-tabbar .van-tabbar-item--active{background:0 0}.dk-page-diy .dk-view-title{display:flex;align-items:center;justify-content:space-between}.dk-page-diy .dk-view-title .title-left{display:flex;align-items:center}.dk-page-diy .dk-view-video{display:flex;align-items:center;justify-content:center;width:100%;min-height:240px;color:#eee;background:#222}.dk-page-diy .dk-view-video .dk-video-content{width:100%;height:100%;text-align:center}.dk-page-diy .dk-view-video .dk-video-content p{font-size:12px;color:#999}.dk-page-diy .dk-view-video .dk-video-content .poster{width:100%;height:100%}.dk-page-diy .dk-view-video .el-icon-video-play{font-size:50px}.dk-page-diy .dk-view-video .video-preview{position:absolute;top:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background:#000;opacity:.8}.dk-page-diy .dk-min-swipe .image{width:100%}.dk-page-diy .dk-min-swipe .swipe-title{position:absolute;bottom:0;background:rgba(0,0,0,.3333333333);width:100%;color:#fff;padding:5px}.dk-page-diy .dk-min-area{position:relative}.dk-page-diy .hot-item{display:flex;align-items:center;justify-content:center;color:#fff}
1
+ @charset "UTF-8";.dk-page-diy{min-width:1000px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy .drag-box{min-height:50px}.dk-page-diy ._fc-l,.dk-page-diy ._fc-m,.dk-page-diy ._fc-r{background:#fff;box-sizing:border-box;height:calc(100vh - 180px);position:relative}.dk-page-diy ._fc-l::-webkit-scrollbar,.dk-page-diy ._fc-m::-webkit-scrollbar,.dk-page-diy ._fc-r::-webkit-scrollbar{display:none}.dk-page-diy ._fc-l{overflow:inherit!important;display:flex;flex:0 0 auto;flex-direction:column;top:0}.dk-page-diy ._fc-l ._fc-l-group{padding:0 12px}.dk-page-diy ._fc-l ._fc-l-title{font-weight:600;font-size:14px;margin:18px 0 5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy ._fc-l ._fc-l-item{display:inline-block;background:#fff;color:#000;min-width:70px;width:80px;height:70px;line-height:1;text-align:center;transition:all .2s ease;cursor:pointer;border-radius:6px;position:relative}.dk-page-diy ._fc-l ._fc-l-item.not-drag{cursor:not-allowed;background:#f6f6f6!important;color:#000!important}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-name{font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-count{background-color:#409eff;border-radius:10px;color:#fff;display:inline-block;font-size:12px;height:18px;line-height:18px;padding:0 6px;text-align:center;white-space:nowrap;border:1px solid #fff;position:absolute;top:5px;right:20px;z-index:1;transform:translateY(-50%) translateX(100%)}.dk-page-diy ._fc-l ._fc-l-item ._fc-l-icon{padding:10px 5px 12px}.dk-page-diy ._fc-l ._fc-l-item:hover{background:#409eff;color:#fff}.dk-page-diy ._fc-l.item-box ._fc-l-groups{height:calc(100vh - 220px);overflow:auto;flex:1 1 0%}.dk-page-diy ._fc-l.item-box ._fc-l-groups::-webkit-scrollbar{display:none}.dk-page-diy ._fc-l.item-box ._fc-l-groups ._fc-l-items ._fc-l-item{margin:5px;width:76px;box-shadow:1px 1px 4px rgba(0,0,0,.1019607843)}.dk-page-diy ._fc-l:hover .aside-toggle{display:block}.dk-page-diy ._fc-l .children-list{width:100%;position:relative;background:#fff;bottom:0;overflow:auto;z-index:2}.dk-page-diy ._fc-l .children-list .child-title{cursor:pointer;text-align:center;font-size:14px;padding:4px;position:-webkit-sticky;position:sticky;z-index:2;top:0;background:#fff;border-top:1px solid #eaecef;border-right:0}.dk-page-diy ._fc-l .children-list .child-title .dk-icon{position:absolute;right:10px}.dk-page-diy ._fc-l .children-list .child-title .dk-icon:hover{color:#409eff!important}.dk-page-diy ._fc-l .children-list .el-tree-node .close-rule{position:absolute;right:0;display:none;padding:0 10px}.dk-page-diy ._fc-l .children-list .el-tree-node .close-rule:hover{color:#409eff!important}.dk-page-diy ._fc-l .children-list .el-tree-node:hover .close-rule{display:inline-flex}.dk-page-diy ._fc-l .children-list .aside-resizer{width:100%;height:4px;margin:-2px 0;cursor:n-resize;z-index:3}.dk-page-diy ._fc-l .children-list::-webkit-scrollbar{display:none}.dk-page-diy ._fc-m{background:#ebeced;width:100%}.dk-page-diy ._fc-m ._fc-m-tools{background:#fff;height:40px;align-items:center;display:flex;justify-content:flex-end;border:1px solid #ececec;border-top:0 none}.dk-page-diy ._fc-m ._fc-m-drag{overflow:auto;box-sizing:border-box}.dk-page-diy ._fc-m .form-create ._fc-l-item{background:#409eff;width:100%;height:30px;overflow:hidden;transition:all .3s ease;display:flex;justify-content:center;align-items:center;color:#fff}.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-count,.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-icon,.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen ._fc-l-name{display:none}.dk-page-diy ._fc-m .form-create ._fc-l-item.sortable-chosen:after{content:"放在这里";color:#fff;font-size:14px}.dk-page-diy ._fc-m .form-create ._fc-l-item ._fc-l-icon{margin:0 10px}.dk-page-diy ._fc-r{width:calc(100% - 800px);overflow:inherit!important}.dk-page-diy ._fc-r .el-tabs__nav-wrap{padding:0 20px}.dk-page-diy ._fc-r .el-tabs__nav{width:100%}.dk-page-diy ._fc-r .el-tabs__item{width:33%;text-align:center}.dk-page-diy ._fc-r .el-tabs__content{padding:0 20px;height:calc(100vh - 235px);overflow:auto}.dk-page-diy ._fc-r .el-tabs__content::-webkit-scrollbar{width:5px}.dk-page-diy ._fc-r .el-tabs__nav-wrap::after{height:1px;background-color:#ececec}.dk-page-diy ._fc-r ._fc-r-tabs{display:flex;cursor:pointer;padding:0;border-bottom:1px solid #ececec}.dk-page-diy ._fc-r ._fc-r-tab{height:40px;box-sizing:border-box;line-height:40px;display:inline-block;list-style:none;font-size:14px;font-weight:600;color:#303133;position:relative;flex:1;text-align:center}.dk-page-diy ._fc-r ._fc-r-tab.active{color:#409eff;border-bottom:2px solid #409eff}.dk-page-diy ._fc-r:hover .aside-toggle{display:block}.dk-page-diy ._fc-r .el-form-item__content{display:block}.dk-page-diy ._fc-r .el-form-item__content .form-help{line-height:1.5;margin-top:4px;color:#888;font-size:12px}.dk-page-diy ._fc-m-drag,.dk-page-diy .draggable-drag{min-height:630px;height:100%;position:relative}.dk-page-diy ._fc-m-drag .chosen,.dk-page-diy .draggable-drag .chosen{opacity:1!important}.dk-page-diy .aside-resizer{cursor:ew-resize;height:100%;margin:0 -2px;position:absolute;top:0;width:4px;z-index:1;right:0}.dk-page-diy .aside-resizer:hover{background:rgba(204,204,204,.5)}.dk-page-diy .aside-toggle{background:inherit;cursor:pointer;padding:20px 5px;position:absolute;top:50%;transform:translateY(-50%);z-index:1;display:none}.dk-page-diy .drag-tool{padding:var(--padding);position:relative;min-height:30px;box-sizing:border-box;word-wrap:break-word;word-break:break-all;margin:var(--margin);outline:var(--showDashed) dashed #a2d1ff;overflow:var(--overflow)}.dk-page-diy .drag-tool:hover{outline:2px dashed #a2d1ff}.dk-page-diy .drag-tool .drag-tool{margin:5px}.dk-page-diy .drag-tool+.drag-tool{margin-top:5px}.dk-page-diy .drag-tool .drag-content{overflow:hidden}.dk-page-diy .drag-tool .drag-content .drag-tool .del{right:0;top:0}.dk-page-diy .drag-tool .drag-r{display:block}.dk-page-diy .drag-tool .drag-r{position:absolute;right:2px;bottom:2px;z-index:1200}.dk-page-diy .drag-tool .drag-l{position:absolute;top:0;left:0;z-index:1904}.dk-page-diy .drag-tool .drag-btn{height:18px;width:18px;color:#fff;background-color:#666;text-align:center;line-height:20px;padding-bottom:1px;float:left;cursor:pointer;justify-content:center;display:none;opacity:.5}.dk-page-diy .drag-tool .drag-btn+.drag-btn{margin-left:2px}.dk-page-diy .drag-tool .drag-btn:hover{background-color:var(--el-color-primary);opacity:1}.dk-page-diy .drag-tool .drag-btn-danger{background-color:var(--el-color-danger)!important}.dk-page-diy .drag-tool .drag-btn i{font-size:13px}.dk-page-diy .drag-tool .drag-mask{z-index:1199;position:absolute;top:0;left:0;right:0;bottom:0}.dk-page-diy .drag-tool.active{outline:2px solid #409eff}.dk-page-diy .drag-tool.active>.drag-r .drag-btn{display:block}.dk-page-diy .drag-tool.active>.drag-l .drag-btn{display:block}.dk-page-diy .drag-tool.active>.del{display:block}.dk-page-diy .drag-tool.active>.op{display:block}.dk-page-diy .preview-phone{overflow:auto;box-shadow:inset 0 2px 5px 1px rgba(62,62,62,.0901960784);height:100%}.dk-page-diy .preview-phone::-webkit-scrollbar{width:8px}.dk-page-diy .preview-phone .phone{background:#fff;width:375px;margin:20px auto;box-shadow:0 5px 10px rgba(0,0,0,.2);min-height:700px}.dk-page-diy .preview-phone .phone .phone-header{height:75px;margin-bottom:1px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-page-diy .preview-phone .phone .phone-header img{width:100%}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top{display:flex;align-items:flex-start;justify-content:space-between;height:30px;font-size:12px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-time{margin:10px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-time span{margin-right:5px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-bangs{background:#000;width:200px;height:30px;border-bottom-right-radius:20px;border-bottom-left-radius:20px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-battery{margin:10px;display:flex;align-items:center;height:18px}.dk-page-diy .preview-phone .phone .phone-header .phone-header-top .phone-battery img{margin-left:5px}.dk-page-diy .preview-phone .phone .phone-header .phone-title{display:flex;justify-content:space-between;align-items:center;height:40px}.dk-page-diy .preview-phone .phone .phone-header .phone-title .phone-title-icon{margin:5px}.dk-page-diy .preview-phone .phone .phone-header-min{background-image:url(https://demo-saas.site.niucloud.com/admin/assets/diy_preview_head-8c072698.png);background-repeat:no-repeat;background-position:center;background-size:cover;position:relative}.dk-page-diy .preview-phone .phone .phone-header-min .close-button{position:absolute;top:34px;right:27px}.dk-page-diy .preview-phone .phone .phone-header-min .close-button:hover .close-button-mask{background:rgba(0,0,0,.0666666667)}.dk-page-diy .preview-phone .phone .phone-header-min .close-button .close-button-mask{width:20px;height:20px;border-radius:100%;cursor:pointer}.dk-page-diy .preview-phone .phone .phone-header-min .more-button-mask{position:absolute;top:34px;right:70px;width:25px;cursor:pointer;border-radius:40px;height:20px}.dk-page-diy .preview-phone .phone .phone-header-min .more-button-mask:hover{background:rgba(0,0,0,.0666666667)}.dk-page-diy .preview-phone .phone .phone-body{background:#f5f5f5;background-size:100% auto!important;overflow:visible;background-repeat:no-repeat;background-origin:initial;background-clip:initial}.dk-page-diy .preview-phone .phone .phone-body .ghost{box-shadow:var(--el-box-shadow)}.dk-page-diy .dk-view-bullet-chat{height:30px;line-height:30px;color:#fff;background:rgba(0,0,0,.6);border-radius:100px}.dk-page-diy .dk-view-bullet-chat .bullet-content{display:flex;align-items:center;height:20px;margin:5px;font-size:12px}.dk-page-diy .dk-view-bullet-chat .bullet-content img{width:20px;height:20px;border-radius:100%}.dk-page-diy .dk-view-bullet-chat .bullet-content span{padding:0 5px}.dk-page-diy .dk-view-common-btn .btn{display:flex;align-items:center;justify-content:center}.dk-page-diy .dk-view-common-btn .btn .van-icon{font-size:1.2em}.dk-page-diy .dk-view-common-btn .f-btn{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.dk-page-diy .dk-view-common-btn .f-btn .image-content{display:inherit}.dk-page-diy .dk-view-common-btn .f-btn .f-btn-content{display:flex;align-items:center;justify-content:center;border-radius:100%}.dk-page-diy .dk-view-common-btn .f-img{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly}.dk-page-diy .dk-view-image.dk-mobile-image-default{display:flex;flex-direction:column}.dk-page-diy .dk-view-image.dk-mobile-image-default .van-image{display:block}.dk-page-diy .dk-view-image.dk-mobile-image-default .dk-mobile-image-content{display:block}.dk-page-diy .dk-view-image.dk-mobile-image-slide{width:100%;overflow-x:scroll;white-space:nowrap}.dk-page-diy .dk-view-image.dk-mobile-image-slide .dk-mobile-image-content{position:relative;display:inline-block;margin-right:10px;vertical-align:top}.dk-page-diy .dk-view-image .dk-mobile-image-content{position:relative;overflow:hidden}.dk-page-diy .dk-view-image .dk-mobile-image-content:last-child{margin:0!important}.dk-page-diy .dk-view-image .dk-mobile-image-content .text-type-footer{text-align:center;height:48px;line-height:48px}.dk-page-diy .dk-view-image .dk-mobile-image-content .text-type-default{color:#fff;text-align:center;position:absolute;background:linear-gradient(180deg,transparent,rgba(0,0,0,.75));bottom:0;height:48px;line-height:48px;width:100%}.dk-page-diy .dk-view-dialog .preview{display:flex;align-items:center;justify-content:center;height:40px;text-align:center;background:#fff}.dk-page-diy .dk-view-music{width:100%;display:flex;align-items:center;justify-content:center}.dk-page-diy .dk-view-music .dk-music-icon{background:#fff;border-radius:100%;border:2px solid #fff;font-weight:800;box-sizing:content-box;color:#f56c6c}.dk-page-diy .dk-view-music .dk-music-img{border-radius:100%}.dk-page-diy .dk-view-music .changeRight{-webkit-animation-name:changeRight;animation-name:changeRight}.dk-page-diy .dk-view-music .changeLeft{-webkit-animation-name:changeLeft;animation-name:changeLeft}@-webkit-keyframes changeRight{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(180deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes changeRight{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(180deg)}100%{-webkit-transform:rotate(360deg)}}@-webkit-keyframes changeLeft{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(-180deg)}100%{-webkit-transform:rotate(-360deg)}}@keyframes changeLeft{0%{-webkit-transform:rotate(0)}50%{-webkit-transform:rotate(-180deg)}100%{-webkit-transform:rotate(-360deg)}}.dk-page-diy .dk-view-swipe .image{width:100%}.dk-page-diy .dk-view-tabbar .van-tabbar,.dk-page-diy .dk-view-tabbar .van-tabbar-item--active{background:0 0}.dk-page-diy .dk-view-title{display:flex;align-items:center;justify-content:space-between}.dk-page-diy .dk-view-title .title-left{display:flex;align-items:center}.dk-page-diy .dk-view-video{display:flex;align-items:center;justify-content:center;width:100%;min-height:240px;color:#eee;background:#222}.dk-page-diy .dk-view-video .dk-video-content{width:100%;height:100%;text-align:center}.dk-page-diy .dk-view-video .dk-video-content p{font-size:12px;color:#999}.dk-page-diy .dk-view-video .dk-video-content .poster{width:100%;height:100%}.dk-page-diy .dk-view-video .el-icon-video-play{font-size:50px}.dk-page-diy .dk-view-video .video-preview{position:absolute;top:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background:#000;opacity:.8}.dk-page-diy .dk-min-swipe .image{width:100%}.dk-page-diy .dk-min-swipe .swipe-title{position:absolute;bottom:0;background:rgba(0,0,0,.3333333333);width:100%;color:#fff;padding:5px}.dk-page-diy .dk-min-area{position:relative}.dk-page-diy .hot-item{display:flex;align-items:center;justify-content:center;color:#fff}
@@ -53,7 +53,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
53
53
  }, { ...props }, {
54
54
  "remote-method": remoteMethod,
55
55
  remote: "",
56
- placeholder: "c\u6D4B\u8BD5",
56
+ placeholder: "\u8BF7\u9009\u62E9",
57
57
  options: internalOptions.value,
58
58
  style: { "width": "100%" },
59
59
  onChange: handleChange,
@@ -1 +1 @@
1
- {"version":3,"file":"select.vue2.js","sources":["../../../src/select/src/select.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkSelect',\n});\n</script>\n<template>\n <el-select-v2\n v-model=\"internalValue\"\n class=\"dk-select\"\n v-bind=\"{ ...props }\"\n :remote-method=\"remoteMethod\"\n remote\n placeholder=\"c测试\"\n :options=\"internalOptions\"\n style=\"width: 100%\"\n @change=\"handleChange\"\n @visible-change=\"handleVisibleChange\"\n @remove-tag=\"handleRemoveTag\"\n @clear=\"handleClear\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]=\"scope\">\n <slot :name=\"idx\" v-bind=\"scope\"></slot>\n </template>\n </el-select-v2>\n</template>\n\n<script lang=\"ts\" setup>\nimport { selectProps } from './props'\nimport { watch, ref } from 'vue'\nimport { request } from '@vipl520/utils'\n\nconst props = defineProps(selectProps)\nconst internalValue = ref(props.modelValue) // 使用 ref 以便响应式更新\nconst internalOptions = ref(props.options || {})\nconst emit = defineEmits(['update:modelValue', 'change', 'visible-change', 'remove-tag', 'clear', 'blur', 'focus'])\n// 监听内部值的变化并向外部发出事件\nwatch(internalValue, (newValue) => {\n console.log('new', newValue)\n emit('update:modelValue', newValue)\n})\nconst remoteMethod = (query?: string) => {\n if (!props.remoteUrl) return\n request(\n {\n url: props.remoteUrl,\n method: 'post',\n data: { query, select: 1 },\n },\n {\n code_success_show: false,\n }\n ).then((res) => {\n internalOptions.value = res.data\n })\n}\n\n// 事件处理函数\nconst handleChange = (value: any) => emit('change', value)\nconst handleVisibleChange = (value: boolean) => emit('visible-change', value)\nconst handleRemoveTag = (value: any) => emit('remove-tag', value)\nconst handleClear = () => emit('clear')\nconst handleBlur = (event: FocusEvent) => emit('blur', event)\nconst handleFocus = (event: FocusEvent) => emit('focus', event)\n\nremoteMethod()\n</script>\n"],"names":["__MACROS_defineComponent","ref","watch","request"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA+BD,IAAM,MAAA,aAAA,GAAgBC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAC1C,IAAA,MAAM,eAAkB,GAAAA,OAAA,CAAI,KAAM,CAAA,OAAA,IAAW,EAAE,CAAA,CAAA;AAG/C,IAAMC,SAAA,CAAA,aAAA,EAAe,CAAC,QAAa,KAAA;AACjC,MAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,QAAQ,CAAA,CAAA;AAC3B,MAAA,IAAA,CAAK,qBAAqB,QAAQ,CAAA,CAAA;AAAA,KACnC,CAAA,CAAA;AACD,IAAM,MAAA,YAAA,GAAe,CAAC,KAAmB,KAAA;AACvC,MAAA,IAAI,CAAC,KAAM,CAAA,SAAA;AAAW,QAAA,OAAA;AACtB,MAAAC,aAAA;AAAA,QACE;AAAA,UACE,KAAK,KAAM,CAAA,SAAA;AAAA,UACX,MAAQ,EAAA,MAAA;AAAA,UACR,IAAM,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,CAAE,EAAA;AAAA,SAC3B;AAAA,QACA;AAAA,UACE,iBAAmB,EAAA,KAAA;AAAA,SACrB;AAAA,OACF,CAAE,IAAK,CAAA,CAAC,GAAQ,KAAA;AACd,QAAA,eAAA,CAAgB,QAAQ,GAAI,CAAA,IAAA,CAAA;AAAA,OAC7B,CAAA,CAAA;AAAA,KACH,CAAA;AAGA,IAAA,MAAM,YAAe,GAAA,CAAC,KAAe,KAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AACzD,IAAA,MAAM,mBAAsB,GAAA,CAAC,KAAmB,KAAA,IAAA,CAAK,kBAAkB,KAAK,CAAA,CAAA;AAC5E,IAAA,MAAM,eAAkB,GAAA,CAAC,KAAe,KAAA,IAAA,CAAK,cAAc,KAAK,CAAA,CAAA;AAChE,IAAM,MAAA,WAAA,GAAc,MAAM,IAAA,CAAK,OAAO,CAAA,CAAA;AACtC,IAAA,MAAM,UAAa,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,QAAQ,KAAK,CAAA,CAAA;AAC5D,IAAA,MAAM,WAAc,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAE9D,IAAa,YAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"select.vue2.js","sources":["../../../src/select/src/select.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkSelect',\n});\n</script>\n<template>\n <el-select-v2\n v-model=\"internalValue\"\n class=\"dk-select\"\n v-bind=\"{ ...props }\"\n :remote-method=\"remoteMethod\"\n remote\n placeholder=\"请选择\"\n :options=\"internalOptions\"\n style=\"width: 100%\"\n @change=\"handleChange\"\n @visible-change=\"handleVisibleChange\"\n @remove-tag=\"handleRemoveTag\"\n @clear=\"handleClear\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]=\"scope\">\n <slot :name=\"idx\" v-bind=\"scope\"></slot>\n </template>\n </el-select-v2>\n</template>\n\n<script lang=\"ts\" setup>\nimport { selectProps } from './props'\nimport { watch, ref } from 'vue'\nimport { request } from '@vipl520/utils'\n\nconst props = defineProps(selectProps)\nconst internalValue = ref(props.modelValue) // 使用 ref 以便响应式更新\nconst internalOptions = ref(props.options || {})\nconst emit = defineEmits(['update:modelValue', 'change', 'visible-change', 'remove-tag', 'clear', 'blur', 'focus'])\n// 监听内部值的变化并向外部发出事件\nwatch(internalValue, (newValue) => {\n console.log('new', newValue)\n emit('update:modelValue', newValue)\n})\nconst remoteMethod = (query?: string) => {\n if (!props.remoteUrl) return\n request(\n {\n url: props.remoteUrl,\n method: 'post',\n data: { query, select: 1 },\n },\n {\n code_success_show: false,\n }\n ).then((res) => {\n internalOptions.value = res.data\n })\n}\n\n// 事件处理函数\nconst handleChange = (value: any) => emit('change', value)\nconst handleVisibleChange = (value: boolean) => emit('visible-change', value)\nconst handleRemoveTag = (value: any) => emit('remove-tag', value)\nconst handleClear = () => emit('clear')\nconst handleBlur = (event: FocusEvent) => emit('blur', event)\nconst handleFocus = (event: FocusEvent) => emit('focus', event)\n\nremoteMethod()\n</script>\n"],"names":["__MACROS_defineComponent","ref","watch","request"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA+BD,IAAM,MAAA,aAAA,GAAgBC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAC1C,IAAA,MAAM,eAAkB,GAAAA,OAAA,CAAI,KAAM,CAAA,OAAA,IAAW,EAAE,CAAA,CAAA;AAG/C,IAAMC,SAAA,CAAA,aAAA,EAAe,CAAC,QAAa,KAAA;AACjC,MAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,QAAQ,CAAA,CAAA;AAC3B,MAAA,IAAA,CAAK,qBAAqB,QAAQ,CAAA,CAAA;AAAA,KACnC,CAAA,CAAA;AACD,IAAM,MAAA,YAAA,GAAe,CAAC,KAAmB,KAAA;AACvC,MAAA,IAAI,CAAC,KAAM,CAAA,SAAA;AAAW,QAAA,OAAA;AACtB,MAAAC,aAAA;AAAA,QACE;AAAA,UACE,KAAK,KAAM,CAAA,SAAA;AAAA,UACX,MAAQ,EAAA,MAAA;AAAA,UACR,IAAM,EAAA,EAAE,KAAO,EAAA,MAAA,EAAQ,CAAE,EAAA;AAAA,SAC3B;AAAA,QACA;AAAA,UACE,iBAAmB,EAAA,KAAA;AAAA,SACrB;AAAA,OACF,CAAE,IAAK,CAAA,CAAC,GAAQ,KAAA;AACd,QAAA,eAAA,CAAgB,QAAQ,GAAI,CAAA,IAAA,CAAA;AAAA,OAC7B,CAAA,CAAA;AAAA,KACH,CAAA;AAGA,IAAA,MAAM,YAAe,GAAA,CAAC,KAAe,KAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AACzD,IAAA,MAAM,mBAAsB,GAAA,CAAC,KAAmB,KAAA,IAAA,CAAK,kBAAkB,KAAK,CAAA,CAAA;AAC5E,IAAA,MAAM,eAAkB,GAAA,CAAC,KAAe,KAAA,IAAA,CAAK,cAAc,KAAK,CAAA,CAAA;AAChE,IAAM,MAAA,WAAA,GAAc,MAAM,IAAA,CAAK,OAAO,CAAA,CAAA;AACtC,IAAA,MAAM,UAAa,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,QAAQ,KAAK,CAAA,CAAA;AAC5D,IAAA,MAAM,WAAc,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAE9D,IAAa,YAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,6 +12,7 @@ const _hoisted_2 = {
12
12
  style: { "width": "100%" },
13
13
  class: "m-l-20px"
14
14
  };
15
+ const _hoisted_3 = { style: { "display": "flex" } };
15
16
  const __default__ = vue.defineComponent({
16
17
  name: "DkStyleBorderInput"
17
18
  });
@@ -243,51 +244,54 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
243
244
  }, 8, ["disabled"])
244
245
  ]),
245
246
  default: vue.withCtx(() => [
246
- vue.createVNode(_component_el_slider, {
247
- modelValue: form[position.value].borderWidth,
248
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form[position.value].borderWidth = $event),
249
- class: "dk-border-slider",
250
- max: 50,
251
- onChange: _cache[2] || (_cache[2] = ($event) => clearOtherBorder())
252
- }, null, 8, ["modelValue"]),
253
- vue.createVNode(_component_el_input, {
254
- modelValue: form[position.value].borderWidth,
255
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form[position.value].borderWidth = $event),
256
- class: "dk-border-input",
257
- type: "number",
258
- onChange: _cache[6] || (_cache[6] = ($event) => clearOtherBorder())
259
- }, {
260
- append: vue.withCtx(() => [
261
- vue.createVNode(_component_el_select, {
262
- modelValue: form[position.value].unit,
263
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form[position.value].unit = $event),
264
- placeholder: "\u8BF7\u9009\u62E9",
265
- class: "dk-border-select",
266
- "suffix-icon": "",
267
- onChange: _cache[4] || (_cache[4] = ($event) => clearOtherBorder())
268
- }, {
269
- default: vue.withCtx(() => [
270
- (vue.openBlock(), vue.createElementBlock(
271
- vue.Fragment,
272
- null,
273
- vue.renderList(units, (item) => {
274
- return vue.createVNode(_component_el_option, {
275
- key: item,
276
- label: item,
277
- value: item
278
- }, null, 8, ["label", "value"]);
279
- }),
280
- 64
281
- /* STABLE_FRAGMENT */
282
- ))
283
- ]),
284
- _: 1
285
- /* STABLE */
286
- }, 8, ["modelValue"])
287
- ]),
288
- _: 1
289
- /* STABLE */
290
- }, 8, ["modelValue"])
247
+ vue.createElementVNode("div", _hoisted_3, [
248
+ vue.createVNode(_component_el_slider, {
249
+ modelValue: form[position.value].borderWidth,
250
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form[position.value].borderWidth = $event),
251
+ class: "dk-border-slider",
252
+ max: 50,
253
+ onChange: _cache[2] || (_cache[2] = ($event) => clearOtherBorder())
254
+ }, null, 8, ["modelValue"]),
255
+ vue.createVNode(_component_el_input, {
256
+ modelValue: form[position.value].borderWidth,
257
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form[position.value].borderWidth = $event),
258
+ class: "dk-border-input",
259
+ type: "number",
260
+ onChange: _cache[6] || (_cache[6] = ($event) => clearOtherBorder())
261
+ }, {
262
+ append: vue.withCtx(() => [
263
+ vue.createVNode(_component_el_select, {
264
+ modelValue: form[position.value].unit,
265
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form[position.value].unit = $event),
266
+ placeholder: "\u8BF7\u9009\u62E9",
267
+ class: "dk-border-select",
268
+ style: { "width": "50px" },
269
+ "suffix-icon": "",
270
+ onChange: _cache[4] || (_cache[4] = ($event) => clearOtherBorder())
271
+ }, {
272
+ default: vue.withCtx(() => [
273
+ (vue.openBlock(), vue.createElementBlock(
274
+ vue.Fragment,
275
+ null,
276
+ vue.renderList(units, (item) => {
277
+ return vue.createVNode(_component_el_option, {
278
+ key: item,
279
+ label: item,
280
+ value: item
281
+ }, null, 8, ["label", "value"]);
282
+ }),
283
+ 64
284
+ /* STABLE_FRAGMENT */
285
+ ))
286
+ ]),
287
+ _: 1
288
+ /* STABLE */
289
+ }, 8, ["modelValue"])
290
+ ]),
291
+ _: 1
292
+ /* STABLE */
293
+ }, 8, ["modelValue"])
294
+ ])
291
295
  ]),
292
296
  _: 1
293
297
  /* STABLE */
@@ -1 +1 @@
1
- {"version":3,"file":"style-border-input.vue2.js","sources":["../../../src/style-border-input/src/style-border-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBorderInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-border-input\" :class=\"width.value < 400 ? 'mini' : ''\">\n <div class=\"border-box\">\n <dk-icon\n v-for=\"item in positions\"\n :key=\"item\"\n :icon=\"'gg:border-' + item\"\n :class=\"'border-box-option border-' + item + ' ' + (position == item ? 'selected' : '')\"\n :size=\"24\"\n :style=\"'grid-area: border-' + item + ' / border-' + item + ' / border-' + item + ' / border-' + item + ';'\"\n @click=\"position = item\"\n ></dk-icon>\n </div>\n <div style=\"width: 100%\" class=\"m-l-20px\">\n <!-- 样式、宽度、颜色-->\n <el-form label-width=\"50px\" label-position=\"left\" size=\"small\">\n <el-form-item label=\"尺寸\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderWidth\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderWidth ? 'color-blue' : ''\"\n @click=\"del('borderWidth')\"\n >尺寸</span\n >\n </el-tooltip>\n </template>\n <el-slider\n v-model=\"form[position].borderWidth\"\n class=\"dk-border-slider\"\n :max=\"50\"\n @change=\"clearOtherBorder()\"\n />\n <el-input\n v-model=\"form[position].borderWidth\"\n class=\"dk-border-input\"\n type=\"number\"\n @change=\"clearOtherBorder()\"\n >\n <template #append>\n <el-select\n v-model=\"form[position].unit\"\n placeholder=\"请选择\"\n class=\"dk-border-select\"\n suffix-icon=\"\"\n @change=\"clearOtherBorder()\"\n >\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </template>\n </el-input>\n </el-form-item>\n <el-form-item label=\"样式\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderStyle\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderStyle ? 'color-blue' : ''\"\n @click=\"del('borderStyle')\"\n >样式</span\n >\n </el-tooltip>\n </template>\n <el-radio-group v-model=\"form[position].borderStyle\" @change=\"clearOtherBorder()\">\n <el-radio-button label=\"solid\" name=\"type\">\n <dk-icon icon=\"gg:border-style-solid\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"dotted\" name=\"type\">\n <dk-icon icon=\"gg:border-style-dotted\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"dashed\" name=\"type\">\n <dk-icon icon=\"gg:border-style-dashed\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"double\" name=\"type\">\n <dk-icon icon=\"memory:box-light-double-horizontal\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderColor\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderColor ? 'color-blue' : ''\"\n @click=\"del('borderColor')\"\n >颜色</span\n >\n </el-tooltip>\n </template>\n <el-color-picker v-model=\"form[position].borderColor\" />\n </el-form-item>\n <el-form-item label=\"弧度\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"form.radius == '0px'\">\n <span class=\"cursor-pointer\" :class=\"form.radius !== '0px' ? 'color-blue' : ''\" @click=\"del('radius')\"\n >弧度</span\n >\n </el-tooltip>\n </template>\n <dk-box-size-input v-model=\"form.radius\" type=\"radius\"></dk-box-size-input>\n </el-form-item>\n </el-form>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBorderInputProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize, useWindowSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBorderInputProps)\nconst emit = defineEmits(['update:modelValue'])\n\nconst positions = ['top', 'right', 'bottom', 'left', 'all']\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst position = ref('all')\nconst el: any = ref()\nconst { width } = useElementSize(el) // 当前组件宽度\nconst defaultForm = () => ({\n unit: 'px',\n})\n\nconst form: any = reactive({\n top: defaultForm(),\n right: defaultForm(),\n bottom: defaultForm(),\n left: defaultForm(),\n all: defaultForm(),\n radius: props.modelValue.borderRadius || '0px',\n})\n\nconst styles = computed(() => {\n const style: any = {}\n positions.forEach((item) => {\n if (item === 'all') {\n if (form[item].borderWidth) {\n style.borderWidth = form[item].borderWidth + (form[item].unit || 'px')\n }\n if (form[item].borderStyle) {\n style.borderStyle = form[item].borderStyle\n }\n if (form[item].borderColor) {\n style.borderColor = form[item].borderColor\n }\n } else {\n if (form[item].borderWidth) {\n style['border' + upper(item) + 'Width'] = form[item].borderWidth + (form[item].unit || 'px')\n }\n\n if (form[item].borderStyle) {\n style['border' + upper(item) + 'Style'] = form[item].borderStyle\n }\n\n if (form[item].borderColor) {\n style['border' + upper(item) + 'Color'] = form[item].borderColor\n }\n }\n })\n // 把style中的borderWidth、borderStyle、borderColor放到最前面\n if (form.radius !== '0px') {\n style.borderRadius = form.radius\n }\n return style\n})\nwatch(styles, () => {\n emit('update:modelValue', styles.value)\n})\n\nconst init = () => {\n const keys = [\n 'borderWidth',\n 'borderStyle',\n 'borderColor',\n 'borderRightWidth',\n 'borderRightStyle',\n 'borderRightColor',\n 'borderLeftWidth',\n 'borderLeftStyle',\n 'borderLeftColor',\n 'borderTopWidth',\n 'borderTopStyle',\n 'borderTopColor',\n 'borderBottomWidth',\n 'borderBottomStyle',\n 'borderBottomColor',\n 'borderRadius',\n ]\n\n keys.forEach((key) => {\n if (props.modelValue[key]) {\n if (key === 'borderRadius') {\n form.radius = props.modelValue[key]\n } else {\n let [_, position, property] = key.split(/(?=[A-Z])/)\n let _position = position.toLowerCase() // 位置\n const value = props.modelValue[key] // 值\n if (positions.indexOf(_position) === -1) {\n _position = 'all'\n property = position\n }\n if (property === 'Width') {\n const width = parseInt(value) || 0\n const unit = value.replace(width + '', '') || 'px'\n if (units.indexOf(unit) > -1) {\n form[_position].unit = unit\n form[_position].borderWidth = width\n }\n } else {\n form[_position]['border' + property] = value\n }\n }\n } else {\n if (key === 'borderRadius') {\n form.radius = '0px'\n } else {\n // delete form[position.value][key]\n let [_, position, property] = key.split(/(?=[A-Z])/)\n\n let _position = position.toLowerCase() // 位置\n if (positions.indexOf(_position) === -1) {\n _position = 'all'\n property = position\n }\n const value = props.modelValue[key] // 值\n if (property === 'Width') {\n delete form[_position].borderWidth\n delete form[_position].unit\n } else {\n delete form[_position]['border' + property]\n }\n }\n }\n })\n}\n\nconst clearOtherBorder = () => {\n if (position.value === 'all') {\n positions.forEach((item) => {\n if (item !== 'all') {\n form[item] = {\n unit: 'px',\n }\n }\n })\n } else {\n positions.forEach((item) => {\n if (item === 'all') {\n form[item] = {\n unit: 'px',\n }\n }\n })\n }\n}\nconst del = (value: any) => {\n if (value === 'radius') {\n form.radius = '0px'\n } else {\n delete form[position.value][value]\n }\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n {\n deep: true,\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","upper","watch","position","width","onMounted"],"mappings":";;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAuHD,IAAA,MAAM,YAAY,CAAC,KAAA,EAAO,OAAS,EAAA,QAAA,EAAU,QAAQ,KAAK,CAAA,CAAA;AAC1D,IAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,KAAK,KAAO,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA,CAAA;AACjD,IAAM,MAAA,QAAA,GAAWC,QAAI,KAAK,CAAA,CAAA;AAC1B,IAAA,MAAM,KAAUA,OAAI,EAAA,CAAA;AACpB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAA,MAAM,cAAc,OAAO;AAAA,MACzB,IAAM,EAAA,IAAA;AAAA,KACR,CAAA,CAAA;AAEA,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,KAAK,WAAY,EAAA;AAAA,MACjB,OAAO,WAAY,EAAA;AAAA,MACnB,QAAQ,WAAY,EAAA;AAAA,MACpB,MAAM,WAAY,EAAA;AAAA,MAClB,KAAK,WAAY,EAAA;AAAA,MAC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E,KAAK,CAAA,CAAA;AAAA,OACnC;AAAA,KACF,CAAA;AAEA,IAAAD,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OACP;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAAG,aAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-border-input.vue2.js","sources":["../../../src/style-border-input/src/style-border-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBorderInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-border-input\" :class=\"width.value < 400 ? 'mini' : ''\">\n <div class=\"border-box\">\n <dk-icon\n v-for=\"item in positions\"\n :key=\"item\"\n :icon=\"'gg:border-' + item\"\n :class=\"'border-box-option border-' + item + ' ' + (position == item ? 'selected' : '')\"\n :size=\"24\"\n :style=\"'grid-area: border-' + item + ' / border-' + item + ' / border-' + item + ' / border-' + item + ';'\"\n @click=\"position = item\"\n ></dk-icon>\n </div>\n <div style=\"width: 100%\" class=\"m-l-20px\">\n <!-- 样式、宽度、颜色-->\n <el-form label-width=\"50px\" label-position=\"left\" size=\"small\">\n <el-form-item label=\"尺寸\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderWidth\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderWidth ? 'color-blue' : ''\"\n @click=\"del('borderWidth')\"\n >尺寸</span\n >\n </el-tooltip>\n </template>\n <div style=\"display: flex\">\n <el-slider\n v-model=\"form[position].borderWidth\"\n class=\"dk-border-slider\"\n :max=\"50\"\n @change=\"clearOtherBorder()\"\n />\n <el-input\n v-model=\"form[position].borderWidth\"\n class=\"dk-border-input\"\n type=\"number\"\n @change=\"clearOtherBorder()\"\n >\n <template #append>\n <el-select\n v-model=\"form[position].unit\"\n placeholder=\"请选择\"\n class=\"dk-border-select\"\n style=\"width: 50px\"\n suffix-icon=\"\"\n @change=\"clearOtherBorder()\"\n >\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </template>\n </el-input>\n </div>\n </el-form-item>\n <el-form-item label=\"样式\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderStyle\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderStyle ? 'color-blue' : ''\"\n @click=\"del('borderStyle')\"\n >样式</span\n >\n </el-tooltip>\n </template>\n <el-radio-group v-model=\"form[position].borderStyle\" @change=\"clearOtherBorder()\">\n <el-radio-button label=\"solid\" name=\"type\">\n <dk-icon icon=\"gg:border-style-solid\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"dotted\" name=\"type\">\n <dk-icon icon=\"gg:border-style-dotted\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"dashed\" name=\"type\">\n <dk-icon icon=\"gg:border-style-dashed\"></dk-icon>\n </el-radio-button>\n <el-radio-button label=\"double\" name=\"type\">\n <dk-icon icon=\"memory:box-light-double-horizontal\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"!form[position].borderColor\">\n <span\n class=\"cursor-pointer\"\n :class=\"form[position].borderColor ? 'color-blue' : ''\"\n @click=\"del('borderColor')\"\n >颜色</span\n >\n </el-tooltip>\n </template>\n <el-color-picker v-model=\"form[position].borderColor\" />\n </el-form-item>\n <el-form-item label=\"弧度\">\n <template #label>\n <el-tooltip effect=\"dark\" content=\"点击清除\" placement=\"top-start\" :disabled=\"form.radius == '0px'\">\n <span class=\"cursor-pointer\" :class=\"form.radius !== '0px' ? 'color-blue' : ''\" @click=\"del('radius')\"\n >弧度</span\n >\n </el-tooltip>\n </template>\n <dk-box-size-input v-model=\"form.radius\" type=\"radius\"></dk-box-size-input>\n </el-form-item>\n </el-form>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBorderInputProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize, useWindowSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBorderInputProps)\nconst emit = defineEmits(['update:modelValue'])\n\nconst positions = ['top', 'right', 'bottom', 'left', 'all']\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst position = ref('all')\nconst el: any = ref()\nconst { width } = useElementSize(el) // 当前组件宽度\nconst defaultForm = () => ({\n unit: 'px',\n})\n\nconst form: any = reactive({\n top: defaultForm(),\n right: defaultForm(),\n bottom: defaultForm(),\n left: defaultForm(),\n all: defaultForm(),\n radius: props.modelValue.borderRadius || '0px',\n})\n\nconst styles = computed(() => {\n const style: any = {}\n positions.forEach((item) => {\n if (item === 'all') {\n if (form[item].borderWidth) {\n style.borderWidth = form[item].borderWidth + (form[item].unit || 'px')\n }\n if (form[item].borderStyle) {\n style.borderStyle = form[item].borderStyle\n }\n if (form[item].borderColor) {\n style.borderColor = form[item].borderColor\n }\n } else {\n if (form[item].borderWidth) {\n style['border' + upper(item) + 'Width'] = form[item].borderWidth + (form[item].unit || 'px')\n }\n\n if (form[item].borderStyle) {\n style['border' + upper(item) + 'Style'] = form[item].borderStyle\n }\n\n if (form[item].borderColor) {\n style['border' + upper(item) + 'Color'] = form[item].borderColor\n }\n }\n })\n // 把style中的borderWidth、borderStyle、borderColor放到最前面\n if (form.radius !== '0px') {\n style.borderRadius = form.radius\n }\n return style\n})\nwatch(styles, () => {\n emit('update:modelValue', styles.value)\n})\n\nconst init = () => {\n const keys = [\n 'borderWidth',\n 'borderStyle',\n 'borderColor',\n 'borderRightWidth',\n 'borderRightStyle',\n 'borderRightColor',\n 'borderLeftWidth',\n 'borderLeftStyle',\n 'borderLeftColor',\n 'borderTopWidth',\n 'borderTopStyle',\n 'borderTopColor',\n 'borderBottomWidth',\n 'borderBottomStyle',\n 'borderBottomColor',\n 'borderRadius',\n ]\n\n keys.forEach((key) => {\n if (props.modelValue[key]) {\n if (key === 'borderRadius') {\n form.radius = props.modelValue[key]\n } else {\n let [_, position, property] = key.split(/(?=[A-Z])/)\n let _position = position.toLowerCase() // 位置\n const value = props.modelValue[key] // 值\n if (positions.indexOf(_position) === -1) {\n _position = 'all'\n property = position\n }\n if (property === 'Width') {\n const width = parseInt(value) || 0\n const unit = value.replace(width + '', '') || 'px'\n if (units.indexOf(unit) > -1) {\n form[_position].unit = unit\n form[_position].borderWidth = width\n }\n } else {\n form[_position]['border' + property] = value\n }\n }\n } else {\n if (key === 'borderRadius') {\n form.radius = '0px'\n } else {\n // delete form[position.value][key]\n let [_, position, property] = key.split(/(?=[A-Z])/)\n\n let _position = position.toLowerCase() // 位置\n if (positions.indexOf(_position) === -1) {\n _position = 'all'\n property = position\n }\n const value = props.modelValue[key] // 值\n if (property === 'Width') {\n delete form[_position].borderWidth\n delete form[_position].unit\n } else {\n delete form[_position]['border' + property]\n }\n }\n }\n })\n}\n\nconst clearOtherBorder = () => {\n if (position.value === 'all') {\n positions.forEach((item) => {\n if (item !== 'all') {\n form[item] = {\n unit: 'px',\n }\n }\n })\n } else {\n positions.forEach((item) => {\n if (item === 'all') {\n form[item] = {\n unit: 'px',\n }\n }\n })\n }\n}\nconst del = (value: any) => {\n if (value === 'radius') {\n form.radius = '0px'\n } else {\n delete form[position.value][value]\n }\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n {\n deep: true,\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","upper","watch","position","width","onMounted"],"mappings":";;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0HD,IAAA,MAAM,YAAY,CAAC,KAAA,EAAO,OAAS,EAAA,QAAA,EAAU,QAAQ,KAAK,CAAA,CAAA;AAC1D,IAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,KAAK,KAAO,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA,CAAA;AACjD,IAAM,MAAA,QAAA,GAAWC,QAAI,KAAK,CAAA,CAAA;AAC1B,IAAA,MAAM,KAAUA,OAAI,EAAA,CAAA;AACpB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAA,MAAM,cAAc,OAAO;AAAA,MACzB,IAAM,EAAA,IAAA;AAAA,KACR,CAAA,CAAA;AAEA,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,KAAK,WAAY,EAAA;AAAA,MACjB,OAAO,WAAY,EAAA;AAAA,MACnB,QAAQ,WAAY,EAAA;AAAA,MACpB,MAAM,WAAY,EAAA;AAAA,MAClB,KAAK,WAAY,EAAA;AAAA,MACjB,MAAA,EAAQ,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,KAAA;AAAA,KAC1C,CAAA,CAAA;AAED,IAAM,MAAA,MAAA,GAASC,aAAS,MAAM;AAC5B,MAAA,MAAM,QAAa,EAAC,CAA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;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAAG,aAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -37,13 +37,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
37
37
  return shadows.value.join(",");
38
38
  });
39
39
  vue.watch(boxShadow, (n, o) => {
40
- emit("update:modelValue", { boxShadow });
40
+ emit("update:modelValue", { boxShadow: boxShadow.value });
41
41
  });
42
42
  vue.watch(
43
43
  () => props.modelValue,
44
44
  () => {
45
45
  init();
46
- }
46
+ },
47
+ { deep: true }
47
48
  );
48
49
  vue.onMounted(() => {
49
50
  init();
@@ -1 +1 @@
1
- {"version":3,"file":"style-shadow-input.vue2.js","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item\n v-for=\"(item, key) in shadows\"\n :key=\"key\"\n :title=\"item\"\n :name=\"key + ''\"\n >\n <dk-style-shadow-content\n v-model=\"shadows[key]\"\n ></dk-style-shadow-content>\n </el-collapse-item>\n </el-collapse>\n <ul v-else class=\"shadow-list\">\n <li v-for=\"(item, key) in shadows\" :key=\"key\">\n <el-input v-model=\"shadows[key]\" disabled>\n <template #append>\n <el-popover\n placement=\"right-start\"\n title=\"\"\n width=\"380\"\n trigger=\"click\"\n >\n <template #reference>\n <el-button>设置</el-button>\n </template>\n <dk-style-shadow-content\n v-model=\"shadows[key]\"\n ></dk-style-shadow-content>\n </el-popover>\n </template>\n </el-input>\n <dk-icon\n class=\"close-shadow\"\n icon=\"Close\"\n hover-color=\"#f00\"\n @click=\"delShadow(key)\"\n ></dk-icon>\n </li>\n </ul>\n <el-button class=\"m-t-10px w-100%\" @click=\"addShadow\">\n <dk-icon icon=\"Plus\"></dk-icon>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shadowInputProps } from './props'\nimport { computed, onMounted, ref, watch } from 'vue'\n\n\n\nconst props = defineProps(shadowInputProps)\n\nconst shadows: any = ref([])\n\nconst activeName = ref('1')\nconst addShadow = () => {\n shadows.value.push('1px 1px 1px 1px #000')\n activeName.value = shadows.value.length - 1 + ''\n}\n\nconst delShadow = (index: number) => {\n shadows.value.splice(index, 1)\n}\n\nconst init = () => {\n if (props.modelValue.boxShadow) {\n shadows.value = props.modelValue.boxShadow.split(',')\n }\n}\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst boxShadow = computed(() => {\n return shadows.value.join(',')\n})\n\nwatch(boxShadow, (n, o) => {\n emit('update:modelValue', { boxShadow })\n})\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","computed","watch","onMounted"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAyDD,IAAM,MAAA,OAAA,GAAeC,OAAI,CAAA,EAAE,CAAA,CAAA;AAE3B,IAAM,MAAA,UAAA,GA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;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-shadow-input.vue2.js","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item v-for=\"(item, key) in shadows\" :key=\"key\" :title=\"item\" :name=\"key + ''\">\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-collapse-item>\n </el-collapse>\n <ul v-else class=\"shadow-list\">\n <li v-for=\"(item, key) in shadows\" :key=\"key\">\n <el-input v-model=\"shadows[key]\" disabled>\n <template #append>\n <el-popover placement=\"right-start\" title=\"\" width=\"380\" trigger=\"click\">\n <template #reference>\n <el-button>设置</el-button>\n </template>\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-popover>\n </template>\n </el-input>\n <dk-icon class=\"close-shadow\" icon=\"Close\" hover-color=\"#f00\" @click=\"delShadow(key)\"></dk-icon>\n </li>\n </ul>\n <el-button class=\"m-t-10px w-100%\" @click=\"addShadow\">\n <dk-icon icon=\"Plus\"></dk-icon>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shadowInputProps } from './props'\nimport { computed, onMounted, ref, watch } from 'vue'\n\n\n\nconst props = defineProps(shadowInputProps)\n\nconst shadows: any = ref([])\n\nconst activeName = ref('1')\nconst addShadow = () => {\n shadows.value.push('1px 1px 1px 1px #000')\n activeName.value = shadows.value.length - 1 + ''\n}\n\nconst delShadow = (index: number) => {\n shadows.value.splice(index, 1)\n}\n\nconst init = () => {\n if (props.modelValue.boxShadow) {\n shadows.value = props.modelValue.boxShadow.split(',')\n }\n}\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst boxShadow = computed(() => {\n return shadows.value.join(',')\n})\n\nwatch(boxShadow, (n, o) => {\n emit('update:modelValue', { boxShadow: boxShadow.value })\n})\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n { deep: true }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","computed","watch","onMounted"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAsCD,IAAM,MAAA,OAAA,GAAeC,OAAI,CAAA,EAAE,CAAA,CAAA;AAE3B,IAAM,MAAA,UAAA,GAAaA,QAAI,GAAG,CAAA,CAAA;AAC1B,IAAA,MAAM,YAAY,MAAM;AACtB,MAAQ,OAAA,CAAA,KAAA,CAAM,KAAK,sBAAsB,CAAA,CAAA;AACzC,MAAA,UAAA,CAAW,KAAQ,GAAA,OAAA,CAAQ,KAAM,CAAA,MAAA,GAAS,CAAI,GAAA,EAAA,CAAA;AAAA,KAChD,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,CAAC,KAAkB,KAAA;AACnC,MAAQ,OAAA,CAAA,KAAA,CAAM,MAAO,CAAA,KAAA,EAAO,CAAC,CAAA,CAAA;AAAA,KAC/B,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAI,IAAA,KAAA,CAAM,WAAW,SAAW,EAAA;AAC9B,QAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAM,UAAW,CAAA,SAAA,CAAU,MAAM,GAAG,CAAA,CAAA;AAAA,OACtD;AAAA,KACF,CAAA;AAIA,IAAM,MAAA,SAAA,GAAYC,aAAS,MAAM;AAC/B,MAAO,OAAA,OAAA,CAAQ,KAAM,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAMC,SAAA,CAAA,SAAA,EAAW,CAAC,CAAA,EAAG,CAAM,KAAA;AACzB,MAAA,IAAA,CAAK,mBAAqB,EAAA,EAAE,SAAW,EAAA,SAAA,CAAU,OAAO,CAAA,CAAA;AAAA,KACzD,CAAA,CAAA;AAED,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OACP;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AAEA,IAAAC,aAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vipl520/dk-ui",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Vant extension components.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",