@opentiny/vue-renderless 3.11.8 → 3.12.1

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 +3 -2
  28. package/col/vue.js +1 -1
  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 +11 -7
  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} +6 -2
  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
@@ -0,0 +1,42 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ import { handelNodeClick } from "./index";
3
+ const api = ["state", "handelNodeClick"];
4
+ const renderless = (props, { reactive, watch, computed }, { dispatch, nextTick }) => {
5
+ const api2 = {};
6
+ const state = reactive({
7
+ renderNodes: false,
8
+ showNodes: false,
9
+ activeNodeId: null,
10
+ allExpandedKeysPath: computed(() => [...props.expandedKeysPath, ...props.activedKeysPath])
11
+ });
12
+ Object.assign(api2, {
13
+ state,
14
+ handelNodeClick: handelNodeClick({ state, dispatch })
15
+ });
16
+ watch(
17
+ () => props.activedKeys,
18
+ () => {
19
+ if (props.activedKeys && props.nodes.id === props.activedKeys && state.activeNodeId !== props.activedKeys) {
20
+ nextTick(() => {
21
+ state.activeNodeId = props.activedKeys;
22
+ dispatch("Menu", "node-changed", { id: props.activedKeys });
23
+ });
24
+ }
25
+ },
26
+ { immediate: true }
27
+ );
28
+ watch(
29
+ () => state.allExpandedKeysPath,
30
+ () => {
31
+ if (state.allExpandedKeysPath.length) {
32
+ state.showNodes = state.allExpandedKeysPath.includes(props.nodes.id);
33
+ }
34
+ },
35
+ { deep: true, immediate: true }
36
+ );
37
+ return api2;
38
+ };
39
+ export {
40
+ api,
41
+ renderless
42
+ };
package/modal/index.js CHANGED
@@ -48,11 +48,13 @@ const mounted = ({
48
48
  if (props.escClosable) {
49
49
  on(document, "keydown", api.handleGlobalKeydownEvent);
50
50
  }
51
+ on(window, "hashchange", api.handleHashChange);
51
52
  document.body.appendChild(parent.$el);
52
53
  };
53
54
  const beforeUnmouted = ({ api, parent, isMobileFirstMode }) => () => {
54
55
  isMobileFirstMode && off(window, "resize", api.resetDragStyle);
55
56
  off(document, "keydown", api.handleGlobalKeydownEvent);
57
+ off(window, "hashchange", api.handleHashChange);
56
58
  api.removeMsgQueue();
57
59
  if (parent.$el.parentNode) {
58
60
  parent.$el.parentNode.removeChild(parent.$el);
@@ -202,6 +204,9 @@ const handleGlobalKeydownEvent = (api) => (event) => {
202
204
  api.close("esc");
203
205
  }
204
206
  };
207
+ const handleHashChange = (api) => () => {
208
+ api.close("close");
209
+ };
205
210
  const getBox = ({ vm }) => () => vm.$refs.modalBox;
206
211
  const maximize = ({
207
212
  api,
@@ -638,6 +643,7 @@ export {
638
643
  getBox,
639
644
  handleEvent,
640
645
  handleGlobalKeydownEvent,
646
+ handleHashChange,
641
647
  maximize,
642
648
  mounted,
643
649
  mousedownEvent,
package/modal/vue.js CHANGED
@@ -24,7 +24,8 @@ import {
24
24
  cancelEvent,
25
25
  open,
26
26
  resetDragStyle,
27
- computedBoxStyle
27
+ computedBoxStyle,
28
+ handleHashChange
28
29
  } from "./index";
29
30
  const api = [
30
31
  "state",
@@ -82,6 +83,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
82
83
  removeMsgQueue: removeMsgQueue({ api: api2, parent }),
83
84
  close: close({ emit, parent, props, state }),
84
85
  handleGlobalKeydownEvent: handleGlobalKeydownEvent(api2),
86
+ handleHashChange: handleHashChange(api2),
85
87
  maximize: maximize({ api: api2, nextTick, props, state, isMobileFirstMode }),
86
88
  revert: revert({ api: api2, nextTick, state, isMobileFirstMode }),
87
89
  toggleZoomEvent: toggleZoomEvent({ api: api2, emit, parent, state, isMobileFirstMode }),
package/numeric/index.js CHANGED
@@ -16,11 +16,14 @@ const initService = (service) => {
16
16
  };
17
17
  };
18
18
  const getDecimal = (props) => (value) => getMiniDecimal(value, props.plugin);
19
- const watchValue = ({ api, state }) => (value) => {
19
+ const watchValue = ({ api, state, nextTick }) => (value) => {
20
20
  if (value === state.currentValue) {
21
21
  return;
22
22
  }
23
23
  api.setCurrentValue(value);
24
+ nextTick(() => {
25
+ api.dispatchDisplayedValue();
26
+ });
24
27
  };
25
28
  const toPrecision = (state) => ({ num, precision }) => {
26
29
  if (precision === void 0) {
@@ -202,7 +205,7 @@ const handleInput = ({ state, api, emit, props }) => (event) => {
202
205
  if (value !== "-" && api.getDecimal(value).isNaN()) {
203
206
  emitError();
204
207
  if (!(value === "" && props.allowEmpty)) {
205
- value = value.indexOf("e") === -1 ? state.lastInput : value;
208
+ value = !value.includes("e") ? state.lastInput : value;
206
209
  }
207
210
  } else {
208
211
  value = value.split(".").map((a, i) => {
@@ -296,12 +299,25 @@ const dispatchDisplayedValue = ({ state, api, dispatch }) => () => {
296
299
  const getDisplayedValue = ({ state, props }) => () => {
297
300
  return state.displayValue || state.displayValue === 0 ? state.displayValue + " " + (props.unit || "") : "-";
298
301
  };
302
+ const getDisplayOnlyText = ({ parent, state, props }) => () => {
303
+ const showEmptyValue = props.showEmptyValue || (parent.tinyForm || {}).showEmptyValue;
304
+ if (showEmptyValue) {
305
+ return state.displayValue;
306
+ } else {
307
+ if (state.displayValue || state.displayValue === 0) {
308
+ return state.displayValue;
309
+ } else {
310
+ return "-";
311
+ }
312
+ }
313
+ };
299
314
  export {
300
315
  decrease,
301
316
  dispatchDisplayedValue,
302
317
  displayValue,
303
318
  focus,
304
319
  getDecimal,
320
+ getDisplayOnlyText,
305
321
  getDisplayedValue,
306
322
  getNumPecision,
307
323
  getPrecision,
package/numeric/vue.js CHANGED
@@ -24,7 +24,8 @@ import {
24
24
  unmounted,
25
25
  initService,
26
26
  dispatchDisplayedValue,
27
- getDisplayedValue
27
+ getDisplayedValue,
28
+ getDisplayOnlyText
28
29
  } from "./index";
29
30
  const api = [
30
31
  "state",
@@ -56,7 +57,8 @@ const initState = ({ reactive, computed, props, api: api2, $service, parent }) =
56
57
  maxDisabled: computed(() => !props.circulate && state.currentValue >= props.max || state.formDisabled),
57
58
  controlsAtRight: computed(() => props.controls && props.controlsPosition === "right"),
58
59
  format: computed(() => getUnitPrecision({ service: $service, props })),
59
- isDisplayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly)
60
+ isDisplayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly),
61
+ displayOnlyText: computed(() => api2.getDisplayOnlyText())
60
62
  });
61
63
  return state;
62
64
  };
@@ -68,7 +70,8 @@ const initApi = ({
68
70
  refs,
69
71
  emit,
70
72
  dispatch,
71
- constants
73
+ constants,
74
+ nextTick
72
75
  }) => {
73
76
  Object.assign(api2, {
74
77
  state,
@@ -91,10 +94,11 @@ const initApi = ({
91
94
  handleInputChange: handleInputChange({ api: api2 }),
92
95
  mouseEvent: mouseEvent({ api: api2, props, state }),
93
96
  handleBlur: handleBlur({ constants, dispatch, emit, props, state, api: api2 }),
94
- watchValue: watchValue({ api: api2, state }),
97
+ watchValue: watchValue({ api: api2, state, nextTick }),
95
98
  setCurrentValue: setCurrentValue({ api: api2, constants, dispatch, emit, props, state }),
96
99
  dispatchDisplayedValue: dispatchDisplayedValue({ api: api2, state, dispatch }),
97
- getDisplayedValue: getDisplayedValue({ state, props })
100
+ getDisplayedValue: getDisplayedValue({ state, props }),
101
+ getDisplayOnlyText: getDisplayOnlyText({ parent, props, state })
98
102
  });
99
103
  api2.getDecimal(0);
100
104
  };
@@ -107,12 +111,12 @@ const initWatch = ({
107
111
  watch(() => props.modelValue, api2.watchValue, { immediate: true });
108
112
  watch(() => state.isDisplayOnly, api2.dispatchDisplayedValue);
109
113
  };
110
- const renderless = (props, { computed, onMounted, onUpdated, onUnmounted, reactive, watch, inject }, { parent, emit, refs, constants, dispatch, service }) => {
114
+ const renderless = (props, { computed, onMounted, onUpdated, onUnmounted, reactive, watch, inject }, { parent, emit, refs, constants, dispatch, service, nextTick }) => {
111
115
  const api2 = {};
112
116
  const $service = initService(service);
113
117
  const state = initState({ reactive, computed, props, api: api2, $service, parent });
114
118
  parent.tinyForm = parent.tinyForm || inject("form", null);
115
- initApi({ api: api2, props, state, parent, refs, emit, dispatch, constants });
119
+ initApi({ api: api2, props, state, parent, refs, emit, dispatch, constants, nextTick });
116
120
  initWatch({ state, watch, props, api: api2 });
117
121
  onMounted(() => {
118
122
  api2.dispatchDisplayedValue();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.11.8",
3
+ "version": "3.12.1",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "homepage": "https://opentiny.design/tiny-vue",
6
6
  "keywords": [
@@ -5,22 +5,31 @@ const hide = ({ state, emit }) => () => {
5
5
  state.isLock = false;
6
6
  }, 300);
7
7
  state.showPopover = false;
8
- emit("hide", state);
8
+ emit("hide", state.showPopover);
9
9
  };
10
- const show = ({ state, emit, props }) => (trigger) => {
11
- if (trigger && props.trigger !== trigger || state.isLock || state.showPopover) {
10
+ const show = ({ state, props, emit }) => (trigger) => {
11
+ if ((trigger ? props.trigger !== trigger : !props.reference) || state.isLock || state.showPopover) {
12
12
  return;
13
13
  }
14
14
  state.showPopover = true;
15
- emit("show", state);
15
+ emit("show", state.showPopover);
16
16
  };
17
17
  const confirm = ({ state, emit }) => () => {
18
18
  state.showPopover = false;
19
- emit("confirm", state);
20
- emit("hide", state);
19
+ emit("confirm", state.showPopover);
20
+ emit("hide", state.showPopover);
21
+ };
22
+ const handleEmit = ({ state, emit, vm }) => (type) => {
23
+ let { events = {} } = vm;
24
+ if (events[type]) {
25
+ events[type].call(vm, { $modal: vm, type });
26
+ } else {
27
+ emit(type, state.showPopover);
28
+ }
21
29
  };
22
30
  export {
23
31
  confirm,
32
+ handleEmit,
24
33
  hide,
25
34
  show
26
35
  };
package/popconfirm/vue.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "../chunk-G2ADBYYC.js";
2
- import { show, hide, confirm } from "./index";
3
- const api = ["state", "show", "hide", "confirm"];
4
- const renderless = (props, { computed, reactive }, { emit, constants, designConfig }) => {
2
+ import { show, hide, confirm, handleEmit } from "./index";
3
+ const api = ["state", "show", "hide", "confirm", "handleEmit"];
4
+ const renderless = (props, { computed, reactive }, { emit, constants, designConfig, vm }) => {
5
5
  var _a;
6
6
  const api2 = {};
7
7
  const designIcon = (_a = designConfig == null ? void 0 : designConfig.icons) == null ? void 0 : _a[props.type];
@@ -16,7 +16,8 @@ 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, emit }),
20
+ handleEmit: handleEmit({ state, emit, vm })
20
21
  });
21
22
  return api2;
22
23
  };
@@ -0,0 +1,243 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "../chunk-G2ADBYYC.js";
5
+ import { on, off, getScrollTop, preventDefault } from "../common/deps/dom";
6
+ const onTouchstart = ({ state }) => (event) => {
7
+ state.draggposition = event.touches[0].clientY;
8
+ };
9
+ const onTouchmove = ({ vm, state }) => (event) => {
10
+ if (!state.disabled) {
11
+ if (event.touches[0].clientY < state.draggposition || vm.$refs.track.parentNode.scrollTop > 10) {
12
+ return;
13
+ }
14
+ state.replaces = state.pullingText;
15
+ state.animationDuration = 0;
16
+ state.translate3d = (event.touches[0].clientY - state.draggposition) / 2;
17
+ state.styleObj = {
18
+ "transition-duration": "0ms",
19
+ transform: "translate3d(0px," + state.translate3d + "px,0px)"
20
+ };
21
+ state.checkStatus = false;
22
+ if (state.translate3d > state.headHeight) {
23
+ state.replaces = state.loosingText;
24
+ } else {
25
+ state.replaces = state.pullingText;
26
+ }
27
+ }
28
+ };
29
+ const onTouchend = ({ emit, props, state }) => () => {
30
+ state.animationDuration = props.animationDuration;
31
+ if (state.translate3d >= state.headHeight) {
32
+ state.translate3d = state.headHeight;
33
+ state.checkStatus = true;
34
+ state.styleObj = {
35
+ "transition-duration": state.animationDuration + "ms",
36
+ transform: "translate3d(0px," + state.translate3d + "px,0px)"
37
+ };
38
+ emit("update:modelValue", true);
39
+ emit("refresh");
40
+ } else {
41
+ state.styleObj = {
42
+ "transition-duration": state.animationDuration + "ms"
43
+ };
44
+ state.translate3d = 0;
45
+ state.checkStatus = false;
46
+ state.replaces = "";
47
+ }
48
+ };
49
+ const mountedHandler = ({ api, vm, state }) => () => {
50
+ state.styleObj = { "transition-duration": state.animationDuration + "ms" };
51
+ const track = vm.$refs.track;
52
+ on(track, "touchstart", api.onTouchstart);
53
+ on(track, "touchmove", api.onTouchmove);
54
+ on(track, "touchend", api.onTouchend);
55
+ };
56
+ const beforeUnmountHandler = ({ api, vm }) => () => {
57
+ const track = vm.$refs.track;
58
+ off(track, "touchstart", api.onTouchstart);
59
+ off(track, "touchmove", api.onTouchmove);
60
+ off(track, "touchend", api.onTouchend);
61
+ };
62
+ const watchModelValue = ({ value, state }) => {
63
+ if (!value) {
64
+ if (state.successText) {
65
+ state.checkStatus = false;
66
+ state.replaces = state.successText;
67
+ setTimeout(() => {
68
+ state.translate3d = 0;
69
+ state.styleObj = {
70
+ "transition-duration": state.animationDuration + "ms"
71
+ };
72
+ state.replaces = "";
73
+ }, state.successDuration);
74
+ } else {
75
+ state.translate3d = 0;
76
+ state.checkStatus = false;
77
+ state.replaces = "";
78
+ state.styleObj = {
79
+ "transition-duration": state.animationDuration + "ms"
80
+ };
81
+ }
82
+ }
83
+ };
84
+ const isTouchable = ({ props, state, constants }) => () => ![constants.STATUS.LOADING, constants.STATUS.SUCCESS].includes(state.status) && !props.disabled;
85
+ const ease = ({ state, props }) => (distance) => {
86
+ const pullDistance = +(props.pullDistance || state.headHeight);
87
+ if (distance > pullDistance) {
88
+ if (distance < pullDistance * 2) {
89
+ distance = pullDistance + (distance - pullDistance) / 2;
90
+ } else {
91
+ distance = pullDistance * 1.5 + (distance - pullDistance * 2) / 4;
92
+ }
93
+ }
94
+ return Math.round(distance);
95
+ };
96
+ const setStatus = ({ emit, props, state, constants }) => (distance, isLoading) => {
97
+ const pullDistance = +(props.pullDistance || state.headHeight);
98
+ state.distance = distance;
99
+ if (isLoading) {
100
+ state.status = constants.STATUS.LOADING;
101
+ } else if (distance === 0) {
102
+ state.status = constants.STATUS.NORMAL;
103
+ } else if (distance < pullDistance) {
104
+ state.status = constants.STATUS.PULLING;
105
+ } else {
106
+ state.status = constants.STATUS.LOOSING;
107
+ }
108
+ emit("change", { status: state.status, distance });
109
+ };
110
+ const getStatusText = ({ props, state, t, constants }) => () => {
111
+ const { status } = state;
112
+ if (status === constants.STATUS.NORMAL)
113
+ return "";
114
+ return props[`${status}Text`] || t(status);
115
+ };
116
+ const showSuccessTip = ({ api, props, state, constants }) => () => {
117
+ state.status = constants.STATUS.SUCCESS;
118
+ setTimeout(() => api.setStatus(0), +props.successDuration);
119
+ };
120
+ const checkPosition = ({ state, touchState }) => (event) => {
121
+ state.reachTop = getScrollTop(state.scrollParent) === 0;
122
+ if (state.reachTop) {
123
+ state.duration = 0;
124
+ touchState.start(event);
125
+ }
126
+ };
127
+ const onTouchStart = (api) => (event) => {
128
+ if (!api.checkSelfSimulate(event))
129
+ return;
130
+ if (api.isTouchable()) {
131
+ api.checkPosition(event);
132
+ }
133
+ };
134
+ const onTouchMove = ({ api, state, touchState }) => (event) => {
135
+ if (!api.checkSelfSimulate(event))
136
+ return;
137
+ if (api.isTouchable()) {
138
+ if (!state.reachTop) {
139
+ api.checkPosition(event);
140
+ }
141
+ const { deltaY } = touchState;
142
+ touchState.move(event);
143
+ if (state.reachTop && deltaY.value >= 0 && touchState.isVertical()) {
144
+ preventDefault(event);
145
+ api.setStatus(api.ease(deltaY.value));
146
+ }
147
+ }
148
+ };
149
+ const onTouchEnd = ({ api, emit, nextTick, state, props, touchState, constants }) => (event) => {
150
+ if (!api.checkSelfSimulate(event))
151
+ return;
152
+ if (state.reachTop && touchState.deltaY.value && api.isTouchable()) {
153
+ state.duration = +props.animationDuration;
154
+ if (state.status === constants.STATUS.LOOSING) {
155
+ api.setStatus(+state.headHeight, true);
156
+ emit("update:modelValue", true);
157
+ nextTick(() => emit("refresh"));
158
+ } else {
159
+ api.setStatus(0);
160
+ }
161
+ }
162
+ };
163
+ const watchModelValueChange = ({ api, slots, state, props }) => (value) => {
164
+ state.duration = +props.animationDuration;
165
+ if (value) {
166
+ api.setStatus(+state.headHeight, true);
167
+ } else if (slots.success || props.successText) {
168
+ api.showSuccessTip();
169
+ } else {
170
+ api.setStatus(0, false);
171
+ }
172
+ };
173
+ const watchStatusChange = ({ api, state, props, Loading, vm, constants, slots }) => (value, oldValue) => {
174
+ const headEl = vm.$refs.head && vm.$refs.head.$el;
175
+ if (headEl && !slots[constants.STATUS.LOADING]) {
176
+ const { LOADING } = constants.STATUS;
177
+ const enterLoading = value === LOADING && oldValue !== LOADING;
178
+ const exitLoading = value !== LOADING && oldValue === LOADING;
179
+ const defLoadingOptions = { "tiny_mode": props.tiny_mode, target: headEl, text: api.getStatusText() };
180
+ if (props.loadingOptions) {
181
+ if (props.loadingOptions.enterLoading) {
182
+ if (enterLoading) {
183
+ props.loadingOptions.enterLoading(__spreadProps(__spreadValues({}, defLoadingOptions), { component: Loading }));
184
+ }
185
+ if (exitLoading && props.loadingOptions.exitLoading) {
186
+ props.loadingOptions.exitLoading();
187
+ }
188
+ } else {
189
+ if (enterLoading) {
190
+ if (props.loadingOptions.customClass)
191
+ defLoadingOptions.customClass = props.loadingOptions.customClass;
192
+ if (props.loadingOptions.spinner)
193
+ defLoadingOptions.spinner = props.loadingOptions.spinner;
194
+ state.$loadingInstance = Loading.service(defLoadingOptions);
195
+ }
196
+ if (exitLoading) {
197
+ state.$loadingInstance.close();
198
+ }
199
+ }
200
+ }
201
+ }
202
+ };
203
+ const parseHeaderHeight = ({ state, props, constants }) => () => {
204
+ const { headHeight } = props;
205
+ const heightRE = /^(\d+)(px|rem)$/;
206
+ let stateHeadHeight;
207
+ if (typeof headHeight === "number" && (headHeight <= 0 || Object.is(headHeight, NaN)) || headHeight === "") {
208
+ stateHeadHeight = constants.DEFAULT_HEAD_HEIGHT;
209
+ } else if (typeof headHeight === "string" && heightRE.test(headHeight)) {
210
+ const matches = heightRE.exec(headHeight);
211
+ if (matches[2] === "px") {
212
+ stateHeadHeight = Number(matches[1]);
213
+ } else if (matches[2] === "rem") {
214
+ stateHeadHeight = Number(matches[1]) * 16;
215
+ }
216
+ } else {
217
+ stateHeadHeight = Number(headHeight);
218
+ }
219
+ state.headHeight = stateHeadHeight;
220
+ state.headerHeight = `${stateHeadHeight}px`;
221
+ };
222
+ const checkSelfSimulate = ({ state, props }) => (event) => props.selfSimulate && event && event.isTinySimulate ? state.scrollTrack && state.scrollTrack === event.target : true;
223
+ export {
224
+ beforeUnmountHandler,
225
+ checkPosition,
226
+ checkSelfSimulate,
227
+ ease,
228
+ getStatusText,
229
+ isTouchable,
230
+ mountedHandler,
231
+ onTouchEnd,
232
+ onTouchMove,
233
+ onTouchStart,
234
+ onTouchend,
235
+ onTouchmove,
236
+ onTouchstart,
237
+ parseHeaderHeight,
238
+ setStatus,
239
+ showSuccessTip,
240
+ watchModelValue,
241
+ watchModelValueChange,
242
+ watchStatusChange
243
+ };
@@ -0,0 +1,116 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ import {
3
+ mountedHandler,
4
+ beforeUnmountHandler,
5
+ onTouchstart,
6
+ onTouchmove,
7
+ onTouchend,
8
+ isTouchable,
9
+ ease,
10
+ setStatus,
11
+ getStatusText,
12
+ showSuccessTip,
13
+ checkPosition,
14
+ onTouchStart,
15
+ onTouchMove,
16
+ onTouchEnd,
17
+ watchModelValueChange,
18
+ watchStatusChange,
19
+ parseHeaderHeight,
20
+ checkSelfSimulate
21
+ } from "./index";
22
+ import { getScrollParent } from "../common/deps/dom";
23
+ import { useTouch } from "../common/deps/useTouch";
24
+ import { useEventListener } from "../common/deps/useEventListener";
25
+ import emulate from "../common/deps/touch-emulator";
26
+ emulate();
27
+ const api = ["state", "constants", "onTouchStart", "onTouchEnd", "getStatusText"];
28
+ const renderless = (props, { ref, unref, toRef, isRef, reactive, computed, watch, onMounted, onUnmounted, onActivated, onDeactivated }, { vm, emit, constants, t, nextTick, slots }, { Loading }) => {
29
+ const api2 = {};
30
+ const state = reactive({
31
+ replaces: "",
32
+ styleObj: {},
33
+ translate3d: 0,
34
+ draggposition: 0,
35
+ value: props.modelValue,
36
+ checkStatus: false,
37
+ headHeight: props.headHeight,
38
+ pullingText: props.pullingText,
39
+ loosingText: props.loosingText,
40
+ successText: props.successText,
41
+ successDuration: props.successDuration,
42
+ animationDuration: props.animationDuration,
43
+ disabled: computed(() => props.disabled),
44
+ /* mf state */
45
+ reachTop: false,
46
+ scrollParent: null,
47
+ scrollTrack: null,
48
+ status: constants.STATUS.NORMAL,
49
+ distance: 0,
50
+ duration: 0,
51
+ headerHeight: ""
52
+ });
53
+ const touchState = {};
54
+ Object.assign(api2, {
55
+ state,
56
+ constants,
57
+ onTouchstart: onTouchstart({ state }),
58
+ onTouchmove: onTouchmove({ vm, state }),
59
+ onTouchend: onTouchend({ emit, props, state }),
60
+ mountedHandler: mountedHandler({ api: api2, vm, state }),
61
+ beforeUnmountHandler: beforeUnmountHandler({ api: api2, vm }),
62
+ useTouch: useTouch(ref),
63
+ useEventListener: useEventListener({
64
+ unref,
65
+ isRef,
66
+ watch,
67
+ nextTick,
68
+ onMounted,
69
+ onUnmounted,
70
+ onActivated,
71
+ onDeactivated
72
+ }),
73
+ isTouchable: isTouchable({ props, state, constants }),
74
+ ease: ease({ state, props }),
75
+ setStatus: setStatus({ emit, props, state, constants }),
76
+ getStatusText: getStatusText({ props, state, t, constants }),
77
+ showSuccessTip: showSuccessTip({ api: api2, props, state, constants }),
78
+ checkPosition: checkPosition({ state, touchState }),
79
+ onTouchStart: onTouchStart(api2),
80
+ onTouchMove: onTouchMove({ api: api2, state, touchState }),
81
+ onTouchEnd: onTouchEnd({ api: api2, emit, nextTick, state, props, touchState, constants }),
82
+ watchModelValueChange: watchModelValueChange({ api: api2, slots, state, props }),
83
+ watchStatusChange: watchStatusChange({ api: api2, state, props, Loading, vm, constants, slots }),
84
+ parseHeaderHeight: parseHeaderHeight({ state, props, constants }),
85
+ checkSelfSimulate: checkSelfSimulate({ state, props })
86
+ });
87
+ watch(
88
+ () => props.modelValue,
89
+ (value) => api2.watchModelValueChange(value)
90
+ );
91
+ watch(
92
+ () => state.status,
93
+ (value, oldValue) => api2.watchStatusChange(value, oldValue)
94
+ );
95
+ watch(
96
+ () => props.headHeight,
97
+ () => api2.parseHeaderHeight(),
98
+ { immediate: true }
99
+ );
100
+ Object.assign(touchState, api2.useTouch());
101
+ state.stopHandle = api2.useEventListener("touchmove", api2.onTouchMove, { target: toRef(state, "scrollTrack") });
102
+ onMounted(() => {
103
+ state.scrollParent = getScrollParent(vm.$refs.root);
104
+ state.scrollTrack = vm.$refs.track;
105
+ });
106
+ onUnmounted(() => {
107
+ typeof state.stopHandle === "function" && state.stopHandle();
108
+ state.scrollParent = null;
109
+ state.scrollTrack = null;
110
+ });
111
+ return api2;
112
+ };
113
+ export {
114
+ api,
115
+ renderless
116
+ };
@@ -0,0 +1,54 @@
1
+ import "../chunk-G2ADBYYC.js";
2
+ const change = (emit) => () => {
3
+ emit("change");
4
+ };
5
+ function getSizeStr({ props, state }) {
6
+ state.sizeStr = `${props.size}px`;
7
+ const maxIconSize = props.size * 0.3;
8
+ if (props.iconSize > maxIconSize) {
9
+ state.iconSizeStr = `${maxIconSize}px`;
10
+ } else {
11
+ state.iconSizeStr = `${props.iconSize}px`;
12
+ }
13
+ }
14
+ function getQrCodeCanvas({ props, vm, QRCode }) {
15
+ const container = vm.$refs.wrapperRef;
16
+ const qrcodeRef = vm.$refs.qrcodeRef;
17
+ const defaultPadding = (container == null ? void 0 : container.style.padding) || "12px";
18
+ const errorCorrectionLevel = props.level && props.level[0] || "M";
19
+ const qrCodeData = {
20
+ errorCorrectionLevel,
21
+ type: "image/png",
22
+ width: props.size - getCssLength(defaultPadding) * 2,
23
+ margin: 0,
24
+ small: true,
25
+ color: {
26
+ dark: props.color,
27
+ light: "#ffffff00"
28
+ // 背景设为透明改用外框设定背景色
29
+ }
30
+ };
31
+ QRCode.toCanvas(qrcodeRef, props.value, qrCodeData);
32
+ }
33
+ function setIconBackground({ vm, state }) {
34
+ const container = vm.$refs.wrapperRef;
35
+ if (container == null ? void 0 : container.style.backgroundColor) {
36
+ state.iconBackgroudColor = container == null ? void 0 : container.style.backgroundColor;
37
+ }
38
+ }
39
+ function getCssLength(style) {
40
+ return style ? Number(style.replace("px", "")) : 0;
41
+ }
42
+ const draw = ({ props, state, vm, QRCode }) => () => {
43
+ getSizeStr({ props, state });
44
+ getQrCodeCanvas({ props, vm, QRCode });
45
+ setIconBackground({ vm, state });
46
+ };
47
+ export {
48
+ change,
49
+ draw,
50
+ getCssLength,
51
+ getQrCodeCanvas,
52
+ getSizeStr,
53
+ setIconBackground
54
+ };