@opentiny/vue-renderless 3.11.8 → 3.12.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 (339) hide show
  1. package/anchor/index.js +13 -6
  2. package/anchor/vue.js +1 -1
  3. package/breadcrumb/index.js +6 -1
  4. package/breadcrumb-item/index.js +8 -1
  5. package/calendar-bar/index.js +295 -68
  6. package/calendar-bar/vue.js +82 -8
  7. package/calendar-view/index.js +2 -2
  8. package/card/index.js +4 -4
  9. package/card/vue.js +2 -3
  10. package/card-group/vue.js +3 -7
  11. package/carousel/index.js +26 -27
  12. package/carousel/vue.js +41 -46
  13. package/carousel-item/index.js +9 -6
  14. package/carousel-item/vue.js +4 -4
  15. package/cascader-mobile/index.js +5 -1
  16. package/cascader-mobile/vue.js +2 -1
  17. package/cascader-panel/index.js +6 -2
  18. package/cascader-view/index.js +363 -0
  19. package/cascader-view/vue.js +130 -0
  20. package/chart-core/deps/constants.js +27 -0
  21. package/chart-core/deps/numerify.js +27 -28
  22. package/chart-core/index.js +122 -31
  23. package/chart-core/vue.js +12 -8
  24. package/chart-radar/index.js +2 -2
  25. package/checkbox-button/vue.js +8 -1
  26. package/checkbox-group/vue.js +4 -5
  27. package/col/index.js +5 -9
  28. package/col/vue.js +4 -3
  29. package/collapse-item/index.js +14 -2
  30. package/color-picker/index.js +24 -34
  31. package/color-picker/utils/color.js +7 -1
  32. package/color-picker/vue.js +39 -26
  33. package/color-select-panel/alpha-select/vue.js +5 -8
  34. package/color-select-panel/hue-select/index.js +4 -2
  35. package/color-select-panel/hue-select/vue.js +11 -10
  36. package/color-select-panel/index.js +29 -17
  37. package/color-select-panel/utils/color.js +5 -0
  38. package/color-select-panel/vue.js +16 -7
  39. package/column-list-item/index.js +19 -5
  40. package/column-list-item/vue.js +16 -14
  41. package/common/bigInt.js +1 -1
  42. package/common/deps/dom.js +37 -5
  43. package/common/deps/repeat-click.js +3 -2
  44. package/common/deps/touch-emulator.js +95 -0
  45. package/common/deps/touch.js +12 -11
  46. package/common/deps/useEventListener.js +47 -0
  47. package/common/deps/useTouch.js +68 -0
  48. package/common/deps/vue-popper.js +2 -3
  49. package/common/index.js +1 -1
  50. package/common/runtime.js +1 -1
  51. package/common/string.js +20 -9
  52. package/date-picker/index.js +24 -4
  53. package/date-picker-mobile/index.js +5 -1
  54. package/file-upload/index.js +148 -50
  55. package/file-upload/vue.js +24 -6
  56. package/filter/index.js +2 -1
  57. package/filter/vue.js +1 -1
  58. package/form-item/index.js +24 -21
  59. package/form-item/vue.js +14 -12
  60. package/grid/plugins/export.js +0 -8
  61. package/grid/utils/common.js +13 -16
  62. package/image-viewer/index.js +1 -1
  63. package/ip-address/index.js +6 -3
  64. package/menu/index.js +127 -0
  65. package/menu/vue.js +90 -0
  66. package/menu-node/index.js +12 -0
  67. package/menu-node/vue.js +42 -0
  68. package/modal/index.js +6 -0
  69. package/modal/vue.js +3 -1
  70. package/numeric/index.js +18 -2
  71. package/numeric/vue.js +11 -7
  72. package/package.json +1 -1
  73. package/popconfirm/index.js +15 -6
  74. package/popconfirm/vue.js +5 -4
  75. package/pull-refresh-mobile-first/index.js +243 -0
  76. package/pull-refresh-mobile-first/vue.js +116 -0
  77. package/qr-code/index.js +54 -0
  78. package/qr-code/vue.js +31 -0
  79. package/radio/index.js +9 -7
  80. package/radio/vue.js +4 -4
  81. package/radio-button/index.js +2 -2
  82. package/radio-button/vue.js +2 -2
  83. package/radio-group/vue.js +1 -0
  84. package/rich-text-edtior/index.js +18 -38
  85. package/rich-text-edtior/vue.js +52 -63
  86. package/select/index.js +2 -4
  87. package/slide-bar/index.js +6 -6
  88. package/slide-bar/vue.js +5 -5
  89. package/slider/index.js +47 -14
  90. package/slider/vue.js +25 -6
  91. package/slider-button/index.js +5 -1
  92. package/slider-button/vue.js +1 -0
  93. package/slider-button-group/index.js +15 -0
  94. package/slider-button-group/vue.js +8 -11
  95. package/standard-list-item/index.js +9 -3
  96. package/standard-list-item/vue.js +3 -2
  97. package/switch/index.js +11 -9
  98. package/switch/vue.js +1 -1
  99. package/tab-bar/index.js +1 -1
  100. package/tab-bar/vue.js +2 -1
  101. package/tab-nav/index.js +31 -31
  102. package/tab-nav/vue.js +13 -12
  103. package/tabs/vue.js +3 -1
  104. package/tabs-mf/index.js +14 -9
  105. package/tabs-mf/vue-bar.js +3 -2
  106. package/tabs-mf/vue-nav-item.js +2 -1
  107. package/tabs-mf/vue-nav.js +18 -2
  108. package/tabs-mf/vue.js +3 -1
  109. package/tag/index.js +1 -1
  110. package/toast/index.js +7 -0
  111. package/toast/vue.js +19 -0
  112. package/transfer/index.js +2 -2
  113. package/transfer/vue.js +1 -1
  114. package/tree-node/index.js +1 -1
  115. package/types/{action-menu.type.d.mts → action-menu.type.d.ts} +3 -3
  116. package/types/{alert.type.d.mts → alert.type.d.ts} +2 -1
  117. package/types/{anchor.type.d.mts → anchor.type.d.ts} +3 -3
  118. package/types/{badge.type.d.mts → badge.type.d.ts} +1 -1
  119. package/types/{breadcrumb-item.type.d.mts → breadcrumb-item.type.d.ts} +1 -1
  120. package/types/{breadcrumb.type.d.mts → breadcrumb.type.d.ts} +1 -1
  121. package/types/{button-group.type.d.mts → button-group.type.d.ts} +1 -1
  122. package/types/{button.type.d.mts → button.type.d.ts} +1 -1
  123. package/types/{cascader-menu.type.d.mts → cascader-menu.type.d.ts} +4 -4
  124. package/types/{cascader-node.type.d.mts → cascader-node.type.d.ts} +4 -4
  125. package/types/{cascader-panel.type.d.mts → cascader-panel.type.d.ts} +6 -6
  126. package/types/{checkbox.type.d.mts → checkbox.type.d.ts} +2 -1
  127. package/types/{collapse-item.type.d.mts → collapse-item.type.d.ts} +1 -1
  128. package/types/{collapse.type.d.mts → collapse.type.d.ts} +1 -1
  129. package/types/{color-picker.type.d.mts → color-picker.type.d.ts} +2 -2
  130. package/types/{color-select-panel.type.d.mts → color-select-panel.type.d.ts} +2 -2
  131. package/types/{date-picker.type.d.mts → date-picker.type.d.ts} +5 -1
  132. package/types/{dialog-box.type.d.mts → dialog-box.type.d.ts} +9 -9
  133. package/types/{dropdown-item.type-77f0c8c5.d.ts → dropdown-item.type-bf83e929.d.ts} +4 -4
  134. package/types/{dropdown-item.type.d.mts → dropdown-item.type.d.ts} +3 -3
  135. package/types/{dropdown-menu.type.d.mts → dropdown-menu.type.d.ts} +3 -3
  136. package/types/{dropdown.type.d.mts → dropdown.type.d.ts} +1 -1
  137. package/types/{file-upload.type.d.mts → file-upload.type.d.ts} +2 -2
  138. package/types/{floatbar.type.d.mts → floatbar.type.d.ts} +7 -7
  139. package/types/{form-item.type.d.mts → form-item.type.d.ts} +2 -2
  140. package/types/{form.type-1e2e9272.d.ts → form.type-d0fd42f3.d.ts} +20 -7
  141. package/types/{form.type.d.mts → form.type.d.ts} +2 -2
  142. package/types/{image.type.d.mts → image.type.d.ts} +1 -1
  143. package/types/{input.type.d.mts → input.type.d.ts} +10 -2
  144. package/types/{link.type.d.mts → link.type.d.ts} +1 -1
  145. package/types/{loading.type.d.mts → loading.type.d.ts} +1 -1
  146. package/types/{milestone.type.d.mts → milestone.type.d.ts} +1 -1
  147. package/types/{modal.type.d.mts → modal.type.d.ts} +18 -19
  148. package/types/{nav-menu.type.d.mts → nav-menu.type.d.ts} +1 -1
  149. package/types/{numeric.type.d.mts → numeric.type.d.ts} +9 -3
  150. package/types/{picker.type.d.mts → picker.type.d.ts} +5 -1
  151. package/types/{popeditor.type.d.mts → popeditor.type.d.ts} +1 -1
  152. package/types/{popover.type.d.mts → popover.type.d.ts} +1 -1
  153. package/types/{progress.type.d.mts → progress.type.d.ts} +1 -1
  154. package/types/{radio-button.type.d.mts → radio-button.type.d.ts} +3 -3
  155. package/types/{radio-group.type.d.mts → radio-group.type.d.ts} +5 -1
  156. package/types/{radio.type.d.mts → radio.type.d.ts} +2 -2
  157. package/types/{search.type.d.mts → search.type.d.ts} +1 -1
  158. package/types/{shared.type.d.mts → shared.type.d.ts} +7 -7
  159. package/types/{slider.type.d.mts → slider.type.d.ts} +1 -1
  160. package/types/{steps.type.d.mts → steps.type.d.ts} +6 -1
  161. package/types/{switch.type.d.mts → switch.type.d.ts} +5 -1
  162. package/types/{tab-bar.type.d.mts → tab-bar.type.d.ts} +3 -2
  163. package/types/{tab-item.type.d.mts → tab-item.type.d.ts} +2 -2
  164. package/types/{tab-nav.type.d.mts → tab-nav.type.d.ts} +13 -12
  165. package/types/{tabs.type.d.mts → tabs.type.d.ts} +6 -4
  166. package/types/{tag.type.d.mts → tag.type.d.ts} +1 -1
  167. package/types/{time-line.type-5f76ecc2.d.ts → time-line.type-d7daa669.d.ts} +1 -1
  168. package/types/{time-line.type.d.mts → time-line.type.d.ts} +2 -2
  169. package/types/{timeline-item.type.d.mts → timeline-item.type.d.ts} +2 -2
  170. package/types/toast.type.d.ts +63 -0
  171. package/types/{tooltip.type.d.mts → tooltip.type.d.ts} +2 -9
  172. package/types/{upload-dragger.type.d.mts → upload-dragger.type.d.ts} +2 -2
  173. package/types/{upload-list.type-b934f279.d.ts → upload-list.type-343e8c11.d.ts} +45 -7
  174. package/types/{upload-list.type.d.mts → upload-list.type.d.ts} +2 -2
  175. package/types/{upload.type.d.mts → upload.type.d.ts} +2 -2
  176. package/types/watermark.type.d.ts +33 -0
  177. package/types/{wizard.type.d.mts → wizard.type.d.ts} +1 -1
  178. package/upload/index.js +1 -1
  179. package/upload-list/index.js +3 -2
  180. package/upload-list/vue.js +12 -2
  181. package/watermark/index.js +202 -0
  182. package/watermark/vue.js +27 -0
  183. package/wizard/index.js +5 -5
  184. package/card-group/index.js +0 -16
  185. package/color-picker/alpha-select/index.js +0 -20
  186. package/color-picker/alpha-select/vue.js +0 -60
  187. package/color-picker/color-select/index.js +0 -69
  188. package/color-picker/color-select/vue.js +0 -57
  189. package/color-picker/utils/use-drag.js +0 -38
  190. /package/types/{action-sheet.type.d.mts → action-sheet.type.d.ts} +0 -0
  191. /package/types/{amount.type.d.mts → amount.type.d.ts} +0 -0
  192. /package/types/{area.type.d.mts → area.type.d.ts} +0 -0
  193. /package/types/{autocomplete.type.d.mts → autocomplete.type.d.ts} +0 -0
  194. /package/types/{autonavi-map.type.d.mts → autonavi-map.type.d.ts} +0 -0
  195. /package/types/{avatar.type.d.mts → avatar.type.d.ts} +0 -0
  196. /package/types/{baidu-map.type.d.mts → baidu-map.type.d.ts} +0 -0
  197. /package/types/{bulletin-board.type.d.mts → bulletin-board.type.d.ts} +0 -0
  198. /package/types/{calendar-bar.type.d.mts → calendar-bar.type.d.ts} +0 -0
  199. /package/types/{calendar.type.d.mts → calendar.type.d.ts} +0 -0
  200. /package/types/{card-group.type.d.mts → card-group.type.d.ts} +0 -0
  201. /package/types/{card-template.type.d.mts → card-template.type.d.ts} +0 -0
  202. /package/types/{card.type.d.mts → card.type.d.ts} +0 -0
  203. /package/types/{carousel-item.type.d.mts → carousel-item.type.d.ts} +0 -0
  204. /package/types/{carousel.type.d.mts → carousel.type.d.ts} +0 -0
  205. /package/types/{cascader-mobile.type.d.mts → cascader-mobile.type.d.ts} +0 -0
  206. /package/types/{cascader-select.type.d.mts → cascader-select.type.d.ts} +0 -0
  207. /package/types/{cascader.type.d.mts → cascader.type.d.ts} +0 -0
  208. /package/types/{cell.type.d.mts → cell.type.d.ts} +0 -0
  209. /package/types/{chart-bar.type.d.mts → chart-bar.type.d.ts} +0 -0
  210. /package/types/{chart-boxplot.type.d.mts → chart-boxplot.type.d.ts} +0 -0
  211. /package/types/{chart-candle.type.d.mts → chart-candle.type.d.ts} +0 -0
  212. /package/types/{chart-core.type.d.mts → chart-core.type.d.ts} +0 -0
  213. /package/types/{chart-funnel.type.d.mts → chart-funnel.type.d.ts} +0 -0
  214. /package/types/{chart-gauge.type.d.mts → chart-gauge.type.d.ts} +0 -0
  215. /package/types/{chart-graph.type.d.mts → chart-graph.type.d.ts} +0 -0
  216. /package/types/{chart-heatmap.type.d.mts → chart-heatmap.type.d.ts} +0 -0
  217. /package/types/{chart-line.type.d.mts → chart-line.type.d.ts} +0 -0
  218. /package/types/{chart-liquidfill.type.d.mts → chart-liquidfill.type.d.ts} +0 -0
  219. /package/types/{chart-map.type.d.mts → chart-map.type.d.ts} +0 -0
  220. /package/types/{chart-pie.type.d.mts → chart-pie.type.d.ts} +0 -0
  221. /package/types/{chart-radar.type.d.mts → chart-radar.type.d.ts} +0 -0
  222. /package/types/{chart-sankey.type.d.mts → chart-sankey.type.d.ts} +0 -0
  223. /package/types/{chart-scatter.type.d.mts → chart-scatter.type.d.ts} +0 -0
  224. /package/types/{chart-sunburst.type.d.mts → chart-sunburst.type.d.ts} +0 -0
  225. /package/types/{chart-tree.type.d.mts → chart-tree.type.d.ts} +0 -0
  226. /package/types/{chart-waterfall.type.d.mts → chart-waterfall.type.d.ts} +0 -0
  227. /package/types/{chart-wordcloud.type.d.mts → chart-wordcloud.type.d.ts} +0 -0
  228. /package/types/{checkbox-button.type.d.mts → checkbox-button.type.d.ts} +0 -0
  229. /package/types/{checkbox-group.type.d.mts → checkbox-group.type.d.ts} +0 -0
  230. /package/types/{col.type.d.mts → col.type.d.ts} +0 -0
  231. /package/types/{column-list-group.type.d.mts → column-list-group.type.d.ts} +0 -0
  232. /package/types/{column-list-item.type.d.mts → column-list-item.type.d.ts} +0 -0
  233. /package/types/{common.type.d.mts → common.type.d.ts} +0 -0
  234. /package/types/{company.type.d.mts → company.type.d.ts} +0 -0
  235. /package/types/{container.type.d.mts → container.type.d.ts} +0 -0
  236. /package/types/{country.type.d.mts → country.type.d.ts} +0 -0
  237. /package/types/{credit-card-form.type.d.mts → credit-card-form.type.d.ts} +0 -0
  238. /package/types/{credit-card.type.d.mts → credit-card.type.d.ts} +0 -0
  239. /package/types/{crop.type.d.mts → crop.type.d.ts} +0 -0
  240. /package/types/{currency.type.d.mts → currency.type.d.ts} +0 -0
  241. /package/types/{date-panel.type.d.mts → date-panel.type.d.ts} +0 -0
  242. /package/types/{date-picker-mobile.type.d.mts → date-picker-mobile.type.d.ts} +0 -0
  243. /package/types/{date-range.type.d.mts → date-range.type.d.ts} +0 -0
  244. /package/types/{date-table.type.d.mts → date-table.type.d.ts} +0 -0
  245. /package/types/{dept.type.d.mts → dept.type.d.ts} +0 -0
  246. /package/types/{detail-page.type.d.mts → detail-page.type.d.ts} +0 -0
  247. /package/types/{dialog-select.type.d.mts → dialog-select.type.d.ts} +0 -0
  248. /package/types/{drawer.type.d.mts → drawer.type.d.ts} +0 -0
  249. /package/types/{drop-roles.type.d.mts → drop-roles.type.d.ts} +0 -0
  250. /package/types/{drop-times.type.d.mts → drop-times.type.d.ts} +0 -0
  251. /package/types/{dynamic-scroller-item.type.d.mts → dynamic-scroller-item.type.d.ts} +0 -0
  252. /package/types/{dynamic-scroller.type.d.mts → dynamic-scroller.type.d.ts} +0 -0
  253. /package/types/{espace.type.d.mts → espace.type.d.ts} +0 -0
  254. /package/types/{exception.type.d.mts → exception.type.d.ts} +0 -0
  255. /package/types/{fall-menu.type.d.mts → fall-menu.type.d.ts} +0 -0
  256. /package/types/{filter-bar.type.d.mts → filter-bar.type.d.ts} +0 -0
  257. /package/types/{filter-box.type.d.mts → filter-box.type.d.ts} +0 -0
  258. /package/types/{filter-panel.type.d.mts → filter-panel.type.d.ts} +0 -0
  259. /package/types/{filter.type.d.mts → filter.type.d.ts} +0 -0
  260. /package/types/{floating-button.type.d.mts → floating-button.type.d.ts} +0 -0
  261. /package/types/{flowchart.type.d.mts → flowchart.type.d.ts} +0 -0
  262. /package/types/{fullscreen.type.d.mts → fullscreen.type.d.ts} +0 -0
  263. /package/types/{grid.type.d.mts → grid.type.d.ts} +0 -0
  264. /package/types/{guide.type.d.mts → guide.type.d.ts} +0 -0
  265. /package/types/{hrapprover.type.d.mts → hrapprover.type.d.ts} +0 -0
  266. /package/types/{image-viewer.type.d.mts → image-viewer.type.d.ts} +0 -0
  267. /package/types/{index-bar-anchor.type.d.mts → index-bar-anchor.type.d.ts} +0 -0
  268. /package/types/{index-bar.type.d.mts → index-bar.type.d.ts} +0 -0
  269. /package/types/{ip-address.type.d.mts → ip-address.type.d.ts} +0 -0
  270. /package/types/{layout.type.d.mts → layout.type.d.ts} +0 -0
  271. /package/types/{link-menu.type.d.mts → link-menu.type.d.ts} +0 -0
  272. /package/types/{list.type.d.mts → list.type.d.ts} +0 -0
  273. /package/types/{locales.type.d.mts → locales.type.d.ts} +0 -0
  274. /package/types/{logon-user.type.d.mts → logon-user.type.d.ts} +0 -0
  275. /package/types/{logout.type.d.mts → logout.type.d.ts} +0 -0
  276. /package/types/{mini-picker.type.d.mts → mini-picker.type.d.ts} +0 -0
  277. /package/types/{month-range.type.d.mts → month-range.type.d.ts} +0 -0
  278. /package/types/{month-table.type.d.mts → month-table.type.d.ts} +0 -0
  279. /package/types/{multi-select.type.d.mts → multi-select.type.d.ts} +0 -0
  280. /package/types/{notify.type.d.mts → notify.type.d.ts} +0 -0
  281. /package/types/{option-group.type.d.mts → option-group.type.d.ts} +0 -0
  282. /package/types/{option.type.d.mts → option.type.d.ts} +0 -0
  283. /package/types/{pager-item.type.d.mts → pager-item.type.d.ts} +0 -0
  284. /package/types/{pager.type.d.mts → pager.type.d.ts} +0 -0
  285. /package/types/{panel.type.d.mts → panel.type.d.ts} +0 -0
  286. /package/types/{picker-column.type.d.mts → picker-column.type.d.ts} +0 -0
  287. /package/types/{pop-upload.type.d.mts → pop-upload.type.d.ts} +0 -0
  288. /package/types/{popconfirm.type.d.mts → popconfirm.type.d.ts} +0 -0
  289. /package/types/{popup.type.d.mts → popup.type.d.ts} +0 -0
  290. /package/types/{pull-refresh.type.d.mts → pull-refresh.type.d.ts} +0 -0
  291. /package/types/{query-builder.type.d.mts → query-builder.type.d.ts} +0 -0
  292. /package/types/{rate.type.d.mts → rate.type.d.ts} +0 -0
  293. /package/types/{record.type.d.mts → record.type.d.ts} +0 -0
  294. /package/types/{recycle-scroller.type.d.mts → recycle-scroller.type.d.ts} +0 -0
  295. /package/types/{river.type.d.mts → river.type.d.ts} +0 -0
  296. /package/types/{roles.type.d.mts → roles.type.d.ts} +0 -0
  297. /package/types/{row.type.d.mts → row.type.d.ts} +0 -0
  298. /package/types/{scroll-text.type.d.mts → scroll-text.type.d.ts} +0 -0
  299. /package/types/{scrollbar.type.d.mts → scrollbar.type.d.ts} +0 -0
  300. /package/types/{select-dropdown.type.d.mts → select-dropdown.type.d.ts} +0 -0
  301. /package/types/{select-mobile.type.d.mts → select-mobile.type.d.ts} +0 -0
  302. /package/types/{select-view.type.d.mts → select-view.type.d.ts} +0 -0
  303. /package/types/{select.type.d.mts → select.type.d.ts} +0 -0
  304. /package/types/{selected-box.type.d.mts → selected-box.type.d.ts} +0 -0
  305. /package/types/{slide-bar.type.d.mts → slide-bar.type.d.ts} +0 -0
  306. /package/types/{slider-button-group.type.d.mts → slider-button-group.type.d.ts} +0 -0
  307. /package/types/{slider-button.type.d.mts → slider-button.type.d.ts} +0 -0
  308. /package/types/{split.type.d.mts → split.type.d.ts} +0 -0
  309. /package/types/{standard-list-item.type.d.mts → standard-list-item.type.d.ts} +0 -0
  310. /package/types/{tab-dropdown.type.d.mts → tab-dropdown.type.d.ts} +0 -0
  311. /package/types/{tab-item-mf.type.d.mts → tab-item-mf.type.d.ts} +0 -0
  312. /package/types/{tabbar-item.type.d.mts → tabbar-item.type.d.ts} +0 -0
  313. /package/types/{tabbar.type.d.mts → tabbar.type.d.ts} +0 -0
  314. /package/types/{table.type.d.mts → table.type.d.ts} +0 -0
  315. /package/types/{tabs-mf.type.d.mts → tabs-mf.type.d.ts} +0 -0
  316. /package/types/{tag-group.type.d.mts → tag-group.type.d.ts} +0 -0
  317. /package/types/{tall-storage.type.d.mts → tall-storage.type.d.ts} +0 -0
  318. /package/types/{text-popup.type.d.mts → text-popup.type.d.ts} +0 -0
  319. /package/types/{time-panel.type.d.mts → time-panel.type.d.ts} +0 -0
  320. /package/types/{time-picker-mobile.type.d.mts → time-picker-mobile.type.d.ts} +0 -0
  321. /package/types/{time-range.type.d.mts → time-range.type.d.ts} +0 -0
  322. /package/types/{time-spinner.type.d.mts → time-spinner.type.d.ts} +0 -0
  323. /package/types/{time.type.d.mts → time.type.d.ts} +0 -0
  324. /package/types/{toggle-menu.type.d.mts → toggle-menu.type.d.ts} +0 -0
  325. /package/types/{top-box.type.d.mts → top-box.type.d.ts} +0 -0
  326. /package/types/{transfer-panel.type.d.mts → transfer-panel.type.d.ts} +0 -0
  327. /package/types/{transfer.type.d.mts → transfer.type.d.ts} +0 -0
  328. /package/types/{tree-menu.type.d.mts → tree-menu.type.d.ts} +0 -0
  329. /package/types/{tree-node.type.d.mts → tree-node.type.d.ts} +0 -0
  330. /package/types/{tree.type.d.mts → tree.type.d.ts} +0 -0
  331. /package/types/{user-account.type.d.mts → user-account.type.d.ts} +0 -0
  332. /package/types/{user-contact.type.d.mts → user-contact.type.d.ts} +0 -0
  333. /package/types/{user-head-group.type.d.mts → user-head-group.type.d.ts} +0 -0
  334. /package/types/{user-head.type.d.mts → user-head.type.d.ts} +0 -0
  335. /package/types/{user-link.type.d.mts → user-link.type.d.ts} +0 -0
  336. /package/types/{user.type.d.mts → user.type.d.ts} +0 -0
  337. /package/types/{wheel.type.d.mts → wheel.type.d.ts} +0 -0
  338. /package/types/{year-range.type.d.mts → year-range.type.d.ts} +0 -0
  339. /package/types/{year-table.type.d.mts → year-table.type.d.ts} +0 -0
