@fangzhongya/fang-ui 0.1.39 → 0.1.41

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 (141) hide show
  1. package/dist/components/common/use.cjs +148 -101
  2. package/dist/components/common/use.d.ts +26 -6
  3. package/dist/components/common/use.js +149 -102
  4. package/dist/components/company-select/src/index2.cjs +1 -2
  5. package/dist/components/company-select/src/index2.js +1 -2
  6. package/dist/components/double/src/index2.cjs +2 -2
  7. package/dist/components/double/src/index2.js +2 -2
  8. package/dist/components/forms/index.css +18 -0
  9. package/dist/components/forms/src/index2.cjs +9 -6
  10. package/dist/components/forms/src/index2.js +9 -6
  11. package/dist/components/forms/src/setup.cjs +9 -12
  12. package/dist/components/forms/src/setup.js +9 -12
  13. package/dist/components/forms/src/util.cjs +6 -8
  14. package/dist/components/forms/src/util.js +6 -8
  15. package/dist/components/forms-div/src/data.cjs +8 -5
  16. package/dist/components/forms-div/src/data.d.ts +21 -3
  17. package/dist/components/forms-div/src/data.js +8 -5
  18. package/dist/components/forms-div/src/index2.cjs +41 -70
  19. package/dist/components/forms-div/src/index2.js +43 -72
  20. package/dist/components/forms-item/index.css +49 -0
  21. package/dist/components/forms-item/src/data.cjs +6 -0
  22. package/dist/components/forms-item/src/data.d.ts +19 -0
  23. package/dist/components/forms-item/src/data.js +6 -0
  24. package/dist/components/forms-item/src/index2.cjs +11 -7
  25. package/dist/components/forms-item/src/index2.js +11 -7
  26. package/dist/components/forms-item/src/indexts.d.ts +40 -1
  27. package/dist/components/forms-item/src/label.cjs +7 -1
  28. package/dist/components/forms-item/src/label.d.ts +40 -1
  29. package/dist/components/forms-item/src/label.js +7 -1
  30. package/dist/components/forms-items/index.css +18 -0
  31. package/dist/components/forms-items/index.scss +21 -0
  32. package/dist/components/forms-items/src/data.cjs +9 -0
  33. package/dist/components/forms-items/src/data.d.ts +22 -0
  34. package/dist/components/forms-items/src/data.js +9 -0
  35. package/dist/components/forms-items/src/index2.cjs +22 -10
  36. package/dist/components/forms-items/src/index2.js +22 -10
  37. package/dist/components/forms-items/style/index2.scss +1 -0
  38. package/dist/components/icon/src/index2.cjs +1 -2
  39. package/dist/components/icon/src/index2.js +1 -2
  40. package/dist/components/input-history/src/index2.cjs +1 -1
  41. package/dist/components/input-history/src/index2.js +1 -1
  42. package/dist/components/input-select/src/index2.cjs +0 -2
  43. package/dist/components/input-select/src/index2.js +0 -2
  44. package/dist/components/inputs/src/index2.cjs +1 -1
  45. package/dist/components/inputs/src/index2.js +1 -1
  46. package/dist/components/list/src/index2.cjs +4 -8
  47. package/dist/components/list/src/index2.js +4 -8
  48. package/dist/components/list/src/util.cjs +7 -5
  49. package/dist/components/list/src/util.d.ts +29 -1
  50. package/dist/components/list/src/util.js +7 -5
  51. package/dist/components/lists/src/index2.cjs +1 -2
  52. package/dist/components/lists/src/index2.js +1 -2
  53. package/dist/components/menus/src/util.cjs +8 -24
  54. package/dist/components/menus/src/util.js +9 -25
  55. package/dist/components/page/index.css +18 -0
  56. package/dist/components/right-key/src/index2.cjs +3 -3
  57. package/dist/components/right-key/src/index2.js +3 -3
  58. package/dist/components/seamless-scroll/src/index2.cjs +1 -1
  59. package/dist/components/seamless-scroll/src/index2.js +1 -1
  60. package/dist/components/selects/src/index2.cjs +2 -2
  61. package/dist/components/selects/src/index2.js +2 -2
  62. package/dist/components/stick-edge/src/index2.cjs +2 -2
  63. package/dist/components/stick-edge/src/index2.js +2 -2
  64. package/dist/components/switchs/src/index2.cjs +1 -1
  65. package/dist/components/switchs/src/index2.js +1 -1
  66. package/dist/components/tables/common/com-color2.cjs +0 -3
  67. package/dist/components/tables/common/com-color2.js +0 -3
  68. package/dist/components/tables/common/com-lis2.cjs +0 -1
  69. package/dist/components/tables/common/com-lis2.js +0 -1
  70. package/dist/components/tables/common/pagin.d.ts +6 -0
  71. package/dist/components/tables/common/tooltip.cjs +1 -1
  72. package/dist/components/tables/common/tooltip.js +1 -1
  73. package/dist/components/tables/common/util.cjs +2 -4
  74. package/dist/components/tables/common/util.js +2 -4
  75. package/dist/components/tables/src/column.cjs +11 -3
  76. package/dist/components/tables/src/column.d.ts +29 -0
  77. package/dist/components/tables/src/column.js +11 -3
  78. package/dist/components/tables/src/columns.d.ts +7 -0
  79. package/dist/components/tables/src/columns3.cjs +1 -7
  80. package/dist/components/tables/src/columns3.js +1 -7
  81. package/dist/components/tables/src/index2.cjs +2 -2
  82. package/dist/components/tables/src/index2.js +2 -2
  83. package/dist/components/tablesv/src/column.cjs +11 -3
  84. package/dist/components/tablesv/src/column.d.ts +25 -0
  85. package/dist/components/tablesv/src/column.js +11 -3
  86. package/dist/components/tablesv/src/columns.d.ts +7 -0
  87. package/dist/components/tablesv/src/columns3.cjs +1 -7
  88. package/dist/components/tablesv/src/columns3.js +1 -7
  89. package/dist/components/tablesv/src/index2.cjs +2 -2
  90. package/dist/components/tablesv/src/index2.js +2 -2
  91. package/dist/components/uploads/src/util.cjs +2 -3
  92. package/dist/components/uploads/src/util.d.ts +7 -0
  93. package/dist/components/uploads/src/util.js +2 -3
  94. package/dist/css/forms-item.css +49 -0
  95. package/dist/css/forms-items.css +18 -0
  96. package/dist/css/forms.css +18 -0
  97. package/dist/css/index.css +18 -0
  98. package/dist/css/page.css +18 -0
  99. package/dist/directives/adjust/index.cjs +4 -8
  100. package/dist/directives/adjust/index.js +4 -8
  101. package/dist/directives/drag/index.cjs +6 -1
  102. package/dist/directives/drag/index.js +6 -1
  103. package/dist/directives/expose/index.cjs +6 -0
  104. package/dist/directives/expose/index.js +6 -0
  105. package/dist/directives/inserted/index.cjs +5 -0
  106. package/dist/directives/inserted/index.js +5 -0
  107. package/dist/directives/locus/index.cjs +5 -0
  108. package/dist/directives/locus/index.js +5 -0
  109. package/dist/directives/scroll/index.cjs +10 -0
  110. package/dist/directives/scroll/index.d.ts +0 -5
  111. package/dist/directives/scroll/index.js +10 -0
  112. package/dist/directives/sortable/index.cjs +5 -0
  113. package/dist/directives/sortable/index.js +5 -0
  114. package/dist/directives/stick/index.cjs +13 -8
  115. package/dist/directives/stick/index.js +13 -8
  116. package/dist/hooks/attrs-default/index.d.ts +5 -3
  117. package/dist/hooks/compons/index.d.ts +13 -0
  118. package/dist/hooks/cssname/index.cjs +1 -1
  119. package/dist/hooks/cssname/index.d.ts +22 -1
  120. package/dist/hooks/cssname/index.js +1 -1
  121. package/dist/hooks/default-config/index.d.ts +10 -0
  122. package/dist/hooks/expose/index.cjs +2 -0
  123. package/dist/hooks/expose/index.d.ts +6 -0
  124. package/dist/hooks/expose/index.js +2 -0
  125. package/dist/hooks/full-screen/index.d.ts +6 -0
  126. package/dist/hooks/global-config/index.d.ts +16 -0
  127. package/dist/hooks/inherit/index.cjs +2 -0
  128. package/dist/hooks/inherit/index.d.ts +8 -0
  129. package/dist/hooks/inherit/index.js +2 -0
  130. package/dist/hooks/locale/index.d.ts +24 -0
  131. package/dist/hooks/props-default/index.d.ts +14 -5
  132. package/dist/icons/iconify.d.ts +7 -0
  133. package/dist/icons/iconifyCss.d.ts +6 -0
  134. package/dist/icons/index.json +1 -1
  135. package/dist/index.css +18 -0
  136. package/dist/type.d.ts +8 -0
  137. package/dist/utils/local.cjs +12 -6
  138. package/dist/utils/local.js +12 -6
  139. package/dist/utils/util.cjs +7 -5
  140. package/dist/utils/util.js +7 -5
  141. package/package.json +3 -3
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  const width = ref(200);
31
31
  const refInput = ref();
