@web-utils/form-ui 1.0.0-beta86 → 1.0.0-beta88

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 (212) hide show
  1. package/affix/index.mjs +1 -1
  2. package/chunks/{4kjeIiag2.mjs → 5RCAxanu2.mjs} +3 -3
  3. package/chunks/{vebd58-O.mjs → 9ec0Wti82.mjs} +1 -1
  4. package/chunks/{BxcsELcB2.mjs → B7BaAm4k2.mjs} +2 -2
  5. package/chunks/{DSTNXl142.mjs → BFhVUqpP2.mjs} +2 -2
  6. package/chunks/BLKcXIrX.mjs +517 -0
  7. package/chunks/{C8h_P_kl2.mjs → BSOrm2U4.mjs} +2 -2
  8. package/chunks/BbUUI4mF.mjs +204 -0
  9. package/chunks/{D_q3C3v4.mjs → BegZOXrr.mjs} +4 -4
  10. package/chunks/{BIy6bO4j.mjs → Bg01eBVa2.mjs} +2 -2
  11. package/chunks/{DJlgX5ty.mjs → BhPVs8Ju.mjs} +1 -1
  12. package/chunks/{DrvwVjzq2.mjs → BmbhIxPF2.mjs} +2 -2
  13. package/chunks/{BYu4QaK72.mjs → Br3whXEJ2.mjs} +2 -2
  14. package/chunks/{y1Q66LEa2.mjs → BuI82QMb2.mjs} +1 -1
  15. package/chunks/{CCpKg0cM.mjs → Bv7b2DXh2.mjs} +2 -2
  16. package/chunks/{ofu8wJKp.mjs → C-s-88fN2.mjs} +1 -1
  17. package/chunks/{CET31mBi.mjs → C54nZqvy2.mjs} +1 -1
  18. package/chunks/CBHGpbDK.mjs +56 -0
  19. package/chunks/CFpGTE5U2.mjs +221 -0
  20. package/chunks/CIihGrgY.mjs +30 -0
  21. package/chunks/{XQwnPkab2.mjs → CW021IPm2.mjs} +1 -1
  22. package/chunks/{CLn5E7NV.mjs → CW1nopZH.mjs} +1 -1
  23. package/chunks/CY2YrwMT.mjs +302 -0
  24. package/chunks/{DVF9q3oX.mjs → CdvD0NRo2.mjs} +2 -2
  25. package/chunks/Cf_h9S62.mjs +378 -0
  26. package/chunks/{8h-xBLL82.mjs → CixNVW_T2.mjs} +10 -10
  27. package/chunks/{By-W0XXn2.mjs → ClkLQjZ82.mjs} +1 -1
  28. package/chunks/CsNZt53l.mjs +4074 -0
  29. package/chunks/{HFLY8Wla.mjs → D1mQTnJ8.mjs} +181 -185
  30. package/chunks/{CjCNtCWd.mjs → D20CQ-B6.mjs} +1 -1
  31. package/chunks/{BxuM-fgJ.mjs → D2kLAzxW.mjs} +1 -1
  32. package/chunks/{tfaGdZX2.mjs → D8_fl5Oq.mjs} +4 -4
  33. package/chunks/{C28bnMcw.mjs → DC3DNg_r.mjs} +1 -1
  34. package/chunks/{DWN5uzm02.mjs → DL4xcGES2.mjs} +10 -10
  35. package/chunks/{SWO35fS42.mjs → Dd4RtBO02.mjs} +1 -1
  36. package/chunks/{3nLaRSbR2.mjs → DdHN2Nv72.mjs} +1 -1
  37. package/chunks/{BrSqLOi5.mjs → DmJaItEY.mjs} +6 -6
  38. package/chunks/{CkHQY4ME2.mjs → Dnapnskp2.mjs} +1 -1
  39. package/chunks/{vHsAJZRT.mjs → MUk_IdeO2.mjs} +2 -2
  40. package/chunks/NAZ8HFBg.mjs +340 -0
  41. package/chunks/{saZ_qJOT.mjs → aOv3rI7q.mjs} +1 -1
  42. package/chunks/{mqi8hesW2.mjs → dxZzZgUn.mjs} +2 -2
  43. package/chunks/{Tq3_dajC2.mjs → m5oFTe8Y2.mjs} +1 -1
  44. package/chunks/{Dst9_BmZ.mjs → n7IipIUY.mjs} +3 -3
  45. package/chunks/{SInS7QSL.mjs → vCOhFr2x.mjs} +1 -1
  46. package/constants/index.d.ts +2 -0
  47. package/constants/index.mjs +2 -2
  48. package/data-table-picker/index.mjs +1 -1
  49. package/dialog-form/index.d.ts +4 -0
  50. package/dialog-form/index.mjs +154 -0
  51. package/dialog-form/style.css +1 -0
  52. package/empty-view/index.d.ts +2 -2
  53. package/flex-box/index.mjs +1 -1
  54. package/flex-column/index.mjs +1 -1
  55. package/flex-item/index.mjs +1 -1
  56. package/flex-row/index.mjs +1 -1
  57. package/flow-designer/index.mjs +1 -1
  58. package/form-cascader/index.mjs +1 -1
  59. package/form-checkbox/index.mjs +1 -1
  60. package/form-checkbox-group/index.mjs +1 -1
  61. package/form-date-picker/index.d.ts +4 -4
  62. package/form-date-picker/index.mjs +1 -1
  63. package/form-holder/index.mjs +1 -1
  64. package/form-image/index.mjs +1 -1
  65. package/form-input/index.mjs +1 -1
  66. package/form-input-cron-expression/index.mjs +1 -1
  67. package/form-input-email/index.mjs +1 -1
  68. package/form-input-id-card/index.mjs +1 -1
  69. package/form-input-number/index.mjs +1 -1
  70. package/form-input-phone-number/index.mjs +1 -1
  71. package/form-input-tag/index.mjs +1 -1
  72. package/form-input-time/index.mjs +1 -1
  73. package/form-item/index.mjs +1 -1
  74. package/form-item-group/index.mjs +1 -1
  75. package/form-radio-group/index.mjs +1 -1
  76. package/form-rate/index.mjs +1 -1
  77. package/form-row/index.mjs +1 -1
  78. package/form-select/index.mjs +1 -1
  79. package/form-slider/index.mjs +1 -1
  80. package/form-switch/index.mjs +1 -1
  81. package/form-table/index.mjs +1 -1
  82. package/form-table-plus/index.mjs +1 -1
  83. package/form-text/index.mjs +1 -1
  84. package/form-textarea/index.mjs +1 -1
  85. package/form-time-select/index.mjs +1 -1
  86. package/form-tree-select/index.mjs +1 -1
  87. package/form-tree-select-multiple/index.mjs +1 -1
  88. package/form-view/index.mjs +2 -2
  89. package/fy-array/index.d.ts +234 -0
  90. package/fy-array/index.mjs +130 -0
  91. package/fy-array/style.css +1 -0
  92. package/fy-button/index.d.ts +18 -0
  93. package/fy-button/index.mjs +2 -0
  94. package/fy-button/style.css +1 -0
  95. package/fy-cascader/index.d.ts +298 -0
  96. package/fy-cascader/index.mjs +116 -0
  97. package/fy-checkbox/index.d.ts +231 -0
  98. package/fy-checkbox/index.mjs +100 -0
  99. package/fy-checkbox/style.css +1 -0
  100. package/fy-curd/index.d.ts +908 -0
  101. package/fy-curd/index.mjs +2 -0
  102. package/fy-date/index.d.ts +246 -0
  103. package/fy-date/index.mjs +79 -0
  104. package/fy-date/style.css +1 -0
  105. package/fy-dynamic/index.d.ts +268 -0
  106. package/fy-dynamic/index.mjs +2 -0
  107. package/fy-empty/index.d.ts +31 -0
  108. package/fy-empty/index.mjs +35 -0
  109. package/fy-empty/style.css +1 -0
  110. package/fy-form/index.d.ts +522 -0
  111. package/fy-form/index.mjs +2 -0
  112. package/fy-form/style.css +1 -0
  113. package/fy-input/index.d.ts +316 -0
  114. package/fy-input/index.mjs +122 -0
  115. package/fy-input-color/index.d.ts +235 -0
  116. package/fy-input-color/index.mjs +80 -0
  117. package/fy-input-icon/index.d.ts +244 -0
  118. package/fy-input-icon/index.mjs +133 -0
  119. package/fy-input-icon/style.css +1 -0
  120. package/fy-input-map/index.d.ts +266 -0
  121. package/fy-input-map/index.mjs +248 -0
  122. package/fy-input-map/style.css +1 -0
  123. package/fy-input-number/index.d.ts +266 -0
  124. package/fy-input-number/index.mjs +78 -0
  125. package/fy-input-table/index.d.ts +248 -0
  126. package/fy-input-table/index.mjs +166 -0
  127. package/fy-input-table/style.css +1 -0
  128. package/fy-input-tree/index.d.ts +351 -0
  129. package/fy-input-tree/index.mjs +266 -0
  130. package/fy-input-tree/style.css +1 -0
  131. package/fy-radio/index.d.ts +218 -0
  132. package/fy-radio/index.mjs +56 -0
  133. package/fy-radio/style.css +1 -0
  134. package/fy-rate/index.d.ts +288 -0
  135. package/fy-rate/index.mjs +90 -0
  136. package/fy-rate/style.css +1 -0
  137. package/fy-select/index.d.ts +324 -0
  138. package/fy-select/index.mjs +2 -0
  139. package/fy-select/style.css +1 -0
  140. package/fy-slider/index.d.ts +249 -0
  141. package/fy-slider/index.mjs +72 -0
  142. package/fy-switch/index.d.ts +229 -0
  143. package/fy-switch/index.mjs +71 -0
  144. package/fy-tabs/index.d.ts +20 -0
  145. package/fy-tabs/index.mjs +50 -0
  146. package/fy-time/index.d.ts +704 -0
  147. package/fy-time/index.mjs +85 -0
  148. package/fy-title/index.d.ts +224 -0
  149. package/fy-title/index.mjs +18 -0
  150. package/fy-title/style.css +1 -0
  151. package/fy-tree/index.d.ts +141 -0
  152. package/fy-tree/index.mjs +390 -0
  153. package/fy-tree/style.css +1 -0
  154. package/fy-u-editor/index.d.ts +116 -0
  155. package/fy-u-editor/index.mjs +2 -0
  156. package/fy-u-editor/style.css +1 -0
  157. package/fy-upload/index.d.ts +379 -0
  158. package/fy-upload/index.mjs +2 -0
  159. package/fy-upload/style.css +1 -0
  160. package/helper/avue.d.ts +36 -0
  161. package/helper/avue.mjs +35 -0
  162. package/helper/input.mjs +1 -1
  163. package/icon-temp/index.d.ts +19 -0
  164. package/icon-temp/index.mjs +27 -0
  165. package/icon-temp/style.css +1 -0
  166. package/image-viewer/index.d.ts +1 -1
  167. package/index.css +1 -1
  168. package/index.d.ts +31 -1
  169. package/index.mjs +118 -90
  170. package/keyboard/index.mjs +1 -1
  171. package/monaco-editor/index.d.ts +126 -0
  172. package/monaco-editor/index.mjs +2 -0
  173. package/monaco-editor/style.css +1 -0
  174. package/package.json +3 -1
  175. package/pageable-table/index.d.ts +1 -1
  176. package/pageable-table/index.mjs +1 -1
  177. package/photo-swipe/index.mjs +1 -1
  178. package/resolver/components.mjs +1 -1
  179. package/split-pane/index.mjs +1 -1
  180. package/sub-table/index.mjs +1 -1
  181. package/sub-table-plus/index.mjs +1 -1
  182. package/table-column-def/index.d.ts +6 -6
  183. package/table-view/index.mjs +4 -4
  184. package/tag-render/index.d.ts +1 -1
  185. package/toolbar/index.mjs +1 -1
  186. package/vue-cron/index.mjs +1 -1
  187. package/vue-tags-input/index.d.ts +1 -1
  188. package/vue-tree-select/index.mjs +1 -1
  189. package/watermark/index.mjs +1 -1
  190. package/web-types.json +1 -1
  191. package/x-input-tag/index.mjs +1 -1
  192. package/chunks/{DCqyZyF6.mjs → BCYFaOiB.mjs} +0 -0
  193. package/chunks/{B1luuf_A2.mjs → BJDeTpmp2.mjs} +0 -0
  194. package/chunks/{BhHMGhJ8.mjs → BcsscZAM.mjs} +0 -0
  195. package/chunks/{DbcxJ45j.mjs → BfW25VbY.mjs} +1 -1
  196. package/chunks/{6dNVtIN32.mjs → BjccroM8.mjs} +0 -0
  197. package/chunks/{BTGrh7dw2.mjs → Br0vC3nS2.mjs} +0 -0
  198. package/chunks/{BM5LdxU72.mjs → CB0zQsKV2.mjs} +0 -0
  199. package/chunks/{Bs926z902.mjs → CHqxWrj7.mjs} +1 -1
  200. package/chunks/{B5c0s3IR.mjs → CJwAjhLy.mjs} +1 -1
  201. package/chunks/{BAG_R87k2.mjs → CZnwC17w.mjs} +0 -0
  202. package/chunks/{tVHVSu5h.mjs → CbedyG4s.mjs} +4 -4
  203. package/chunks/{BwL9Xz1F.mjs → Cp1olyWc.mjs} +0 -0
  204. package/chunks/{KOJEsarR2.mjs → CpmWELPU.mjs} +0 -0
  205. package/chunks/{C-zPVdz-.mjs → D9ft-f6n.mjs} +1 -1
  206. package/chunks/{PEU1JRcN2.mjs → DEHzWyyp.mjs} +0 -0
  207. package/chunks/{CHmZyvFr.mjs → DJe2Reym.mjs} +0 -0
  208. package/chunks/{CpsHWpwH2.mjs → DNq7pbXh2.mjs} +0 -0
  209. package/chunks/{X-ckP2Hj.mjs → DOLQ28wD.mjs} +0 -0
  210. package/chunks/{tqW2DSco.mjs → fT8tFJVO.mjs} +1 -1
  211. /package/chunks/{Dkw6LNCq2.mjs → jG7vu3RX.mjs} +0 -0
  212. /package/chunks/{b0ve2YgF.mjs → mQG01w6Y.mjs} +0 -0
