@vipl520/dk-ui 1.0.48 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/index.js +193 -92
  2. package/dist/index.min.js +4 -4
  3. package/dist/index.min.js.map +1 -1
  4. package/dist/index.min.mjs +4 -4
  5. package/dist/index.min.mjs.map +1 -1
  6. package/dist/index.mjs +193 -92
  7. package/dist/web-types.json +1 -1
  8. package/es/style-box-input/index.d.ts +5 -5
  9. package/es/style-box-input/src/props.d.ts +2 -2
  10. package/es/style-box-input/src/props.mjs +2 -2
  11. package/es/style-box-input/src/props.mjs.map +1 -1
  12. package/es/style-box-input/src/style-box-input.vue.d.ts +5 -5
  13. package/es/style-box-input/src/style-box-input.vue2.mjs +85 -71
  14. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  15. package/es/style-input/index.d.ts +35 -0
  16. package/es/style-input/src/props.d.ts +16 -0
  17. package/es/style-input/src/props.mjs +18 -0
  18. package/es/style-input/src/props.mjs.map +1 -1
  19. package/es/style-input/src/style-input.vue.d.ts +35 -0
  20. package/es/style-input/src/style-input.vue2.mjs +73 -3
  21. package/es/style-input/src/style-input.vue2.mjs.map +1 -1
  22. package/lib/style-box-input/index.d.ts +5 -5
  23. package/lib/style-box-input/src/props.d.ts +2 -2
  24. package/lib/style-box-input/src/props.js +2 -2
  25. package/lib/style-box-input/src/props.js.map +1 -1
  26. package/lib/style-box-input/src/style-box-input.vue.d.ts +5 -5
  27. package/lib/style-box-input/src/style-box-input.vue2.js +84 -70
  28. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  29. package/lib/style-input/index.d.ts +35 -0
  30. package/lib/style-input/src/props.d.ts +16 -0
  31. package/lib/style-input/src/props.js +18 -0
  32. package/lib/style-input/src/props.js.map +1 -1
  33. package/lib/style-input/src/style-input.vue.d.ts +35 -0
  34. package/lib/style-input/src/style-input.vue2.js +72 -2
  35. package/lib/style-input/src/style-input.vue2.js.map +1 -1
  36. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -955,7 +955,7 @@ const groupProps = {
955
955
 
956
956
  const _hoisted_1$V = { key: 1 };
957
957
  const _hoisted_2$I = { class: "collapse-title" };
958
- const _hoisted_3$v = { class: "_dk-group-handle" };
958
+ const _hoisted_3$w = { class: "_dk-group-handle" };
959
959
  const __default__$N = defineComponent({
960
960
  name: "DkGroup"
961
961
  });
@@ -1259,7 +1259,7 @@ var _sfc_main$1c = /* @__PURE__ */ defineComponent({
1259
1259
  onEmitEvent: (name, ...args) => emitEvent(name, args, index),
1260
1260
  "onUpdate:api": ($f) => add$f(index, $f)
1261
1261
  }, null, 8, ["model-value", "rule", "option", "onUpdate:modelValue", "onEmitEvent", "onUpdate:api"])),
