@opentiny/vue-renderless 3.13.1 → 3.14.0

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 (321) hide show
  1. package/action-sheet/index.js +20 -13
  2. package/action-sheet/vue.js +8 -7
  3. package/amount/index.js +100 -25
  4. package/amount/vue.js +102 -26
  5. package/anchor/index.js +1 -0
  6. package/area/index.js +8 -8
  7. package/area/vue.js +5 -5
  8. package/async-flowchart/index.js +16 -3
  9. package/autocomplete/index.js +58 -14
  10. package/autocomplete/vue.js +40 -12
  11. package/badge/index.js +12 -0
  12. package/badge/vue.js +6 -4
  13. package/breadcrumb/vue.js +3 -1
  14. package/breadcrumb-item/vue.js +6 -2
  15. package/button/index.js +5 -1
  16. package/calendar/index.js +2 -86
  17. package/calendar-bar/index.js +18 -4
  18. package/calendar-view/index.js +5 -1
  19. package/calendar-view/vue.js +16 -3
  20. package/card-group/vue.js +4 -2
  21. package/cascader/index.js +86 -34
  22. package/cascader/vue.js +61 -20
  23. package/cascader-menu/index.js +7 -7
  24. package/cascader-menu/vue.js +2 -3
  25. package/cascader-mobile/index.js +36 -23
  26. package/cascader-mobile/vue.js +6 -0
  27. package/cascader-node/index.js +13 -1
  28. package/cascader-node/vue.js +15 -4
  29. package/cascader-panel/index.js +1 -1
  30. package/cascader-select/column-index.js +150 -0
  31. package/cascader-select/column.js +120 -0
  32. package/cascader-select/index.js +29 -165
  33. package/cascader-select/usePicker.js +251 -0
  34. package/cascader-select/useTouch.js +65 -0
  35. package/cascader-select/vue.js +35 -47
  36. package/cell/vue.js +2 -1
  37. package/chart-bar/index.js +2 -3
  38. package/chart-core/deps/constants.js +43 -43
  39. package/chart-core/index.js +1 -1
  40. package/chart-gauge/index.js +2 -2
  41. package/chart-heatmap/index.js +17 -10
  42. package/chart-line/index.js +8 -9
  43. package/chart-tree/index.js +2 -2
  44. package/chart-waterfall/index.js +4 -6
  45. package/checkbox/index.js +18 -1
  46. package/checkbox/vue.js +15 -7
  47. package/checkbox-group/vue.js +1 -0
  48. package/col/vue.js +1 -1
  49. package/collapse/index.js +3 -3
  50. package/color-select-panel/vue.js +0 -7
  51. package/column-list-item/index.js +17 -1
  52. package/column-list-item/vue.js +8 -3
  53. package/common/date.js +7 -5
  54. package/common/deps/clickoutside.js +6 -2
  55. package/common/deps/dom.js +19 -4
  56. package/common/deps/popper.js +44 -11
  57. package/common/deps/resize-event.js +1 -0
  58. package/common/deps/touch-emulator.js +4 -1
  59. package/common/deps/tree-model/node.js +2 -2
  60. package/common/deps/tree-model/tree-store.js +2 -13
  61. package/common/deps/useRect.js +25 -0
  62. package/common/deps/vue-popper.js +38 -20
  63. package/common/index.js +2 -2
  64. package/common/runtime.js +1 -1
  65. package/common/string.js +2 -2
  66. package/common/type.js +2 -1
  67. package/common/validate/rules/enum.js +1 -1
  68. package/common/validate/rules/pattern.js +2 -2
  69. package/common/validate/rules/range.js +8 -5
  70. package/common/validate/rules/required.js +1 -1
  71. package/common/validate/rules/type.js +5 -5
  72. package/common/validate/rules/whitespace.js +1 -1
  73. package/common/validate/util.js +15 -16
  74. package/common/validate/validations/integer.js +1 -1
  75. package/common/validate/validations/method.js +1 -1
  76. package/currency/index.js +74 -7
  77. package/currency/vue.js +21 -5
  78. package/date-panel/index.js +16 -0
  79. package/date-panel/vue.js +8 -2
  80. package/date-picker-mobile/index.js +12 -0
  81. package/date-picker-mobile/vue.js +7 -1
  82. package/date-range/vue.js +14 -6
  83. package/date-table/index.js +5 -0
  84. package/date-table/vue.js +3 -1
  85. package/dialog-box/index.js +46 -14
  86. package/dialog-box/vue.js +30 -7
  87. package/dialog-select/index.js +6 -3
  88. package/dialog-select/vue.js +8 -4
  89. package/drawer/index.js +27 -5
  90. package/drawer/vue.js +14 -7
  91. package/dropdown/index.js +7 -7
  92. package/dropdown/vue.js +6 -2
  93. package/dropdown-item/index.js +9 -1
  94. package/dropdown-item/mf.js +6 -10
  95. package/dropdown-item/vue.js +20 -7
  96. package/dropdown-menu/index.js +20 -7
  97. package/dropdown-menu/vue.js +4 -3
  98. package/exception/index.js +2 -7
  99. package/exception/vue.js +7 -10
  100. package/fall-menu/index.js +5 -1
  101. package/fall-menu/vue.js +13 -2
  102. package/file-upload/index.js +68 -18
  103. package/file-upload/vue.js +38 -8
  104. package/filter-box/index.js +1 -0
  105. package/float-button/index.js +42 -0
  106. package/float-button/vue.js +101 -0
  107. package/floating-button/index.js +62 -16
  108. package/floating-button/vue.js +27 -9
  109. package/flowchart/index.js +134 -25
  110. package/flowchart/node.js +13 -4
  111. package/flowchart/vue.js +16 -4
  112. package/form/vue.js +8 -0
  113. package/form-item/index.js +5 -5
  114. package/form-item/vue.js +3 -1
  115. package/fullscreen/index.js +5 -5
  116. package/fullscreen/vue.js +3 -3
  117. package/grid/plugins/export.js +5 -2
  118. package/grid/utils/column.js +1 -0
  119. package/grid/utils/dom.js +7 -1
  120. package/image/index.js +6 -1
  121. package/image/vue.js +6 -3
  122. package/image-viewer/index.js +62 -51
  123. package/image-viewer/vue.js +17 -5
  124. package/input/index.js +81 -20
  125. package/input/vue.js +44 -18
  126. package/ip-address/index.js +61 -19
  127. package/ip-address/vue.js +22 -4
  128. package/link/vue.js +3 -1
  129. package/loading/index.js +2 -2
  130. package/loading/vue.js +8 -2
  131. package/logout/index.js +1 -1
  132. package/menu/index.js +15 -2
  133. package/menu/vue.js +22 -17
  134. package/mind-map/index.js +47 -0
  135. package/mind-map/vue.js +53 -0
  136. package/modal/index.js +44 -4
  137. package/modal/vue.js +18 -4
  138. package/multi-select/index.js +186 -11
  139. package/multi-select/vue.js +60 -15
  140. package/multi-select-item/index.js +23 -0
  141. package/multi-select-item/vue.js +31 -0
  142. package/numeric/index.js +46 -12
  143. package/numeric/vue.js +44 -19
  144. package/option/index.js +27 -9
  145. package/option/vue.js +37 -21
  146. package/option-group/index.js +3 -3
  147. package/package.json +1 -1
  148. package/pager/index.js +18 -4
  149. package/pager/vue.js +16 -5
  150. package/picker/index.js +258 -49
  151. package/picker/mb.js +42 -0
  152. package/picker/vue.js +70 -17
  153. package/picker-column/index.js +1 -1
  154. package/pop-upload/vue.js +3 -0
  155. package/popconfirm/index.js +3 -6
  156. package/popconfirm/vue.js +1 -1
  157. package/popeditor/index.js +71 -32
  158. package/popeditor/vue.js +15 -11
  159. package/popover/index.js +4 -4
  160. package/popover/vue.js +6 -6
  161. package/popup/index.js +3 -3
  162. package/popup/vue.js +5 -5
  163. package/pull-refresh/index.js +13 -13
  164. package/pull-refresh/vue.js +5 -4
  165. package/radio/index.js +0 -17
  166. package/radio/vue.js +4 -10
  167. package/rate/index.js +1 -1
  168. package/rate/vue.js +0 -2
  169. package/record/index.js +4 -1
  170. package/rich-text/clipboard.js +54 -0
  171. package/rich-text/index.js +192 -0
  172. package/rich-text/module/file-upload.js +107 -0
  173. package/rich-text/module/image-drop.js +63 -0
  174. package/rich-text/module/image-upload.js +89 -0
  175. package/rich-text/options.js +141 -0
  176. package/rich-text/table-module.js +382 -0
  177. package/rich-text/vue.js +102 -0
  178. package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
  179. package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
  180. package/scrollbar/index.js +11 -11
  181. package/scrollbar/vue-bar.js +3 -3
  182. package/scrollbar/vue.js +5 -5
  183. package/search/index.js +9 -9
  184. package/search/vue.js +8 -6
  185. package/select/index.js +457 -389
  186. package/select/vue.js +257 -161
  187. package/select-dropdown/index.js +61 -3
  188. package/select-dropdown/vue.js +85 -8
  189. package/select-view/index.js +3 -1
  190. package/selected-box/index.js +2 -0
  191. package/selected-box/vue.js +6 -3
  192. package/signature/index.js +241 -0
  193. package/signature/vue.js +88 -0
  194. package/skeleton/index.js +14 -0
  195. package/skeleton/vue.js +15 -0
  196. package/skeleton-item/vue.js +15 -0
  197. package/slider/index.js +70 -17
  198. package/slider/vue.js +16 -7
  199. package/split/index.js +5 -3
  200. package/split/vue.js +4 -6
  201. package/standard-list-item/index.js +15 -1
  202. package/standard-list-item/vue.js +6 -5
  203. package/steps/index.js +25 -2
  204. package/steps/slide-bar.js +8 -1
  205. package/steps/vue.js +15 -3
  206. package/tab-item-mf/vue.js +14 -8
  207. package/tab-nav/index.js +30 -5
  208. package/tab-nav/vue.js +16 -4
  209. package/tabbar/vue.js +9 -3
  210. package/tabbar-item/vue.js +3 -2
  211. package/tabs/index.js +16 -4
  212. package/tabs/vue.js +2 -1
  213. package/tabs-mf/index.js +20 -6
  214. package/tabs-mf/vue-nav.js +26 -11
  215. package/tabs-mf/vue.js +7 -7
  216. package/tabs-mf/wheel.js +1 -0
  217. package/tag/index.js +1 -1
  218. package/tag-group/index.js +2 -1
  219. package/time/index.js +5 -2
  220. package/time/vue.js +1 -1
  221. package/time-line/index.js +3 -3
  222. package/time-line/vue.js +2 -2
  223. package/time-picker-mobile/index.js +24 -5
  224. package/time-picker-mobile/vue.js +17 -7
  225. package/time-range/index.js +2 -0
  226. package/timeline-item/vue.js +1 -1
  227. package/tooltip/index.js +6 -3
  228. package/tooltip/vue.js +4 -4
  229. package/transfer/index.js +20 -22
  230. package/transfer/vue.js +1 -6
  231. package/transfer-panel/vue.js +3 -5
  232. package/tree/index.js +21 -4
  233. package/tree/vue.js +10 -8
  234. package/tree-menu/index.js +31 -5
  235. package/tree-menu/vue.js +28 -15
  236. package/tree-node/index.js +18 -18
  237. package/tree-node/vue.js +6 -5
  238. package/types/action-sheet.type.d.ts +118 -1
  239. package/types/alert.type.d.ts +1 -1
  240. package/types/amount.type.d.ts +168 -1
  241. package/types/area.type.d.ts +134 -1
  242. package/types/async-flowchart.type.d.ts +72 -0
  243. package/types/autocomplete.type.d.ts +199 -1
  244. package/types/badge.type.d.ts +3 -1
  245. package/types/breadcrumb-item.type.d.ts +2 -0
  246. package/types/breadcrumb.type.d.ts +2 -0
  247. package/types/button-group.type.d.ts +3 -3
  248. package/types/button.type.d.ts +4 -0
  249. package/types/cascader-menu.type.d.ts +3 -4
  250. package/types/cascader-node.type.d.ts +5 -2
  251. package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
  252. package/types/cascader-panel.type.d.ts +3 -241
  253. package/types/cascader.type.d.ts +329 -1
  254. package/types/checkbox.type.d.ts +9 -3
  255. package/types/collapse.type.d.ts +20 -3
  256. package/types/date-picker.type.d.ts +37 -0
  257. package/types/dialog-box.type.d.ts +13 -3
  258. package/types/drawer.type.d.ts +133 -1
  259. package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
  260. package/types/dropdown-item.type.d.ts +1 -1
  261. package/types/dropdown-menu.type.d.ts +1 -1
  262. package/types/dropdown.type.d.ts +1 -5
  263. package/types/fall-menu.type.d.ts +94 -1
  264. package/types/file-upload.type.d.ts +1 -1
  265. package/types/float-button.type.d.ts +123 -0
  266. package/types/form-item.type.d.ts +1 -1
  267. package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
  268. package/types/form.type.d.ts +1 -1
  269. package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
  270. package/types/input.type.d.ts +1 -5
  271. package/types/ip-address.type.d.ts +160 -1
  272. package/types/link.type.d.ts +6 -3
  273. package/types/loading.type.d.ts +7 -0
  274. package/types/milestone.type.d.ts +1 -1
  275. package/types/mind-map.type.d.ts +20 -0
  276. package/types/modal.type.d.ts +29 -2
  277. package/types/numeric.type.d.ts +41 -10
  278. package/types/pager.type.d.ts +13 -1
  279. package/types/picker.type.d.ts +18 -0
  280. package/types/popconfirm.type.d.ts +86 -1
  281. package/types/popeditor.type.d.ts +5 -1
  282. package/types/popover.type.d.ts +3 -3
  283. package/types/progress.type.d.ts +3 -1
  284. package/types/radio.type.d.ts +0 -4
  285. package/types/rate.type.d.ts +236 -1
  286. package/types/search.type.d.ts +88 -1
  287. package/types/shared.type.d.ts +1 -1
  288. package/types/skeleton-item.type.d.ts +38 -0
  289. package/types/skeleton.type.d.ts +45 -0
  290. package/types/slider.type.d.ts +49 -10
  291. package/types/steps.type.d.ts +15 -4
  292. package/types/switch.type.d.ts +3 -3
  293. package/types/tab-bar.type.d.ts +1 -1
  294. package/types/tab-nav.type.d.ts +7 -2
  295. package/types/tabs.type.d.ts +9 -1
  296. package/types/tag-group.type.d.ts +64 -1
  297. package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
  298. package/types/time-line.type.d.ts +1 -1
  299. package/types/timeline-item.type.d.ts +1 -1
  300. package/types/tooltip.type.d.ts +2 -2
  301. package/types/transfer.type.d.ts +185 -1
  302. package/types/tree-menu.type.d.ts +210 -1
  303. package/types/upload-dragger.type.d.ts +2 -2
  304. package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
  305. package/types/upload-list.type.d.ts +1 -1
  306. package/types/upload.type.d.ts +1 -1
  307. package/types/user-head.type.d.ts +146 -1
  308. package/types/wizard.type.d.ts +1 -0
  309. package/upload/index.js +64 -34
  310. package/upload/vue.js +9 -5
  311. package/upload-dragger/index.js +22 -20
  312. package/upload-list/index.js +24 -18
  313. package/upload-list/vue.js +9 -4
  314. package/user/index.js +34 -25
  315. package/user/vue.js +1 -1
  316. package/user-head/index.js +3 -3
  317. package/watermark/index.js +11 -0
  318. package/wheel/index.js +3 -0
  319. package/wizard/vue.js +4 -2
  320. package/common/deps/modal-queue.js +0 -6
  321. package/common/deps/requestAnimationFrame.js +0 -25
