@fangzhongya/fang-ui 0.1.50 → 0.1.52

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 (198) hide show
  1. package/bin/fang-ui.js +2 -2
  2. package/dist/components/box-fun/index.cjs +1 -0
  3. package/dist/components/box-fun/index.js +1 -0
  4. package/dist/components/box-fun/index.scss +8 -0
  5. package/dist/components/box-fun/style/index2.scss +4 -0
  6. package/dist/components/buttons/src/data.d.ts +14 -11
  7. package/dist/components/cascaders/src/data.d.ts +14 -11
  8. package/dist/components/cascaders/src/index2.cjs +15 -8
  9. package/dist/components/cascaders/src/index2.js +15 -8
  10. package/dist/components/checks/src/data.d.ts +14 -11
  11. package/dist/components/checks/src/index2.cjs +6 -6
  12. package/dist/components/checks/src/index2.js +6 -6
  13. package/dist/components/common/list.cjs +34 -15
  14. package/dist/components/common/list.d.ts +25 -12
  15. package/dist/components/common/list.js +34 -15
  16. package/dist/components/common/use.cjs +9 -5
  17. package/dist/components/common/use.js +9 -5
  18. package/dist/components/date-picker/style/element.scss +7 -4
  19. package/dist/components/dates/src/data.d.ts +14 -11
  20. package/dist/components/dates2/src/data.d.ts +14 -11
  21. package/dist/components/draggable/style/index2.scss +1 -0
  22. package/dist/components/edit-data/index.cjs +9 -0
  23. package/dist/components/edit-data/index.css +144 -0
  24. package/dist/components/edit-data/index.d.ts +5 -0
  25. package/dist/components/edit-data/index.js +9 -0
  26. package/dist/components/edit-data/index.scss +95 -0
  27. package/dist/components/edit-data/src/area/array-json.cjs +4 -0
  28. package/dist/components/edit-data/src/area/array-json.js +4 -0
  29. package/dist/components/edit-data/src/area/array-json2.cjs +109 -0
  30. package/dist/components/edit-data/src/area/array-json2.js +109 -0
  31. package/dist/components/edit-data/src/area/array.cjs +4 -0
  32. package/dist/components/edit-data/src/area/array.js +4 -0
  33. package/dist/components/edit-data/src/area/array2.cjs +135 -0
  34. package/dist/components/edit-data/src/area/array2.js +135 -0
  35. package/dist/components/edit-data/src/area/code.cjs +4 -0
  36. package/dist/components/edit-data/src/area/code.js +4 -0
  37. package/dist/components/edit-data/src/area/code2.cjs +52 -0
  38. package/dist/components/edit-data/src/area/code2.js +52 -0
  39. package/dist/components/edit-data/src/area/editor.cjs +4 -0
  40. package/dist/components/edit-data/src/area/editor.js +4 -0
  41. package/dist/components/edit-data/src/area/editor2.cjs +170 -0
  42. package/dist/components/edit-data/src/area/editor2.js +170 -0
  43. package/dist/components/edit-data/src/area/general.cjs +4 -0
  44. package/dist/components/edit-data/src/area/general.js +4 -0
  45. package/dist/components/edit-data/src/area/general2.cjs +88 -0
  46. package/dist/components/edit-data/src/area/general2.js +88 -0
  47. package/dist/components/edit-data/src/area/object-json.cjs +4 -0
  48. package/dist/components/edit-data/src/area/object-json.js +4 -0
  49. package/dist/components/edit-data/src/area/object-json2.cjs +109 -0
  50. package/dist/components/edit-data/src/area/object-json2.js +109 -0
  51. package/dist/components/edit-data/src/area/object.cjs +4 -0
  52. package/dist/components/edit-data/src/area/object.js +4 -0
  53. package/dist/components/edit-data/src/area/object2.cjs +116 -0
  54. package/dist/components/edit-data/src/area/object2.js +116 -0
  55. package/dist/components/edit-data/src/data/array.cjs +4 -0
  56. package/dist/components/edit-data/src/data/array.js +4 -0
  57. package/dist/components/edit-data/src/data/array2.cjs +68 -0
  58. package/dist/components/edit-data/src/data/array2.js +68 -0
  59. package/dist/components/edit-data/src/data/bigint.cjs +4 -0
  60. package/dist/components/edit-data/src/data/bigint.js +4 -0
  61. package/dist/components/edit-data/src/data/bigint2.cjs +42 -0
  62. package/dist/components/edit-data/src/data/bigint2.js +42 -0
  63. package/dist/components/edit-data/src/data/boolean.cjs +4 -0
  64. package/dist/components/edit-data/src/data/boolean.js +4 -0
  65. package/dist/components/edit-data/src/data/boolean2.cjs +53 -0
  66. package/dist/components/edit-data/src/data/boolean2.js +53 -0
  67. package/dist/components/edit-data/src/data/function.cjs +4 -0
  68. package/dist/components/edit-data/src/data/function.js +4 -0
  69. package/dist/components/edit-data/src/data/function2.cjs +61 -0
  70. package/dist/components/edit-data/src/data/function2.js +61 -0
  71. package/dist/components/edit-data/src/data/not.cjs +4 -0
  72. package/dist/components/edit-data/src/data/not.js +4 -0
  73. package/dist/components/edit-data/src/data/not2.cjs +56 -0
  74. package/dist/components/edit-data/src/data/not2.js +56 -0
  75. package/dist/components/edit-data/src/data/null.cjs +4 -0
  76. package/dist/components/edit-data/src/data/null.js +4 -0
  77. package/dist/components/edit-data/src/data/null2.cjs +24 -0
  78. package/dist/components/edit-data/src/data/null2.js +24 -0
  79. package/dist/components/edit-data/src/data/number.cjs +4 -0
  80. package/dist/components/edit-data/src/data/number.js +4 -0
  81. package/dist/components/edit-data/src/data/number2.cjs +42 -0
  82. package/dist/components/edit-data/src/data/number2.js +42 -0
  83. package/dist/components/edit-data/src/data/object.cjs +4 -0
  84. package/dist/components/edit-data/src/data/object.js +4 -0
  85. package/dist/components/edit-data/src/data/object2.cjs +68 -0
  86. package/dist/components/edit-data/src/data/object2.js +68 -0
  87. package/dist/components/edit-data/src/data/other.cjs +4 -0
  88. package/dist/components/edit-data/src/data/other.js +4 -0
  89. package/dist/components/edit-data/src/data/other2.cjs +59 -0
  90. package/dist/components/edit-data/src/data/other2.js +59 -0
  91. package/dist/components/edit-data/src/data/string.cjs +4 -0
  92. package/dist/components/edit-data/src/data/string.js +4 -0
  93. package/dist/components/edit-data/src/data/string2.cjs +43 -0
  94. package/dist/components/edit-data/src/data/string2.js +43 -0
  95. package/dist/components/edit-data/src/data/symbol.cjs +4 -0
  96. package/dist/components/edit-data/src/data/symbol.js +4 -0
  97. package/dist/components/edit-data/src/data/symbol2.cjs +55 -0
  98. package/dist/components/edit-data/src/data/symbol2.js +55 -0
  99. package/dist/components/edit-data/src/data/undefined.cjs +4 -0
  100. package/dist/components/edit-data/src/data/undefined.js +4 -0
  101. package/dist/components/edit-data/src/data/undefined2.cjs +24 -0
  102. package/dist/components/edit-data/src/data/undefined2.js +24 -0
  103. package/dist/components/edit-data/src/data.cjs +57 -0
  104. package/dist/components/edit-data/src/data.d.ts +131 -0
  105. package/dist/components/edit-data/src/data.js +57 -0
  106. package/dist/components/edit-data/src/index.cjs +4 -0
  107. package/dist/components/edit-data/src/index.js +4 -0
  108. package/dist/components/edit-data/src/index2.cjs +134 -0
  109. package/dist/components/edit-data/src/index2.js +134 -0
  110. package/dist/components/edit-data/src/util.cjs +99 -0
  111. package/dist/components/edit-data/src/util.d.ts +1 -0
  112. package/dist/components/edit-data/src/util.js +99 -0
  113. package/dist/components/edit-data/style/index2.scss +13 -0
  114. package/dist/components/edit-data-add/index.cjs +9 -0
  115. package/dist/components/edit-data-add/index.d.ts +5 -0
  116. package/dist/components/edit-data-add/index.js +9 -0
  117. package/dist/components/edit-data-add/index.scss +5 -0
  118. package/dist/components/edit-data-add/src/data.cjs +24 -0
  119. package/dist/components/edit-data-add/src/data.d.ts +36 -0
  120. package/dist/components/edit-data-add/src/data.js +24 -0
  121. package/dist/components/edit-data-add/src/index.cjs +4 -0
  122. package/dist/components/edit-data-add/src/index.js +4 -0
  123. package/dist/components/edit-data-add/src/index2.cjs +241 -0
  124. package/dist/components/edit-data-add/src/index2.js +241 -0
  125. package/dist/components/edit-data-add/style/comm.scss +38 -0
  126. package/dist/components/edit-data-add/style/index2.scss +2 -0
  127. package/dist/components/history/src/data.cjs +9 -1
  128. package/dist/components/history/src/data.d.ts +13 -1
  129. package/dist/components/history/src/data.js +9 -1
  130. package/dist/components/history/src/index2.cjs +27 -9
  131. package/dist/components/history/src/index2.js +27 -9
  132. package/dist/components/index.cjs +60 -56
  133. package/dist/components/index.d.ts +2 -0
  134. package/dist/components/index.js +4 -0
  135. package/dist/components/index.scss +3 -0
  136. package/dist/components/index2.scss +5 -2
  137. package/dist/components/labels/src/data.d.ts +14 -11
  138. package/dist/components/labels/src/index2.cjs +13 -2
  139. package/dist/components/labels/src/index2.js +13 -2
  140. package/dist/components/page/index.css +8 -0
  141. package/dist/components/retract/index.css +20 -0
  142. package/dist/components/retract/index.scss +24 -0
  143. package/dist/components/retract/src/data.cjs +10 -0
  144. package/dist/components/retract/src/data.d.ts +10 -0
  145. package/dist/components/retract/src/data.js +10 -0
  146. package/dist/components/retract/src/index2.cjs +24 -4
  147. package/dist/components/retract/src/index2.js +23 -3
  148. package/dist/components/retract/style/index2.scss +1 -0
  149. package/dist/components/selects/src/data.d.ts +14 -11
  150. package/dist/components/selects/src/index2.cjs +1 -1
  151. package/dist/components/selects/src/index2.js +1 -1
  152. package/dist/components/switchs/src/data.d.ts +14 -11
  153. package/dist/components/switchs/src/index2.cjs +9 -5
  154. package/dist/components/switchs/src/index2.js +9 -5
  155. package/dist/components/tables/common/com-limit.cjs +4 -0
  156. package/dist/components/tables/common/com-limit.js +4 -0
  157. package/dist/components/tables/common/com-limit2.cjs +91 -0
  158. package/dist/components/tables/common/com-limit2.js +91 -0
  159. package/dist/components/tables/common/com.scss +12 -0
  160. package/dist/components/tables/index.css +9 -0
  161. package/dist/components/tables/index.scss +2 -0
  162. package/dist/components/tables/src/columns2.cjs +3 -1
  163. package/dist/components/tables/src/columns2.js +7 -5
  164. package/dist/components/tablesp/index.css +9 -0
  165. package/dist/components/tablespd/index.css +9 -0
  166. package/dist/components/uploads/src/data.d.ts +14 -11
  167. package/dist/css/edit-data.css +144 -0
  168. package/dist/css/index.css +149 -0
  169. package/dist/css/page.css +8 -0
  170. package/dist/css/retract.css +20 -0
  171. package/dist/css/tables.css +9 -0
  172. package/dist/css/tablesp.css +9 -0
  173. package/dist/css/tablespd.css +9 -0
  174. package/dist/directives/adjust/index.cjs +14 -6
  175. package/dist/directives/adjust/index.js +14 -6
  176. package/dist/directives/adjustment/index.cjs +622 -0
  177. package/dist/directives/adjustment/index.d.ts +7 -0
  178. package/dist/directives/adjustment/index.js +622 -0
  179. package/dist/directives/index.cjs +18 -16
  180. package/dist/directives/index.d.ts +1 -0
  181. package/dist/directives/index.js +16 -14
  182. package/dist/expand/{chunk-A7IW6WRD.cjs → chunk-BJVT6JH7.cjs} +6 -0
  183. package/dist/expand/{chunk-L4FI5HCY.js → chunk-I5UJEJJB.js} +6 -0
  184. package/dist/expand/components.cjs +5 -5
  185. package/dist/expand/components.js +1 -1
  186. package/dist/expand/config.cjs +2 -2
  187. package/dist/expand/config.js +1 -1
  188. package/dist/icons/index.json +1 -1
  189. package/dist/index.cjs +84 -78
  190. package/dist/index.css +149 -0
  191. package/dist/index.js +20 -14
  192. package/dist/utils/util.cjs +1 -1
  193. package/dist/utils/util.js +2 -2
  194. package/dist/utils/vues/withInstall.cjs +2 -1
  195. package/dist/utils/vues/withInstall.js +2 -1
  196. package/package.json +13 -12
  197. /package/dist/components/{option → draggable}/index.css +0 -0
  198. /package/dist/css/{option.css → draggable.css} +0 -0