1262
- createElementVNode("div", _hoisted_3$v, [
1262
+ createElementVNode("div", _hoisted_3$w, [
1263
1263
  createVNode(
1264
1264
  _component_el_button_group,
1265
1265
  null,
@@ -1426,7 +1426,7 @@ const tinyEditorProps = {
1426
1426
 
1427
1427
  const _hoisted_1$U = { key: 0 };
1428
1428
  const _hoisted_2$H = { key: 1 };
1429
- const _hoisted_3$u = { class: "text-center" };
1429
+ const _hoisted_3$v = { class: "text-center" };
1430
1430
  const __default__$M = defineComponent({
1431
1431
  name: "DkTinyEditor"
1432
1432
  });
@@ -1559,7 +1559,7 @@ var _sfc_main$1b = /* @__PURE__ */ defineComponent({
1559
1559
  "z-index": 1298
1560
1560
  }, {
1561
1561
  footer: withCtx(() => [
1562
- createElementVNode("div", _hoisted_3$u, [
1562
+ createElementVNode("div", _hoisted_3$v, [
1563
1563
  createVNode(_component_el_button, {
1564
1564
  type: "primary",
1565
1565
  style: { "width": "200px" },
@@ -1788,7 +1788,7 @@ const hotAreaInputProps = {
1788
1788
 
1789
1789
  const _hoisted_1$S = { class: "hot-area-content" };
1790
1790
  const _hoisted_2$G = { class: "hot-area-draggable" };
1791
- const _hoisted_3$t = {
1791
+ const _hoisted_3$u = {
1792
1792
  class: "hot-item-content",
1793
1793
  style: { "position": "relative", "width": "100%", "height": "100%", "background": "#0003" }
1794
1794
  };
@@ -1946,7 +1946,7 @@ var _sfc_main$18 = /* @__PURE__ */ defineComponent({
1946
1946
  default: withCtx(() => [
1947
1947
  createElementVNode(
1948
1948
  "div",
1949
- _hoisted_3$t,
1949
+ _hoisted_3$u,
1950
1950
  toDisplayString(key + 1),
1951
1951
  1
1952
1952
  /* TEXT */
@@ -2676,7 +2676,7 @@ const _hoisted_2$D = /* @__PURE__ */ createElementVNode(
2676
2676
  -1
2677
2677
  /* HOISTED */
2678
2678
  );
2679
- const _hoisted_3$s = /* @__PURE__ */ createElementVNode(
2679
+ const _hoisted_3$t = /* @__PURE__ */ createElementVNode(
2680
2680
  "path",
2681
2681
  {
2682
2682
  fill: "#B0B7BD",
@@ -2813,7 +2813,7 @@ var _sfc_main$14 = /* @__PURE__ */ defineComponent({
2813
2813
  return openBlock(), createElementBlock("svg", _hoisted_1$O, [
2814
2814
  createElementVNode("g", null, [
2815
2815
  _hoisted_2$D,
2816
- _hoisted_3$s,
2816
+ _hoisted_3$t,
2817
2817
  _hoisted_4$l,
2818
2818
  createElementVNode(
2819
2819
  "path",
@@ -2861,7 +2861,7 @@ const attachmentProps = {
2861
2861
 
2862
2862
  const _hoisted_1$N = { class: "dk-attachment attachment" };
2863
2863
  const _hoisted_2$C = { class: "attachment-header flex justify-between pt-5px pb-5px" };
2864
- const _hoisted_3$r = { class: "header-form z" };
2864
+ const _hoisted_3$s = { class: "header-form z" };
2865
2865
  const _hoisted_4$k = { class: "header-button y" };
2866
2866
  const _hoisted_5$e = /* @__PURE__ */ createElementVNode(
2867
2867
  "i",
@@ -2906,7 +2906,7 @@ const _hoisted_20$1 = { key: 3 };
2906
2906
  const _hoisted_21$1 = { class: "file-name over" };
2907
2907
  const _hoisted_22$1 = { class: "right" };
2908
2908
  const _hoisted_23$1 = { class: "block p-10px" };
2909
- const _hoisted_24$1 = {
2909
+ const _hoisted_24 = {
2910
2910
  key: 1,
2911
2911
  style: { "display": "flex", "align-items": "center", "justify-content": "center", "height": "340px" }
2912
2912
  };
@@ -3117,7 +3117,7 @@ var _sfc_main$13 = /* @__PURE__ */ defineComponent({
3117
3117
  return openBlock(), createElementBlock("div", _hoisted_1$N, [
3118
3118
  createCommentVNode(" \u9876\u90E8"),
3119
3119
  createElementVNode("div", _hoisted_2$C, [
3120
- createElementVNode("div", _hoisted_3$r, [
3120
+ createElementVNode("div", _hoisted_3$s, [
3121
3121
  createVNode(_component_el_input, {
3122
3122
  modelValue: searchFileName.value,
3123
3123
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchFileName.value = $event),
@@ -3406,7 +3406,7 @@ var _sfc_main$13 = /* @__PURE__ */ defineComponent({
3406
3406
  ])
3407
3407
  ])), [
3408
3408
  [_directive_loading, loading.value]
3409
- ]) : (openBlock(), createElementBlock("div", _hoisted_24$1, [
3409
+ ]) : (openBlock(), createElementBlock("div", _hoisted_24, [
3410
3410
  createVNode(_component_el_empty, { description: "\u6682\u65E0\u6570\u636E" })
3411
3411
  ])),
3412
3412
  (openBlock(), createBlock(_component_dk_form, {
@@ -3544,7 +3544,7 @@ const fileInputProps = {
3544
3544
 
3545
3545
  const _hoisted_1$L = { class: "show m-t-5px" };
3546
3546
  const _hoisted_2$B = { class: "image-error" };
3547
- const _hoisted_3$q = { class: "image-slot" };
3547
+ const _hoisted_3$r = { class: "image-slot" };
3548
3548
  const _hoisted_4$j = { class: "no-image" };
3549
3549
  const __default__$C = defineComponent({
3550
3550
  name: "DkFileInput"
@@ -3681,7 +3681,7 @@ var _sfc_main$11 = /* @__PURE__ */ defineComponent({
3681
3681
  style: { "width": "100%", "height": "100%" }
3682
3682
  }, {
3683
3683
  error: withCtx(() => [
3684
- createElementVNode("div", _hoisted_3$q, [
3684
+ createElementVNode("div", _hoisted_3$r, [
3685
3685
  createElementVNode("div", _hoisted_4$j, [
3686
3686
  createVNode(_component_el_icon, null, {
3687
3687
  default: withCtx(() => [
@@ -3941,7 +3941,7 @@ const fileListInputProps = {
3941
3941
 
3942
3942
  const _hoisted_1$K = { class: "dk-image-list" };
3943
3943
  const _hoisted_2$A = ["onClick"];
3944
- const _hoisted_3$p = { key: 0 };
3944
+ const _hoisted_3$q = { key: 0 };
3945
3945
  const __default__$y = defineComponent({
3946
3946
  name: "DkFileListInput"
3947
3947
  });
@@ -4051,7 +4051,7 @@ var _sfc_main$Z = /* @__PURE__ */ defineComponent({
4051
4051
  128
4052
4052
  /* KEYED_FRAGMENT */
4053
4053
  )),
4054
- _ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$p, [
4054
+ _ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$q, [
4055
4055
  createElementVNode(
4056
4056
  "div",
4057
4057
  {
@@ -4313,7 +4313,7 @@ const _hoisted_2$z = {
4313
4313
  class: "text-center",
4314
4314
  style: { "font-size": "12px", "color": "#999" }
4315
4315
  };
4316
- const _hoisted_3$o = { class: "search-icon" };
4316
+ const _hoisted_3$p = { class: "search-icon" };
4317
4317
  const __default__$u = defineComponent({
4318
4318
  name: "DkIconContent"
4319
4319
  });
@@ -4527,7 +4527,7 @@ var _sfc_main$V = /* @__PURE__ */ defineComponent({
4527
4527
  _: 1
4528
4528
  /* STABLE */
4529
4529
  }, 8, ["modelValue"]),
4530
- createElementVNode("div", _hoisted_3$o, [
4530
+ createElementVNode("div", _hoisted_3$p, [
4531
4531
  createVNode(_component_el_input, {
4532
4532
  modelValue: searchIcon.value,
4533
4533
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchIcon.value = $event),
@@ -4850,6 +4850,24 @@ const styleInputProps = {
4850
4850
  return {};
4851
4851
  },
4852
4852
  type: Object
4853
+ },
4854
+ isDrawer: {
4855
+ default: false,
4856
+ type: Boolean
4857
+ },
4858
+ drawerProps: {
4859
+ default: () => {
4860
+ return {
4861
+ title: "\u7F16\u8F91\u6837\u5F0F",
4862
+ direction: "rtl",
4863
+ size: "400px"
4864
+ };
4865
+ },
4866
+ type: Object
4867
+ },
4868
+ drawerText: {
4869
+ default: "\u7F16\u8F91\u6837\u5F0F",
4870
+ type: String
4853
4871
  }
4854
4872
  };
4855
4873
 
@@ -4858,6 +4876,7 @@ const _hoisted_2$y = {
4858
4876
  key: 0,
4859
4877
  class: "p-5px"
4860
4878
  };
4879
+ const _hoisted_3$o = { key: 1 };
4861
4880
  const __default__$r = defineComponent({
4862
4881
  name: "DkStyleInput"
4863
4882
  });
@@ -4867,6 +4886,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
4867
4886
  emits: ["update:modelValue"],
4868
4887
  setup(__props, { emit }) {
4869
4888
  const props = __props;
4889
+ const drawer = ref(false);
4870
4890
  const activeNames = ref([0]);
4871
4891
  const values = ref({});
4872
4892
  const loading = ref(true);
@@ -4915,9 +4935,12 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
4915
4935
  return (_ctx, _cache) => {
4916
4936
  const _component_el_collapse_item = resolveComponent("el-collapse-item");
4917
4937
  const _component_el_collapse = resolveComponent("el-collapse");
4938
+ const _component_el_button = resolveComponent("el-button");
4939
+ const _component_el_drawer = resolveComponent("el-drawer");
4918
4940
  return openBlock(), createElementBlock("div", _hoisted_1$G, [
4919
4941
  !loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
4920
- createVNode(_component_el_collapse, {
4942
+ !props.isDrawer ? (openBlock(), createBlock(_component_el_collapse, {
4943
+ key: 0,
4921
4944
  modelValue: activeNames.value,
4922
4945
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeNames.value = $event)
4923
4946
  }, {
@@ -4955,7 +4978,72 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
4955
4978
  ]),
4956
4979
  _: 1
4957
4980
  /* STABLE */
4958
- }, 8, ["modelValue"])
4981
+ }, 8, ["modelValue"])) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
4982
+ createVNode(_component_el_button, {
4983
+ type: "primary",
4984
+ plain: "",
4985
+ style: { "width": "100%" },
4986
+ onClick: _cache[1] || (_cache[1] = ($event) => drawer.value = true)
4987
+ }, {
4988
+ default: withCtx(() => [
4989
+ createTextVNode(
4990
+ toDisplayString(props.drawerText),
4991
+ 1
4992
+ /* TEXT */
4993
+ )
4994
+ ]),
4995
+ _: 1
4996
+ /* STABLE */
4997
+ }),
4998
+ createVNode(_component_el_drawer, mergeProps({
4999
+ modelValue: drawer.value,
5000
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => drawer.value = $event)
5001
+ }, props.drawerProps), {
5002
+ default: withCtx(() => [
5003
+ createVNode(_component_el_collapse, {
5004
+ modelValue: activeNames.value,
5005
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => activeNames.value = $event)
5006
+ }, {
5007
+ default: withCtx(() => [
5008
+ (openBlock(true), createElementBlock(
5009
+ Fragment,
5010
+ null,
5011
+ renderList(_components.value, (item, key) => {
5012
+ return openBlock(), createBlock(_component_el_collapse_item, {
5013
+ key,
5014
+ title: "",
5015
+ name: key
5016
+ }, {
5017
+ title: withCtx(() => [
5018
+ createTextVNode(
5019
+ toDisplayString(item.title),
5020
+ 1
5021
+ /* TEXT */
5022
+ )
5023
+ ]),
5024
+ default: withCtx(() => [
5025
+ activeNames.value.includes(key) ? (openBlock(), createBlock(resolveDynamicComponent(item.name), mergeProps({
5026
+ key: 0,
5027
+ modelValue: values.value[item.name],
5028
+ "onUpdate:modelValue": ($event) => values.value[item.name] = $event
5029
+ }, item.props, { onChange }), null, 16, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
5030
+ ]),
5031
+ _: 2
5032
+ /* DYNAMIC */
5033
+ }, 1032, ["name"]);
5034
+ }),
5035
+ 128
5036
+ /* KEYED_FRAGMENT */
5037
+ ))
5038
+ ]),
5039
+ _: 1
5040
+ /* STABLE */
5041
+ }, 8, ["modelValue"])
5042
+ ]),
5043
+ _: 1
5044
+ /* STABLE */
5045
+ }, 16, ["modelValue"])
5046
+ ]))
4959
5047
  ])) : createCommentVNode("v-if", true)
4960
5048
  ]);
4961
5049
  };
@@ -5353,8 +5441,8 @@ const styleBoxInputProps = {
5353
5441
  default: () => ({})
5354
5442
  },
5355
5443
  height: {
5356
- type: Number,
5357
- default: 180
5444
+ type: [Number, String],
5445
+ default: "auto"
5358
5446
  },
5359
5447
  help: {
5360
5448
  type: String,
@@ -5478,50 +5566,46 @@ const _hoisted_4$i = { class: "float-right cursor-pointer" };
5478
5566
  const _hoisted_5$d = { class: "name-header-operations" };
5479
5567
  const _hoisted_6$b = { class: "name-header-operations" };
5480
5568
  const _hoisted_7$b = { class: "name-header-operations" };
5481
- const _hoisted_8$9 = ["title"];
5482
- const _hoisted_9$7 = ["onMouseenter"];
5483
- const _hoisted_10$5 = ["onUpdate:modelValue", "onBlur"];
5484
- const _hoisted_11$5 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5485
- const _hoisted_12$4 = /* @__PURE__ */ createElementVNode(
5569
+ const _hoisted_8$9 = ["title", "onClick"];
5570
+ const _hoisted_9$7 = ["onUpdate:modelValue", "onBlur"];
5571
+ const _hoisted_10$5 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5572
+ const _hoisted_11$5 = /* @__PURE__ */ createElementVNode(
5486
5573
  "div",
5487
5574
  { style: { "position": "absolute", "display": "none", "width": "100%", "height": "100%" } },
5488
5575
  null,
5489
5576
  -1
5490
5577
  /* HOISTED */
5491
5578
  );
5492
- const _hoisted_13$3 = { class: "anchor-wrapper" };
5493
- const _hoisted_14$3 = ["onMousedown"];
5494
- const _hoisted_15$2 = /* @__PURE__ */ createElementVNode(
5579
+ const _hoisted_12$4 = { class: "anchor-wrapper" };
5580
+ const _hoisted_13$3 = ["onMousedown"];
5581
+ const _hoisted_14$3 = /* @__PURE__ */ createElementVNode(
5495
5582
  "span",
5496
5583
  { class: "title" },
5497
5584
  " \u5916\u8FB9\u8DDD ",
5498
5585
  -1
5499
5586
  /* HOISTED */
5500
5587
  );
5501
- const _hoisted_16$2 = { class: "thumnail border" };
5502
- const _hoisted_17$1 = ["title"];
5503
- const _hoisted_18 = ["onMouseenter"];
5504
- const _hoisted_19 = ["onUpdate:modelValue", "onBlur"];
5505
- const _hoisted_20 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5506
- const _hoisted_21 = { class: "anchor-wrapper" };
5507
- const _hoisted_22 = ["onMousedown"];
5508
- const _hoisted_23 = /* @__PURE__ */ createElementVNode(
5588
+ const _hoisted_15$2 = { class: "thumnail border" };
5589
+ const _hoisted_16$2 = ["title", "onClick"];
5590
+ const _hoisted_17$1 = ["onUpdate:modelValue", "onBlur"];
5591
+ const _hoisted_18 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5592
+ const _hoisted_19 = { class: "anchor-wrapper" };
5593
+ const _hoisted_20 = ["onMousedown"];
5594
+ const _hoisted_21 = /* @__PURE__ */ createElementVNode(
5509
5595
  "span",
5510
5596
  { class: "title" },
5511
5597
  " \u5185\u8FB9\u8DDD ",
5512
5598
  -1
5513
5599
  /* HOISTED */
5514
5600
  );
5515
- const _hoisted_24 = { class: "title" };
5516
- const _hoisted_25 = { class: "content-unit left-0" };
5517
- const _hoisted_26 = /* @__PURE__ */ createElementVNode(
5601
+ const _hoisted_22 = { class: "title" };
5602
+ const _hoisted_23 = /* @__PURE__ */ createElementVNode(
5518
5603
  "span",
5519
5604
  null,
5520
5605
  " x ",
5521
5606
  -1
5522
5607
  /* HOISTED */
5523
5608
  );
5524
- const _hoisted_27 = { class: "content-unit right-0" };
5525
5609
  const __default__$p = defineComponent({
5526
5610
  name: "DkStyleBoxInput"
5527
5611
  });
@@ -5551,13 +5635,17 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5551
5635
  width: props.modelValue.width || "",
5552
5636
  height: props.modelValue.height || ""
5553
5637
  });
5554
- ref(props.height);
5555
- watch(
5556
- () => props.height,
5557
- () => {
5558
- console.log("height", props.height);
5638
+ const box = ref(null);
5639
+ const { width } = useElementSize(box);
5640
+ const height = computed(() => {
5641
+ console.log("props.height", props.height);
5642
+ if (props.height === "auto") {
5643
+ const h = width.value / 1.8;
5644
+ return h > 300 ? 300 : h;
5645
+ } else {
5646
+ return props.height;
5559
5647
  }
5560
- );
5648
+ });
5561
5649
  watch(
5562
5650
  () => props.modelValue,
5563
5651
  (newVal, oldVal) => {
@@ -5650,17 +5738,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5650
5738
  stopChangeBound.value = handleMouseUp.bind(event);
5651
5739
  document.addEventListener("mouseup", stopChangeBound.value);
5652
5740
  dragging.value = true;
5653
- const height2 = props.height;
5654
5741
  const wrapperElement = document.querySelector(".wrapper");
5655
- const width = wrapperElement ? wrapperElement.offsetWidth : 0;
5742
+ const width2 = wrapperElement ? wrapperElement.offsetWidth : 0;
5656
5743
  const multiples = {
5657
5744
  margin: 0.9,
5658
5745
  padding: 0.9 * 0.7
5659
5746
  };
5660
5747
  const { clientX, clientY } = event;
5661
- const setCursorAndDimensions = (cursor, left, top, width2, height3) => {
5748
+ const setCursorAndDimensions = (cursor, left, top, width3, height2) => {
5662
5749
  document.body.style.cursor = cursor;
5663
- Object.assign(positionStyle, { left, top, width: width2, height: height3, display: "block" });
5750
+ Object.assign(positionStyle, { left, top, width: width3, height: height2, display: "block" });
5664
5751
  };
5665
5752
  startPosition.x = clientX;
5666
5753
  startPosition.y = clientY;
@@ -5668,16 +5755,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5668
5755
  setCursorAndDimensions(
5669
5756
  "ew-resize",
5670
5757
  clientX + "px",
5671
- clientY - height2 * 0.5 * multiples[type] + "px",
5758
+ clientY - height.value * 0.5 * multiples[type] + "px",
5672
5759
  "0.1px",
5673
- height2 * multiples[type] + "px"
5760
+ height.value * multiples[type] + "px"
5674
5761
  );
5675
5762
  } else {
5676
5763
  setCursorAndDimensions(
5677
5764
  "ns-resize",
5678
- clientX - width * 0.5 * multiples[type] + "px",
5765
+ clientX - width2 * 0.5 * multiples[type] + "px",
5679
5766
  clientY + "px",
5680
- width * multiples[type] + "px",
5767
+ width2 * multiples[type] + "px",
5681
5768
  "0.1px"
5682
5769
  );
5683
5770
  }
@@ -5856,9 +5943,11 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5856
5943
  createElementVNode(
5857
5944
  "div",
5858
5945
  {
5946
+ ref_key: "box",
5947
+ ref: box,
5859
5948
  tabindex: "0",
5860
5949
  class: "wrapper",
5861
- style: normalizeStyle([{ "margin-top": "10px" }, { height: props.height + "px" }])
5950
+ style: normalizeStyle([{ "margin-top": "10px" }, { height: height.value + "px" }])
5862
5951
  },
5863
5952
  [
5864
5953
  createElementVNode(
@@ -5878,11 +5967,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5878
5967
  return openBlock(), createElementBlock("div", { key }, [
5879
5968
  createElementVNode("span", {
5880
5969
  title: item.title,
5881
- class: normalizeClass(`anchor-tip-${item.position} value-indicator`)
5970
+ class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
5971
+ onClick: ($event) => onDblclick(item.value, key)
5882
5972
  }, [
5883
- createElementVNode("span", {
5884
- onMouseenter: ($event) => onDblclick(item.value, key)
5885
- }, toDisplayString(getValue(styles[item.value])), 41, _hoisted_9$7)
5973
+ createElementVNode(
5974
+ "span",
5975
+ null,
5976
+ toDisplayString(getValue(styles[item.value])),
5977
+ 1
5978
+ /* TEXT */
5979
+ )
5886
5980
  ], 10, _hoisted_8$9),
5887
5981
  withDirectives(createElementVNode("input", {
5888
5982
  ref_for: true,
@@ -5891,7 +5985,7 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5891
5985
  "onUpdate:modelValue": ($event) => styles[item.value] = $event,
5892
5986
  class: normalizeClass("input-box anchor-tip-" + item.position + (showStyles[item.value] ? " show" : "")),
5893
5987
  onBlur: ($event) => onBlur(item.value)
5894
- }, null, 42, _hoisted_10$5), [
5988
+ }, null, 42, _hoisted_9$7), [
5895
5989
  [vModelText, styles[item.value]]
5896
5990
  ]),
5897
5991
  (openBlock(), createElementBlock("svg", {
@@ -5903,15 +5997,15 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5903
5997
  style: normalizeStyle(item.svg.style),
5904
5998
  class: "esm-modal-svg",
5905
5999
  innerHTML: item.svg.content
5906
- }, null, 12, _hoisted_11$5))
6000
+ }, null, 12, _hoisted_10$5))
5907
6001
  ]);
5908
6002
  }),
5909
6003
  128
5910
6004
  /* KEYED_FRAGMENT */
5911
6005
  ))
5912
6006
  ]),
5913
- _hoisted_12$4,
5914
- createElementVNode("div", _hoisted_13$3, [
6007
+ _hoisted_11$5,
6008
+ createElementVNode("div", _hoisted_12$4, [
5915
6009
  (openBlock(), createElementBlock(
5916
6010
  Fragment,
5917
6011
  null,
@@ -5922,16 +6016,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5922
6016
  onMousemove: handleMouseMove,
5923
6017
  onMousedown: ($event) => handleMouseDown("margin", item, $event),
5924
6018
  onMouseup: handleMouseUp
5925
- }, null, 42, _hoisted_14$3);
6019
+ }, null, 42, _hoisted_13$3);
5926
6020
  }),
5927
6021
  64
5928
6022
  /* STABLE_FRAGMENT */
5929
6023
  ))
5930
6024
  ]),
5931
- _hoisted_15$2,
6025
+ _hoisted_14$3,
5932
6026
  createCommentVNode("\u5916\u8FB9\u8DDD Margin END"),
5933
6027
  createCommentVNode("\u5185\u8FB9\u8DDD Padding"),
5934
- createElementVNode("div", _hoisted_16$2, [
6028
+ createElementVNode("div", _hoisted_15$2, [
5935
6029
  createElementVNode(
5936
6030
  "div",
5937
6031
  {
@@ -5948,12 +6042,17 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5948
6042
  return openBlock(), createElementBlock("div", { key }, [
5949
6043
  createElementVNode("span", {
5950
6044
  title: item.title,
5951
- class: normalizeClass(`anchor-tip-${item.position} value-indicator`)
6045
+ class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
6046
+ onClick: ($event) => onDblclick(item.value, key + 4)
5952
6047
  }, [
5953
- createElementVNode("span", {
5954
- onMouseenter: ($event) => onDblclick(item.value, key + 4)
5955
- }, toDisplayString(getValue(styles[item.value])), 41, _hoisted_18)
5956
- ], 10, _hoisted_17$1),
6048
+ createElementVNode(
6049
+ "span",
6050
+ null,
6051
+ toDisplayString(getValue(styles[item.value])),
6052
+ 1
6053
+ /* TEXT */
6054
+ )
6055
+ ], 10, _hoisted_16$2),
5957
6056
  withDirectives(createElementVNode("input", {
5958
6057
  ref_for: true,
5959
6058
  ref_key: "inputField",
@@ -5961,7 +6060,7 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5961
6060
  "onUpdate:modelValue": ($event) => styles[item.value] = $event,
5962
6061
  class: normalizeClass("input-box anchor-tip-" + item.position + (showStyles[item.value] ? " show" : "")),
5963
6062
  onBlur: ($event) => onBlur(item.value)
5964
- }, null, 42, _hoisted_19), [
6063
+ }, null, 42, _hoisted_17$1), [
5965
6064
  [vModelText, styles[item.value]]
5966
6065
  ]),
5967
6066
  (openBlock(), createElementBlock("svg", {
@@ -5973,14 +6072,14 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5973
6072
  style: normalizeStyle(item.svg.style),
5974
6073
  class: "esm-modal-svg",
5975
6074
  innerHTML: item.svg.content
5976
- }, null, 12, _hoisted_20))
6075
+ }, null, 12, _hoisted_18))
5977
6076
  ]);
5978
6077
  }),
5979
6078
  128
5980
6079
  /* KEYED_FRAGMENT */
5981
6080
  ))
5982
6081
  ]),
5983
- createElementVNode("div", _hoisted_21, [
6082
+ createElementVNode("div", _hoisted_19, [
5984
6083
  (openBlock(), createElementBlock(
5985
6084
  Fragment,
5986
6085
  null,
@@ -5991,13 +6090,13 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5991
6090
  onMousemove: handleMouseMove,
5992
6091
  onMousedown: ($event) => handleMouseDown("padding", item, $event),
5993
6092
  onMouseup: handleMouseUp
5994
- }, null, 42, _hoisted_22);
6093
+ }, null, 42, _hoisted_20);
5995
6094
  }),
5996
6095
  64
5997
6096
  /* STABLE_FRAGMENT */
5998
6097
  ))
5999
6098
  ]),
6000
- _hoisted_23,
6099
+ _hoisted_21,
6001
6100
  createCommentVNode("\u5185\u8FB9\u8DDD END"),
6002
6101
  createElementVNode(
6003
6102
  "div",
@@ -6007,16 +6106,17 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
6007
6106
  onMouseleave: _cache[10] || (_cache[10] = ($event) => onMouseMove("widthHeight", "leave", $event))
6008
6107
  },
6009
6108
  [
6010
- createElementVNode("span", _hoisted_24, [
6011
- createElementVNode("span", _hoisted_25, [
6109
+ createElementVNode("span", _hoisted_22, [
6110
+ createElementVNode("span", {
6111
+ class: "content-unit left-0",
6112
+ onClick: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
6113
+ }, [
6012
6114
  createElementVNode(
6013
6115
  "em",
6014
- {
6015
- onMouseenter: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
6016
- },
6116
+ null,
6017
6117
  toDisplayString(getValue(styles["width"])),
6018
- 33
6019
- /* TEXT, HYDRATE_EVENTS */
6118
+ 1
6119
+ /* TEXT */
6020
6120
  )
6021
6121
  ]),
6022
6122
  withDirectives(createElementVNode(
@@ -6034,16 +6134,17 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
6034
6134
  ), [
6035
6135
  [vModelText, styles.width]
6036
6136
  ]),
6037
- _hoisted_26,
6038
- createElementVNode("span", _hoisted_27, [
6137
+ _hoisted_23,
6138
+ createElementVNode("span", {
6139
+ class: "content-unit right-0",
6140
+ onClick: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
6141
+ }, [
6039
6142
  createElementVNode(
6040
6143
  "em",
6041
- {
6042
- onMouseenter: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
6043
- },
6144
+ null,
6044
6145
  toDisplayString(getValue(styles["height"])),
6045
- 33
6046
- /* TEXT, HYDRATE_EVENTS */
6146
+ 1
6147
+ /* TEXT */
6047
6148
  )
6048
6149
  ]),
6049
6150
  withDirectives(createElementVNode(
@@ -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.47",
5
+ "version": "1.0.49",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
@@ -4,8 +4,8 @@ export declare const StyleBoxInput: import("@vipl520/utils").WithInstall<import(
4
4
  default: () => {};
5
5
  };
6
6
  height: {
7
- type: NumberConstructor;
8
- default: number;
7
+ type: (StringConstructor | NumberConstructor)[];
8
+ default: string;
9
9
  };
10
10
  help: {
11
11
  type: StringConstructor;
@@ -17,8 +17,8 @@ export declare const StyleBoxInput: import("@vipl520/utils").WithInstall<import(
17
17
  default: () => {};
18
18
  };
19
19
  height: {
20
- type: NumberConstructor;
21
- default: number;
20
+ type: (StringConstructor | NumberConstructor)[];
21
+ default: string;
22
22
  };
23
23
  help: {
24
24
  type: StringConstructor;
@@ -29,7 +29,7 @@ export declare const StyleBoxInput: import("@vipl520/utils").WithInstall<import(
29
29
  onChange?: ((...args: any[]) => any) | undefined;
30
30
  }, {
31
31
  modelValue: Record<string, any>;
32
- height: number;
32
+ height: string | number;
33
33
  help: string;
34
34
  }, {}>>;
35
35
  export default StyleBoxInput;