package/qr-code/vue.js ADDED
@@ -0,0 +1,31 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ import { change, draw } from ".";
3
+ const api = ["state"];
4
+ const renderless = (props, { reactive, watch, onMounted }, { vm, emit }, { QRCode }) => {
5
+ const api2 = {};
6
+ const state = reactive({
7
+ sizeStr: "",
8
+ iconSizeStr: "",
9
+ iconBackgroudColor: ""
10
+ });
11
+ Object.assign(api2, {
12
+ state,
13
+ draw: draw({ props, state, vm, QRCode }),
14
+ change: change(emit)
15
+ });
16
+ onMounted(() => {
17
+ api2.draw();
18
+ });
19
+ watch(
20
+ () => [props.level, props.value],
21
+ () => {
22
+ api2.draw();
23
+ api2.change();
24
+ }
25
+ );
26
+ return api2;
27
+ };
28
+ export {
29
+ api,
30
+ renderless
31
+ };
package/radio/index.js CHANGED
@@ -43,7 +43,7 @@ const setModel = ({
43
43
  dispatch,
44
44
  emit,
45
45
  props,
46
- refs,
46
+ vm,
47
47
  state
48
48
  }) => (val) => {
49
49
  if (state.isGroup) {
@@ -51,13 +51,15 @@ const setModel = ({
51
51
  } else {
52
52
  emit("update:modelValue", val);
53
53
  }
54
- refs.radio && (refs.radio.checked = state.model === props.label);
54
+ vm.$refs.radio && (vm.$refs.radio.checked = state.model === props.label);
55
55
  };
56
- const toggleEvent = ({ props, refs, type }) => {
57
- const radioEl = refs.radio;
58
- Object.keys(props.events).forEach((ev) => {
59
- radioEl[type + "EventListener"](ev, props.events[ev]);
60
- });
56
+ const toggleEvent = ({ props, vm, type }) => {
57
+ const radioEl = vm.$refs.radio;
58
+ if (radioEl) {
59
+ Object.keys(props.events).forEach((ev) => {
60
+ radioEl[type + "EventListener"](ev, props.events[ev]);
61
+ });
62
+ }
61
63
  };
62
64
  const dispatchDisplayedValue = ({ state, dispatch, api }) => () => {
63
65
  if (state.isDisplayOnly) {
package/radio/vue.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  getDisplayedValue
14
14
  } from "./index";
15
15
  const api = ["state", "handleChange"];
16
- const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject, watch }, { refs, vm, parent, emit, constants, nextTick, dispatch }) => {
16
+ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject, watch }, { vm, parent, emit, constants, nextTick, dispatch }) => {
17
17
  parent.tinyForm = parent.tinyForm || inject("form", null);
18
18
  const api2 = {};
19
19
  const state = reactive({
@@ -40,7 +40,7 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
40
40
  tabIndex: tabIndex({ props, state }),
41
41
  isDisabled: isDisabled({ props, state }),
42
42
  isDisplayOnly: isDisplayOnly({ props }),
43
- setModel: setModel({ constants, dispatch, emit, props, refs, state }),
43
+ setModel: setModel({ constants, dispatch, emit, props, vm, state }),
44
44
  handleChange: handleChange({ constants, dispatch, emit, state, nextTick }),
45
45
  dispatchDisplayedValue: dispatchDisplayedValue({ state, api: api2, dispatch }),
46
46
  getDisplayedValue: getDisplayedValue({ vm, state, props })
@@ -49,10 +49,10 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
49
49
  onMounted(() => {
50
50
  api2.dispatchDisplayedValue();
51
51
  dispatch("Tooltip", "tooltip-update");
52
- toggleEvent({ props, refs, type: "add" });
52
+ toggleEvent({ props, vm, type: "add" });
53
53
  });
54
54
  onBeforeUnmount(() => {
55
- toggleEvent({ props, refs, type: "remove" });
55
+ toggleEvent({ props, vm, type: "remove" });
56
56
  });
57
57
  return api2;
58
58
  };
@@ -37,8 +37,8 @@ const getStyle = (state) => () => {
37
37
  color: ((_d = state.radioGroup) == null ? void 0 : _d.textColor) || ""
38
38
  };
39
39
  };
40
- const toggleEvents = ({ refs, props }) => (isUnBind = false) => {
41
- const radioEl = refs.radio;
40
+ const toggleEvents = ({ vm, props }) => (isUnBind = false) => {
41
+ const radioEl = vm.$refs.radio;
42
42
  Object.keys(props.events).forEach((ev) => {
43
43
  radioEl[(isUnBind ? "remove" : "add") + "EventListener"](ev, props.events[ev]);
44
44
  });
@@ -11,10 +11,10 @@ import {
11
11
  handleBlur
12
12
  } from "./index";
13
13
  const api = ["state", "handleChange", "keydownHandle", "handleFocus", "handleBlur"];
14
- const renderless = (props, { computed, reactive, onMounted, onBeforeUnmount, inject }, { emit, parent, dispatch, constants, nextTick, refs }) => {
14
+ const renderless = (props, { computed, reactive, onMounted, onBeforeUnmount, inject }, { parent, dispatch, constants, nextTick, vm }) => {
15
15
  const api2 = {
16
16
  getGroup: getGroup({ constants, parent }),
17
- toggleEvents: toggleEvents({ refs, props })
17
+ toggleEvents: toggleEvents({ vm, props })
18
18
  };
19
19
  const state = reactive({
20
20
  focus: false,
@@ -25,6 +25,7 @@ const renderless = (props, { computed, onMounted, reactive, watch, provide }, {
25
25
  onMounted(api2.onMounted);
26
26
  provide("radioVertical", props.vertical);
27
27
  provide("showTips", props.showTips);
28
+ provide("size", props.size);
28
29
  return api2;
29
30
  };
30
31
  export {
@@ -53,42 +53,22 @@ const setLink = (editor) => {
53
53
  editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
54
54
  };
55
55
  };
56
- const handleMove = (state, box) => {
57
- return (e) => {
58
- let { x, y } = box.value[0].getBoundingClientRect();
59
- state.flagX = Math.ceil((e.x - x) / 30);
60
- state.flagY = Math.ceil((e.y - y) / 30);
61
- };
56
+ const tableMouseMove = (state, vm) => (e) => {
57
+ let { x, y } = vm.$refs.tablePanelRef[0].getBoundingClientRect();
58
+ state.flagX = Math.ceil((e.x - x) / 30);
59
+ state.flagY = Math.ceil((e.y - y) / 30);
62
60
  };
63
- const handleClickOutside = (state, box) => {
64
- return (e) => {
65
- var _a;
66
- if (!((_a = box.value[0]) == null ? void 0 : _a.contains(e.target))) {
67
- state.isShow = false;
68
- removeClickOutside(state, box)();
69
- }
70
- };
61
+ const tableChoose = (state, vm) => (e) => {
62
+ if (state.flagX && state.flagY) {
63
+ state.editor.chain().focus().insertTable({ rows: state.flagY, cols: state.flagX, withHeaderRow: true }).run();
64
+ }
65
+ state.isShowTable = false;
71
66
  };
72
- const removeClickOutside = (state, box) => {
73
- return () => {
74
- window.removeEventListener("click", handleClickOutside(state, box));
75
- };
67
+ const toggleTablePanel = (state) => () => {
68
+ state.isShowTable = !state.isShowTable;
76
69
  };
77
- const handleClick = (state, box) => {
78
- return (e) => {
79
- e.stopPropagation();
80
- if (state.isShow) {
81
- if (state.flagX && state.flagY) {
82
- state.editor.chain().focus().insertTable({ rows: state.flagY, cols: state.flagX, withHeaderRow: true }).run();
83
- }
84
- state.flagX = 0;
85
- state.flagY = 0;
86
- removeClickOutside(state, box)();
87
- } else {
88
- window.addEventListener("click", handleClickOutside(state, box));
89
- }
90
- state.isShow = !state.isShow;
91
- };
70
+ const closeTablePanel = (state) => () => {
71
+ state.isShowTable && (state.isShowTable = false);
92
72
  };
93
73
  const shouldShow = ({ editor, view, state, oldState, from, to }) => {
94
74
  return editor.isActive("table");
@@ -242,13 +222,13 @@ const Active = (item) => {
242
222
  };
243
223
  export {
244
224
  Active,
225
+ closeTablePanel,
245
226
  eventClick,
246
227
  eventImg,
247
228
  handleChange,
248
- handleClick,
249
- handleClickOutside,
250
- handleMove,
251
- removeClickOutside,
252
229
  setLink,
253
- shouldShow
230
+ shouldShow,
231
+ tableChoose,
232
+ tableMouseMove,
233
+ toggleTablePanel
254
234
  };
@@ -5,32 +5,29 @@ import {
5
5
  import {
6
6
  handleChange,
7
7
  setLink,
8
- handleMove,
9
- handleClickOutside,
10
- removeClickOutside,
11
- handleClick,
8
+ tableMouseMove,
9
+ tableChoose,
10
+ toggleTablePanel,
11
+ closeTablePanel,
12
12
  shouldShow,
13
13
  eventImg,
14
14
  eventClick,
15
15
  Active
16
16
  } from "./index";
17
17
  const api = [
18
- "toolBar",
19
18
  "state",
20
19
  "setLink",
21
20
  "handleChange",
22
- "box",
23
- "handleMove",
24
- "handleClickOutside",
25
- "removeClickOutside",
26
- "handleClick",
21
+ "tableMouseMove",
22
+ "tableChoose",
23
+ "toggleTablePanel",
24
+ "closeTablePanel",
27
25
  "shouldShow",
28
- "fontSize",
29
26
  "eventImg",
30
27
  "eventClick",
31
28
  "Active"
32
29
  ];
33
- const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref }, { vm, emit, parent }, {
30
+ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref, markRaw }, { vm, emit, parent }, {
34
31
  Editor,
35
32
  StarterKit,
36
33
  Table,
@@ -53,15 +50,10 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
53
50
  CodeBlockLowlight,
54
51
  lowlight,
55
52
  VueNodeViewRenderer,
56
- // CodehighComp,
57
- // NodeViewContent,
58
- // nodeViewProps,
59
- // NodeViewWrapper,
60
53
  Placeholder,
61
54
  codeHighlight
62
55
  }) => {
63
- var _a;
64
- let toolBar = [
56
+ let defaultToolBar = [
65
57
  "bold",
66
58
  "italic",
67
59
  "underline",
@@ -74,31 +66,35 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
74
66
  "taskList",
75
67
  "subscript",
76
68
  "superscript",
77
- // 'nodeDelete',
78
69
  "undo",
79
70
  "redo",
80
71
  "left",
81
72
  "center",
82
73
  "right",
74
+ "formatClear",
75
+ "link",
83
76
  "h-box",
77
+ //
84
78
  "font-size",
79
+ //
85
80
  "line-height",
81
+ //
86
82
  "highlight",
87
83
  "color",
84
+ //
88
85
  "backgroundColor",
89
- "formatClear",
90
- "link",
86
+ //
91
87
  "unlink",
88
+ //
92
89
  "img",
90
+ //
93
91
  "table"
92
+ //
94
93
  ];
95
- if (props.customToolBar) {
96
- toolBar = props.customToolBar;
97
- }
98
94
  const CustomImage = Image.extend({
99
95
  addAttributes() {
100
- var _a2;
101
- return __spreadProps(__spreadValues({}, (_a2 = this.parent) == null ? void 0 : _a2.call(this)), {
96
+ var _a;
97
+ return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
102
98
  type: {
103
99
  default: "img"
104
100
  }
@@ -224,71 +220,64 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
224
220
  }
225
221
  }).configure({ lowlight }),
226
222
  Placeholder.configure({
227
- placeholder: (_a = props.placeholder) != null ? _a : "Write something \u2026"
223
+ placeholder: props.placeholder
228
224
  })
229
225
  ],
230
- content: "",
226
+ content: props.modelValue,
231
227
  autofocus: true,
232
228
  editable: true,
233
229
  injectCSS: false,
234
230
  // 事件
235
- onBeforeCreate({ editor: editor2 }) {
236
- emit("beforeCreate", { editor: editor2 });
231
+ onBeforeCreate({ editor }) {
232
+ emit("beforeCreate", { editor });
237
233
  },
238
- onCreate({ editor: editor2 }) {
239
- emit("create", { editor: editor2 });
234
+ onCreate({ editor }) {
235
+ emit("create", { editor });
240
236
  },
241
- onUpdate({ editor: editor2 }) {
242
- const json = editor2.getJSON();
243
- const html = editor2.getHTML();
244
- const text = editor2.getText();
245
- const lineText = editor2.getText({ blockSeparator: "--" });
246
- emit("update", { editor: editor2 });
237
+ onUpdate({ editor }) {
238
+ const json = editor.getJSON();
239
+ const html = editor.getHTML();
240
+ const text = editor.getText();
241
+ const lineText = editor.getText({ blockSeparator: "--" });
242
+ emit("update", { editor });
247
243
  emit("update:modelValue", html);
248
244
  },
249
- onFocus({ editor: editor2, event }) {
250
- emit("focus", { editor: editor2, event });
245
+ onFocus({ editor, event }) {
246
+ emit("focus", { editor, event });
251
247
  },
252
- onBlur({ editor: editor2, event }) {
253
- emit("blur", { editor: editor2, event });
248
+ onBlur({ editor, event }) {
249
+ emit("blur", { editor, event });
254
250
  },
255
- onSelectionUpdate({ editor: editor2 }) {
256
- emit("selectionUpdate", { editor: editor2 });
251
+ onSelectionUpdate({ editor }) {
252
+ emit("selectionUpdate", { editor });
257
253
  },
258
- onTransaction({ editor: editor2, transaction }) {
259
- emit("transaction", { editor: editor2, transaction });
254
+ onTransaction({ editor, transaction }) {
255
+ emit("transaction", { editor, transaction });
260
256
  },
261
257
  onDestroy() {
262
258
  emit("destroy");
263
259
  }
264
260
  }, props.options);
265
- let options = props.options ? Object.assign(defaultOptions, props.options) : defaultOptions;
266
- const editor = new Editor(options);
267
- const box = ref(null);
268
- const fontSize = ref("16px");
261
+ let options = Object.assign(defaultOptions, props.options);
269
262
  const state = reactive({
270
- editor: null,
263
+ editor: markRaw(new Editor(options)),
264
+ toolbar: computed(() => props.customToolBar.length ? props.customToolBar : defaultToolBar),
271
265
  // table 变量
272
- isShow: false,
266
+ isShowTable: false,
273
267
  flagX: 0,
274
268
  flagY: 0
275
269
  });
276
- state.editor = editor;
277
270
  const api2 = {
278
- toolBar,
279
271
  state,
280
- setLink: setLink(editor),
281
- handleChange: handleChange(editor),
272
+ setLink: setLink(state.editor),
273
+ handleChange: handleChange(state.editor),
282
274
  // table处理函数
283
- box,
284
- handleMove: handleMove(state, box),
285
- handleClickOutside: handleClickOutside(state, box),
286
- removeClickOutside: removeClickOutside(state, box),
287
- handleClick: handleClick(state, box),
275
+ tableMouseMove: tableMouseMove(state, vm),
276
+ toggleTablePanel: toggleTablePanel(state),
277
+ closeTablePanel: closeTablePanel(state),
278
+ tableChoose: tableChoose(state, vm),
288
279
  // bubble 菜单
289
280
  shouldShow,
290
- //
291
- fontSize,
292
281
  eventImg,
293
282
  eventClick,
294
283
  Active
package/select/index.js CHANGED
@@ -367,8 +367,8 @@ const handleFocus = ({ emit, props, state, api }) => (event) => {
367
367
  } else {
368
368
  state.softFocus = false;
369
369
  }
370
- if (props.remote && state.filterOrSearch && state.firstAutoSeach) {
371
- state.firstAutoSeach = false;
370
+ if (props.remote && state.filterOrSearch && state.firstAutoSearch) {
371
+ state.firstAutoSearch = false;
372
372
  api.resetFilter();
373
373
  }
374
374
  };
@@ -1139,8 +1139,6 @@ const buildRadioConfig = ({ props, state }) => () => {
1139
1139
  return __spreadValues(__spreadValues({}, radioConfig), { checkRowKey, highlight });
1140
1140
  };
1141
1141
  const onMouseenterNative = ({ state }) => (e) => {
1142
- if (e.target === e.currentTarget)
1143
- return;
1144
1142
  state.inputHovering = true;
1145
1143
  if (state.searchSingleCopy && state.selectedLabel) {
1146
1144
  state.softFocus = true;
@@ -1,19 +1,19 @@
1
1
  import "../chunk-G2ADBYYC.js";
2
2
  import { emitEvent } from "../common/event";
3
- const leftClick = ({ api, props, refs, state }) => () => {
3
+ const leftClick = ({ api, props, vm, state }) => () => {
4
4
  if (state.leftLength >= 0) {
5
5
  return;
6
6
  }
7
7
  state.leftLength = state.leftLength + (state.blockWidth + state.blockMargin) * props.wheelBlocks;
8
- refs.insider.style.left = state.leftLength + "px";
8
+ vm.$refs.insider.style.left = state.leftLength + "px";
9
9
  api.changeState();
10
10
  };
11
- const rightClick = ({ api, props, refs, state }) => () => {
11
+ const rightClick = ({ api, props, vm, state }) => () => {
12
12
  if (state.blockWrapper < Math.abs(state.leftLength) + state.wrapperWidth) {
13
13
  return;
14
14
  }
15
15
  state.leftLength = state.leftLength - (state.blockWidth + state.blockMargin) * props.wheelBlocks;
16
- refs.insider.style.left = state.leftLength + "px";
16
+ vm.$refs.insider.style.left = state.leftLength + "px";
17
17
  api.changeState();
18
18
  };
19
19
  const blockClick = ({ emit, state }) => ({ item, index }) => {
@@ -39,8 +39,8 @@ const mouseEvent = ({ api, state }) => (e) => {
39
39
  }
40
40
  }
41
41
  };
42
- const changeSize = ({ props, state, refs }) => () => {
43
- state.wrapperWidth = refs.wrapper.offsetWidth;
42
+ const changeSize = ({ props, state, vm }) => () => {
43
+ state.wrapperWidth = vm.$refs.wrapper.offsetWidth;
44
44
  state.blockWidth = parseInt((1 - (props.initBlocks - 1) * 0.02) / props.initBlocks * state.wrapperWidth, 10);
45
45
  state.blockMargin = parseInt(state.wrapperWidth * 0.02, 10);
46
46
  state.blockWrapper = props.modelValue.length * state.blockWidth + (props.modelValue.length - 1) * state.blockMargin;
package/slide-bar/vue.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "../chunk-G2ADBYYC.js";
2
2
  import { leftClick, rightClick, blockClick, changeState, changeSize, mouseEvent } from "./index";
3
3
  const api = ["state", "mouseEvent", "rightClick", "leftClick", "blockClick"];
4
- const renderless = (props, { onMounted, reactive }, { refs, parent, emit }) => {
4
+ const renderless = (props, { onMounted, reactive }, { vm, parent, emit }) => {
5
5
  const api2 = {};
6
6
  const state = reactive({
7
7
  leftLength: 0,
@@ -18,10 +18,10 @@ const renderless = (props, { onMounted, reactive }, { refs, parent, emit }) => {
18
18
  state,
19
19
  blockClick: blockClick({ emit, state }),
20
20
  changeState: changeState({ props, state }),
21
- changeSize: changeSize({ props, refs, state }),
22
- leftClick: leftClick({ api: api2, props, refs, state }),
23
- mouseEvent: mouseEvent({ api: api2, props, refs, state }),
24
- rightClick: rightClick({ api: api2, parent, props, refs, state })
21
+ changeSize: changeSize({ props, vm, state }),
22
+ leftClick: leftClick({ api: api2, props, vm, state }),
23
+ mouseEvent: mouseEvent({ api: api2, props, vm, state }),
24
+ rightClick: rightClick({ api: api2, parent, props, vm, state })
25
25
  });
26
26
  onMounted(api2.changeSize);
27
27
  return api2;
package/slider/index.js CHANGED
@@ -8,8 +8,8 @@ const bindEvent = (api) => () => {
8
8
  api.bindResize();
9
9
  };
10
10
  const unBindEvent = (api) => () => off(window, "resize", api.bindResize);
11
- const bindResize = ({ parent, props, state }) => () => {
12
- const handleEl = parent.$el.querySelector("div.tiny-slider");
11
+ const bindResize = ({ vm, props, state }) => () => {
12
+ const handleEl = vm.$refs.slider;
13
13
  state.sliderSize = handleEl["client" + (props.vertical ? "Height" : "Width")];
14
14
  state.sliderOffset = handleEl.getBoundingClientRect();
15
15
  };
@@ -63,8 +63,17 @@ const bindMouseDown = ({
63
63
  return;
64
64
  }
65
65
  const handleEl = event.target;
66
- const isClickBar = hasClass(handleEl, constants.sliderCls(mode)) || hasClass(handleEl, constants.rangeCls(mode));
67
- const isClickBtn = hasClass(handleEl, constants.buttonCls(mode)) || hasClass(handleEl, constants.leftSvgCls(mode)) || hasClass(handleEl, constants.rightSvgCls(mode));
66
+ let isClickBar = false;
67
+ let isClickBtn = false;
68
+ if (mode === "mobile-first") {
69
+ const role = Array.from(handleEl.attributes).find((attr) => attr.name === "role");
70
+ const name = role && role.value;
71
+ isClickBar = name === constants.PC_SLIDER_CLS || name === constants.PC_RANGE_CLS;
72
+ isClickBtn = name === constants.PC_BUTTON_CLS;
73
+ } else {
74
+ isClickBar = hasClass(handleEl, constants.sliderCls(mode)) || hasClass(handleEl, constants.rangeCls(mode));
75
+ isClickBtn = hasClass(handleEl, constants.buttonCls(mode)) || hasClass(handleEl, constants.leftSvgCls(mode)) || hasClass(handleEl, constants.rightSvgCls(mode));
76
+ }
68
77
  if (state.disabled || !isClickBtn && !isClickBar) {
69
78
  state.activeIndex = -1;
70
79
  return;
@@ -126,7 +135,7 @@ const hideTip = (state) => () => !state.isDrag && (state.showTip = false);
126
135
  const setTipStyle = ({
127
136
  constants,
128
137
  mode,
129
- parent,
138
+ vm,
130
139
  props,
131
140
  state
132
141
  }) => () => {
@@ -134,19 +143,25 @@ const setTipStyle = ({
134
143
  return;
135
144
  }
136
145
  const tipStyle = { top: 0, left: 0 };
137
- const tipEl = parent.$el.querySelector("." + constants.tipCls(mode));
146
+ const tipEl = vm.$refs.sliderTip;
138
147
  const moveSize = (state.activeValue - props.min) / state.rangeDiff * state.sliderSize;
139
148
  if (props.vertical) {
140
149
  tipStyle.top = state.sliderSize - moveSize - constants.BUTTON_SIZE - constants.TIP_HEIGHT / 2 + constants.HALF_BAR_HEIGHT;
141
- tipStyle.left = -tipEl.clientWidth / 2 + constants.HALF_BAR_HEIGHT;
150
+ tipStyle.left = -tipEl.getBoundingClientRect().width / 2 + constants.HALF_BAR_HEIGHT;
142
151
  } else {
143
152
  tipStyle.top = -constants.TIP_HEIGHT - constants.BUTTON_SIZE / 2 + constants.HALF_BAR_HEIGHT;
144
- tipStyle.left = moveSize - constants.HALF_BAR_HEIGHT - tipEl.clientWidth / 2;
153
+ tipStyle.left = moveSize - tipEl.getBoundingClientRect().width / 2;
154
+ }
155
+ if (mode === "mobile-first") {
156
+ state.tipStyle = {
157
+ left: tipStyle.left + "px"
158
+ };
159
+ } else {
160
+ state.tipStyle = {
161
+ top: tipStyle.top + "px",
162
+ left: tipStyle.left + "px"
163
+ };
145
164
  }
146
- state.tipStyle = {
147
- top: tipStyle.top + "px",
148
- left: tipStyle.left + "px"
149
- };
150
165
  };
151
166
  const getActiveButtonIndexFlag = ({
152
167
  state,
@@ -156,7 +171,13 @@ const getActiveButtonIndexFlag = ({
156
171
  }) => {
157
172
  const cls = constants.buttonCls(mode);
158
173
  const { previousElementSibling } = event.target;
159
- return state.isDouble && (hasClass(previousElementSibling, cls) || event.target.className.baseVal === "tiny-slider-right-svg");
174
+ if (mode === "mobile-first") {
175
+ const role = Array.from(previousElementSibling.attributes).find((attr) => attr.name === "role");
176
+ const name = role && role.value;
177
+ return state.isDouble && name === constants.PC_BUTTON_CLS;
178
+ } else {
179
+ return state.isDouble && (hasClass(previousElementSibling, cls) || event.target.className.baseVal === "tiny-slider-right-svg");
180
+ }
160
181
  };
161
182
  const getActiveButtonIndex = ({ constants, mode, state }) => (event) => {
162
183
  const flag = getActiveButtonIndexFlag({ state, event, constants, mode });
@@ -200,6 +221,7 @@ const calcCurrentValue = ({
200
221
  };
201
222
  const setActiveButtonValue = ({ api, emit, props, state }) => (value) => {
202
223
  if (Array.isArray(value)) {
224
+ ;
203
225
  [state.leftBtnValue, state.rightBtnValue] = value;
204
226
  } else {
205
227
  let currentValue = calcCurrentValue({ currentValue: value, props, state });
@@ -244,6 +266,8 @@ const setBarStyle = ({ props, state }) => () => {
244
266
  }
245
267
  };
246
268
  const initSlider = ({ api, props, state }) => (value) => {
269
+ if (state.isDrag)
270
+ return;
247
271
  state.isDouble = Array.isArray(value);
248
272
  const sliders = state.isDouble ? value : [value];
249
273
  sliders.length > 2 && (sliders.length = 2);
@@ -262,8 +286,13 @@ const initSlider = ({ api, props, state }) => (value) => {
262
286
  state.isInit = false;
263
287
  api.setBarStyle();
264
288
  };
265
- const calculateValue = ({ props, state }) => (event) => {
289
+ const calculateValue = ({ props, state, vm }) => (event) => {
266
290
  let currentValue = 0;
291
+ if (state.sliderSize == 0) {
292
+ const handleEl = vm.$refs.slider;
293
+ state.sliderSize = handleEl["client" + (props.vertical ? "Height" : "Width")];
294
+ state.sliderOffset = handleEl.getBoundingClientRect();
295
+ }
267
296
  const offset = state.sliderOffset;
268
297
  if (event.type === "touchmove" || event.type === "touchstart" || event.type === "touchend") {
269
298
  if (props.vertical) {
@@ -300,6 +329,9 @@ const customBeforeAppearHook = (props) => (el) => {
300
329
  el.style.width = "0%";
301
330
  }
302
331
  };
332
+ const customAppearHook = () => (el) => {
333
+ el.style.transition = "all 0.5s";
334
+ };
303
335
  const customAfterAppearHook = ({ state, props }) => (el) => {
304
336
  const minSize = Math.abs(state.leftBtnPercent - state.rightBtnPercent);
305
337
  const maxSize = Math.max(state.leftBtnPercent, state.rightBtnPercent);
@@ -396,6 +428,7 @@ export {
396
428
  calculateValue,
397
429
  changeActiveValue,
398
430
  customAfterAppearHook,
431
+ customAppearHook,
399
432
  customBeforeAppearHook,
400
433
  displayTip,
401
434
  formatTipValue,