@@ -86,10 +86,10 @@ export declare const dataProps: {
86
86
  };
87
87
  options: {
88
88
  type: {
89
- (arrayLength: number): ObjAny[];
90
- (...items: ObjAny[]): ObjAny[];
91
- new (arrayLength: number): ObjAny[];
92
- new (...items: ObjAny[]): ObjAny[];
89
+ (arrayLength: number): (string | number | boolean | ObjAny)[];
90
+ (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
91
+ new (arrayLength: number): (string | number | boolean | ObjAny)[];
92
+ new (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
93
93
  isArray(arg: any): arg is any[];
94
94
  readonly prototype: any[];
95
95
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -103,9 +103,6 @@ export declare const dataProps: {
103
103
  };
104
104
  default(): never[];
105
105
  };
106
- clearAbsent: {
107
- type: BooleanConstructor;
108
- };
109
106
  label: {
110
107
  type: (StringConstructor | FunctionConstructor)[];
111
108
  default: string;
@@ -117,11 +114,17 @@ export declare const dataProps: {
117
114
  multiple: {
118
115
  type: (BooleanConstructor | StringConstructor)[];
119
116
  };
120
- load: {
121
- type: BooleanConstructor[];
117
+ isLoad: {
118
+ type: BooleanConstructor;
119
+ };
120
+ isClearAbsent: {
121
+ type: BooleanConstructor;
122
+ };
123
+ isOptobj: {
124
+ type: BooleanConstructor;
122
125
  };
123
- optobj: {
124
- type: BooleanConstructor[];
126
+ default: {
127
+ type: null;
125
128
  };
126
129
  };
127
130
  export type DataProps = ExtractPropTypes<typeof dataProps>;
@@ -0,0 +1 @@
1
+ @use '../index.scss' as *;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ ;/* empty css */
4
+ require("./src/index.cjs");
5
+ const withInstall = require("../../utils/vues/withInstall.cjs");
6
+ const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
7
+ const EditData = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "EditData");
8
+ exports.EditData = EditData;
9
+ exports.default = EditData;
@@ -0,0 +1,144 @@
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
+ .edit-data-add {
26
+ width: 100%;
27
+ height: 100%;
28
+ display: flex;
29
+ flex-direction: column;
30
+ }
31
+ .edit-data-add-main {
32
+ flex: 1;
33
+ width: 100%;
34
+ display: flex;
35
+ flex-direction: column;
36
+ }
37
+ .edit-data-add-main-top {
38
+ width: 100%;
39
+ }
40
+ .edit-data-add-main-top-li {
41
+ display: flex;
42
+ align-items: center;
43
+ padding: 10px;
44
+ }
45
+ .edit-data-add-main-top-li-value {
46
+ flex: 1;
47
+ }
48
+ .edit-data-add-main-content {
49
+ flex: 1;
50
+ width: 100%;
51
+ margin: 10px;
52
+ }
53
+ .edit-data-add-main-content-name {
54
+ margin-bottom: 10px;
55
+ }
56
+ .edit-data-add-footer {
57
+ padding-top: 20px;
58
+ text-align: right;
59
+ }
60
+
61
+ .edit-data-general-set {
62
+ display: flex;
63
+ align-items: center;
64
+ }
65
+ .edit-data-editor {
66
+ width: 100%;
67
+ height: 100%;
68
+ display: flex;
69
+ flex-direction: column;
70
+ }
71
+ .edit-data-editor-main {
72
+ flex: 1;
73
+ position: relative;
74
+ }
75
+ .edit-data-editor-content {
76
+ position: absolute;
77
+ inset: 0;
78
+ overflow-y: auto;
79
+ }
80
+ .edit-data-editor-content .edit-data-code {
81
+ height: 100%;
82
+ width: 100%;
83
+ }
84
+ .edit-data-editor-content .edit-data-code .inputs {
85
+ height: 100%;
86
+ width: 100%;
87
+ }
88
+ .edit-data-editor-content .edit-data-code .inputs textarea {
89
+ height: 100%;
90
+ width: 100%;
91
+ }
92
+ .edit-data-editor-footer {
93
+ padding-top: 20px;
94
+ text-align: right;
95
+ }
96
+ .edit-data-area-array, .edit-data-area-object {
97
+ width: 100%;
98
+ height: 100%;
99
+ display: flex;
100
+ flex-direction: column;
101
+ }
102
+ .edit-data-area-array-main, .edit-data-area-object-main {
103
+ flex: 1;
104
+ width: 100%;
105
+ position: relative;
106
+ }
107
+ .edit-data-area-array-content, .edit-data-area-object-content {
108
+ position: absolute;
109
+ inset: 0;
110
+ overflow-y: auto;
111
+ }
112
+ .edit-data-area-array-json, .edit-data-area-object-json {
113
+ width: 100%;
114
+ height: 100%;
115
+ }
116
+ .edit-data-area-array-json .tabs, .edit-data-area-object-json .tabs {
117
+ width: 100%;
118
+ height: 100%;
119
+ }
120
+ .edit-data-area-array-json .tabs .tab-pane, .edit-data-area-object-json .tabs .tab-pane {
121
+ position: absolute;
122
+ inset: 0;
123
+ overflow-y: auto;
124
+ }
125
+ .edit-data-area-array-add, .edit-data-area-object-add {
126
+ margin-bottom: 10px;
127
+ }
128
+ .edit-data-area-comp {
129
+ width: 100%;
130
+ }
131
+ .edit-data-area-comp-li {
132
+ min-height: 40px;
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: space-between;
136
+ }
137
+ .edit-data-area-comp-li-div {
138
+ flex: 1;
139
+ display: flex;
140
+ align-items: center;
141
+ }
142
+ .edit-data-area-comp-li-name {
143
+ padding: 0 10px;
144
+ }
@@ -0,0 +1,5 @@
1
+ import { SFCWithInstall } from '../../utils/vues';
2
+ import { DefineComponent } from 'vue';
3
+ declare const EditData: SFCWithInstall<DefineComponent<{}, {}, any>>;
4
+ export { EditData };
5
+ export default EditData;
@@ -0,0 +1,9 @@
1
+ /* empty css */
2
+ import "./src/index.js";
3
+ import { withInstall } from "../../utils/vues/withInstall.js";
4
+ import _sfc_main from "./src/index2.js";
5
+ const EditData = withInstall(_sfc_main, "EditData");
6
+ export {
7
+ EditData,
8
+ EditData as default
9
+ };
@@ -0,0 +1,95 @@
1
+ @use '../scss/common.scss' as *;
2
+
3
+ @use '../edit-data-add/style/comm.scss' as *;
4
+
5
+ $edit-data: 'edit-data';
6
+ @include b($edit-data) {
7
+ // 占位符,为将来扩展预留
8
+ &-general {
9
+ &-set {
10
+ display: flex;
11
+ align-items: center;
12
+ }
13
+ }
14
+ &-editor {
15
+ width: 100%;
16
+ height: 100%;
17
+ display: flex;
18
+ flex-direction: column;
19
+ &-main {
20
+ flex: 1;
21
+ position: relative;
22
+ }
23
+ &-content {
24
+ position: absolute;
25
+ inset: 0;
26
+ overflow-y: auto;
27
+ .#{z($edit-data,'code')} {
28
+ height: 100%;
29
+ width: 100%;
30
+ .#{co('inputs')} {
31
+ height: 100%;
32
+ width: 100%;
33
+ textarea {
34
+ height: 100%;
35
+ width: 100%;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ &-footer {
41
+ padding-top: 20px;
42
+ text-align: right;
43
+ }
44
+ }
45
+ &-area-array,
46
+ &-area-object {
47
+ width: 100%;
48
+ height: 100%;
49
+ display: flex;
50
+ flex-direction: column;
51
+ &-main {
52
+ flex: 1;
53
+ width: 100%;
54
+ position: relative;
55
+ }
56
+ &-content {
57
+ position: absolute;
58
+ inset: 0;
59
+ overflow-y: auto;
60
+ }
61
+ &-json {
62
+ width: 100%;
63
+ height: 100%;
64
+ .#{co('tabs')} {
65
+ width: 100%;
66
+ height: 100%;
67
+ .#{co('tab-pane')} {
68
+ position: absolute;
69
+ inset: 0;
70
+ overflow-y: auto;
71
+ }
72
+ }
73
+ }
74
+ &-add {
75
+ margin-bottom: 10px;
76
+ }
77
+ }
78
+ &-area-comp {
79
+ width: 100%;
80
+ &-li {
81
+ min-height: 40px;
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: space-between;
85
+ &-div {
86
+ flex: 1;
87
+ display: flex;
88
+ align-items: center;
89
+ }
90
+ &-name {
91
+ padding: 0 10px;
92
+ }
93
+ }
94
+ }
95
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const arrayJson_vue_vue_type_script_setup_true_lang = require("./array-json2.cjs");
4
+ exports.default = arrayJson_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./array-json2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const data = require("../data.cjs");
5
+ const index = require("../../../../hooks/cssname/index.cjs");
6
+ const index$1 = require("../../../../hooks/locale/index.cjs");
7
+ const index$2 = require("../../../tabs/index.cjs");
8
+ const index$3 = require("../../../tab-pane/index.cjs");
9
+ const json5 = require("json5");
10
+ require("./array.cjs");
11
+ const index$4 = require("../../../message/index.cjs");
12
+ const array_vue_vue_type_script_setup_true_lang = require("./array2.cjs");
13
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
14
+ __name: "array-json",
15
+ props: data.dataDataProps,
16
+ emits: data.dataDataEmits,
17
+ setup(__props, { expose: __expose, emit: __emit }) {
18
+ const cs = index.useCssName(data.name);
19
+ const { getLocale } = index$1.useLocale();
20
+ const props = __props;
21
+ const emit = __emit;
22
+ const tab = vue.ref("z");
23
+ const value = vue.computed({
24
+ get() {
25
+ return props.modelValue;
26
+ },
27
+ set(value2) {
28
+ emit("update:modelValue", value2);
29
+ }
30
+ });
31
+ const getValue = (v) => {
32
+ if (Array.isArray(v)) {
33
+ return v;
34
+ } else {
35
+ if (v) {
36
+ return json5.parse(v) || [];
37
+ } else {
38
+ return [];
39
+ }
40
+ }
41
+ };
42
+ const beforeLeave = (name2) => {
43
+ if (name2 == "z") {
44
+ try {
45
+ const v = getValue(value.value);
46
+ value.value = v;
47
+ return true;
48
+ } catch (error) {
49
+ console.log("error", error);
50
+ index$4.Message.error("数组输入错误:" + error);
51
+ return false;
52
+ }
53
+ } else if (name2 == "j") {
54
+ try {
55
+ if (Array.isArray(value.value)) {
56
+ const v = json5.stringify(value.value, null, 4);
57
+ value.value = v;
58
+ } else {
59
+ value.value = value.value;
60
+ }
61
+ return true;
62
+ } catch (error) {
63
+ console.log("error", error);
64
+ index$4.Message.error("数组输入错误:" + error);
65
+ return false;
66
+ }
67
+ }
68
+ };
69
+ __expose({});
70
+ return (_ctx, _cache) => {
71
+ return vue.openBlock(), vue.createElementBlock("div", {
72
+ class: vue.normalizeClass(vue.unref(cs).z("area-array-json"))
73
+ }, [
74
+ vue.createVNode(vue.unref(index$2.Tabs), {
75
+ "default-value": "z",
76
+ modelValue: tab.value,
77
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => tab.value = $event),
78
+ "before-leave": beforeLeave
79
+ }, {
80
+ default: vue.withCtx(() => [
81
+ vue.createVNode(vue.unref(index$3.TabPane), {
82
+ name: "z",
83
+ label: "组件(Array)"
84
+ }, {
85
+ default: vue.withCtx(() => [
86
+ vue.createVNode(array_vue_vue_type_script_setup_true_lang.default, vue.mergeProps(props, {
87
+ modelValue: value.value,
88
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
89
+ }), null, 16, ["modelValue"])
90
+ ]),
91
+ _: 1
92
+ }),
93
+ vue.createVNode(vue.unref(index$3.TabPane), {
94
+ name: "j",
95
+ label: "JSON(Array)"
96
+ }, {
97
+ default: vue.withCtx(() => [
98
+ vue.renderSlot(_ctx.$slots, "default")
99
+ ]),
100
+ _: 3
101
+ })
102
+ ]),
103
+ _: 3
104
+ }, 8, ["modelValue"])
105
+ ], 2);
106
+ };
107
+ }
108
+ });
109
+ exports.default = _sfc_main;
@@ -0,0 +1,109 @@
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, withCtx, mergeProps, renderSlot } from "vue";
2
+ import { dataDataEmits, dataDataProps, name } from "../data.js";
3
+ import { useCssName } from "../../../../hooks/cssname/index.js";
4
+ import { useLocale } from "../../../../hooks/locale/index.js";
5
+ import { Tabs } from "../../../tabs/index.js";
6
+ import { TabPane } from "../../../tab-pane/index.js";
7
+ import json5 from "json5";
8
+ import "./array.js";
9
+ import { Message } from "../../../message/index.js";
10
+ import _sfc_main$1 from "./array2.js";
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "array-json",
13
+ props: dataDataProps,
14
+ emits: dataDataEmits,
15
+ setup(__props, { expose: __expose, emit: __emit }) {
16
+ const cs = useCssName(name);
17
+ const { getLocale } = useLocale();
18
+ const props = __props;
19
+ const emit = __emit;
20
+ const tab = ref("z");
21
+ const value = computed({
22
+ get() {
23
+ return props.modelValue;
24
+ },
25
+ set(value2) {
26
+ emit("update:modelValue", value2);
27
+ }
28
+ });
29
+ const getValue = (v) => {
30
+ if (Array.isArray(v)) {
31
+ return v;
32
+ } else {
33
+ if (v) {
34
+ return json5.parse(v) || [];
35
+ } else {
36
+ return [];
37
+ }
38
+ }
39
+ };
40
+ const beforeLeave = (name2) => {
41
+ if (name2 == "z") {
42
+ try {
43
+ const v = getValue(value.value);
44
+ value.value = v;
45
+ return true;
46
+ } catch (error) {
47
+ console.log("error", error);
48
+ Message.error("数组输入错误:" + error);
49
+ return false;
50
+ }
51
+ } else if (name2 == "j") {
52
+ try {
53
+ if (Array.isArray(value.value)) {
54
+ const v = json5.stringify(value.value, null, 4);
55
+ value.value = v;
56
+ } else {
57
+ value.value = value.value;
58
+ }
59
+ return true;
60
+ } catch (error) {
61
+ console.log("error", error);
62
+ Message.error("数组输入错误:" + error);
63
+ return false;
64
+ }
65
+ }
66
+ };
67
+ __expose({});
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock("div", {
70
+ class: normalizeClass(unref(cs).z("area-array-json"))
71
+ }, [
72
+ createVNode(unref(Tabs), {
73
+ "default-value": "z",
74
+ modelValue: tab.value,
75
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => tab.value = $event),
76
+ "before-leave": beforeLeave
77
+ }, {
78
+ default: withCtx(() => [
79
+ createVNode(unref(TabPane), {
80
+ name: "z",
81
+ label: "组件(Array)"
82
+ }, {
83
+ default: withCtx(() => [
84
+ createVNode(_sfc_main$1, mergeProps(props, {
85
+ modelValue: value.value,
86
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
87
+ }), null, 16, ["modelValue"])
88
+ ]),
89
+ _: 1
90
+ }),
91
+ createVNode(unref(TabPane), {
92
+ name: "j",
93
+ label: "JSON(Array)"
94
+ }, {
95
+ default: withCtx(() => [
96
+ renderSlot(_ctx.$slots, "default")
97
+ ]),
98
+ _: 3
99
+ })
100
+ ]),
101
+ _: 3
102
+ }, 8, ["modelValue"])
103
+ ], 2);
104
+ };
105
+ }
106
+ });
107
+ export {
108
+ _sfc_main as default
109
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const array_vue_vue_type_script_setup_true_lang = require("./array2.cjs");
4
+ exports.default = array_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./array2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const index$5 = require("../../../no-data/index.cjs");
5
+ const index$3 = require("../../../icon/index.cjs");
6
+ const _delete = require("../../../../icons/vue/delete.cjs");
7
+ const data = require("../data.cjs");
8
+ const index = require("../../../../hooks/cssname/index.cjs");
9
+ const index$1 = require("../../../../hooks/locale/index.cjs");
10
+ require("../index.cjs");
11
+ const index$4 = require("../../../../directives/sortable/index.cjs");
12
+ const index$2 = require("../../../button/index.cjs");
13
+ const index$6 = require("../../../edit-data-add/index.cjs");
14
+ const index_vue_vue_type_script_setup_true_lang = require("../index2.cjs");
15
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
+ __name: "array",
17
+ props: data.dataDataProps,
18
+ emits: data.dataDataEmits,
19
+ setup(__props, { emit: __emit }) {
20
+ const cs = index.useCssName(data.name);
21
+ const { getLocale } = index$1.useLocale();
22
+ const props = __props;
23
+ const emit = __emit;
24
+ const box = vue.ref(false);
25
+ const value = vue.computed({
26
+ get() {
27
+ return props.modelValue;
28
+ },
29
+ set(value2) {
30
+ emit("update:modelValue", value2);
31
+ }
32
+ });
33
+ const key = vue.ref(0);
34
+ const onEnd = (obj) => {
35
+ const { oldIndex, newIndex } = obj;
36
+ if (oldIndex === newIndex) return;
37
+ const movedItem = value.value.splice(oldIndex, 1)[0];
38
+ value.value.splice(newIndex, 0, movedItem);
39
+ key.value++;
40
+ };
41
+ const sortable = {
42
+ handle: "." + cs.z("area-comp-li-div"),
43
+ onEnd
44
+ };
45
+ const updateValue = (index2, v) => {
46
+ value.value[index2] = v;
47
+ };
48
+ const onAdd = () => {
49
+ box.value = true;
50
+ };
51
+ const onSubmit = (v) => {
52
+ value.value.push(v.value);
53
+ };
54
+ const onDelete = (index2) => {
55
+ value.value.splice(index2, 1);
56
+ };
57
+ return (_ctx, _cache) => {
58
+ return vue.openBlock(), vue.createElementBlock("div", {
59
+ class: vue.normalizeClass(vue.unref(cs).z("area-array"))
60
+ }, [
61
+ props.addable || props.editable ? (vue.openBlock(), vue.createElementBlock("div", {
62
+ key: 0,
63
+ class: vue.normalizeClass(vue.unref(cs).z("area-array-add"))
64
+ }, [
65
+ vue.createVNode(vue.unref(index$2.Button), {
66
+ type: "primary",
67
+ onClick: onAdd
68
+ }, {
69
+ default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
70
+ vue.createTextVNode(" 添加 ", -1)
71
+ ])]),
72
+ _: 1
73
+ })
74
+ ], 2)) : vue.createCommentVNode("", true),
75
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
76
+ class: vue.normalizeClass(vue.unref(cs).z("area-comp")),
77
+ key: key.value
78
+ }, [
79
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value.value, (item, index2) => {
80
+ return vue.openBlock(), vue.createElementBlock("div", {
81
+ class: vue.normalizeClass(vue.unref(cs).z("area-comp-li")),
82
+ key: index2
83
+ }, [
84
+ vue.createElementVNode("div", {
85
+ class: vue.normalizeClass(vue.unref(cs).z("area-comp-li-div"))
86
+ }, [
87
+ vue.createElementVNode("span", {
88
+ class: vue.normalizeClass(vue.unref(cs).z("area-comp-li-name"))
89
+ }, vue.toDisplayString(index2), 3),
90
+ vue.createVNode(index_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ ref_for: true }, props, {
91
+ type: void 0,
92
+ modelValue: item,
93
+ "onUpdate:modelValue": (val) => updateValue(index2, val)
94
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])
95
+ ], 2),
96
+ vue.createElementVNode("div", null, [
97
+ props.editable ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Button), {
98
+ key: 0,
99
+ type: "danger",
100
+ onClick: ($event) => onDelete(index2),
101
+ text: ""
102
+ }, {
103
+ default: vue.withCtx(() => [
104
+ vue.createVNode(vue.unref(index$3.Icon), { title: "删除" }, {
105
+ default: vue.withCtx(() => [
106
+ vue.createVNode(_delete.default)
107
+ ]),
108
+ _: 1
109
+ })
110
+ ]),
111
+ _: 1
112
+ }, 8, ["onClick"])) : vue.createCommentVNode("", true)
113
+ ])
114
+ ], 2);
115
+ }), 128))
116
+ ], 2)), [
117
+ [vue.unref(index$4.default), sortable]
118
+ ]),
119
+ value.value.length == 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.NoData), {
120
+ key: 1,
121
+ value: "空数组"
122
+ })) : vue.createCommentVNode("", true),
123
+ vue.createVNode(vue.unref(index$6.EditDataAdd), vue.mergeProps(props, {
124
+ type: "array",
125
+ labelName: "数组",
126
+ title: "新增数组",
127
+ modelValue: box.value,
128
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => box.value = $event),
129
+ onSubmit
130
+ }), null, 16, ["modelValue"])
131
+ ], 2);
132
+ };
133
+ }
134
+ });
135
+ exports.default = _sfc_main;