@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
@@ -40,14 +40,22 @@ function handlePropertyMapping(value, ckey, obj, robj) {
40
40
  handler();
41
41
  }
42
42
  function setSslot(obj, scope, emit, slots, props, index$12) {
43
- const slot = use.useSetSlot(obj, scope.row, slots, index$12, scope);
43
+ const optionss = props.options || {};
44
+ const slot = use.useSetSlot(
45
+ obj,
46
+ scope.row,
47
+ slots,
48
+ optionss,
49
+ emit,
50
+ index$12,
51
+ scope
52
+ );
44
53
  if (slot) {
45
54
  return slot;
46
55
  }
47
56
  if (obj.compon) {
48
57
  const isComponSelected = props.isComponSelected;
49
58
  if (isComponSelected(obj, scope)) {
50
- const optionss = props.options || {};
51
59
  const column = use.useSetCompon(
52
60
  obj,
53
61
  scope.row,
@@ -55,7 +63,7 @@ function setSslot(obj, scope, emit, slots, props, index$12) {
55
63
  index.useComponsGet(config.provides.compons),
56
64
  emit,
57
65
  index$12,
58
- { ...scope, options: props.options, config: props.table }
66
+ { ...scope, options: optionss, config: props.table }
59
67
  );
60
68
  if (column) {
61
69
  return column;
@@ -1,8 +1,37 @@
1
1
  import { VNode, RendererNode, RendererElement } from 'vue';
2
+ /**
3
+ * 设置表头函数
4
+ * @param obj - 列表对象
5
+ * @param scope - 作用域对象
6
+ * @param slots - 插槽对象
7
+ * @param emit - 事件发射函数
8
+ * @param props - 属性对象
9
+ * @param index - 索引值
10
+ * @returns 返回处理后的DOM标签
11
+ */
2
12
  export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): any;
13
+ /**
14
+ * 获取表格列组件
15
+ * @param obj - 列配置对象,包含列的基本信息和配置
16
+ * @param emit - 事件发射函数,用于触发自定义事件
17
+ * @param props - 组件属性对象
18
+ * @param slots - 插槽对象,包含自定义插槽内容
19
+ * @param index - 列索引位置
20
+ * @param def - 默认渲染函数,可选参数
21
+ * @returns 返回Element Plus的TableColumn组件实例
22
+ */
3
23
  export declare function getTableColumn(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number, def?: Function): VNode<RendererNode, RendererElement, {
4
24
  [key: string]: any;
5
25
  }>;
26
+ /**
27
+ * 渲染列组件的函数
28
+ * @param obj - 列表对象,包含列的配置信息
29
+ * @param emit - 事件发射函数,用于触发自定义事件
30
+ * @param props - 组件属性对象,包含传入的props数据
31
+ * @param slots - 插槽对象,包含可用的插槽内容
32
+ * @param index - 当前项的索引位置
33
+ * @returns 返回渲染后的DOM元素
34
+ */
6
35
  export declare function columnRender(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number): VNode<RendererNode, RendererElement, {
7
36
  [key: string]: any;
8
37
  }>;
@@ -38,14 +38,22 @@ function handlePropertyMapping(value, ckey, obj, robj) {
38
38
  handler();
39
39
  }
40
40
  function setSslot(obj, scope, emit, slots, props, index) {
41
- const slot = useSetSlot(obj, scope.row, slots, index, scope);
41
+ const optionss = props.options || {};
42
+ const slot = useSetSlot(
43
+ obj,
44
+ scope.row,
45
+ slots,
46
+ optionss,
47
+ emit,
48
+ index,
49
+ scope
50
+ );
42
51
  if (slot) {
43
52
  return slot;
44
53
  }
45
54
  if (obj.compon) {
46
55
  const isComponSelected = props.isComponSelected;
47
56
  if (isComponSelected(obj, scope)) {
48
- const optionss = props.options || {};
49
57
  const column = useSetCompon(
50
58
  obj,
51
59
  scope.row,
@@ -53,7 +61,7 @@ function setSslot(obj, scope, emit, slots, props, index) {
53
61
  useComponsGet(provides.compons),
54
62
  emit,
55
63
  index,
56
- { ...scope, options: props.options, config: props.table }
64
+ { ...scope, options: optionss, config: props.table }
57
65
  );
58
66
  if (column) {
59
67
  return column;
@@ -1 +1,8 @@
1
+ /**
2
+ * 渲染函数,用于处理列表渲染逻辑
3
+ * @param porps 包含组件属性的对象,其中应包含list属性表示要渲染的列表数据
4
+ * @param emit 事件发射函数,用于触发自定义事件
5
+ * @param slots 插槽对象,包含组件的插槽配置
6
+ * @returns 返回处理后的列表渲染结果
7
+ */
1
8
  export declare function render(porps: ObjAny, emit: Function, slots: ObjAny): ObjAny[];
@@ -12,13 +12,7 @@ function getLists(arrs, emit, props, slots, listobj) {
12
12
  if (obj.children && obj.children.length > 0) {
13
13
  if (obj.isdiv) {
14
14
  arr.push(
15
- ...getLists(
16
- obj.children,
17
- emit,
18
- props,
19
- slots,
20
- obj
21
- )
15
+ ...getLists(obj.children, emit, props, slots, obj)
22
16
  );
23
17
  } else {
24
18
  arr.push(
@@ -10,13 +10,7 @@ function getLists(arrs, emit, props, slots, listobj) {
10
10
  if (obj.children && obj.children.length > 0) {
11
11
  if (obj.isdiv) {
12
12
  arr.push(
13
- ...getLists(
14
- obj.children,
15
- emit,
16
- props,
17
- slots,
18
- obj
19
- )
13
+ ...getLists(obj.children, emit, props, slots, obj)
20
14
  );
21
15
  } else {
22
16
  arr.push(
@@ -135,8 +135,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
135
135
  return tableRef.value;
136
136
  };
137
137
  vue.onMounted(() => {
138
- if (window) {
139
- window.addEventListener("click", () => {
138
+ if (globalThis) {
139
+ globalThis.addEventListener("click", () => {
140
140
  isfocus.value = false;
141
141
  });
142
142
  }
@@ -133,8 +133,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
133
133
  return tableRef.value;
134
134
  };
135
135
  onMounted(() => {
136
- if (window) {
137
- window.addEventListener("click", () => {
136
+ if (globalThis) {
137
+ globalThis.addEventListener("click", () => {
138
138
  isfocus.value = false;
139
139
  });
140
140
  }
@@ -71,14 +71,22 @@ function handleSelectableConfig(obj, vxeconfig, table) {
71
71
  };
72
72
  }
73
73
  function setSslot(obj, scope, emit, slots, props, index$12) {
74
- const slot = use.useSetSlot(obj, scope.row, slots, index$12, scope);
74
+ const optionss = props.options || {};
75
+ const slot = use.useSetSlot(
76
+ obj,
77
+ scope.row,
78
+ slots,
79
+ optionss,
80
+ emit,
81
+ index$12,
82
+ scope
83
+ );
75
84
  if (slot) {
76
85
  return slot;
77
86
  }
78
87
  if (obj.compon) {
79
88
  const isComponSelected = props.isComponSelected;
80
89
  if (isComponSelected(obj, scope)) {
81
- const optionss = props.options || {};
82
90
  const column2 = use.useSetCompon(
83
91
  obj,
84
92
  scope.row,
@@ -86,7 +94,7 @@ function setSslot(obj, scope, emit, slots, props, index$12) {
86
94
  index.useComponsGet(config.provides.compons),
87
95
  emit,
88
96
  index$12,
89
- { ...scope, options: props.options, config: props.table }
97
+ { ...scope, options: optionss, config: props.table }
90
98
  );
91
99
  if (column2) {
92
100
  return column2;
@@ -1,6 +1,31 @@
1
1
  import { VNode, RendererNode, RendererElement } from 'vue';
2
+ /**
3
+ * 设置对象属性
4
+ * @param obj - 列表对象,用于获取原始数据
5
+ * @param props - 属性配置对象,包含table和vxeconfig配置
6
+ * @returns 处理后的属性对象
7
+ */
2
8
  export declare function setProps(obj: ListObj, props: ObjAny): ObjAny;
9
+ /**
10
+ * 设置表头函数
11
+ * @param obj - 列表对象
12
+ * @param scope - 作用域对象
13
+ * @param slots - 插槽对象
14
+ * @param emit - 事件发射函数
15
+ * @param props - 属性对象
16
+ * @param index - 索引值
17
+ * @returns 返回处理后的DOM标签
18
+ */
3
19
  export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): any;
20
+ /**
21
+ * 渲染列组件的函数
22
+ * @param obj - 列表对象,包含列的相关配置信息
23
+ * @param emit - 事件发射函数,用于触发自定义事件
24
+ * @param props - 组件属性对象,包含传入的props数据
25
+ * @param slots - 插槽对象,包含可用的插槽内容
26
+ * @param index - 当前项的索引位置
27
+ * @returns 返回渲染后的DOM元素
28
+ */
4
29
  export declare function columnRender(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number): VNode<RendererNode, RendererElement, {
5
30
  [key: string]: any;
6
31
  }>;
@@ -69,14 +69,22 @@ function handleSelectableConfig(obj, vxeconfig, table) {
69
69
  };
70
70
  }
71
71
  function setSslot(obj, scope, emit, slots, props, index) {
72
- const slot = useSetSlot(obj, scope.row, slots, index, scope);
72
+ const optionss = props.options || {};
73
+ const slot = useSetSlot(
74
+ obj,
75
+ scope.row,
76
+ slots,
77
+ optionss,
78
+ emit,
79
+ index,
80
+ scope
81
+ );
73
82
  if (slot) {
74
83
  return slot;
75
84
  }
76
85
  if (obj.compon) {
77
86
  const isComponSelected = props.isComponSelected;
78
87
  if (isComponSelected(obj, scope)) {
79
- const optionss = props.options || {};
80
88
  const column = useSetCompon(
81
89
  obj,
82
90
  scope.row,
@@ -84,7 +92,7 @@ function setSslot(obj, scope, emit, slots, props, index) {
84
92
  useComponsGet(provides.compons),
85
93
  emit,
86
94
  index,
87
- { ...scope, options: props.options, config: props.table }
95
+ { ...scope, options: optionss, config: props.table }
88
96
  );
89
97
  if (column) {
90
98
  return column;
@@ -1 +1,8 @@
1
+ /**
2
+ * 渲染函数,用于处理列表渲染逻辑
3
+ * @param porps 包含组件属性的对象,必须包含list属性用于渲染列表数据
4
+ * @param emit 事件发射函数,用于触发自定义事件
5
+ * @param slots 插槽对象,包含组件的插槽配置
6
+ * @returns 返回处理后的列表渲染结果
7
+ */
1
8
  export declare function render(porps: ObjAny, emit: Function, slots: ObjAny): ObjAny[];
@@ -18,13 +18,7 @@ function getLists(arrs, emit, props, slots, listobj) {
18
18
  if (obj.children && obj.children.length > 0) {
19
19
  const slotObj = {
20
20
  default: (scope) => {
21
- return getLists(
22
- obj.children,
23
- emit,
24
- props,
25
- slots,
26
- obj
27
- );
21
+ return getLists(obj.children, emit, props, slots, obj);
28
22
  }
29
23
  };
30
24
  if (obj.type != "selection") {
@@ -16,13 +16,7 @@ function getLists(arrs, emit, props, slots, listobj) {
16
16
  if (obj.children && obj.children.length > 0) {
17
17
  const slotObj = {
18
18
  default: (scope) => {
19
- return getLists(
20
- obj.children,
21
- emit,
22
- props,
23
- slots,
24
- obj
25
- );
19
+ return getLists(obj.children, emit, props, slots, obj);
26
20
  }
27
21
  };
28
22
  if (obj.type != "selection") {
@@ -206,8 +206,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
206
206
  return tableRef.value;
207
207
  };
208
208
  vue.onMounted(() => {
209
- if (window) {
210
- window.addEventListener("click", () => {
209
+ if (globalThis) {
210
+ globalThis.addEventListener("click", () => {
211
211
  isfocus.value = false;
212
212
  });
213
213
  }
@@ -204,8 +204,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
204
204
  return tableRef.value;
205
205
  };
206
206
  onMounted(() => {
207
- if (window) {
208
- window.addEventListener("click", () => {
207
+ if (globalThis) {
208
+ globalThis.addEventListener("click", () => {
209
209
  isfocus.value = false;
210
210
  });
211
211
  }
@@ -7,8 +7,7 @@ const getExtension = (fileName) => {
7
7
  const extension = fileName.toLowerCase();
8
8
  if (extension) {
9
9
  const ks = Object.keys(data.types);
10
- for (let index = 0; index < ks.length; index++) {
11
- const key = ks[index];
10
+ for (const key of ks) {
12
11
  if (data.types[key].includes(extension)) {
13
12
  return key;
14
13
  }
@@ -65,7 +64,7 @@ function smartFileHandler(url) {
65
64
  iframe.style.display = "none";
66
65
  iframe.src = url;
67
66
  iframe.onload = function() {
68
- window.open(url, "_blank");
67
+ globalThis.open(url, "_blank");
69
68
  iframe.remove();
70
69
  };
71
70
  iframe.onerror = function() {
@@ -1,5 +1,12 @@
1
1
  import { ListValue } from '../../players/common/util';
2
2
  export declare const getType: (accept?: string) => string;
3
+ /**
4
+ * 获取列表项的类型
5
+ * @param obj - 列表值对象,可选参数
6
+ * @param type - 指定的类型,可选参数
7
+ * @param accept - 接受的类型,可选参数
8
+ * @returns 返回确定的类型字符串
9
+ */
3
10
  export declare const getListType: (obj?: ListValue, type?: string, accept?: string) => string;
4
11
  /**
5
12
  * 从 URL 下载文件
@@ -5,8 +5,7 @@ const getExtension = (fileName) => {
5
5
  const extension = fileName.toLowerCase();
6
6
  if (extension) {
7
7
  const ks = Object.keys(types);
8
- for (let index = 0; index < ks.length; index++) {
9
- const key = ks[index];
8
+ for (const key of ks) {
10
9
  if (types[key].includes(extension)) {
11
10
  return key;
12
11
  }
@@ -63,7 +62,7 @@ function smartFileHandler(url) {
63
62
  iframe.style.display = "none";
64
63
  iframe.src = url;
65
64
  iframe.onload = function() {
66
- window.open(url, "_blank");
65
+ globalThis.open(url, "_blank");
67
66
  iframe.remove();
68
67
  };
69
68
  iframe.onerror = function() {
@@ -0,0 +1,49 @@
1
+ :root {
2
+ --on: rgb(91, 189, 246);
3
+ --color-primary: #409eff;
4
+ --bag-primary: #409eff;
5
+ --bag-primary-text: #ffffff;
6
+ --border: #eee;
7
+ --layout-panel-gap: 10px;
8
+ --layout-panel-padding: 20px;
9
+ --layout-form-item-padding-right: var(
10
+ --layout-panel-gap
11
+ );
12
+ --g-main-bg: var(--bg-color-page);
13
+ --lable-array-height: 20px;
14
+ }
15
+
16
+ .com-footer {
17
+ border-top: 1px solid var(--border);
18
+ padding: 20px 20px;
19
+ }
20
+
21
+ .com-lable-array {
22
+ line-height: var(--lable-array-height);
23
+ }
24
+
25
+ .forms-div {
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+ .forms-div-com {
30
+ height: 100%;
31
+ }
32
+
33
+ .forms-item {
34
+ width: 100%;
35
+ }
36
+ .forms-item-el-item.is-height {
37
+ min-height: var(--forms-item-row-height);
38
+ }
39
+ .forms-item-el-item.is-height .el-form-item__label {
40
+ height: var(--forms-item-row-height);
41
+ line-height: var(--forms-item-row-height);
42
+ }
43
+ .forms-item-el-item .el-form-item__label {
44
+ white-space: pre-wrap;
45
+ }
46
+ .forms-item-el-item.is-top .el-form-item__content {
47
+ min-height: var(--forms-item-row-height);
48
+ display: grid;
49
+ }
@@ -46,4 +46,22 @@
46
46
  .forms-item-el-item.is-top .el-form-item__content {
47
47
  min-height: var(--forms-item-row-height);
48
48
  display: grid;
49
+ }
50
+
51
+ .forms-items {
52
+ width: 100%;
53
+ }
54
+ .forms-items.row {
55
+ display: flex;
56
+ flex-direction: row;
57
+ }
58
+ .forms-items.column {
59
+ display: flex;
60
+ flex-direction: column;
61
+ }
62
+ .forms-items-li.no-error {
63
+ --el-color-danger: var(--el-border-color);
64
+ }
65
+ .forms-items-li.no-error .el-input__wrapper.is-focus {
66
+ --el-color-danger: var(--el-input-focus-border);
49
67
  }
@@ -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;
@@ -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;
package/dist/css/page.css CHANGED
@@ -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;
@@ -22,9 +22,7 @@ function getPosition(el) {
22
22
  return obj;
23
23
  }
24
24
  function getNext(el, paren) {
25
- if (!paren) {
26
- paren = el.parentElement || el;
27
- }
25
+ paren ?? (paren = el.parentElement ?? el);
28
26
  const cs = paren.childNodes;
29
27
  let index = 0;
30
28
  let k = cs.length;
@@ -40,9 +38,7 @@ function getNext(el, paren) {
40
38
  return cs[index];
41
39
  }
42
40
  function getFront(el, paren) {
43
- if (!paren) {
44
- paren = el.parentElement || el;
45
- }
41
+ paren ?? (paren = el.parentElement ?? el);
46
42
  const cs = paren.childNodes;
47
43
  let index = cs.length - 1;
48
44
  let k = -1;
@@ -500,8 +496,8 @@ const vAdjust = {
500
496
  if (value && Object.keys(value).length > 0) {
501
497
  let getVobj = function(e) {
502
498
  let is = true;
503
- for (let index = 0; index < arr.length; index++) {
504
- const v = arr[index](e, eps);
499
+ for (const fun of arr) {
500
+ const v = fun(e, eps);
505
501
  if (v) {
506
502
  vobj = v;
507
503
  isCur = true;
@@ -20,9 +20,7 @@ function getPosition(el) {
20
20
  return obj;
21
21
  }
22
22
  function getNext(el, paren) {
23
- if (!paren) {
24
- paren = el.parentElement || el;
25
- }
23
+ paren ?? (paren = el.parentElement ?? el);
26
24
  const cs = paren.childNodes;
27
25
  let index = 0;
28
26
  let k = cs.length;
@@ -38,9 +36,7 @@ function getNext(el, paren) {
38
36
  return cs[index];
39
37
  }
40
38
  function getFront(el, paren) {
41
- if (!paren) {
42
- paren = el.parentElement || el;
43
- }
39
+ paren ?? (paren = el.parentElement ?? el);
44
40
  const cs = paren.childNodes;
45
41
  let index = cs.length - 1;
46
42
  let k = -1;
@@ -498,8 +494,8 @@ const vAdjust = {
498
494
  if (value && Object.keys(value).length > 0) {
499
495
  let getVobj = function(e) {
500
496
  let is = true;
501
- for (let index = 0; index < arr.length; index++) {
502
- const v = arr[index](e, eps);
497
+ for (const fun of arr) {
498
+ const v = fun(e, eps);
503
499
  if (v) {
504
500
  vobj = v;
505
501
  isCur = true;
@@ -28,7 +28,7 @@ function setDom(dom, el, value) {
28
28
  });
29
29
  };
30
30
  const handleMouseMove = (event) => {
31
- if (typeof value.often == "undefined" || value.often) {
31
+ if (value.often === void 0 || value.often) {
32
32
  setValue(event);
33
33
  }
34
34
  if (value.onMouseMove) {
@@ -77,6 +77,11 @@ function setDom(dom, el, value) {
77
77
  }
78
78
  const vDrag = {
79
79
  name: "Drag",
80
+ /**
81
+ * Vue指令的mounted钩子函数,用于在元素挂载时设置DOM相关属性
82
+ * @param el - 指令绑定的DOM元素
83
+ * @param binding - 指令绑定的相关信息对象
84
+ */
80
85
  mounted(el, binding) {
81
86
  const value = binding.value;
82
87
  let dom;
@@ -26,7 +26,7 @@ function setDom(dom, el, value) {
26
26
  });
27
27
  };
28
28
  const handleMouseMove = (event) => {
29
- if (typeof value.often == "undefined" || value.often) {
29
+ if (value.often === void 0 || value.often) {
30
30
  setValue(event);
31
31
  }
32
32
  if (value.onMouseMove) {
@@ -75,6 +75,11 @@ function setDom(dom, el, value) {
75
75
  }
76
76
  const vDrag = {
77
77
  name: "Drag",
78
+ /**
79
+ * Vue指令的mounted钩子函数,用于在元素挂载时设置DOM相关属性
80
+ * @param el - 指令绑定的DOM元素
81
+ * @param binding - 指令绑定的相关信息对象
82
+ */
78
83
  mounted(el, binding) {
79
84
  const value = binding.value;
80
85
  let dom;
@@ -3,6 +3,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const hasOwn = require("@fangzhongya/utils/basic/object/hasOwn");
4
4
  const index = {
5
5
  name: "expose",
6
+ /**
7
+ * Vue指令的created钩子函数,在指令绑定元素被创建时执行
8
+ * @param el 指令绑定的DOM元素
9
+ * @param binding 包含指令信息的绑定对象
10
+ * @param vnode 虚拟节点对象
11
+ */
6
12
  created(el, binding, vnode) {
7
13
  var _a, _b, _c, _d;
8
14
  if (!(binding == null ? void 0 : binding.instance)) return;