32
32
  const options = useStorage(
33
- props.storage || (/* @__PURE__ */ new Date()).getTime() + "",
33
+ props.storage || Date.now() + "",
34
34
  []
35
35
  );
36
36
  const value = ref("");
@@ -75,8 +75,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
75
75
  const v = use.useVueValue(item, props.prop);
76
76
  if (v === value.value) {
77
77
  return "selected";
78
- } else {
79
- return;
80
78
  }
81
79
  }
82
80
  function onInput(v, ...arr) {
@@ -73,8 +73,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
73
  const v = useVueValue(item, props.prop);
74
74
  if (v === value.value) {
75
75
  return "selected";
76
- } else {
77
- return;
78
76
  }
79
77
  }
80
78
  function onInput(v, ...arr) {
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
25
  const elRef = vue.ref();
26
26
  const once = setOnce();
27
27
  const placeholder = vue.computed(() => {
28
- if (typeof props.placeholder == "undefined") {
28
+ if (props.placeholder === void 0) {
29
29
  return getLocale("form.import");
30
30
  } else if (props.oncePlaceholder) {
31
31
  return once(props.placeholder);
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  const elRef = ref();
24
24
  const once = setOnce();
25
25
  const placeholder = computed(() => {
26
- if (typeof props.placeholder == "undefined") {
26
+ if (props.placeholder === void 0) {
27
27
  return getLocale("form.import");
28
28
  } else if (props.oncePlaceholder) {
29
29
  return once(props.placeholder);
@@ -157,8 +157,7 @@ const _sfc_main = vue.defineComponent({
157
157
  };
158
158
  const createDoubleRows = (arr, trls, trvs) => {
159
159
  if (trls.length > 0) {
160
- arr.push(vue.h("tr", {}, trls));
161
- arr.push(vue.h("tr", {}, trvs));
160
+ arr.push(vue.h("tr", {}, trls), vue.h("tr", {}, trvs));
162
161
  }
163
162
  };
164
163
  const getlabel = (obj, index2) => {
@@ -395,10 +394,7 @@ const _sfc_main = vue.defineComponent({
395
394
  class: [
396
395
  cs.z("table"),
397
396
  props.labelPosition ?? "",
398
- cs.is(
399
- "border",
400
- props.border ? true : false
401
- ),
397
+ cs.is("border", Boolean(props.border)),
402
398
  cs.is("aliquots", props.aliquots)
403
399
  ].join(" "),
404
400
  cellspacing: "0",
@@ -414,8 +410,8 @@ const _sfc_main = vue.defineComponent({
414
410
  }
415
411
  };
416
412
  vue.onMounted(() => {
417
- if (window) {
418
- window.addEventListener("click", onClickTotal);
413
+ if (globalThis) {
414
+ globalThis.addEventListener("click", onClickTotal);
419
415
  }
420
416
  });
421
417
  return {
@@ -155,8 +155,7 @@ const _sfc_main = defineComponent({
155
155
  };
156
156
  const createDoubleRows = (arr, trls, trvs) => {
157
157
  if (trls.length > 0) {
158
- arr.push(h("tr", {}, trls));
159
- arr.push(h("tr", {}, trvs));
158
+ arr.push(h("tr", {}, trls), h("tr", {}, trvs));
160
159
  }
161
160
  };
162
161
  const getlabel = (obj, index) => {
@@ -393,10 +392,7 @@ const _sfc_main = defineComponent({
393
392
  class: [
394
393
  cs.z("table"),
395
394
  props.labelPosition ?? "",
396
- cs.is(
397
- "border",
398
- props.border ? true : false
399
- ),
395
+ cs.is("border", Boolean(props.border)),
400
396
  cs.is("aliquots", props.aliquots)
401
397
  ].join(" "),
402
398
  cellspacing: "0",
@@ -412,8 +408,8 @@ const _sfc_main = defineComponent({
412
408
  }
413
409
  };
414
410
  onMounted(() => {
415
- if (window) {
416
- window.addEventListener("click", onClickTotal);
411
+ if (globalThis) {
412
+ globalThis.addEventListener("click", onClickTotal);
417
413
  }
418
414
  });
419
415
  return {
@@ -11,11 +11,11 @@ const setClass = (item, data, index) => {
11
11
  return v;
12
12
  };
13
13
  function setSslot(obj, data, props, compons, emit, slots, isComponSelected, index) {
14
- const slot = use.useSetSlot(obj, data, slots, index);
14
+ const optionss = props.options || {};
15
+ const slot = use.useSetSlot(obj, data, slots, optionss, emit, index);
15
16
  if (slot) {
16
17
  return slot;
17
18
  }
18
- const optionss = props.options || {};
19
19
  if (obj.compon) {
20
20
  if (isComponSelected(obj)) {
21
21
  const column = use.useSetCompon(
@@ -26,7 +26,7 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
26
26
  emit,
27
27
  index,
28
28
  {
29
- options: props.options,
29
+ options: optionss,
30
30
  config: props
31
31
  }
32
32
  );
@@ -39,7 +39,10 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
39
39
  return setDomValue(domValue, props);
40
40
  }
41
41
  function setDomValue(domValue, table) {
42
- return (util.setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? "";
42
+ return (
43
+ // 如果设置了空值显示处理,则使用处理结果,否则使用原始值;如果都为空则返回空字符串
44
+ (util.setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? ""
45
+ );
43
46
  }
44
47
  function setLabel(obj, props, compons, emit, slots, index) {
45
48
  let label = obj.label ?? "";
@@ -66,6 +69,5 @@ function setLabel(obj, props, compons, emit, slots, index) {
66
69
  return label;
67
70
  }
68
71
  exports.setClass = setClass;
69
- exports.setDomValue = setDomValue;
70
72
  exports.setLabel = setLabel;
71
73
  exports.setSslot = setSslot;
@@ -2,8 +2,36 @@ import { Component } from 'vue';
2
2
  type Compons = {
3
3
  [key: string]: Component;
4
4
  };
5
+ /**
6
+ * 设置类名或CSS样式
7
+ * @param item - 列表对象,包含状态、属性和CSS设置方法等信息
8
+ * @param data - 字符串对象,用于查找对应状态或属性的值
9
+ * @param index - 当前项在列表中的索引位置
10
+ * @returns 返回设置的CSS类名或通过自定义方法处理后的结果
11
+ */
5
12
  export declare const setClass: (item: ListObj, data: ObjStr, index: number) => any;
13
+ /**
14
+ * 设置插槽或组件的值
15
+ * @param obj - 列表对象,包含组件信息
16
+ * @param data - 数据对象,用于设置值的数据源
17
+ * @param props - 属性配置对象
18
+ * @param compons - 组件集合
19
+ * @param emit - 事件发射函数
20
+ * @param slots - 插槽配置对象
21
+ * @param isComponSelected - 判断组件是否被选中的函数
22
+ * @param index - 可选的索引值
23
+ * @returns 返回设置后的插槽、组件或DOM值
24
+ */
6
25
  export declare function setSslot(obj: ListObj, data: ObjAny, props: ObjAny, compons: Compons, emit: Function, slots: ObjAny, isComponSelected: Function, index?: number): any;
7
- export declare function setDomValue(domValue: any, table: ObjAny): any;
26
+ /**
27
+ * 设置标签文本内容,支持插槽和国际化处理
28
+ * @param obj - 对象配置,包含label属性等
29
+ * @param props - 组件属性对象
30
+ * @param compons - 组件集合
31
+ * @param emit - 事件发射函数
32
+ * @param slots - 插槽对象
33
+ * @param index - 索引值,可选参数
34
+ * @returns 处理后的标签内容,可能包含冒号后缀
35
+ */
8
36
  export declare function setLabel(obj: ObjAny, props: ObjAny, compons: Compons, emit: Function, slots: ObjAny, index?: number): any;
9
37
  export {};
@@ -9,11 +9,11 @@ const setClass = (item, data, index) => {
9
9
  return v;
10
10
  };
11
11
  function setSslot(obj, data, props, compons, emit, slots, isComponSelected, index) {
12
- const slot = useSetSlot(obj, data, slots, index);
12
+ const optionss = props.options || {};
13
+ const slot = useSetSlot(obj, data, slots, optionss, emit, index);
13
14
  if (slot) {
14
15
  return slot;
15
16
  }
16
- const optionss = props.options || {};
17
17
  if (obj.compon) {
18
18
  if (isComponSelected(obj)) {
19
19
  const column = useSetCompon(
@@ -24,7 +24,7 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
24
24
  emit,
25
25
  index,
26
26
  {
27
- options: props.options,
27
+ options: optionss,
28
28
  config: props
29
29
  }
30
30
  );
@@ -37,7 +37,10 @@ function setSslot(obj, data, props, compons, emit, slots, isComponSelected, inde
37
37
  return setDomValue(domValue, props);
38
38
  }
39
39
  function setDomValue(domValue, table) {
40
- return (setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? "";
40
+ return (
41
+ // 如果设置了空值显示处理,则使用处理结果,否则使用原始值;如果都为空则返回空字符串
42
+ (setEmptyDisplay(domValue, table.emptyDisplay, table.isEmptyStr) || domValue) ?? ""
43
+ );
41
44
  }
42
45
  function setLabel(obj, props, compons, emit, slots, index) {
43
46
  let label = obj.label ?? "";
@@ -65,7 +68,6 @@ function setLabel(obj, props, compons, emit, slots, index) {
65
68
  }
66
69
  export {
67
70
  setClass,
68
- setDomValue,
69
71
  setLabel,
70
72
  setSslot
71
73
  };
@@ -61,8 +61,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
61
61
  );
62
62
  const setListValue = (list, index2) => {
63
63
  const arr = [];
64
- for (let i = 0; i < list.length; i++) {
65
- const obj = list[i];
64
+ for (const obj of list) {
66
65
  if (obj.type == "index") {
67
66
  let value = "";
68
67
  const paginat = attrs.assem.paginat;
@@ -59,8 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  );
60
60
  const setListValue = (list, index) => {
61
61
  const arr = [];
62
- for (let i = 0; i < list.length; i++) {
63
- const obj = list[i];
62
+ for (const obj of list) {
64
63
  if (obj.type == "index") {
65
64
  let value = "";
66
65
  const paginat = attrs.assem.paginat;
@@ -2,32 +2,16 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("vue");
4
4
  const use = require("../../common/use.cjs");
5
- const isObject = require("@fangzhongya/utils/basic/object/isObject");
6
5
  function setLabel(value, obj, props, compons, emit, slots, index) {
7
6
  let label = value ?? obj.label ?? "";
8
- if (label) {
9
- if (isObject.isObject(label)) {
10
- label = { ...obj, ...label };
11
- const slot = use.useSetSlot(label, props.value, slots, index);
12
- if (slot) {
13
- return slot;
14
- }
15
- if (label.compon) {
16
- const column = use.useSetCompon(
17
- label,
18
- props.value,
19
- {},
20
- compons,
21
- emit,
22
- index
23
- );
24
- if (column) {
25
- return column;
26
- }
27
- }
28
- return use.useGetDomValue(label, props.value, {}, index);
7
+ obj.label = label;
8
+ return use.useVNodeComponDom(obj, props.value, slots, emit, {
9
+ // options: {},
10
+ compons,
11
+ index,
12
+ scope: {
13
+ config: props
29
14
  }
30
- }
31
- return label;
15
+ });
32
16
  }
33
17
  exports.setLabel = setLabel;
@@ -1,32 +1,16 @@
1
1
  import "vue";
2
- import { useSetSlot, useSetCompon, useGetDomValue } from "../../common/use.js";
3
- import { isObject } from "@fangzhongya/utils/basic/object/isObject";
2
+ import { useVNodeComponDom } from "../../common/use.js";
4
3
  function setLabel(value, obj, props, compons, emit, slots, index) {
5
4
  let label = value ?? obj.label ?? "";
6
- if (label) {
7
- if (isObject(label)) {
8
- label = { ...obj, ...label };
9
- const slot = useSetSlot(label, props.value, slots, index);
10
- if (slot) {
11
- return slot;
12
- }
13
- if (label.compon) {
14
- const column = useSetCompon(
15
- label,
16
- props.value,
17
- {},
18
- compons,
19
- emit,
20
- index
21
- );
22
- if (column) {
23
- return column;
24
- }
25
- }
26
- return useGetDomValue(label, props.value, {}, index);
5
+ obj.label = label;
6
+ return useVNodeComponDom(obj, props.value, slots, emit, {
7
+ // options: {},
8
+ compons,
9
+ index,
10
+ scope: {
11
+ config: props
27
12
  }
28
- }
29
- return label;
13
+ });
30
14
  }
31
15
  export {
32
16
  setLabel
@@ -49,6 +49,24 @@
49
49
  display: grid;
50
50
  }
51
51
 
52
+ .forms-items {
53
+ width: 100%;
54
+ }
55
+ .forms-items.row {
56
+ display: flex;
57
+ flex-direction: row;
58
+ }
59
+ .forms-items.column {
60
+ display: flex;
61
+ flex-direction: column;
62
+ }
63
+ .forms-items-li.no-error {
64
+ --el-color-danger: var(--el-border-color);
65
+ }
66
+ .forms-items-li.no-error .el-input__wrapper.is-focus {
67
+ --el-color-danger: var(--el-input-focus-border);
68
+ }
69
+
52
70
  .double {
53
71
  width: 100%;
54
72
  display: inline-flex;
@@ -27,10 +27,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
27
  const lefty = vue.ref("");
28
28
  const dom = vue.ref();
29
29
  vue.onMounted(() => {
30
- window.addEventListener("mousedown", watchContextmenu);
30
+ globalThis.addEventListener("mousedown", watchContextmenu);
31
31
  });
32
32
  vue.onUnmounted(() => {
33
- window.removeEventListener("mousedown", watchContextmenu);
33
+ globalThis.removeEventListener("mousedown", watchContextmenu);
34
34
  });
35
35
  function watchContextmenu(event) {
36
36
  if (refRightKeyBox.value.contains(event.target)) {
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
69
69
  x = event.pageX - 1;
70
70
  y = event.pageY - 1;
71
71
  }
72
- let ww = window ? window.innerWidth : 0;
72
+ let ww = globalThis ? globalThis.innerWidth : 0;
73
73
  let kw = 0;
74
74
  if (ww != 0 && x + 120 > ww) {
75
75
  kw = 0 - (x + 120 - ww);
@@ -25,10 +25,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  const lefty = ref("");
26
26
  const dom = ref();
27
27
  onMounted(() => {
28
- window.addEventListener("mousedown", watchContextmenu);
28
+ globalThis.addEventListener("mousedown", watchContextmenu);
29
29
  });
30
30
  onUnmounted(() => {
31
- window.removeEventListener("mousedown", watchContextmenu);
31
+ globalThis.removeEventListener("mousedown", watchContextmenu);
32
32
  });
33
33
  function watchContextmenu(event) {
34
34
  if (refRightKeyBox.value.contains(event.target)) {
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  x = event.pageX - 1;
68
68
  y = event.pageY - 1;
69
69
  }
70
- let ww = window ? window.innerWidth : 0;
70
+ let ww = globalThis ? globalThis.innerWidth : 0;
71
71
  let kw = 0;
72
72
  if (ww != 0 && x + 120 > ww) {
73
73
  kw = 0 - (x + 120 - ww);
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
31
31
  }, 1e3 / fps);
32
32
  resolve(v);
33
33
  });
34
- const getTime = () => (/* @__PURE__ */ new Date()).getTime();
34
+ const getTime = () => Date.now();
35
35
  const val = vue.ref();
36
36
  const currentFps = vue.ref(60);
37
37
  let animation = true;
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  }, 1e3 / fps);
30
30
  resolve(v);
31
31
  });
32
- const getTime = () => (/* @__PURE__ */ new Date()).getTime();
32
+ const getTime = () => Date.now();
33
33
  const val = ref();
34
34
  const currentFps = ref(60);
35
35
  let animation = true;
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
25
  const prs = __props;
26
26
  const props = index$3.usePropsDefault(data.name, prs, data.dataProps);
27
27
  const placeholder = vue.computed(() => {
28
- if (typeof props.placeholder == "undefined") {
28
+ if (props.placeholder === void 0) {
29
29
  return getLocale("form.select");
30
30
  } else {
31
31
  return props.placeholder;
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
42
  emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
43
43
  };
44
44
  if (props.isEmpty) {
45
- const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
45
+ const emptyValue = "__Symbol('empty')__" + Date.now();
46
46
  onClickMultiple = (v, is) => {
47
47
  if (v === emptyValue) {
48
48
  v = "";
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  const prs = __props;
24
24
  const props = usePropsDefault(name, prs, dataProps);
25
25
  const placeholder = computed(() => {
26
- if (typeof props.placeholder == "undefined") {
26
+ if (props.placeholder === void 0) {
27
27
  return getLocale("form.select");
28
28
  } else {
29
29
  return props.placeholder;
@@ -40,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
41
41
  };
42
42
  if (props.isEmpty) {
43
- const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
43
+ const emptyValue = "__Symbol('empty')__" + Date.now();
44
44
  onClickMultiple = (v, is) => {
45
45
  if (v === emptyValue) {
46
46
  v = "";
@@ -74,8 +74,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
74
74
  vue.onMounted(() => {
75
75
  if (props.isFixed) {
76
76
  fRect.value = {
77
- width: window.innerWidth,
78
- height: window.innerHeight,
77
+ width: globalThis.innerWidth,
78
+ height: globalThis.innerHeight,
79
79
  left: 0,
80
80
  top: 0
81
81
  };
@@ -72,8 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
72
  onMounted(() => {
73
73
  if (props.isFixed) {
74
74
  fRect.value = {
75
- width: window.innerWidth,
76
- height: window.innerHeight,
75
+ width: globalThis.innerWidth,
76
+ height: globalThis.innerHeight,
77
77
  left: 0,
78
78
  top: 0
79
79
  };
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
30
  const elRef = vue.ref();
31
31
  const active = vue.ref({});
32
32
  const inactive = vue.ref({});
33
- const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
33
+ const emptyValue = "__Symbol('empty')__" + Date.now();
34
34
  vue.watch(
35
35
  () => props.options,
36
36
  () => {
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  const elRef = ref();
29
29
  const active = ref({});
30
30
  const inactive = ref({});
31
- const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
31
+ const emptyValue = "__Symbol('empty')__" + Date.now();
32
32
  watch(
33
33
  () => props.options,
34
34
  () => {
@@ -70,7 +70,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
70
70
  return props.class;
71
71
  }
72
72
  }
73
- return;
74
73
  });
75
74
  const color = vue.computed(() => {
76
75
  if (props.isBackg) {
@@ -80,13 +79,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
80
79
  } else {
81
80
  return getValue();
82
81
  }
83
- return;
84
82
  });
85
83
  const backgroundColor = vue.computed(() => {
86
84
  if (props.isBackg) {
87
85
  return getValue();
88
86
  }
89
- return;
90
87
  });
91
88
  function getValue() {
92
89
  if (props.formatter) {
@@ -68,7 +68,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
68
  return props.class;
69
69
  }
70
70
  }
71
- return;
72
71
  });
73
72
  const color = computed(() => {
74
73
  if (props.isBackg) {
@@ -78,13 +77,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
77
  } else {
79
78
  return getValue();
80
79
  }
81
- return;
82
80
  });
83
81
  const backgroundColor = computed(() => {
84
82
  if (props.isBackg) {
85
83
  return getValue();
86
84
  }
87
- return;
88
85
  });
89
86
  function getValue() {
90
87
  if (props.formatter) {
@@ -64,7 +64,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
64
64
  return props.class;
65
65
  }
66
66
  }
67
- return;
68
67
  });
69
68
  function setValue(item, index2) {
70
69
  const value = use.useGetDomValue(
@@ -62,7 +62,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
62
  return props.class;
63
63
  }
64
64
  }
65
- return;
66
65
  });
67
66
  function setValue(item, index) {
68
67
  const value = useGetDomValue(
@@ -231,6 +231,9 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
231
231
  isdiv?: boolean | undefined;
232
232
  orig?: boolean | undefined;
233
233
  compon?: string | object | undefined;
234
+ slots?: string | VNode | {
235
+ [key: string]: () => string | VNode | undefined;
236
+ };
234
237
  default?: any;
235
238
  value?: any;
236
239
  label?: string | Function | /*elided*/ any | undefined;
@@ -269,6 +272,9 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
269
272
  isdiv?: boolean | undefined;
270
273
  orig?: boolean | undefined;
271
274
  compon?: string | object | undefined;
275
+ slots?: string | VNode | {
276
+ [key: string]: () => string | VNode | undefined;
277
+ };
272
278
  default?: any;
273
279
  value?: any;
274
280
  label?: string | Function | /*elided*/ any | undefined;
@@ -16,7 +16,7 @@ function isGreaterThan(a, b, epsilon = 0.03) {
16
16
  return a - b > epsilon;
17
17
  }
18
18
  const getPadding = (el) => {
19
- const style = window.getComputedStyle(el, null);
19
+ const style = globalThis.getComputedStyle(el, null);
20
20
  const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
21
21
  const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
22
22
  const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
@@ -14,7 +14,7 @@ function isGreaterThan(a, b, epsilon = 0.03) {
14
14
  return a - b > epsilon;
15
15
  }
16
16
  const getPadding = (el) => {
17
- const style = window.getComputedStyle(el, null);
17
+ const style = globalThis.getComputedStyle(el, null);
18
18
  const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
19
19
  const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
20
20
  const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
@@ -157,10 +157,8 @@ function setEmptyDisplay(value, emptyDisplay, isStr) {
157
157
  if (value === "" || value === void 0 || value === null) {
158
158
  return emptyDisplay;
159
159
  }
160
- } else {
161
- if (value === void 0 || value === null) {
162
- return emptyDisplay;
163
- }
160
+ } else if (value === void 0 || value === null) {
161
+ return emptyDisplay;
164
162
  }
165
163
  }
166
164
  exports.eventAliass = eventAliass;
@@ -155,10 +155,8 @@ function setEmptyDisplay(value, emptyDisplay, isStr) {
155
155
  if (value === "" || value === void 0 || value === null) {
156
156
  return emptyDisplay;
157
157
  }
158
- } else {
159
- if (value === void 0 || value === null) {
160
- return emptyDisplay;
161
- }
158
+ } else if (value === void 0 || value === null) {
159
+ return emptyDisplay;
162
160
  }
163
161
  }
164
162
  export {