@@ -0,0 +1,266 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ dialogWidth: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ rows: NumberConstructor;
7
+ minRows: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ maxRows: {
12
+ type: NumberConstructor;
13
+ };
14
+ }>, {}, {
15
+ formattedAddress: string;
16
+ address: string;
17
+ poi: {};
18
+ marker: null;
19
+ map: null;
20
+ box: boolean;
21
+ }, {
22
+ longitude(): undefined;
23
+ latitude(): undefined;
24
+ title(): "查看" | "选择";
25
+ }, {
26
+ clear(): void;
27
+ handleSubmit(): void;
28
+ handleClear(): void;
29
+ setVal(): void;
30
+ handleShow(): void;
31
+ addMarker(R: any, P: any): void;
32
+ clearMarker(): void;
33
+ getAddress(R: any, P: any): void;
34
+ handleClose(): void;
35
+ addClick(): void;
36
+ init(callback: any): void;
37
+ initPoip(): void;
38
+ poiPickerReady(poiPicker: any): void;
39
+ }, {
40
+ mixins: {
41
+ methods: {
42
+ getSlotName(item: any | undefined, type: string | undefined, slot: string): any;
43
+ getSlotList(list: never[] | undefined, slot: string, propList: Array<any>): string[];
44
+ };
45
+ }[];
46
+ data(): {
47
+ stringMode: boolean;
48
+ name: string;
49
+ text: undefined;
50
+ propsHttpDefault: {
51
+ name: string;
52
+ url: string;
53
+ fileName: string;
54
+ res: string;
55
+ };
56
+ propsDefault: {
57
+ rowKey: string;
58
+ rowParentKey: string;
59
+ nodeKey: string;
60
+ label: string;
61
+ value: string;
62
+ desc: string;
63
+ groups: string;
64
+ title: string;
65
+ leaf: string;
66
+ children: string;
67
+ hasChildren: string;
68
+ labelText: string;
69
+ disabled: string;
70
+ };
71
+ };
72
+ props: {
73
+ blur: FunctionConstructor;
74
+ focus: FunctionConstructor;
75
+ change: FunctionConstructor;
76
+ click: FunctionConstructor;
77
+ typeformat: FunctionConstructor;
78
+ control: FunctionConstructor;
79
+ separator: {
80
+ type: StringConstructor;
81
+ default: string;
82
+ };
83
+ params: {
84
+ type: ObjectConstructor;
85
+ default: () => {};
86
+ };
87
+ listType: {
88
+ type: StringConstructor;
89
+ };
90
+ tableData: {
91
+ type: ObjectConstructor;
92
+ };
93
+ modelValue: {};
94
+ column: {
95
+ type: ObjectConstructor;
96
+ default: () => {};
97
+ };
98
+ label: {
99
+ type: StringConstructor;
100
+ default: string;
101
+ };
102
+ readonly: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ size: StringConstructor;
107
+ tip: {
108
+ type: StringConstructor;
109
+ default: string;
110
+ };
111
+ disabled: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ dataType: {
116
+ type: StringConstructor;
117
+ };
118
+ clearable: {
119
+ type: BooleanConstructor;
120
+ default: boolean;
121
+ };
122
+ type: {
123
+ type: StringConstructor;
124
+ default: string;
125
+ };
126
+ dicUrl: {
127
+ type: StringConstructor;
128
+ default: string;
129
+ };
130
+ dicMethod: {
131
+ type: StringConstructor;
132
+ default: string;
133
+ };
134
+ dicFormatter: FunctionConstructor;
135
+ dicQuery: {
136
+ type: ObjectConstructor;
137
+ default: () => {};
138
+ };
139
+ dic: {
140
+ type: ArrayConstructor;
141
+ default: () => never[];
142
+ };
143
+ placeholder: {
144
+ type: StringConstructor;
145
+ default: string;
146
+ };
147
+ rules: {
148
+ type: ArrayConstructor;
149
+ };
150
+ min: {
151
+ type: NumberConstructor;
152
+ };
153
+ max: {
154
+ type: NumberConstructor;
155
+ };
156
+ multiple: {
157
+ type: BooleanConstructor;
158
+ default: boolean;
159
+ };
160
+ button: {
161
+ type: BooleanConstructor;
162
+ default: boolean;
163
+ };
164
+ group: {
165
+ type: BooleanConstructor;
166
+ default: boolean;
167
+ };
168
+ row: {
169
+ type: BooleanConstructor;
170
+ default: boolean;
171
+ };
172
+ prop: {
173
+ type: StringConstructor;
174
+ default: string;
175
+ };
176
+ border: {
177
+ type: BooleanConstructor;
178
+ default: boolean;
179
+ };
180
+ popperClass: {
181
+ type: StringConstructor;
182
+ };
183
+ propsHttp: {
184
+ type: ObjectConstructor;
185
+ default: () => {
186
+ name: string;
187
+ url: string;
188
+ fileName: string;
189
+ res: string;
190
+ };
191
+ };
192
+ props: {
193
+ type: ObjectConstructor;
194
+ default: () => {
195
+ rowKey: string;
196
+ rowParentKey: string;
197
+ nodeKey: string;
198
+ label: string;
199
+ value: string;
200
+ desc: string;
201
+ groups: string;
202
+ title: string;
203
+ leaf: string;
204
+ children: string;
205
+ hasChildren: string;
206
+ labelText: string;
207
+ disabled: string;
208
+ };
209
+ };
210
+ };
211
+ watch: {
212
+ text: {
213
+ handler(this: any, n: any): void;
214
+ };
215
+ modelValue: {
216
+ handler(this: any): void;
217
+ };
218
+ };
219
+ computed: {
220
+ clearableVal(this: any): any;
221
+ componentName(this: any): string;
222
+ required(this: any): boolean;
223
+ isArray(this: any): boolean;
224
+ isString(this: any): boolean;
225
+ isNumber(this: any): boolean;
226
+ nameKey(this: any): any;
227
+ urlKey(this: any): any;
228
+ resKey(this: any): any;
229
+ groupsKey(this: any): any;
230
+ valueKey(this: any): any;
231
+ descKey(this: any): any;
232
+ leafKey(this: any): any;
233
+ labelKey(this: any): any;
234
+ childrenKey(this: any): any;
235
+ disabledKey(this: any): any;
236
+ idKey(this: any): any;
237
+ };
238
+ created(this: any): void;
239
+ } | {
240
+ methods: {
241
+ bindEvent(this: any, name: any, params: any): void;
242
+ initVal(this: any): void;
243
+ getLabelText(this: any, item: any): any;
244
+ handleFocus(this: any, event: any): void;
245
+ handleBlur(this: any, event: any): void;
246
+ handleClick(this: any, event: any): void;
247
+ handleChange(this: any, value: any): void;
248
+ };
249
+ }, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
250
+ dialogWidth: {
251
+ type: StringConstructor;
252
+ default: string;
253
+ };
254
+ rows: NumberConstructor;
255
+ minRows: {
256
+ type: NumberConstructor;
257
+ default: number;
258
+ };
259
+ maxRows: {
260
+ type: NumberConstructor;
261
+ };
262
+ }>> & Readonly<{}>, {
263
+ minRows: number;
264
+ dialogWidth: string;
265
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
266
+ export default _default;
@@ -0,0 +1,248 @@
1
+ import { t as e } from "../chunks/B1MSrc6f.mjs";
2
+ import { t } from "../chunks/V-Js6hNd.mjs";
3
+ import { t as n } from "../chunks/CIihGrgY.mjs";
4
+ import { n as r, t as i } from "../chunks/Cf_h9S62.mjs";
5
+ import { ElInput as a } from "element-plus/es";
6
+ import "element-plus/es/components/base/style/css";
7
+ import "element-plus/es/components/input/style/css";
8
+ import { createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, openBlock as f, withCtx as p } from "vue";
9
+ import { isBlank as m } from "@web-utils/core";
10
+ //#region src/components/avue/fy-from/input-map/FyInputMap.vue
11
+ var h = {
12
+ name: "FyInputMap",
13
+ mixins: [r, i],
14
+ props: {
15
+ dialogWidth: {
16
+ type: String,
17
+ default: "60%"
18
+ },
19
+ rows: Number,
20
+ minRows: {
21
+ type: Number,
22
+ default: 1
23
+ },
24
+ maxRows: { type: Number }
25
+ },
26
+ data() {
27
+ return {
28
+ formattedAddress: "",
29
+ address: "",
30
+ poi: {},
31
+ marker: null,
32
+ map: null,
33
+ box: !1
34
+ };
35
+ },
36
+ computed: {
37
+ longitude() {
38
+ var e;
39
+ return (e = this.text) == null ? void 0 : e[0];
40
+ },
41
+ latitude() {
42
+ var e;
43
+ return (e = this.text) == null ? void 0 : e[1];
44
+ },
45
+ title() {
46
+ return this.disabled || this.readonly ? "查看" : "选择";
47
+ }
48
+ },
49
+ watch: {
50
+ poi(e) {
51
+ this.formattedAddress = e.formattedAddress;
52
+ },
53
+ value(e) {
54
+ m(e) && (this.poi = {}, this.address = "");
55
+ },
56
+ text(e) {
57
+ m(e) || (this.poi = {
58
+ longitude: e[0],
59
+ latitude: e[1],
60
+ formattedAddress: e[2]
61
+ }, this.address = e[2]);
62
+ },
63
+ box: {
64
+ handler() {
65
+ this.box && this.$nextTick(() => this.init(() => {
66
+ this.longitude && this.latitude && (this.addMarker(this.longitude, this.latitude), this.getAddress(this.longitude, this.latitude));
67
+ }));
68
+ },
69
+ immediate: !0
70
+ }
71
+ },
72
+ unmounted() {
73
+ this.service = null;
74
+ },
75
+ methods: {
76
+ clear() {
77
+ this.poi = {}, this.clearMarker();
78
+ },
79
+ handleSubmit() {
80
+ this.setVal(), this.box = !1;
81
+ },
82
+ handleClear() {
83
+ this.text = [], this.poi = {}, this.handleChange(this.text);
84
+ },
85
+ setVal() {
86
+ this.text = [
87
+ this.poi.longitude,
88
+ this.poi.latitude,
89
+ this.poi.formattedAddress
90
+ ], this.handleChange(this.text);
91
+ },
92
+ handleShow() {
93
+ this.$refs.main.blur(), this.box = !0;
94
+ },
95
+ addMarker(e, t) {
96
+ this.clearMarker(), this.marker = new window.AMap.Marker({ position: [e, t] }), this.marker.setMap(this.map);
97
+ },
98
+ clearMarker() {
99
+ this.marker && (this.marker.setMap(null), this.marker = null);
100
+ },
101
+ getAddress(e, t) {
102
+ this.service = new window.AMap.service("AMap.Geocoder", () => {
103
+ new window.AMap.Geocoder({}).getAddress([e, t], (n, r) => {
104
+ if (n === "complete" && r.info === "OK") {
105
+ let n = r.regeocode;
106
+ this.poi = Object.assign(n, {
107
+ longitude: e,
108
+ latitude: t
109
+ });
110
+ let i = document.createElement("div"), a = document.createElement("img");
111
+ a.src = "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png", i.appendChild(a);
112
+ let o = document.createElement("span");
113
+ o.className = "avue-input-map__marker", o.innerHTML = this.poi.formattedAddress, i.appendChild(o), this.marker.setContent(i);
114
+ }
115
+ });
116
+ });
117
+ },
118
+ handleClose() {
119
+ var e;
120
+ (e = this.poiPicker) == null || e.clearSearchResults();
121
+ },
122
+ addClick() {
123
+ this.map.on("click", (e) => {
124
+ if (this.disabled || this.readonly) return;
125
+ let t = e.lnglat, n = t.P || t.Q, r = t.R;
126
+ this.addMarker(r, n), this.getAddress(r, n);
127
+ });
128
+ },
129
+ init(e) {
130
+ this.map = new window.AMap.Map("map__container", {
131
+ zoom: 13,
132
+ center: (() => {
133
+ if (this.longitude && this.latitude) return [this.longitude, this.latitude];
134
+ })(),
135
+ ...this.params
136
+ }), this.initPoip(), this.addClick(), e();
137
+ },
138
+ initPoip() {
139
+ window.AMapUI.loadUI(["misc/PoiPicker"], (e) => {
140
+ let t = new e({
141
+ input: "map__input",
142
+ placeSearchOptions: {
143
+ map: this.map,
144
+ pageSize: 10
145
+ },
146
+ searchResultsContainer: "map__result"
147
+ });
148
+ this.poiPickerReady(t);
149
+ });
150
+ },
151
+ poiPickerReady(e) {
152
+ this.poiPicker = e, e.on("poiPicked", (t) => {
153
+ this.clearMarker();
154
+ let n = t.source, r = t.item;
155
+ this.poi = Object.assign(r, {
156
+ formattedAddress: r.name,
157
+ longitude: r.location.R,
158
+ latitude: r.location.P || r.location.Q
159
+ }), n !== "search" && e.searchByKeyword(r.name);
160
+ });
161
+ }
162
+ }
163
+ }, g = { class: "avue-input-map" }, _ = { key: 0 }, v = {
164
+ key: 0,
165
+ class: "avue-input-map__content"
166
+ };
167
+ function y(e, r, i, m, h, y) {
168
+ let b = a, x = n, S = t;
169
+ return f(), c("div", g, [d(b, {
170
+ ref: "main",
171
+ modelValue: h.address,
172
+ "onUpdate:modelValue": r[0] || (r[0] = (e) => h.address = e),
173
+ size: e.size,
174
+ clearable: e.clearableVal,
175
+ rows: i.rows,
176
+ autosize: {
177
+ minRows: i.minRows,
178
+ maxRows: i.maxRows
179
+ },
180
+ disabled: e.disabled,
181
+ type: "textarea",
182
+ placeholder: e.placeholder,
183
+ onClear: y.handleClear,
184
+ onFocus: y.handleShow,
185
+ onClick: e.handleClick
186
+ }, null, 8, [
187
+ "modelValue",
188
+ "size",
189
+ "clearable",
190
+ "rows",
191
+ "autosize",
192
+ "disabled",
193
+ "placeholder",
194
+ "onClear",
195
+ "onFocus",
196
+ "onClick"
197
+ ]), h.box ? (f(), c("div", _, [d(S, {
198
+ modelValue: h.box,
199
+ "onUpdate:modelValue": r[2] || (r[2] = (e) => h.box = e),
200
+ "show-full-screen": "",
201
+ width: i.dialogWidth,
202
+ title: e.placeholder,
203
+ onClose: y.handleClose
204
+ }, {
205
+ footer: p(() => [e.disabled || e.readonly ? s("v-if", !0) : (f(), o(x, {
206
+ key: 0,
207
+ type: "primary",
208
+ size: e.size,
209
+ icon: "el-icon-check",
210
+ onClick: y.handleSubmit
211
+ }, {
212
+ default: p(() => [...r[4] || (r[4] = [u(" 确 定 ", -1)])]),
213
+ _: 1
214
+ }, 8, ["size", "onClick"]))]),
215
+ default: p(() => [h.box ? (f(), c("div", v, [d(b, {
216
+ id: "map__input",
217
+ modelValue: h.formattedAddress,
218
+ "onUpdate:modelValue": r[1] || (r[1] = (e) => h.formattedAddress = e),
219
+ class: "avue-input-map__content-input",
220
+ size: e.size,
221
+ readonly: e.disabled,
222
+ clearable: "",
223
+ placeholder: "输入关键字选取地点",
224
+ onClear: y.clear
225
+ }, null, 8, [
226
+ "modelValue",
227
+ "size",
228
+ "readonly",
229
+ "onClear"
230
+ ]), r[3] || (r[3] = l("div", { class: "avue-input-map__content-box" }, [l("div", {
231
+ id: "map__container",
232
+ class: "avue-input-map__content-container",
233
+ tabindex: "0"
234
+ }), l("div", {
235
+ id: "map__result",
236
+ class: "avue-input-map__content-result"
237
+ })], -1))])) : s("v-if", !0)]),
238
+ _: 1
239
+ }, 8, [
240
+ "modelValue",
241
+ "width",
242
+ "title",
243
+ "onClose"
244
+ ])])) : s("v-if", !0)]);
245
+ }
246
+ var b = /* @__PURE__ */ e(h, [["render", y]]);
247
+ //#endregion
248
+ export { b as default };
@@ -0,0 +1 @@
1
+ .amap-icon img,.amap-marker-content img{width:25px;height:34px}.avue-input-map__marker{color:#fff;white-space:nowrap;background-color:#25a5f7;border-radius:3px;padding:4px 10px;font-family:"";font-size:12px;position:absolute;top:-20px;right:-118px;box-shadow:1px 1px 1px #0a0a0a33}.avue-input-map__content{flex-direction:column;height:100%;display:flex}.avue-input-map__content-input{margin-bottom:10px}.avue-input-map__content-box{flex:auto;position:relative}.avue-input-map__content-container{width:100%;height:100%;min-height:450px}.avue-input-map__content-result{width:250px;height:450px;position:absolute;top:0;right:-8px;overflow-y:auto;display:block!important}