@vipl520/dk-ui 1.0.47 → 1.0.49

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 (41) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +85 -47
  3. package/dist/index.min.js +4 -4
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +4 -4
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +85 -47
  8. package/dist/web-types.json +1 -1
  9. package/es/style-box-input/index.d.ts +5 -5
  10. package/es/style-box-input/src/props.d.ts +2 -2
  11. package/es/style-box-input/src/props.mjs +2 -2
  12. package/es/style-box-input/src/props.mjs.map +1 -1
  13. package/es/style-box-input/src/style-box-input.vue.d.ts +5 -5
  14. package/es/style-box-input/src/style-box-input.vue2.mjs +68 -42
  15. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  16. package/es/style-box-input/style/index.css +1 -1
  17. package/es/style-box-input/style/index.scss +7 -3
  18. package/es/style-input/index.d.ts +9 -0
  19. package/es/style-input/src/props.d.ts +8 -1
  20. package/es/style-input/src/props.mjs +10 -1
  21. package/es/style-input/src/props.mjs.map +1 -1
  22. package/es/style-input/src/style-input.vue.d.ts +9 -0
  23. package/es/style-input/src/style-input.vue2.mjs +7 -3
  24. package/es/style-input/src/style-input.vue2.mjs.map +1 -1
  25. package/lib/style-box-input/index.d.ts +5 -5
  26. package/lib/style-box-input/src/props.d.ts +2 -2
  27. package/lib/style-box-input/src/props.js +2 -2
  28. package/lib/style-box-input/src/props.js.map +1 -1
  29. package/lib/style-box-input/src/style-box-input.vue.d.ts +5 -5
  30. package/lib/style-box-input/src/style-box-input.vue2.js +67 -41
  31. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  32. package/lib/style-box-input/style/index.css +1 -1
  33. package/lib/style-box-input/style/index.scss +7 -3
  34. package/lib/style-input/index.d.ts +9 -0
  35. package/lib/style-input/src/props.d.ts +8 -1
  36. package/lib/style-input/src/props.js +10 -1
  37. package/lib/style-input/src/props.js.map +1 -1
  38. package/lib/style-input/src/style-input.vue.d.ts +9 -0
  39. package/lib/style-input/src/style-input.vue2.js +7 -3
  40. package/lib/style-input/src/style-input.vue2.js.map +1 -1
  41. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -4828,7 +4828,7 @@ const defaultConfig = [
4828
4828
 
4829
4829
  const styleInputProps = {
4830
4830
  /**
4831
- * 类型定义
4831
+ * 引入组件
4832
4832
  */
4833
4833
  components: {
4834
4834
  default: () => {
@@ -4836,6 +4836,15 @@ const styleInputProps = {
4836
4836
  },
4837
4837
  type: Array
4838
4838
  },
4839
+ /**
4840
+ * 需要隐藏组件
4841
+ */
4842
+ hideComponents: {
4843
+ default: () => {
4844
+ return [];
4845
+ },
4846
+ type: Array
4847
+ },
4839
4848
  modelValue: {
4840
4849
  default: () => {
4841
4850
  return {};
@@ -4870,10 +4879,14 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
4870
4879
  });
4871
4880
  emit("update:modelValue", obj);
4872
4881
  };
4882
+ const _components = ref([]);
4873
4883
  const init = () => {
4874
- const components = props.components;
4884
+ _components.value = props.components.filter((item) => {
4885
+ console.log("item.name", item.name);
4886
+ return !props.hideComponents.includes(item.name);
4887
+ });
4875
4888
  const obj = {};
4876
- components.forEach((item) => {
4889
+ _components.value.forEach((item) => {
4877
4890
  const params = item.params;
4878
4891
  const paramsObj = {};
4879
4892
  Object.keys(params).forEach((key) => {
@@ -4912,7 +4925,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
4912
4925
  (openBlock(true), createElementBlock(
4913
4926
  Fragment,
4914
4927
  null,
4915
- renderList(props.components, (item, key) => {
4928
+ renderList(_components.value, (item, key) => {
4916
4929
  return openBlock(), createBlock(_component_el_collapse_item, {
4917
4930
  key,
4918
4931
  title: "",
@@ -5340,8 +5353,8 @@ const styleBoxInputProps = {
5340
5353
  default: () => ({})
5341
5354
  },
5342
5355
  height: {
5343
- type: Number,
5344
- default: 180
5356
+ type: [Number, String],
5357
+ default: "auto"
5345
5358
  },
5346
5359
  help: {
5347
5360
  type: String,
@@ -5465,7 +5478,7 @@ const _hoisted_4$i = { class: "float-right cursor-pointer" };
5465
5478
  const _hoisted_5$d = { class: "name-header-operations" };
5466
5479
  const _hoisted_6$b = { class: "name-header-operations" };
5467
5480
  const _hoisted_7$b = { class: "name-header-operations" };
5468
- const _hoisted_8$9 = ["title", "onDblclick"];
5481
+ const _hoisted_8$9 = ["title", "onClick"];
5469
5482
  const _hoisted_9$7 = ["onUpdate:modelValue", "onBlur"];
5470
5483
  const _hoisted_10$5 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5471
5484
  const _hoisted_11$5 = /* @__PURE__ */ createElementVNode(
@@ -5485,7 +5498,7 @@ const _hoisted_14$3 = /* @__PURE__ */ createElementVNode(
5485
5498
  /* HOISTED */
5486
5499
  );
5487
5500
  const _hoisted_15$2 = { class: "thumnail border" };
5488
- const _hoisted_16$2 = ["title", "onDblclick"];
5501
+ const _hoisted_16$2 = ["title", "onClick"];
5489
5502
  const _hoisted_17$1 = ["onUpdate:modelValue", "onBlur"];
5490
5503
  const _hoisted_18 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
5491
5504
  const _hoisted_19 = { class: "anchor-wrapper" };
@@ -5534,13 +5547,17 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5534
5547
  width: props.modelValue.width || "",
5535
5548
  height: props.modelValue.height || ""
5536
5549
  });
5537
- ref(props.height);
5538
- watch(
5539
- () => props.height,
5540
- () => {
5541
- console.log("height", props.height);
5550
+ const box = ref(null);
5551
+ const { width } = useElementSize(box);
5552
+ const height = computed(() => {
5553
+ console.log("props.height", props.height);
5554
+ if (props.height === "auto") {
5555
+ const h = width.value / 1.8;
5556
+ return h > 300 ? 300 : h;
5557
+ } else {
5558
+ return props.height;
5542
5559
  }
5543
- );
5560
+ });
5544
5561
  watch(
5545
5562
  () => props.modelValue,
5546
5563
  (newVal, oldVal) => {
@@ -5633,17 +5650,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5633
5650
  stopChangeBound.value = handleMouseUp.bind(event);
5634
5651
  document.addEventListener("mouseup", stopChangeBound.value);
5635
5652
  dragging.value = true;
5636
- const height2 = props.height;
5637
5653
  const wrapperElement = document.querySelector(".wrapper");
5638
- const width = wrapperElement ? wrapperElement.offsetWidth : 0;
5654
+ const width2 = wrapperElement ? wrapperElement.offsetWidth : 0;
5639
5655
  const multiples = {
5640
5656
  margin: 0.9,
5641
5657
  padding: 0.9 * 0.7
5642
5658
  };
5643
5659
  const { clientX, clientY } = event;
5644
- const setCursorAndDimensions = (cursor, left, top, width2, height3) => {
5660
+ const setCursorAndDimensions = (cursor, left, top, width3, height2) => {
5645
5661
  document.body.style.cursor = cursor;
5646
- Object.assign(positionStyle, { left, top, width: width2, height: height3, display: "block" });
5662
+ Object.assign(positionStyle, { left, top, width: width3, height: height2, display: "block" });
5647
5663
  };
5648
5664
  startPosition.x = clientX;
5649
5665
  startPosition.y = clientY;
@@ -5651,16 +5667,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5651
5667
  setCursorAndDimensions(
5652
5668
  "ew-resize",
5653
5669
  clientX + "px",
5654
- clientY - height2 * 0.5 * multiples[type] + "px",
5670
+ clientY - height.value * 0.5 * multiples[type] + "px",
5655
5671
  "0.1px",
5656
- height2 * multiples[type] + "px"
5672
+ height.value * multiples[type] + "px"
5657
5673
  );
5658
5674
  } else {
5659
5675
  setCursorAndDimensions(
5660
5676
  "ns-resize",
5661
- clientX - width * 0.5 * multiples[type] + "px",
5677
+ clientX - width2 * 0.5 * multiples[type] + "px",
5662
5678
  clientY + "px",
5663
- width * multiples[type] + "px",
5679
+ width2 * multiples[type] + "px",
5664
5680
  "0.1px"
5665
5681
  );
5666
5682
  }
@@ -5839,9 +5855,11 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5839
5855
  createElementVNode(
5840
5856
  "div",
5841
5857
  {
5858
+ ref_key: "box",
5859
+ ref: box,
5842
5860
  tabindex: "0",
5843
5861
  class: "wrapper",
5844
- style: normalizeStyle([{ "margin-top": "10px" }, { height: props.height + "px" }])
5862
+ style: normalizeStyle([{ "margin-top": "10px" }, { height: height.value + "px" }])
5845
5863
  },
5846
5864
  [
5847
5865
  createElementVNode(
@@ -5862,8 +5880,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5862
5880
  createElementVNode("span", {
5863
5881
  title: item.title,
5864
5882
  class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
5865
- onDblclick: ($event) => onDblclick(item.value, key)
5866
- }, toDisplayString(getValue(styles[item.value])), 43, _hoisted_8$9),
5883
+ onClick: ($event) => onDblclick(item.value, key)
5884
+ }, [
5885
+ createElementVNode(
5886
+ "span",
5887
+ null,
5888
+ toDisplayString(getValue(styles[item.value])),
5889
+ 1
5890
+ /* TEXT */
5891
+ )
5892
+ ], 10, _hoisted_8$9),
5867
5893
  withDirectives(createElementVNode("input", {
5868
5894
  ref_for: true,
5869
5895
  ref_key: "inputField",
@@ -5929,8 +5955,16 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5929
5955
  createElementVNode("span", {
5930
5956
  title: item.title,
5931
5957
  class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
5932
- onDblclick: ($event) => onDblclick(item.value, key + 4)
5933
- }, toDisplayString(getValue(styles[item.value])), 43, _hoisted_16$2),
5958
+ onClick: ($event) => onDblclick(item.value, key + 4)
5959
+ }, [
5960
+ createElementVNode(
5961
+ "span",
5962
+ null,
5963
+ toDisplayString(getValue(styles[item.value])),
5964
+ 1
5965
+ /* TEXT */
5966
+ )
5967
+ ], 10, _hoisted_16$2),
5934
5968
  withDirectives(createElementVNode("input", {
5935
5969
  ref_for: true,
5936
5970
  ref_key: "inputField",
@@ -5985,16 +6019,18 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
5985
6019
  },
5986
6020
  [
5987
6021
  createElementVNode("span", _hoisted_22, [
5988
- createElementVNode(
5989
- "span",
5990
- {
5991
- class: "content-unit left-0",
5992
- onDblclick: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
5993
- },
5994
- toDisplayString(getValue(styles["width"])),
5995
- 33
5996
- /* TEXT, HYDRATE_EVENTS */
5997
- ),
6022
+ createElementVNode("span", {
6023
+ class: "content-unit left-0",
6024
+ onClick: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
6025
+ }, [
6026
+ createElementVNode(
6027
+ "em",
6028
+ null,
6029
+ toDisplayString(getValue(styles["width"])),
6030
+ 1
6031
+ /* TEXT */
6032
+ )
6033
+ ]),
5998
6034
  withDirectives(createElementVNode(
5999
6035
  "input",
6000
6036
  {
@@ -6011,16 +6047,18 @@ var _sfc_main$Q = /* @__PURE__ */ defineComponent({
6011
6047
  [vModelText, styles.width]
6012
6048
  ]),
6013
6049
  _hoisted_23,
6014
- createElementVNode(
6015
- "span",
6016
- {
6017
- class: "content-unit right-0",
6018
- onDblclick: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
6019
- },
6020
- toDisplayString(getValue(styles["height"])),
6021
- 33
6022
- /* TEXT, HYDRATE_EVENTS */
6023
- ),
6050
+ createElementVNode("span", {
6051
+ class: "content-unit right-0",
6052
+ onClick: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
6053
+ }, [
6054
+ createElementVNode(
6055
+ "em",
6056
+ null,
6057
+ toDisplayString(getValue(styles["height"])),
6058
+ 1
6059
+ /* TEXT */
6060
+ )
6061
+ ]),
6024
6062
  withDirectives(createElementVNode(
6025
6063
  "input",
6026
6064
  {
@@ -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.46",
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;
@@ -5,8 +5,8 @@ export declare const styleBoxInputProps: {
5
5
  default: () => {};
6
6
  };
7
7
  height: {
8
- type: NumberConstructor;
9
- default: number;
8
+ type: (StringConstructor | NumberConstructor)[];
9
+ default: string;
10
10
  };
11
11
  help: {
12
12
  type: StringConstructor;
@@ -4,8 +4,8 @@ const styleBoxInputProps = {
4
4
  default: () => ({})
5
5
  },
6
6
  height: {
7
- type: Number,
8
- default: 180
7
+ type: [Number, String],
8
+ default: "auto"
9
9
  },
10
10
  help: {
11
11
  type: String,
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","sources":["../../../src/style-box-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleBoxInputProps = {\n modelValue: {\n type: Object,\n default: () => ({}),\n },\n height: {\n type: Number,\n default: 180,\n },\n help: {\n type: String,\n default:\n '可以双击对应位置来配置内外边距和宽度高度,也支持通过描点拖拽增加,支持单位(px、rem、%、auto)',\n },\n}\n\nexport type StyleBoxInputProps = ExtractPropTypes<typeof styleBoxInputProps>\n"],"names":[],"mappings":"AAEO,MAAM,kBAAqB,GAAA;AAAA,EAChC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OACE,EAAA,mQAAA;AAAA,GACJ;AACF;;;;"}
1
+ {"version":3,"file":"props.mjs","sources":["../../../src/style-box-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleBoxInputProps = {\n modelValue: {\n type: Object,\n default: () => ({}),\n },\n height: {\n type: [Number, String],\n default: 'auto',\n },\n help: {\n type: String,\n default: '可以双击对应位置来配置内外边距和宽度高度,也支持通过描点拖拽增加,支持单位(px、rem、%、auto)',\n },\n}\n\nexport type StyleBoxInputProps = ExtractPropTypes<typeof styleBoxInputProps>\n"],"names":[],"mappings":"AAEO,MAAM,kBAAqB,GAAA;AAAA,EAChC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,mQAAA;AAAA,GACX;AACF;;;;"}
@@ -4,8 +4,8 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 @@ declare const _default: import("vue").DefineComponent<{
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 _default;
@@ -1,7 +1,8 @@
1
- import { createElementVNode, defineComponent, reactive, ref, watch, nextTick, resolveComponent, openBlock, createElementBlock, normalizeStyle, createTextVNode, createVNode, withCtx, normalizeClass, createCommentVNode, Fragment, renderList, unref, toDisplayString, withDirectives, vModelText } from 'vue';
1
+ import { createElementVNode, defineComponent, reactive, ref, computed, watch, nextTick, resolveComponent, openBlock, createElementBlock, normalizeStyle, createTextVNode, createVNode, withCtx, normalizeClass, createCommentVNode, Fragment, renderList, unref, toDisplayString, withDirectives, vModelText } from 'vue';
2
2
  import { styleBoxInputProps } from './props.mjs';
3
3
  import { margins, paddings } from './html.mjs';
4
4
  import { upper } from '@vipl520/utils';
5
+ import { useElementSize } from '@vueuse/core';
5
6
 
6
7
  const _hoisted_1 = { class: "dk-style-box-input" };
7
8
  const _hoisted_2 = { class: "header" };
@@ -10,7 +11,7 @@ const _hoisted_4 = { class: "float-right cursor-pointer" };
10
11
  const _hoisted_5 = { class: "name-header-operations" };
11
12
  const _hoisted_6 = { class: "name-header-operations" };
12
13
  const _hoisted_7 = { class: "name-header-operations" };
13
- const _hoisted_8 = ["title", "onDblclick"];
14
+ const _hoisted_8 = ["title", "onClick"];
14
15
  const _hoisted_9 = ["onUpdate:modelValue", "onBlur"];
15
16
  const _hoisted_10 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
16
17
  const _hoisted_11 = /* @__PURE__ */ createElementVNode(
@@ -30,7 +31,7 @@ const _hoisted_14 = /* @__PURE__ */ createElementVNode(
30
31
  /* HOISTED */
31
32
  );
32
33
  const _hoisted_15 = { class: "thumnail border" };
33
- const _hoisted_16 = ["title", "onDblclick"];
34
+ const _hoisted_16 = ["title", "onClick"];
34
35
  const _hoisted_17 = ["onUpdate:modelValue", "onBlur"];
35
36
  const _hoisted_18 = ["width", "height", "viewBox", "data-link-anchor", "innerHTML"];
36
37
  const _hoisted_19 = { class: "anchor-wrapper" };
@@ -79,13 +80,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
79
80
  width: props.modelValue.width || "",
80
81
  height: props.modelValue.height || ""
81
82
  });
82
- const height = ref(props.height);
83
- watch(
84
- () => props.height,
85
- () => {
86
- console.log("height", props.height);
83
+ const box = ref(null);
84
+ const { width } = useElementSize(box);
85
+ const height = computed(() => {
86
+ console.log("props.height", props.height);
87
+ if (props.height === "auto") {
88
+ const h = width.value / 1.8;
89
+ return h > 300 ? 300 : h;
90
+ } else {
91
+ return props.height;
87
92
  }
88
- );
93
+ });
89
94
  watch(
90
95
  () => props.modelValue,
91
96
  (newVal, oldVal) => {
@@ -178,17 +183,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
178
183
  stopChangeBound.value = handleMouseUp.bind(event);
179
184
  document.addEventListener("mouseup", stopChangeBound.value);
180
185
  dragging.value = true;
181
- const height2 = props.height;
182
186
  const wrapperElement = document.querySelector(".wrapper");
183
- const width = wrapperElement ? wrapperElement.offsetWidth : 0;
187
+ const width2 = wrapperElement ? wrapperElement.offsetWidth : 0;
184
188
  const multiples = {
185
189
  margin: 0.9,
186
190
  padding: 0.9 * 0.7
187
191
  };
188
192
  const { clientX, clientY } = event;
189
- const setCursorAndDimensions = (cursor, left, top, width2, height3) => {
193
+ const setCursorAndDimensions = (cursor, left, top, width3, height2) => {
190
194
  document.body.style.cursor = cursor;
191
- Object.assign(positionStyle, { left, top, width: width2, height: height3, display: "block" });
195
+ Object.assign(positionStyle, { left, top, width: width3, height: height2, display: "block" });
192
196
  };
193
197
  startPosition.x = clientX;
194
198
  startPosition.y = clientY;
@@ -196,16 +200,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
196
200
  setCursorAndDimensions(
197
201
  "ew-resize",
198
202
  clientX + "px",
199
- clientY - height2 * 0.5 * multiples[type] + "px",
203
+ clientY - height.value * 0.5 * multiples[type] + "px",
200
204
  "0.1px",
201
- height2 * multiples[type] + "px"
205
+ height.value * multiples[type] + "px"
202
206
  );
203
207
  } else {
204
208
  setCursorAndDimensions(
205
209
  "ns-resize",
206
- clientX - width * 0.5 * multiples[type] + "px",
210
+ clientX - width2 * 0.5 * multiples[type] + "px",
207
211
  clientY + "px",
208
- width * multiples[type] + "px",
212
+ width2 * multiples[type] + "px",
209
213
  "0.1px"
210
214
  );
211
215
  }
@@ -384,9 +388,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
384
388
  createElementVNode(
385
389
  "div",
386
390
  {
391
+ ref_key: "box",
392
+ ref: box,
387
393
  tabindex: "0",
388
394
  class: "wrapper",
389
- style: normalizeStyle([{ "margin-top": "10px" }, { height: props.height + "px" }])
395
+ style: normalizeStyle([{ "margin-top": "10px" }, { height: height.value + "px" }])
390
396
  },
391
397
  [
392
398
  createElementVNode(
@@ -407,8 +413,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
407
413
  createElementVNode("span", {
408
414
  title: item.title,
409
415
  class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
410
- onDblclick: ($event) => onDblclick(item.value, key)
411
- }, toDisplayString(getValue(styles[item.value])), 43, _hoisted_8),
416
+ onClick: ($event) => onDblclick(item.value, key)
417
+ }, [
418
+ createElementVNode(
419
+ "span",
420
+ null,
421
+ toDisplayString(getValue(styles[item.value])),
422
+ 1
423
+ /* TEXT */
424
+ )
425
+ ], 10, _hoisted_8),
412
426
  withDirectives(createElementVNode("input", {
413
427
  ref_for: true,
414
428
  ref_key: "inputField",
@@ -474,8 +488,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
474
488
  createElementVNode("span", {
475
489
  title: item.title,
476
490
  class: normalizeClass(`anchor-tip-${item.position} value-indicator`),
477
- onDblclick: ($event) => onDblclick(item.value, key + 4)
478
- }, toDisplayString(getValue(styles[item.value])), 43, _hoisted_16),
491
+ onClick: ($event) => onDblclick(item.value, key + 4)
492
+ }, [
493
+ createElementVNode(
494
+ "span",
495
+ null,
496
+ toDisplayString(getValue(styles[item.value])),
497
+ 1
498
+ /* TEXT */
499
+ )
500
+ ], 10, _hoisted_16),
479
501
  withDirectives(createElementVNode("input", {
480
502
  ref_for: true,
481
503
  ref_key: "inputField",
@@ -530,16 +552,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
530
552
  },
531
553
  [
532
554
  createElementVNode("span", _hoisted_22, [
533
- createElementVNode(
534
- "span",
535
- {
536
- class: "content-unit left-0",
537
- onDblclick: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
538
- },
539
- toDisplayString(getValue(styles["width"])),
540
- 33
541
- /* TEXT, HYDRATE_EVENTS */
542
- ),
555
+ createElementVNode("span", {
556
+ class: "content-unit left-0",
557
+ onClick: _cache[3] || (_cache[3] = ($event) => onDblclick("width", 9))
558
+ }, [
559
+ createElementVNode(
560
+ "em",
561
+ null,
562
+ toDisplayString(getValue(styles["width"])),
563
+ 1
564
+ /* TEXT */
565
+ )
566
+ ]),
543
567
  withDirectives(createElementVNode(
544
568
  "input",
545
569
  {
@@ -556,16 +580,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
556
580
  [vModelText, styles.width]
557
581
  ]),
558
582
  _hoisted_23,
559
- createElementVNode(
560
- "span",
561
- {
562
- class: "content-unit right-0",
563
- onDblclick: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
564
- },
565
- toDisplayString(getValue(styles["height"])),
566
- 33
567
- /* TEXT, HYDRATE_EVENTS */
568
- ),
583
+ createElementVNode("span", {
584
+ class: "content-unit right-0",
585
+ onClick: _cache[6] || (_cache[6] = ($event) => onDblclick("height", 9))
586
+ }, [
587
+ createElementVNode(
588
+ "em",
589
+ null,
590
+ toDisplayString(getValue(styles["height"])),
591
+ 1
592
+ /* TEXT */
593
+ )
594
+ ]),
569
595
  withDirectives(createElementVNode(
570
596
  "input",
571
597
  {