package/picker/mb.js ADDED
@@ -0,0 +1,42 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ const dateMobileToggle = ({ state, props }) => (visible) => {
3
+ if (props.readonly || state.pickerDisabled || state.dateMobileOption.visible === visible)
4
+ return;
5
+ if (visible) {
6
+ state.dateMobileOption.value = props.modelValue;
7
+ }
8
+ state.dateMobileOption.visible = visible;
9
+ };
10
+ const timeMobileToggle = ({ state, props, api }) => (visible) => {
11
+ if (props.readonly || state.pickerDisabled || state.timeMobileOption.visible === visible)
12
+ return;
13
+ if (visible) {
14
+ state.timeMobileOption.value = api.dateToTimeArray(props.modelValue);
15
+ }
16
+ state.timeMobileOption.visible = visible;
17
+ };
18
+ const timeMobileConfirm = ({ state, api }) => () => {
19
+ api.emitInput(api.timeArrayToDate(state.timeMobileOption.value));
20
+ };
21
+ const dateToTimeArray = (value) => {
22
+ const date = new Date(value);
23
+ return [date.getHours(), date.getMinutes(), date.getSeconds()];
24
+ };
25
+ const timeArrayToDate = ({ props }) => (value) => {
26
+ const timeArr = value;
27
+ let date = new Date(props.modelValue);
28
+ if (isNaN(date.getTime())) {
29
+ date = /* @__PURE__ */ new Date();
30
+ }
31
+ date.setHours(timeArr[0]);
32
+ date.setMinutes(timeArr[1]);
33
+ date.setSeconds(timeArr[2]);
34
+ return date;
35
+ };
36
+ export {
37
+ dateMobileToggle,
38
+ dateToTimeArray,
39
+ timeArrayToDate,
40
+ timeMobileConfirm,
41
+ timeMobileToggle
42
+ };
package/picker/vue.js CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  parseString,
25
25
  formatToString,
26
26
  handleMouseEnter,
27
+ handleInput,
27
28
  handleChange,
28
29
  handleStartInput,
29
30
  handleEndInput,
@@ -53,8 +54,10 @@ import {
53
54
  emitDbTime,
54
55
  handleEnterDisplayOnlyContent,
55
56
  handleEnterPickerlabel,
56
- setInputPaddingLeft
57
+ setInputPaddingLeft,
58
+ formatInputValue
57
59
  } from "./index";
60
+ import { dateMobileToggle, timeMobileToggle, dateToTimeArray, timeArrayToDate, timeMobileConfirm } from "./mb";
58
61
  import { DATEPICKER } from "../common";
59
62
  const api = [
60
63
  "state",
@@ -66,9 +69,9 @@ const api = [
66
69
  "handleStartChange",
67
70
  "handleStartInput",
68
71
  "handleKeydown",
69
- "handleMouseEnter",
70
72
  "handleClickIcon",
71
73
  "handleMouseEnter",
74
+ "handleInput",
72
75
  "handleChange",
73
76
  "handleClose",
74
77
  "handlePick",
@@ -76,9 +79,13 @@ const api = [
76
79
  "handleSelectChange",
77
80
  "popperElm",
78
81
  "handleEnterDisplayOnlyContent",
79
- "handleEnterPickerlabel"
82
+ "handleEnterPickerlabel",
83
+ "timeMobileToggle",
84
+ "timeMobileConfirm",
85
+ "emitInput",
86
+ "dateMobileToggle"
80
87
  ];
81
- const initState = ({ api: api2, reactive, vm, computed, props, utils, parent }) => {
88
+ const initState = ({ api: api2, reactive, vm, computed, props, utils, parent, breakpoint }) => {
82
89
  const state = reactive({
83
90
  historyValue: [],
84
91
  historyInput: [],
@@ -103,6 +110,7 @@ const initState = ({ api: api2, reactive, vm, computed, props, utils, parent })
103
110
  haveTrigger: computed(() => api2.computedHaveTrigger()),
104
111
  displayValue: computed(() => api2.displayValue()),
105
112
  parsedValue: computed(() => api2.parsedValue()),
113
+ oldValue: props.modelValue,
106
114
  pickerSize: computed(() => props.size),
107
115
  pickerDisabled: computed(() => props.disabled || state.formDisabled || state.isDisplayOnly),
108
116
  firstInputId: computed(() => api2.firstInputId()),
@@ -113,11 +121,38 @@ const initState = ({ api: api2, reactive, vm, computed, props, utils, parent })
113
121
  format: computed(() => api2.computedFormat()),
114
122
  labelTooltip: "",
115
123
  displayOnlyTooltip: "",
116
- isDisplayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly)
124
+ isDisplayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly),
125
+ isMobileScreen: computed(() => breakpoint.current.value === "default"),
126
+ dateMobileOption: {
127
+ visible: false,
128
+ type: props.type,
129
+ value: props.modelValue
130
+ },
131
+ timeMobileOption: {
132
+ visible: false,
133
+ type: props.type,
134
+ value: [0, 0, 0]
135
+ },
136
+ isDateMobileComponent: computed(
137
+ () => [
138
+ DATEPICKER.DateRange,
139
+ DATEPICKER.DateTimeRange,
140
+ DATEPICKER.DateTime,
141
+ DATEPICKER.DatePicker,
142
+ DATEPICKER.Date,
143
+ DATEPICKER.Dates
144
+ ].includes(props.type)
145
+ ),
146
+ isTimeMobileComponent: computed(
147
+ () => [DATEPICKER.Time, DATEPICKER.TimeRange, DATEPICKER.TimeSelect, DATEPICKER.TimePicker].includes(props.type)
148
+ ),
149
+ showSeconds: computed(
150
+ () => (state.format || props.pickerOptions && props.pickerOptions.format || "ss").includes("ss")
151
+ )
117
152
  });
118
153
  return state;
119
154
  };
120
- const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
155
+ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils, parent }) => {
121
156
  const { t, emit, dispatch, nextTick, vm } = vnode;
122
157
  const { TimePanel, TimeRangePanel } = others;
123
158
  const { destroyPopper, popperElm, updatePopper, doDestroy } = initPopper({ props, hooks, vnode });
@@ -127,16 +162,17 @@ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
127
162
  destroyPopper,
128
163
  emitDbTime: emitDbTime({ emit, state, t }),
129
164
  hidePicker: hidePicker({ state, doDestroy }),
130
- handleSelectChange: ({ tz, date }) => emit("select-change", { tz, date }),
165
+ handleSelectChange: ({ tz, date }) => !state.ranged && emit("select-change", { tz, date }),
131
166
  getPanel: getPanel(others),
132
- handleFocus: handleFocus({ emit, vm, state }),
167
+ handleFocus: handleFocus({ emit, vm, state, api: api2 }),
133
168
  getTimezone: getTimezone({ props, utils }),
134
169
  emitChange: emitChange({ api: api2, dispatch, emit, props, state }),
135
170
  parsedValue: parsedValue({ api: api2, props, state, t }),
136
171
  parseAsFormatAndType: parseAsFormatAndType({ api: api2 }),
137
- typeValueResolveMap: typeValueResolveMap({ api: api2, t }),
172
+ typeValueResolveMap: typeValueResolveMap({ api: api2, props, t }),
138
173
  updateOptions: updateOptions({ api: api2, props, state }),
139
174
  focus: focus({ api: api2, props, vm }),
175
+ handleInput: handleInput({ api: api2, state, props }),
140
176
  handleChange: handleChange({ api: api2, state }),
141
177
  isValidValue: isValidValue({ api: api2, state }),
142
178
  emitInput: emitInput({ api: api2, emit, props, state }),
@@ -160,18 +196,25 @@ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
160
196
  computedTriggerClass: computedTriggerClass({ props, state }),
161
197
  computedHaveTrigger: computedHaveTrigger({ props }),
162
198
  setInputPaddingLeft: setInputPaddingLeft({ props, state, vm, nextTick }),
199
+ formatInputValue: formatInputValue({ props, state, api: api2 })
200
+ });
201
+ initApi2({ api: api2, props, state, t, parent });
202
+ initMobileApi({ api: api2, props, state, t, parent });
203
+ };
204
+ const initApi2 = ({ api: api2, props, state, t, parent }) => {
205
+ Object.assign(api2, {
163
206
  t,
164
207
  state,
165
208
  blur: blur(state),
166
209
  getMode: getMode({ state }),
167
- getType: getType({ props }),
168
- dateParser: dateParser({ t }),
210
+ getType: getType({ props, parent }),
211
+ dateParser: dateParser({ t, props }),
169
212
  rangeParser: rangeParser(api2),
170
213
  rangeFormatter: rangeFormatter(api2),
171
214
  dateFormatter: dateFormatter({ t }),
172
215
  getValueEmpty: getValueEmpty(props),
173
- handleEndInput: handleEndInput(state),
174
- handleStartInput: handleStartInput(state),
216
+ handleEndInput: handleEndInput({ state, props, api: api2 }),
217
+ handleStartInput: handleStartInput({ state, props, api: api2 }),
175
218
  firstInputId: firstInputId({ props, state }),
176
219
  secondInputId: secondInputId({ props, state }),
177
220
  handleMouseEnter: handleMouseEnter({ props, state }),
@@ -182,6 +225,15 @@ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
182
225
  handleEnterDisplayOnlyContent: handleEnterDisplayOnlyContent({ state, t })
183
226
  });
184
227
  };
228
+ const initMobileApi = ({ api: api2, props, state }) => {
229
+ Object.assign(api2, {
230
+ dateMobileToggle: dateMobileToggle({ state, props, api: api2 }),
231
+ timeMobileToggle: timeMobileToggle({ state, props, api: api2 }),
232
+ timeMobileConfirm: timeMobileConfirm({ state, props, api: api2 }),
233
+ dateToTimeArray,
234
+ timeArrayToDate: timeArrayToDate({ state, props, api: api2 })
235
+ });
236
+ };
185
237
  const initWatch = ({ api: api2, state, props, watch, markRaw }) => {
186
238
  watch(
187
239
  () => state.type,
@@ -206,17 +258,18 @@ const initWatch = ({ api: api2, state, props, watch, markRaw }) => {
206
258
  const renderless = (props, hooks, vnode, others) => {
207
259
  const api2 = {};
208
260
  const { reactive, computed, watch, onBeforeUnmount, inject, markRaw, onMounted } = hooks;
209
- const { vm, service, parent } = vnode;
261
+ const { vm, service, parent, useBreakpoint } = vnode;
210
262
  const { utils = {} } = service || {};
211
- const state = initState({ api: api2, reactive, vm, computed, props, utils, parent });
263
+ const breakpoint = useBreakpoint();
264
+ const state = initState({ api: api2, reactive, vm, computed, props, utils, parent, inject, breakpoint });
212
265
  parent.tinyForm = parent.tinyForm || inject("form", null);
213
- initApi({ api: api2, props, hooks, state, vnode, others, utils });
266
+ initApi({ api: api2, props, hooks, state, vnode, others, utils, parent });
214
267
  initWatch({ api: api2, state, props, watch, markRaw });
215
268
  api2.initGlobalTimezone();
216
269
  onMounted(() => {
217
270
  api2.setInputPaddingLeft();
218
271
  });
219
- vm.$on("handle-clear", (event) => {
272
+ parent.$on("handle-clear", (event) => {
220
273
  state.showClose = true;
221
274
  api2.handleClickIcon(event);
222
275
  });
@@ -183,7 +183,7 @@ const deepClone = (obj) => {
183
183
  if (Array.isArray(obj)) {
184
184
  return obj.map((item) => deepClone(item));
185
185
  }
186
- if (typeof obj === "object") {
186
+ if (typeof obj === "object" && obj !== null) {
187
187
  return deepAssign({}, obj);
188
188
  }
189
189
  return obj;
package/pop-upload/vue.js CHANGED
@@ -40,6 +40,7 @@ import {
40
40
  fileUploadChange,
41
41
  deleteFile
42
42
  } from "./index";
43
+ import { formatFileSize } from "../common/string";
43
44
  const api = [
44
45
  "state",
45
46
  "closeSuccessTips",
@@ -55,6 +56,7 @@ const api = [
55
56
  "showDialog",
56
57
  "closeDialog",
57
58
  "fileUploadChange",
59
+ "formatFileSize",
58
60
  "deleteFile"
59
61
  ];
60
62
  const initState = ({ reactive, props, computed, api: api2 }) => reactive({
@@ -93,6 +95,7 @@ const initState = ({ reactive, props, computed, api: api2 }) => reactive({
93
95
  const initApi = ({ api: api2, state, refs, emit, props, constants, t }) => {
94
96
  Object.assign(api2, {
95
97
  state,
98
+ formatFileSize,
96
99
  abort: abort(refs),
97
100
  showDialog: showDialog(state),
98
101
  watchLimit: watchLimit(state),
@@ -5,26 +5,23 @@ const hide = ({ state, emit }) => () => {
5
5
  state.isLock = false;
6
6
  }, 300);
7
7
  state.showPopover = false;
8
- emit("hide", state.showPopover);
9
8
  };
10
9
  const show = ({ state, props, emit }) => (trigger) => {
11
10
  if ((trigger ? props.trigger !== trigger : !props.reference) || state.isLock || state.showPopover) {
12
11
  return;
13
12
  }
14
13
  state.showPopover = true;
15
- emit("show", state.showPopover);
16
14
  };
17
- const confirm = ({ state, emit }) => () => {
15
+ const confirm = ({ state, api }) => () => {
18
16
  state.showPopover = false;
19
- emit("confirm", state.showPopover);
20
- emit("hide", state.showPopover);
17
+ api.handleEmit("confirm");
21
18
  };
22
19
  const handleEmit = ({ state, emit, vm }) => (type) => {
23
20
  let { events = {} } = vm;
24
21
  if (events[type]) {
25
22
  events[type].call(vm, { $modal: vm, type });
26
23
  } else {
27
- emit(type, state.showPopover);
24
+ emit(type, state);
28
25
  }
29
26
  };
30
27
  export {
package/popconfirm/vue.js CHANGED
@@ -16,7 +16,7 @@ const renderless = (props, { computed, reactive }, { emit, constants, designConf
16
16
  state,
17
17
  show: show({ state, emit, props }),
18
18
  hide: hide({ state, emit }),
19
- confirm: confirm({ state, emit }),
19
+ confirm: confirm({ state, api: api2 }),
20
20
  handleEmit: handleEmit({ state, emit, vm })
21
21
  });
22
22
  return api2;
@@ -1,6 +1,4 @@
1
- import {
2
- __spreadValues
3
- } from "../chunk-G2ADBYYC.js";
1
+ import "../chunk-G2ADBYYC.js";
4
2
  import { find } from "../common/array";
5
3
  import { typeOf, isNull } from "../common/type";
6
4
  import { getDataset } from "../common/dataset";
@@ -52,7 +50,7 @@ const getDisplay = ({ constants, props, state }) => () => {
52
50
  } else if (props.multi) {
53
51
  const displayTxt = [];
54
52
  state.selectedValues.forEach((val) => {
55
- const item = find(state.selectedDatas, (data) => val == data[props.valueField]);
53
+ const item = find(state.selectedDatas, (data) => String(val) === String(data[props.valueField]));
56
54
  if (item) {
57
55
  displayTxt.push(item[props.textField]);
58
56
  } else {
@@ -93,6 +91,7 @@ const handleClear = ({ constants, emit, props, state }) => () => {
93
91
  state.treeSelectList = [];
94
92
  state.selectedDatas = [];
95
93
  state.selectedValues = [];
94
+ state.cacheStore.treeSelectList = [];
96
95
  if (!isEqual(state.commitValue, props.modelValue)) {
97
96
  emit("update:modelValue", state.commitValue);
98
97
  emit(
@@ -122,6 +121,9 @@ const handleConfirm = ({ api, constants, emit, props, state }) => (skipBeforeClo
122
121
  }
123
122
  if (props.popseletor === constants.TYPE_TREE) {
124
123
  const commitValue = state.treeSelectList.map((item) => item.id).join(props.valueSplit);
124
+ state.cacheStore = {
125
+ treeSelectList: state.treeSelectList.slice(0)
126
+ };
125
127
  if (!isEqual(commitValue, props.modelValue)) {
126
128
  emit("update:modelValue", commitValue);
127
129
  emit("change", commitValue, state.treeSelectList);
@@ -143,8 +145,8 @@ const handleOpen = ({ api, constants, props, state }) => (event) => {
143
145
  api.openDialog({ api, props, state });
144
146
  }
145
147
  };
146
- const handleSearch = ({ api, refs, constants }) => () => {
147
- const sourcetable = refs[constants.GRID_REF.source];
148
+ const handleSearch = ({ api, vm, constants }) => () => {
149
+ const sourcetable = vm.$refs[constants.GRID_REF.source];
148
150
  sourcetable && sourcetable.clearRadioRow();
149
151
  api.query();
150
152
  };
@@ -187,7 +189,7 @@ const renderTextHandler = ({ state, props, datas, dataset, value }) => {
187
189
  arrValues = value && ~["string", "number"].indexOf(typeof value) ? value.toString().split(props.valueSplit) : [];
188
190
  }
189
191
  arrValues.forEach((val) => {
190
- const item = find(dataset, (data) => val == data[props.valueField]) || find(datas, (data) => val == data[props.valueField]);
192
+ const item = find(dataset, (data) => String(val) === String(data[props.valueField])) || find(datas, (data) => String(val) === String(data[props.valueField]));
191
193
  item && rows.push(item);
192
194
  });
193
195
  if (props.multi) {
@@ -212,7 +214,7 @@ const getTreeSelectList = ({ value, state, props }) => {
212
214
  eachTree(
213
215
  state.treeOp.data,
214
216
  (node) => {
215
- if (values.some((val) => val == node[id])) {
217
+ if (values.includes(String(node[id]))) {
216
218
  selectdTreeNodeList.push({ id: node[id], value: node[label] });
217
219
  }
218
220
  },
@@ -235,7 +237,7 @@ const initDisplay = ({ api, constants, props, state, nextTick }) => (value) => {
235
237
  });
236
238
  });
237
239
  } else {
238
- const item = find(dataset, (data) => value == data[props.valueField]);
240
+ const item = find(dataset, (data) => String(value) === String(data[props.valueField]));
239
241
  state.selectedDatas = item || value;
240
242
  if (props.popseletor === constants.TYPE_GRID) {
241
243
  state.commitValue = state.selectedDatas ? state.selectedDatas[props.valueField] : "";
@@ -337,17 +339,17 @@ const selectedGridSelectChange = ({ constants, props, vm, state }) => ({ checked
337
339
  const len = state.selectedValues.length;
338
340
  event && (event.target.checked = !checked);
339
341
  for (let i = 0; i < len; i++) {
340
- if (state.selectedValues[i] == row[props.valueField]) {
342
+ if (String(state.selectedValues[i]) === String(row[props.valueField])) {
341
343
  state.selectedValues.splice(i, 1);
342
344
  state.selectedDatas.splice(i, 1);
343
345
  const sourcetable = refs[constants.GRID_REF.source];
344
346
  const historytable = refs[constants.GRID_REF.history];
345
347
  sourcetable && sourcetable.setSelection(
346
- sourcetable.data.filter((lrow) => lrow[props.valueField] == row[props.valueField]),
348
+ sourcetable.data.filter((lrow) => String(lrow[props.valueField]) === String(row[props.valueField])),
347
349
  false
348
350
  );
349
351
  historytable && historytable.setSelection(
350
- historytable.data.filter((lrow) => lrow[props.valueField] == row[props.valueField]),
352
+ historytable.data.filter((lrow) => String(lrow[props.valueField]) === String(row[props.valueField])),
351
353
  false
352
354
  );
353
355
  break;
@@ -359,7 +361,7 @@ const selectedGridSelectChange = ({ constants, props, vm, state }) => ({ checked
359
361
  const sourceGridSelectAll = ({ props, state, api }) => ({ selection, checked }) => {
360
362
  if (checked) {
361
363
  selection.forEach((item) => {
362
- if (!find(state.selectedValues, (val) => val == item[props.valueField])) {
364
+ if (!find(state.selectedValues, (val) => String(val) === String(item[props.valueField]))) {
363
365
  state.selectedValues.push(item[props.valueField]);
364
366
  state.selectedDatas.push(item);
365
367
  }
@@ -368,7 +370,7 @@ const sourceGridSelectAll = ({ props, state, api }) => ({ selection, checked })
368
370
  const len = state.sourceGridDataset.length;
369
371
  for (let i = 0; i < len; i++) {
370
372
  const sourceGridItem = state.sourceGridDataset[i][props.valueField];
371
- const selectedItem = find(state.selectedValues, (val) => val == sourceGridItem);
373
+ const selectedItem = find(state.selectedValues, (val) => String(val) === String(sourceGridItem));
372
374
  const index = state.selectedValues.indexOf(selectedItem);
373
375
  if (index !== -1) {
374
376
  state.selectedValues.splice(index, 1);
@@ -392,7 +394,7 @@ const sourceGridSelectChange = ({ props, state, api }) => ({ checked, row, confi
392
394
  state.selectedDatas.push(row);
393
395
  } else {
394
396
  state.selectedValues.forEach((item, index) => {
395
- if (row[props.valueField] == item) {
397
+ if (String(row[props.valueField]) === String(item)) {
396
398
  state.selectedValues.splice(index, 1);
397
399
  state.selectedDatas.splice(index, 1);
398
400
  }
@@ -431,12 +433,22 @@ const computedTreeOp = ({ api, constants }) => (props, state) => {
431
433
  treeOp.checkStrictly = treeOp.checkStrictly !== false;
432
434
  treeOp.expandOnClickNode = false;
433
435
  treeOp.nodeKey = treeOp.nodeKey || constants.ID;
434
- treeOp.defaultCheckedKeys = state.treeSelectList.map((item) => item.id);
435
- treeOp.props = __spreadValues({
436
- label: props.textField || constants.LABEL,
437
- id: props.valueField || constants.ID,
438
- children: "children"
439
- }, treeOp.props);
436
+ treeOp.defaultCheckedKeys = state.cacheStore.treeSelectList && state.cacheStore.treeSelectList.map((item) => item.id);
437
+ const defaultLabel = props.textField || constants.LABEL;
438
+ const defaultId = props.valueField || constants.ID;
439
+ const defaultChildren = "children";
440
+ if (!treeOp.props) {
441
+ treeOp.props = {
442
+ label: defaultLabel,
443
+ id: defaultId,
444
+ children: defaultChildren
445
+ };
446
+ } else {
447
+ const { label, id, children } = treeOp.props;
448
+ treeOp.props.label = label || defaultLabel;
449
+ treeOp.props.id = id || defaultId;
450
+ treeOp.props.children = children || defaultChildren;
451
+ }
440
452
  return treeOp;
441
453
  };
442
454
  const treeCheckChange = ({ constants, state, props }) => (data, checked) => {
@@ -447,15 +459,35 @@ const treeCheckChange = ({ constants, state, props }) => (data, checked) => {
447
459
  state.treeSelectList = treeSelectList;
448
460
  } else {
449
461
  if (checked) {
450
- state.treeSelectList.push({
451
- id: data[state.treeOp.props.id],
452
- value: data[state.treeOp.props.label]
453
- });
462
+ addTreeSelectNode(data, state);
454
463
  } else {
455
- state.treeSelectList = state.treeSelectList.filter((item) => item.id !== data[state.treeOp.props.id]);
464
+ state.removedNodeId = [];
465
+ getRemovedNodeId(data, state);
466
+ state.treeSelectList = state.treeSelectList.filter((item) => !state.removedNodeId.includes(item.id));
456
467
  }
457
468
  }
458
469
  };
470
+ const addTreeSelectNode = (node, state) => {
471
+ if (!state.treeSelectList.some((item) => item.id === node[state.treeOp.props.id])) {
472
+ state.treeSelectList.push({
473
+ id: node[state.treeOp.props.id],
474
+ value: node[state.treeOp.props.label]
475
+ });
476
+ }
477
+ if (!node.expanded && Array.isArray(node.children)) {
478
+ node.children.forEach((child) => {
479
+ addTreeSelectNode(child, state);
480
+ });
481
+ }
482
+ };
483
+ const getRemovedNodeId = (node, state) => {
484
+ state.removedNodeId.push(node[state.treeOp.props.id]);
485
+ if (!node.expanded && Array.isArray(node.children)) {
486
+ node.children.forEach((child) => {
487
+ getRemovedNodeId(child, state);
488
+ });
489
+ }
490
+ };
459
491
  const handleNumberPageChange = ({ api, emit, state }) => (size) => {
460
492
  state.pagerConfig.currentPage = 1;
461
493
  state.pagerConfig.pageSize = size;
@@ -500,9 +532,9 @@ const getSuggestParam = ({ state, props, api }) => (input) => {
500
532
  }
501
533
  return input;
502
534
  };
503
- const updateSuggestWidth = ({ refs }) => () => {
504
- let $input = refs.reference.getInput();
505
- refs.popper.style.width = $input.clientWidth + "px";
535
+ const updateSuggestWidth = ({ vm }) => () => {
536
+ const $input = vm.$refs.reference.getInput();
537
+ vm.$refs.popper.style.width = $input.clientWidth + "px";
506
538
  };
507
539
  const doSuggesst = ({ state, props, popper, api, nextTick }) => (event) => {
508
540
  if (!props.suggest) {
@@ -546,8 +578,9 @@ const doSuggesst = ({ state, props, popper, api, nextTick }) => (event) => {
546
578
  }
547
579
  }
548
580
  };
549
- const closeSuggestPanel = ({ state, api, refs }) => (event = false) => {
550
- const { reference, popper } = refs;
581
+ const closeSuggestPanel = ({ state, api, vm }) => (event = false) => {
582
+ const reference = vm.$refs.reference;
583
+ const popper = vm.$refs.popper;
551
584
  let keep = !event;
552
585
  if (event.target) {
553
586
  keep = reference.$el.contains(event.target) || popper.contains(event.target);
@@ -565,6 +598,11 @@ const suggestRadioChange = ({ state, api }) => ({ row }) => {
565
598
  state.showSuggestPanel = false;
566
599
  api.handleConfirm();
567
600
  };
601
+ const radioChangeFn = ({ props, api }) => () => {
602
+ if (props.radioChangeClose) {
603
+ api.handleConfirm();
604
+ }
605
+ };
568
606
  const handlePager = ({ api, props, state }) => () => {
569
607
  if (!props.showPager) {
570
608
  state.sourceGridDataset = state.fullGridData;
@@ -599,7 +637,7 @@ const mounted = ({ api, props }) => () => {
599
637
  const doDestroy = ({ popper }) => () => {
600
638
  popper.doDestroy();
601
639
  };
602
- const selectedBoxInit = (refs) => () => refs.selectedBox && refs.selectedBox.init();
640
+ const selectedBoxInit = (vm) => () => vm.$refs.selectedBox && vm.$refs.selectedBox.init();
603
641
  const selectedBoxClear = (api) => () => api.selectedGridSelectAll({ checked: false });
604
642
  const selectedBoxDelete = (api) => ({ option: row }) => api.selectedGridSelectChange({ checked: false, row });
605
643
  const selectedBoxDrag = ({ props, state }) => ({ state: { select } }) => {
@@ -643,6 +681,7 @@ export {
643
681
  mounted,
644
682
  openDialog,
645
683
  query,
684
+ radioChangeFn,
646
685
  selectedBoxClear,
647
686
  selectedBoxDelete,
648
687
  selectedBoxDrag,
package/popeditor/vue.js CHANGED
@@ -45,7 +45,8 @@ import {
45
45
  selectedBoxInit,
46
46
  selectedBoxClear,
47
47
  selectedBoxDelete,
48
- selectedBoxDrag
48
+ selectedBoxDrag,
49
+ radioChangeFn
49
50
  } from "./index";
50
51
  const api = [
51
52
  "state",
@@ -74,7 +75,8 @@ const api = [
74
75
  "doDestroy",
75
76
  "selectedBoxClear",
76
77
  "selectedBoxDelete",
77
- "selectedBoxDrag"
78
+ "selectedBoxDrag",
79
+ "radioChangeFn"
78
80
  ];
79
81
  const initState = ({ reactive, computed, props, api: api2, constants, t, parent, vm }) => {
80
82
  const state = reactive({
@@ -89,6 +91,7 @@ const initState = ({ reactive, computed, props, api: api2, constants, t, parent,
89
91
  commitValue: Array.isArray(props.modelValue) ? props.modelValue.slice(0) : props.modelValue,
90
92
  currentPage: 1,
91
93
  baseColumns: computed(() => getColumns({ constants, props })),
94
+ removedNodeId: [],
92
95
  selectedDatas: [],
93
96
  selectedValues: [],
94
97
  sourceGridDataset: [],
@@ -118,7 +121,7 @@ const initState = ({ reactive, computed, props, api: api2, constants, t, parent,
118
121
  });
119
122
  return state;
120
123
  };
121
- const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constants, vm, nextTick }) => {
124
+ const initApi = ({ api: api2, props, state, parent, vm, emit, popper, constants, nextTick }) => {
122
125
  Object.assign(api2, {
123
126
  state,
124
127
  popper,
@@ -139,7 +142,7 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
139
142
  handleReset: handleReset({ api: api2, state, props }),
140
143
  openDialog: openDialog({ api: api2, emit, props, state }),
141
144
  initDisplay: initDisplay({ api: api2, constants, props, state, nextTick }),
142
- handleSearch: handleSearch({ api: api2, props, state, refs, constants }),
145
+ handleSearch: handleSearch({ api: api2, props, state, vm, constants }),
143
146
  computedTreeOp: computedTreeOp({ api: api2, constants }),
144
147
  handleSizeChange: handleSizeChange({ api: api2, emit, state }),
145
148
  handleOpen: handleOpen({ api: api2, constants, props, state }),
@@ -148,10 +151,10 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
148
151
  handleNumberPageChange: handleNumberPageChange({ api: api2, emit, state }),
149
152
  doSearch: doSearch({ api: api2, state, props }),
150
153
  doClear: doClear({ api: api2, state, props }),
151
- updateSuggestWidth: updateSuggestWidth({ refs }),
154
+ updateSuggestWidth: updateSuggestWidth({ vm }),
152
155
  doSuggesstNow: doSuggesst({ api: api2, state, props, popper, nextTick }),
153
156
  doSuggesst: debounce(1e3, doSuggesst({ api: api2, state, props, popper, nextTick })),
154
- closeSuggestPanel: closeSuggestPanel({ api: api2, state, refs }),
157
+ closeSuggestPanel: closeSuggestPanel({ api: api2, state, vm }),
155
158
  sourceGridSelectChange: sourceGridSelectChange({ props, state, api: api2 }),
156
159
  sourceGridSelectAll: sourceGridSelectAll({ props, state, api: api2 }),
157
160
  getSuggestParam: getSuggestParam({ props, state, api: api2 }),
@@ -160,10 +163,11 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
160
163
  initSearchOption: initSearchOption({ api: api2, state }),
161
164
  mounted: mounted({ api: api2, props }),
162
165
  doDestroy: doDestroy({ popper }),
163
- selectedBoxInit: selectedBoxInit(refs),
166
+ selectedBoxInit: selectedBoxInit(vm),
164
167
  selectedBoxClear: selectedBoxClear(api2),
165
168
  selectedBoxDelete: selectedBoxDelete(api2),
166
- selectedBoxDrag: selectedBoxDrag({ props, state })
169
+ selectedBoxDrag: selectedBoxDrag({ props, state }),
170
+ radioChangeFn: radioChangeFn({ props, api: api2 })
167
171
  });
168
172
  state.search = api2.createSearchForm(false);
169
173
  };
@@ -187,12 +191,12 @@ const initWatch = ({ watch, props, api: api2, state, popper }) => {
187
191
  );
188
192
  watch(() => props.conditions, api2.initSearchOption, { deep: true, immediate: true });
189
193
  };
190
- const renderless = (props, { computed, onMounted, reactive, watch, inject, toRefs, onBeforeUnmount, onDeactivated }, { t, refs, parent, emit, constants, vm, nextTick, slots }) => {
194
+ const renderless = (props, { computed, onMounted, reactive, watch, inject, toRefs, onBeforeUnmount, onDeactivated }, { t, parent, emit, constants, vm, nextTick, slots }) => {
191
195
  const api2 = {};
192
196
  const state = initState({ reactive, computed, props, api: api2, constants, t, parent, vm });
193
197
  const popper = userPopper({
194
198
  emit,
195
- refs,
199
+ vm,
196
200
  watch,
197
201
  onBeforeUnmount,
198
202
  props,
@@ -203,7 +207,7 @@ const renderless = (props, { computed, onMounted, reactive, watch, inject, toRef
203
207
  onDeactivated
204
208
  });
205
209
  parent.tinyForm = parent.tinyForm || inject("form", null);
206
- initApi({ api: api2, props, state, parent, refs, emit, popper, constants, vm, nextTick });
210
+ initApi({ api: api2, props, state, parent, vm, emit, popper, constants, nextTick });
207
211
  initWatch({ watch, props, api: api2, state, popper });
208
212
  onMounted(api2.mounted);
209
213
  onBeforeUnmount(api2.closeSuggestPanel);
package/popover/index.js CHANGED
@@ -118,10 +118,10 @@ const handleMouseLeave = ({ props, state }) => () => {
118
118
  state.showPopper = false;
119
119
  }
120
120
  };
121
- const handleDocumentClick = ({ refs, state }) => (event) => {
121
+ const handleDocumentClick = ({ vm, state }) => (event) => {
122
122
  const reference = state.referenceElm;
123
123
  const popperElm = state.popperElm;
124
- const $el = refs.root;
124
+ const $el = vm.$refs.root;
125
125
  let target = event.target;
126
126
  if ((target == null ? void 0 : target.shadowRoot) && popperElm) {
127
127
  target = state.webCompEventTarget;
@@ -165,8 +165,8 @@ const destroyed = ({ state, api }) => () => {
165
165
  off(referenceElm, "keydown", api.handleKeydown);
166
166
  };
167
167
  const computedTooltipId = (constants) => () => `${constants.IDPREFIX}-${guid("", 4)}`;
168
- const wrapMounted = ({ api, props, refs, state }) => () => {
169
- const { reference, popper, wrapper } = refs;
168
+ const wrapMounted = ({ api, props, vm, state }) => () => {
169
+ const { reference, popper, wrapper } = vm.$refs;
170
170
  const referenceElm = state.referenceElm = props.reference || reference;
171
171
  state.popperElm = state.popperElm || popper;
172
172
  if (!referenceElm && wrapper.children) {