zartui 3.0.5 → 3.0.7

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 (401) hide show
  1. package/es/button/Button.d.ts +3 -0
  2. package/es/button/Button.mjs +2 -0
  3. package/es/button/index.d.ts +2 -0
  4. package/es/cascader/Cascader.mjs +0 -2
  5. package/es/cascader/index.css +1 -1
  6. package/es/checkbox/Checkbox.d.ts +1 -1
  7. package/es/checkbox/Checker.d.ts +2 -2
  8. package/es/checkbox/index.d.ts +1 -1
  9. package/es/collapse-item/CollapseItem.mjs +3 -1
  10. package/es/date-time-picker/DateTimePicker.d.ts +1 -1
  11. package/es/date-time-picker/DateTimePicker.mjs +9 -3
  12. package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  13. package/es/date-time-picker/index.d.ts +1 -1
  14. package/es/dialog/index.css +1 -1
  15. package/es/divider/index.css +1 -1
  16. package/es/dropdown-item/DropdownItem.mjs +7 -4
  17. package/es/dropdown-menu/DropdownMenu.mjs +2 -2
  18. package/es/dropdown-menu/types.d.ts +1 -0
  19. package/es/empty/Images.mjs +9 -9
  20. package/es/empty/index.css +1 -1
  21. package/es/hierarchy-select/Breadcrumb.d.ts +43 -0
  22. package/es/hierarchy-select/Breadcrumb.mjs +56 -0
  23. package/es/hierarchy-select/HierarchySelect.d.ts +104 -0
  24. package/es/hierarchy-select/HierarchySelect.mjs +221 -0
  25. package/es/hierarchy-select/index.css +1 -0
  26. package/es/hierarchy-select/index.d.ts +79 -0
  27. package/es/hierarchy-select/index.mjs +8 -0
  28. package/es/hierarchy-select/style/index.d.ts +1 -0
  29. package/es/hierarchy-select/style/index.mjs +8 -0
  30. package/es/hierarchy-select/svg/SubIcon.d.ts +1 -0
  31. package/es/hierarchy-select/svg/SubIcon.mjs +33 -0
  32. package/es/hierarchy-select/types.d.ts +7 -0
  33. package/es/hierarchy-select/types.mjs +0 -0
  34. package/es/icon/config.mjs +3 -1
  35. package/es/icon/index.css +1 -1
  36. package/es/image-preview/ImagePreview.mjs +1 -1
  37. package/es/index-anchor/IndexAnchor.d.ts +11 -0
  38. package/es/index-anchor/IndexAnchor.mjs +88 -0
  39. package/es/index-anchor/index.css +1 -0
  40. package/es/index-anchor/index.d.ts +14 -0
  41. package/es/index-anchor/index.mjs +10 -0
  42. package/es/index-anchor/style/index.d.ts +1 -0
  43. package/es/index-anchor/style/index.mjs +3 -0
  44. package/es/index-anchor/types.d.ts +11 -0
  45. package/es/index-anchor/types.mjs +0 -0
  46. package/es/index-bar/IndexBar.d.ts +64 -0
  47. package/es/index-bar/IndexBar.mjs +275 -0
  48. package/es/index-bar/index.css +1 -0
  49. package/es/index-bar/index.d.ts +50 -0
  50. package/es/index-bar/index.mjs +10 -0
  51. package/es/index-bar/style/index.d.ts +1 -0
  52. package/es/index-bar/style/index.mjs +2 -0
  53. package/es/index-bar/types.d.ts +16 -0
  54. package/es/index-bar/types.mjs +0 -0
  55. package/es/index.d.ts +8 -1
  56. package/es/index.mjs +22 -1
  57. package/es/lazyload/vue-lazyload/index.mjs +5 -0
  58. package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
  59. package/es/lazyload/vue-lazyload/listener.mjs +45 -0
  60. package/es/list/List.mjs +2 -4
  61. package/es/list/index.css +1 -1
  62. package/es/locale/lang/en-US.d.ts +7 -23
  63. package/es/locale/lang/en-US.mjs +7 -23
  64. package/es/locale/lang/zh-CN.d.ts +7 -23
  65. package/es/locale/lang/zh-CN.mjs +7 -23
  66. package/es/media-picker/MediaPicker.mjs +20 -0
  67. package/es/media-picker/image/PickFileIcon.mjs +1 -1
  68. package/es/media-picker/image/PickPhotoIcon.mjs +1 -1
  69. package/es/media-picker/image/TakeAudioIcon.mjs +1 -1
  70. package/es/media-picker/image/TakePhotoIcon.mjs +1 -1
  71. package/es/media-picker/image/TakeVideoIcon.mjs +1 -1
  72. package/es/media-picker/index.css +1 -1
  73. package/es/media-picker/util/media-util.mjs +3 -0
  74. package/es/media-picker/watermark/image-processor.mjs +10 -6
  75. package/es/media-picker/watermark/resize-options.mjs +1 -0
  76. package/es/media-picker/watermark/watermark.mjs +4 -0
  77. package/es/multiple-picker/MultiplePicker.d.ts +4 -4
  78. package/es/multiple-picker/MultiplePicker.mjs +3 -3
  79. package/es/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  80. package/es/multiple-picker/MultiplePickerOptions.mjs +3 -3
  81. package/es/multiple-picker/index.d.ts +3 -3
  82. package/es/notice-bar/index.css +1 -1
  83. package/es/picker/Picker.mjs +7 -4
  84. package/es/picker/PickerToolbar.mjs +1 -0
  85. package/es/popover/Popover.d.ts +13 -0
  86. package/es/popover/Popover.mjs +91 -4
  87. package/es/popover/index.css +1 -1
  88. package/es/popover/index.d.ts +9 -0
  89. package/es/popup/Popup.mjs +1 -0
  90. package/es/popup/index.css +1 -1
  91. package/es/popup/shared.mjs +12 -0
  92. package/es/radio/Radio.d.ts +1 -1
  93. package/es/radio/index.d.ts +1 -1
  94. package/es/rate/index.css +1 -1
  95. package/es/search/Search.d.ts +1 -1
  96. package/es/search/Search.mjs +1 -0
  97. package/es/search/index.d.ts +1 -1
  98. package/es/signature/Signature.mjs +13 -10
  99. package/es/signature/index.css +1 -1
  100. package/es/step/Step.mjs +10 -6
  101. package/es/step/index.css +1 -1
  102. package/es/stepper/Stepper.mjs +2 -0
  103. package/es/stepper/index.css +1 -1
  104. package/es/steps/index.css +1 -1
  105. package/es/sticky/Sticky.mjs +2 -0
  106. package/es/style/base.css +1 -1
  107. package/es/style/css-variables.css +1 -1
  108. package/es/swipe/Swipe.d.ts +3 -1
  109. package/es/swipe/Swipe.mjs +19 -2
  110. package/es/swipe/index.d.ts +3 -1
  111. package/es/swipe-cell/SwipeCell.d.ts +44 -0
  112. package/es/swipe-cell/SwipeCell.mjs +163 -0
  113. package/es/swipe-cell/index.css +1 -0
  114. package/es/swipe-cell/index.d.ts +39 -0
  115. package/es/swipe-cell/index.mjs +10 -0
  116. package/es/swipe-cell/style/index.d.ts +1 -0
  117. package/es/swipe-cell/style/index.mjs +2 -0
  118. package/es/swipe-cell/types.d.ts +9 -0
  119. package/es/swipe-cell/types.mjs +0 -0
  120. package/es/switch/index.css +1 -1
  121. package/es/tabbar-item/index.css +1 -1
  122. package/es/table/Table.d.ts +113 -0
  123. package/es/table/Table.mjs +118 -0
  124. package/es/table/index.css +1 -0
  125. package/es/table/index.d.ts +75 -0
  126. package/es/table/index.mjs +10 -0
  127. package/es/table/style/index.d.ts +1 -0
  128. package/es/table/style/index.mjs +2 -0
  129. package/es/tabs/Tabs.mjs +2 -0
  130. package/es/tabs/index.css +1 -1
  131. package/es/tag/Tag.d.ts +18 -1
  132. package/es/tag/Tag.mjs +47 -2
  133. package/es/tag/index.css +1 -1
  134. package/es/tag/index.d.ts +13 -1
  135. package/es/text-ellipsis/TextEllipsis.d.ts +76 -0
  136. package/es/text-ellipsis/TextEllipsis.mjs +118 -0
  137. package/es/text-ellipsis/index.css +1 -0
  138. package/es/text-ellipsis/index.d.ts +60 -0
  139. package/es/text-ellipsis/index.mjs +10 -0
  140. package/es/text-ellipsis/style/index.d.ts +1 -0
  141. package/es/text-ellipsis/style/index.mjs +2 -0
  142. package/es/text-ellipsis/types.d.ts +3 -0
  143. package/es/text-ellipsis/types.mjs +0 -0
  144. package/es/timeline/Timeline.d.ts +113 -0
  145. package/es/timeline/Timeline.mjs +162 -0
  146. package/es/timeline/index.css +1 -0
  147. package/es/timeline/index.d.ts +75 -0
  148. package/es/timeline/index.mjs +10 -0
  149. package/es/timeline/style/index.d.ts +1 -0
  150. package/es/timeline/style/index.mjs +4 -0
  151. package/es/uploader/Uploader.d.ts +1 -1
  152. package/es/uploader/index.d.ts +1 -1
  153. package/es/uploader/utils.mjs +1 -1
  154. package/es/utils/dom.d.ts +1 -0
  155. package/es/utils/dom.mjs +11 -0
  156. package/lib/action-sheet/index.js +4 -0
  157. package/lib/avatar/Avatar.js +4 -0
  158. package/lib/avatar/index.js +4 -0
  159. package/lib/badge/index.js +4 -0
  160. package/lib/button/Button.d.ts +3 -0
  161. package/lib/button/Button.js +2 -0
  162. package/lib/button/index.d.ts +2 -0
  163. package/lib/button/index.js +4 -0
  164. package/lib/calendar/Calendar.js +4 -0
  165. package/lib/calendar/CalendarMonth.js +4 -0
  166. package/lib/calendar/index.js +4 -0
  167. package/lib/cascader/Cascader.js +4 -2
  168. package/lib/cascader/index.css +1 -1
  169. package/lib/cascader/index.js +4 -0
  170. package/lib/cell/index.js +4 -0
  171. package/lib/cell-group/index.js +4 -0
  172. package/lib/checkbox/Checkbox.d.ts +1 -1
  173. package/lib/checkbox/Checkbox.js +4 -0
  174. package/lib/checkbox/Checker.d.ts +2 -2
  175. package/lib/checkbox/index.d.ts +1 -1
  176. package/lib/checkbox/index.js +4 -0
  177. package/lib/checkbox-group/index.js +4 -0
  178. package/lib/col/index.js +4 -0
  179. package/lib/collapse/index.js +4 -0
  180. package/lib/collapse-item/CollapseItem.js +7 -1
  181. package/lib/collapse-item/index.js +4 -0
  182. package/lib/config-provider/index.js +4 -0
  183. package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
  184. package/lib/date-time-picker/DateTimePicker.js +13 -3
  185. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  186. package/lib/date-time-picker/DateTimePickerWrapper.js +4 -0
  187. package/lib/date-time-picker/index.d.ts +1 -1
  188. package/lib/date-time-picker/index.js +4 -0
  189. package/lib/dialog/function-call.js +4 -0
  190. package/lib/dialog/index.css +1 -1
  191. package/lib/dialog/index.js +4 -0
  192. package/lib/divider/index.css +1 -1
  193. package/lib/divider/index.js +4 -0
  194. package/lib/dropdown-item/DropdownItem.js +6 -3
  195. package/lib/dropdown-item/index.js +4 -0
  196. package/lib/dropdown-menu/DropdownMenu.js +6 -2
  197. package/lib/dropdown-menu/index.js +4 -0
  198. package/lib/dropdown-menu/types.d.ts +1 -0
  199. package/lib/empty/Images.js +9 -9
  200. package/lib/empty/index.css +1 -1
  201. package/lib/empty/index.js +4 -0
  202. package/lib/field/index.js +4 -0
  203. package/lib/form/index.js +4 -0
  204. package/lib/grid/index.js +4 -0
  205. package/lib/grid-item/index.js +4 -0
  206. package/lib/hierarchy-select/Breadcrumb.d.ts +43 -0
  207. package/lib/hierarchy-select/Breadcrumb.js +85 -0
  208. package/lib/hierarchy-select/HierarchySelect.d.ts +104 -0
  209. package/lib/hierarchy-select/HierarchySelect.js +250 -0
  210. package/lib/hierarchy-select/index.css +1 -0
  211. package/lib/hierarchy-select/index.d.ts +79 -0
  212. package/lib/hierarchy-select/index.js +37 -0
  213. package/lib/hierarchy-select/style/index.d.ts +1 -0
  214. package/lib/hierarchy-select/style/index.js +8 -0
  215. package/lib/hierarchy-select/svg/SubIcon.d.ts +1 -0
  216. package/lib/hierarchy-select/svg/SubIcon.js +52 -0
  217. package/lib/hierarchy-select/types.d.ts +7 -0
  218. package/lib/hierarchy-select/types.js +15 -0
  219. package/lib/icon/config.js +3 -1
  220. package/lib/icon/index.css +1 -1
  221. package/lib/icon/index.js +4 -0
  222. package/lib/image/index.js +4 -0
  223. package/lib/image-preview/ImagePreview.js +5 -1
  224. package/lib/image-preview/function-call.js +4 -0
  225. package/lib/image-preview/index.js +4 -0
  226. package/lib/index-anchor/IndexAnchor.d.ts +11 -0
  227. package/lib/index-anchor/IndexAnchor.js +107 -0
  228. package/lib/index-anchor/index.css +1 -0
  229. package/lib/index-anchor/index.d.ts +14 -0
  230. package/lib/index-anchor/index.js +39 -0
  231. package/lib/index-anchor/style/index.d.ts +1 -0
  232. package/lib/index-anchor/style/index.js +3 -0
  233. package/lib/index-anchor/types.d.ts +11 -0
  234. package/lib/index-anchor/types.js +15 -0
  235. package/lib/index-bar/IndexBar.d.ts +64 -0
  236. package/lib/index-bar/IndexBar.js +294 -0
  237. package/lib/index-bar/index.css +1 -0
  238. package/lib/index-bar/index.d.ts +50 -0
  239. package/lib/index-bar/index.js +39 -0
  240. package/lib/index-bar/style/index.d.ts +1 -0
  241. package/lib/index-bar/style/index.js +2 -0
  242. package/lib/index-bar/types.d.ts +16 -0
  243. package/lib/index-bar/types.js +15 -0
  244. package/lib/index.css +1 -1
  245. package/lib/index.d.ts +8 -1
  246. package/lib/index.js +22 -1
  247. package/lib/lazyload/vue-lazyload/index.js +9 -0
  248. package/lib/lazyload/vue-lazyload/lazy.js +85 -0
  249. package/lib/lazyload/vue-lazyload/listener.js +45 -0
  250. package/lib/list/List.js +2 -4
  251. package/lib/list/index.css +1 -1
  252. package/lib/list/index.js +4 -0
  253. package/lib/loading/index.js +4 -0
  254. package/lib/locale/index.js +4 -0
  255. package/lib/locale/lang/en-US.d.ts +7 -23
  256. package/lib/locale/lang/en-US.js +7 -23
  257. package/lib/locale/lang/zh-CN.d.ts +7 -23
  258. package/lib/locale/lang/zh-CN.js +7 -23
  259. package/lib/media-picker/MediaPicker.js +24 -0
  260. package/lib/media-picker/image/PickFileIcon.js +1 -1
  261. package/lib/media-picker/image/PickPhotoIcon.js +1 -1
  262. package/lib/media-picker/image/TakeAudioIcon.js +1 -1
  263. package/lib/media-picker/image/TakePhotoIcon.js +1 -1
  264. package/lib/media-picker/image/TakeVideoIcon.js +1 -1
  265. package/lib/media-picker/index.css +1 -1
  266. package/lib/media-picker/index.js +4 -0
  267. package/lib/media-picker/util/media-util.js +3 -0
  268. package/lib/media-picker/watermark/image-processor.js +10 -6
  269. package/lib/media-picker/watermark/resize-options.js +1 -0
  270. package/lib/media-picker/watermark/watermark.js +4 -0
  271. package/lib/media-player/MediaPlayer.js +4 -0
  272. package/lib/media-player/index.js +4 -0
  273. package/lib/multiple-picker/MultiplePicker.d.ts +4 -4
  274. package/lib/multiple-picker/MultiplePicker.js +7 -3
  275. package/lib/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  276. package/lib/multiple-picker/MultiplePickerOptions.js +3 -3
  277. package/lib/multiple-picker/index.d.ts +3 -3
  278. package/lib/multiple-picker/index.js +4 -0
  279. package/lib/nav-bar/index.js +4 -0
  280. package/lib/notice-bar/NoticeBar.js +4 -0
  281. package/lib/notice-bar/index.css +1 -1
  282. package/lib/notice-bar/index.js +4 -0
  283. package/lib/notify/function-call.js +4 -0
  284. package/lib/notify/index.js +4 -0
  285. package/lib/number-keyboard/NumberKeyboard.js +4 -0
  286. package/lib/number-keyboard/NumberKeyboardKey.js +4 -0
  287. package/lib/number-keyboard/index.js +4 -0
  288. package/lib/overlay/index.js +4 -0
  289. package/lib/password-input/index.js +4 -0
  290. package/lib/picker/Picker.js +10 -3
  291. package/lib/picker/PickerToolbar.js +1 -0
  292. package/lib/picker/index.js +4 -0
  293. package/lib/popover/Popover.d.ts +13 -0
  294. package/lib/popover/Popover.js +90 -3
  295. package/lib/popover/index.css +1 -1
  296. package/lib/popover/index.d.ts +9 -0
  297. package/lib/popover/index.js +4 -0
  298. package/lib/popup/Popup.js +1 -0
  299. package/lib/popup/index.css +1 -1
  300. package/lib/popup/index.js +4 -0
  301. package/lib/popup/shared.js +12 -0
  302. package/lib/pull-refresh/index.js +4 -0
  303. package/lib/radio/Radio.d.ts +1 -1
  304. package/lib/radio/Radio.js +4 -0
  305. package/lib/radio/index.d.ts +1 -1
  306. package/lib/radio/index.js +4 -0
  307. package/lib/radio-group/index.js +4 -0
  308. package/lib/rate/index.css +1 -1
  309. package/lib/rate/index.js +4 -0
  310. package/lib/row/index.js +4 -0
  311. package/lib/search/Search.d.ts +1 -1
  312. package/lib/search/Search.js +1 -0
  313. package/lib/search/index.d.ts +1 -1
  314. package/lib/search/index.js +4 -0
  315. package/lib/signature/Signature.js +16 -9
  316. package/lib/signature/index.css +1 -1
  317. package/lib/signature/index.js +4 -0
  318. package/lib/skeleton/index.js +4 -0
  319. package/lib/step/Step.js +10 -6
  320. package/lib/step/index.css +1 -1
  321. package/lib/step/index.js +4 -0
  322. package/lib/stepper/Stepper.js +6 -0
  323. package/lib/stepper/index.css +1 -1
  324. package/lib/stepper/index.js +4 -0
  325. package/lib/steps/index.css +1 -1
  326. package/lib/steps/index.js +4 -0
  327. package/lib/sticky/Sticky.js +2 -0
  328. package/lib/sticky/index.js +4 -0
  329. package/lib/style/base.css +1 -1
  330. package/lib/style/css-variables.css +1 -1
  331. package/lib/swipe/Swipe.d.ts +3 -1
  332. package/lib/swipe/Swipe.js +19 -2
  333. package/lib/swipe/index.d.ts +3 -1
  334. package/lib/swipe/index.js +4 -0
  335. package/lib/swipe-cell/SwipeCell.d.ts +44 -0
  336. package/lib/swipe-cell/SwipeCell.js +182 -0
  337. package/lib/swipe-cell/index.css +1 -0
  338. package/lib/swipe-cell/index.d.ts +39 -0
  339. package/lib/swipe-cell/index.js +39 -0
  340. package/lib/swipe-cell/style/index.d.ts +1 -0
  341. package/lib/swipe-cell/style/index.js +2 -0
  342. package/lib/swipe-cell/types.d.ts +9 -0
  343. package/lib/swipe-cell/types.js +15 -0
  344. package/lib/swipe-item/index.js +4 -0
  345. package/lib/switch/index.css +1 -1
  346. package/lib/switch/index.js +4 -0
  347. package/lib/tab/index.js +4 -0
  348. package/lib/tabbar/index.js +4 -0
  349. package/lib/tabbar-item/index.css +1 -1
  350. package/lib/tabbar-item/index.js +4 -0
  351. package/lib/table/Table.d.ts +113 -0
  352. package/lib/table/Table.js +137 -0
  353. package/lib/table/index.css +1 -0
  354. package/lib/table/index.d.ts +75 -0
  355. package/lib/table/index.js +39 -0
  356. package/lib/table/style/index.d.ts +1 -0
  357. package/lib/table/style/index.js +2 -0
  358. package/lib/tabs/Tabs.js +6 -0
  359. package/lib/tabs/index.css +1 -1
  360. package/lib/tabs/index.js +4 -0
  361. package/lib/tag/Tag.d.ts +18 -1
  362. package/lib/tag/Tag.js +47 -2
  363. package/lib/tag/index.css +1 -1
  364. package/lib/tag/index.d.ts +13 -1
  365. package/lib/tag/index.js +4 -0
  366. package/lib/text-ellipsis/TextEllipsis.d.ts +76 -0
  367. package/lib/text-ellipsis/TextEllipsis.js +137 -0
  368. package/lib/text-ellipsis/index.css +1 -0
  369. package/lib/text-ellipsis/index.d.ts +60 -0
  370. package/lib/text-ellipsis/index.js +39 -0
  371. package/lib/text-ellipsis/style/index.d.ts +1 -0
  372. package/lib/text-ellipsis/style/index.js +2 -0
  373. package/lib/text-ellipsis/types.d.ts +3 -0
  374. package/lib/text-ellipsis/types.js +15 -0
  375. package/lib/time-picker/TimePicker.js +4 -0
  376. package/lib/time-picker/TimePickerColumn.js +4 -0
  377. package/lib/time-picker/index.js +4 -0
  378. package/lib/timeline/Timeline.d.ts +113 -0
  379. package/lib/timeline/Timeline.js +191 -0
  380. package/lib/timeline/index.css +1 -0
  381. package/lib/timeline/index.d.ts +75 -0
  382. package/lib/timeline/index.js +39 -0
  383. package/lib/timeline/style/index.d.ts +1 -0
  384. package/lib/timeline/style/index.js +4 -0
  385. package/lib/toast/function-call.js +4 -0
  386. package/lib/toast/index.js +4 -0
  387. package/lib/uploader/Uploader.d.ts +1 -1
  388. package/lib/uploader/Uploader.js +4 -0
  389. package/lib/uploader/index.d.ts +1 -1
  390. package/lib/uploader/index.js +4 -0
  391. package/lib/uploader/utils.js +1 -1
  392. package/lib/utils/create.js +4 -0
  393. package/lib/utils/dom.d.ts +1 -0
  394. package/lib/utils/dom.js +11 -0
  395. package/lib/web-types.json +1 -1
  396. package/lib/zartui.cjs.js +2619 -1019
  397. package/lib/zartui.es.js +2671 -1071
  398. package/lib/zartui.js +3354 -1218
  399. package/lib/zartui.min.js +1 -1
  400. package/package.json +24 -23
  401. package/README.md +0 -25
@@ -75,12 +75,26 @@ function stdin_default() {
75
75
  );
76
76
  this.setMode(this.options.observer ? modeType.observer : modeType.event);
77
77
  }
78
+ /**
79
+ * update config
80
+ * @param {Object} config params
81
+ * @return
82
+ */
78
83
  config(options = {}) {
79
84
  Object.assign(this.options, options);
80
85
  }
86
+ /**
87
+ * output listener's load performance
88
+ * @return {Array}
89
+ */
81
90
  performance() {
82
91
  return this.listeners.map((item) => item.performance());
83
92
  }
93
+ /*
94
+ * add lazy component to queue
95
+ * @param {Vue} vm lazy component instance
96
+ * @return
97
+ */
84
98
  addLazyBox(vm) {
85
99
  this.listeners.push(vm);
86
100
  if (inBrowser) {
@@ -91,6 +105,13 @@ function stdin_default() {
91
105
  }
92
106
  }
93
107
  }
108
+ /*
109
+ * add image listener to queue
110
+ * @param {DOM} el
111
+ * @param {object} binding vue directive binding
112
+ * @param {vnode} vnode vue directive vnode
113
+ * @return
114
+ */
94
115
  add(el, binding, vnode) {
95
116
  if (this.listeners.some((item) => item.el === el)) {
96
117
  this.update(el, binding);
@@ -131,6 +152,12 @@ function stdin_default() {
131
152
  nextTick(() => this.lazyLoadHandler());
132
153
  });
133
154
  }
155
+ /**
156
+ * update image src
157
+ * @param {DOM} el
158
+ * @param {object} vue directive binding
159
+ * @return
160
+ */
134
161
  update(el, binding, vnode) {
135
162
  const value = this.valueFormatter(binding.value);
136
163
  let { src } = value;
@@ -152,6 +179,11 @@ function stdin_default() {
152
179
  this.lazyLoadHandler();
153
180
  nextTick(() => this.lazyLoadHandler());
154
181
  }
182
+ /**
183
+ * remove listener form list
184
+ * @param {DOM} el
185
+ * @return
186
+ */
155
187
  remove(el) {
156
188
  if (!el)
157
189
  return;
@@ -164,6 +196,11 @@ function stdin_default() {
164
196
  existItem.$destroy();
165
197
  }
166
198
  }
199
+ /*
200
+ * remove lazy components form list
201
+ * @param {Vue} vm Vue instance
202
+ * @return
203
+ */
167
204
  removeComponent(vm) {
168
205
  if (!vm)
169
206
  return;
@@ -196,6 +233,14 @@ function stdin_default() {
196
233
  this.initIntersectionObserver();
197
234
  }
198
235
  }
236
+ /*
237
+ *** Private functions ***
238
+ */
239
+ /*
240
+ * add listener target
241
+ * @param {DOM} el listener target
242
+ * @return
243
+ */
199
244
  addListenerTarget(el) {
200
245
  if (!el)
201
246
  return;
@@ -214,6 +259,11 @@ function stdin_default() {
214
259
  }
215
260
  return this.targetIndex;
216
261
  }
262
+ /*
263
+ * remove listener target or reduce target childrenCount
264
+ * @param {DOM} el or window
265
+ * @return
266
+ */
217
267
  removeListenerTarget(el) {
218
268
  this.targets.forEach((target, index) => {
219
269
  if (target.el === el) {
@@ -226,6 +276,12 @@ function stdin_default() {
226
276
  }
227
277
  });
228
278
  }
279
+ /*
280
+ * add or remove eventlistener
281
+ * @param {DOM} el DOM or Window
282
+ * @param {boolean} start flag
283
+ * @return
284
+ */
229
285
  initListen(el, start) {
230
286
  this.options.ListenEvents.forEach(
231
287
  (evt) => (start ? on : off)(el, evt, this.lazyLoadHandler)
@@ -266,6 +322,10 @@ function stdin_default() {
266
322
  this.Event.listeners[event].forEach((func) => func(context, inCache));
267
323
  };
268
324
  }
325
+ /**
326
+ * find nodes which in viewport and trigger load
327
+ * @return
328
+ */
269
329
  lazyLoadHandler() {
270
330
  const freeList = [];
271
331
  this.listeners.forEach((listener) => {
@@ -282,6 +342,11 @@ function stdin_default() {
282
342
  item.$destroy();
283
343
  });
284
344
  }
345
+ /**
346
+ * init IntersectionObserver
347
+ * set mode to observer
348
+ * @return
349
+ */
285
350
  initIntersectionObserver() {
286
351
  if (!hasIntersectionObserver) {
287
352
  return;
@@ -296,6 +361,10 @@ function stdin_default() {
296
361
  });
297
362
  }
298
363
  }
364
+ /**
365
+ * init IntersectionObserver
366
+ * @return
367
+ */
299
368
  observerHandler(entries) {
300
369
  entries.forEach((entry) => {
301
370
  if (entry.isIntersecting) {
@@ -309,6 +378,13 @@ function stdin_default() {
309
378
  }
310
379
  });
311
380
  }
381
+ /**
382
+ * set element attribute with image'url and state
383
+ * @param {object} lazyload listener object
384
+ * @param {string} state will be rendered
385
+ * @param {bool} inCache is rendered from cache
386
+ * @return
387
+ */
312
388
  elRenderer(listener, state, cache) {
313
389
  if (!listener.el)
314
390
  return;
@@ -340,6 +416,11 @@ function stdin_default() {
340
416
  el.dispatchEvent(event);
341
417
  }
342
418
  }
419
+ /**
420
+ * generate loading loaded error image url
421
+ * @param {string} image's src
422
+ * @return {object} image's loading, loaded, error url
423
+ */
343
424
  valueFormatter(value) {
344
425
  let src = value;
345
426
  let { loading, error } = this.options;
@@ -35,6 +35,10 @@ class ReactiveListener {
35
35
  this.initState();
36
36
  this.render("loading", false);
37
37
  }
38
+ /*
39
+ * init listener state
40
+ * @return
41
+ */
38
42
  initState() {
39
43
  if ("dataset" in this.el) {
40
44
  this.el.dataset.src = this.src;
@@ -48,9 +52,20 @@ class ReactiveListener {
48
52
  rendered: false
49
53
  };
50
54
  }
55
+ /*
56
+ * record performance
57
+ * @return
58
+ */
51
59
  record(event) {
52
60
  this.performanceData[event] = Date.now();
53
61
  }
62
+ /*
63
+ * update image listener data
64
+ * @param {String} image uri
65
+ * @param {String} loading image uri
66
+ * @param {String} error image uri
67
+ * @return
68
+ */
54
69
  update({ src, loading, error }) {
55
70
  const oldSrc = this.src;
56
71
  this.src = src;
@@ -62,15 +77,27 @@ class ReactiveListener {
62
77
  this.initState();
63
78
  }
64
79
  }
80
+ /*
81
+ * check el is in view
82
+ * @return {Boolean} el is in view
83
+ */
65
84
  checkInView() {
66
85
  const rect = useRect(this.el);
67
86
  return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
68
87
  }
88
+ /*
89
+ * listener filter
90
+ */
69
91
  filter() {
70
92
  Object.keys(this.options.filter).forEach((key) => {
71
93
  this.options.filter[key](this, this.options);
72
94
  });
73
95
  }
96
+ /*
97
+ * render loading first
98
+ * @params cb:Function
99
+ * @return
100
+ */
74
101
  renderLoading(cb) {
75
102
  this.state.loading = true;
76
103
  loadImageAsync(
@@ -93,6 +120,10 @@ class ReactiveListener {
93
120
  }
94
121
  );
95
122
  }
123
+ /*
124
+ * try load image and render it
125
+ * @return
126
+ */
96
127
  load(onFinish = noop) {
97
128
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
98
129
  if (process.env.NODE_ENV !== "production" && !this.options.silent) {
@@ -141,9 +172,19 @@ class ReactiveListener {
141
172
  );
142
173
  });
143
174
  }
175
+ /*
176
+ * render image
177
+ * @param {String} state to render // ['loading', 'src', 'error']
178
+ * @param {String} is form cache
179
+ * @return
180
+ */
144
181
  render(state, cache) {
145
182
  this.elRenderer(this, state, cache);
146
183
  }
184
+ /*
185
+ * output performance data
186
+ * @return {Object} performance data
187
+ */
147
188
  performance() {
148
189
  let state = "loading";
149
190
  let time = 0;
@@ -159,6 +200,10 @@ class ReactiveListener {
159
200
  time
160
201
  };
161
202
  }
203
+ /*
204
+ * $destroy
205
+ * @return
206
+ */
162
207
  $destroy() {
163
208
  this.el = null;
164
209
  this.src = null;
package/es/list/List.mjs CHANGED
@@ -33,7 +33,8 @@ var stdin_default = defineComponent({
33
33
  const scrollParent = useScrollParent(root);
34
34
  const check = () => {
35
35
  nextTick(() => {
36
- if (loading.value || props.finished || props.error || (tabStatus == null ? void 0 : tabStatus.value) === false) {
36
+ if (loading.value || props.finished || props.error || // skip check when inside an inactive tab
37
+ (tabStatus == null ? void 0 : tabStatus.value) === false) {
37
38
  return;
38
39
  }
39
40
  const {
@@ -63,9 +64,6 @@ var stdin_default = defineComponent({
63
64
  const text = slots.finished ? slots.finished() : props.finishedText;
64
65
  if (text) {
65
66
  return _createVNode(Divider, {
66
- "style": {
67
- padding: "0 16px"
68
- },
69
67
  "class": bem("finished-text")
70
68
  }, {
71
69
  default: () => [text]
package/es/list/index.css CHANGED
@@ -1 +1 @@
1
- :root{--zt-list-text-color: var(--zt-text-color-a6);--zt-list-text-font-size: var(--zt-font-size-md);--zt-list-text-line-height: 44px;--zt-list-loading-icon-size: 16px}.zt-list__loading,.zt-list__finished-text,.zt-list__error-text{color:var(--zt-list-text-color);font-size:var(--zt-list-text-font-size);line-height:var(--zt-list-text-line-height);text-align:center;padding-top:6px}.zt-list__placeholder{height:0;pointer-events:none}.zt-list__loading-icon .zt-loading__spinner{width:var(--zt-list-loading-icon-size);height:var(--zt-list-loading-icon-size)}
1
+ :root{--zt-list-text-color: var(--zt-text-color-a6);--zt-list-text-font-size: var(--zt-font-size-md);--zt-list-text-line-height: 44px;--zt-list-loading-icon-size: 16px}.zt-list__loading,.zt-list__finished-text,.zt-list__error-text{color:var(--zt-list-text-color);font-size:var(--zt-list-text-font-size);line-height:var(--zt-list-text-line-height);text-align:center}.zt-list__placeholder{height:0;pointer-events:none}.zt-list__loading-icon .zt-loading__spinner{width:var(--zt-list-loading-icon-size);height:var(--zt-list-loading-icon-size)}
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  nameEmpty: string;
11
11
  addContact: string;
12
12
  telInvalid: string;
13
- vanCalendar: {
13
+ ztCalendar: {
14
14
  end: string;
15
15
  start: string;
16
16
  title: string;
@@ -18,44 +18,28 @@ declare const _default: {
18
18
  monthTitle: (year: number, month: number) => string;
19
19
  rangePrompt: (maxRange: number) => string;
20
20
  };
21
- vanCascader: {
21
+ ztCascader: {
22
22
  select: string;
23
23
  };
24
- vanPagination: {
24
+ ztPagination: {
25
25
  prev: string;
26
26
  next: string;
27
27
  };
28
- vanPullRefresh: {
28
+ ztPullRefresh: {
29
29
  pulling: string;
30
30
  loosing: string;
31
31
  };
32
- vanSubmitBar: {
32
+ ztSubmitBar: {
33
33
  label: string;
34
34
  };
35
- vanCoupon: {
36
- unlimited: string;
37
- discount: (discount: number) => string;
38
- condition: (condition: number) => string;
39
- };
40
- vanCouponCell: {
41
- title: string;
42
- count: (count: number) => string;
43
- };
44
- vanCouponList: {
45
- exchange: string;
46
- close: string;
47
- enable: string;
48
- disabled: string;
49
- placeholder: string;
50
- };
51
- vanAddressEdit: {
35
+ ztAddressEdit: {
52
36
  area: string;
53
37
  areaEmpty: string;
54
38
  addressEmpty: string;
55
39
  addressDetail: string;
56
40
  defaultAddress: string;
57
41
  };
58
- vanAddressList: {
42
+ ztAddressList: {
59
43
  add: string;
60
44
  };
61
45
  };
@@ -10,7 +10,7 @@ var stdin_default = {
10
10
  nameEmpty: "Please fill in the name",
11
11
  addContact: "Add contact",
12
12
  telInvalid: "Malformed phone number",
13
- vanCalendar: {
13
+ ztCalendar: {
14
14
  end: "End",
15
15
  start: "Start",
16
16
  title: "Calendar",
@@ -18,44 +18,28 @@ var stdin_default = {
18
18
  monthTitle: (year, month) => `${year}/${month}`,
19
19
  rangePrompt: (maxRange) => `Choose no more than ${maxRange} days`
20
20
  },
21
- vanCascader: {
21
+ ztCascader: {
22
22
  select: "Select"
23
23
  },
24
- vanPagination: {
24
+ ztPagination: {
25
25
  prev: "Previous",
26
26
  next: "Next"
27
27
  },
28
- vanPullRefresh: {
28
+ ztPullRefresh: {
29
29
  pulling: "Pull to refresh...",
30
30
  loosing: "Loose to refresh..."
31
31
  },
32
- vanSubmitBar: {
32
+ ztSubmitBar: {
33
33
  label: "Total:"
34
34
  },
35
- vanCoupon: {
36
- unlimited: "Unlimited",
37
- discount: (discount) => `${discount * 10}% off`,
38
- condition: (condition) => `At least ${condition}`
39
- },
40
- vanCouponCell: {
41
- title: "Coupon",
42
- count: (count) => `You have ${count} coupons`
43
- },
44
- vanCouponList: {
45
- exchange: "Exchange",
46
- close: "Close",
47
- enable: "Available",
48
- disabled: "Unavailable",
49
- placeholder: "Coupon code"
50
- },
51
- vanAddressEdit: {
35
+ ztAddressEdit: {
52
36
  area: "Area",
53
37
  areaEmpty: "Please select a receiving area",
54
38
  addressEmpty: "Address can not be empty",
55
39
  addressDetail: "Address",
56
40
  defaultAddress: "Set as the default address"
57
41
  },
58
- vanAddressList: {
42
+ ztAddressList: {
59
43
  add: "Add new address"
60
44
  }
61
45
  };
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  nameEmpty: string;
11
11
  addContact: string;
12
12
  telInvalid: string;
13
- vanCalendar: {
13
+ ztCalendar: {
14
14
  end: string;
15
15
  start: string;
16
16
  title: string;
@@ -18,44 +18,28 @@ declare const _default: {
18
18
  monthTitle: (year: number, month: number) => string;
19
19
  rangePrompt: (maxRange: number) => string;
20
20
  };
21
- vanCascader: {
21
+ ztCascader: {
22
22
  select: string;
23
23
  };
24
- vanPagination: {
24
+ ztPagination: {
25
25
  prev: string;
26
26
  next: string;
27
27
  };
28
- vanPullRefresh: {
28
+ ztPullRefresh: {
29
29
  pulling: string;
30
30
  loosing: string;
31
31
  };
32
- vanSubmitBar: {
32
+ ztSubmitBar: {
33
33
  label: string;
34
34
  };
35
- vanCoupon: {
36
- unlimited: string;
37
- discount: (discount: number) => string;
38
- condition: (condition: number) => string;
39
- };
40
- vanCouponCell: {
41
- title: string;
42
- count: (count: number) => string;
43
- };
44
- vanCouponList: {
45
- exchange: string;
46
- close: string;
47
- enable: string;
48
- disabled: string;
49
- placeholder: string;
50
- };
51
- vanAddressEdit: {
35
+ ztAddressEdit: {
52
36
  area: string;
53
37
  areaEmpty: string;
54
38
  addressEmpty: string;
55
39
  addressDetail: string;
56
40
  defaultAddress: string;
57
41
  };
58
- vanAddressList: {
42
+ ztAddressList: {
59
43
  add: string;
60
44
  };
61
45
  };
@@ -10,7 +10,7 @@ var stdin_default = {
10
10
  nameEmpty: "\u8BF7\u586B\u5199\u59D3\u540D",
11
11
  addContact: "\u6DFB\u52A0\u8054\u7CFB\u4EBA",
12
12
  telInvalid: "\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",
13
- vanCalendar: {
13
+ ztCalendar: {
14
14
  end: "\u7ED3\u675F",
15
15
  start: "\u5F00\u59CB",
16
16
  title: "\u8BF7\u9009\u62E9\u65E5\u671F",
@@ -18,44 +18,28 @@ var stdin_default = {
18
18
  monthTitle: (year, month) => `${year}\u5E74${month}\u6708`,
19
19
  rangePrompt: (maxRange) => `\u6700\u591A\u9009\u62E9 ${maxRange} \u5929`
20
20
  },
21
- vanCascader: {
21
+ ztCascader: {
22
22
  select: "\u8BF7\u9009\u62E9"
23
23
  },
24
- vanPagination: {
24
+ ztPagination: {
25
25
  prev: "\u4E0A\u4E00\u9875",
26
26
  next: "\u4E0B\u4E00\u9875"
27
27
  },
28
- vanPullRefresh: {
28
+ ztPullRefresh: {
29
29
  pulling: "\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",
30
30
  loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
31
31
  },
32
- vanSubmitBar: {
32
+ ztSubmitBar: {
33
33
  label: "\u5408\u8BA1:"
34
34
  },
35
- vanCoupon: {
36
- unlimited: "\u65E0\u95E8\u69DB",
37
- discount: (discount) => `${discount}\u6298`,
38
- condition: (condition) => `\u6EE1${condition}\u5143\u53EF\u7528`
39
- },
40
- vanCouponCell: {
41
- title: "\u4F18\u60E0\u5238",
42
- count: (count) => `${count}\u5F20\u53EF\u7528`
43
- },
44
- vanCouponList: {
45
- exchange: "\u5151\u6362",
46
- close: "\u4E0D\u4F7F\u7528",
47
- enable: "\u53EF\u7528",
48
- disabled: "\u4E0D\u53EF\u7528",
49
- placeholder: "\u8F93\u5165\u4F18\u60E0\u7801"
50
- },
51
- vanAddressEdit: {
35
+ ztAddressEdit: {
52
36
  area: "\u5730\u533A",
53
37
  areaEmpty: "\u8BF7\u9009\u62E9\u5730\u533A",
54
38
  addressEmpty: "\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",
55
39
  addressDetail: "\u8BE6\u7EC6\u5730\u5740",
56
40
  defaultAddress: "\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"
57
41
  },
58
- vanAddressList: {
42
+ ztAddressList: {
59
43
  add: "\u65B0\u589E\u5730\u5740"
60
44
  }
61
45
  };
@@ -31,9 +31,22 @@ const mediaPickerProps = {
31
31
  showTitle: Boolean,
32
32
  title: makeStringProp("\u6DFB\u52A0\u9644\u4EF6"),
33
33
  mediaList: makeArrayProp(),
34
+ // 图片压缩后的最大边长
34
35
  maxImageSideLength: makeNumberProp(1920),
36
+ // 单个图片文件大小限制(本单位为KB,默认最大1M)
35
37
  maxImageFileSize: makeNumberProp(1024),
38
+ // 单个文件大小限制(本单位为KB,默认最大1M)
36
39
  maxFileSize: makeNumberProp(FILE_SIZE_LIMIT * 1024),
40
+ /**
41
+ * {
42
+ * maxImageSideLength,
43
+ * address,
44
+ * humanName,
45
+ * projectName,
46
+ * watermarkConfigString
47
+ * (http://faq.egova.com.cn:7777/redmine/projects/redmine/wiki/%E6%8B%8D%E7%85%A7%E6%B0%B4%E5%8D%B0%E9%85%8D%E7%BD%AE)
48
+ * }
49
+ */
37
50
  watermarkOptions: {
38
51
  type: Object,
39
52
  default: () => null
@@ -49,10 +62,16 @@ const mediaPickerProps = {
49
62
  allowTakeAudio: Boolean,
50
63
  allowPickAudio: Boolean,
51
64
  allowPickFile: Boolean,
65
+ // 预览函数(返回true时不再执行默认行为)
66
+ // 参数:media,index
52
67
  preview: Function,
68
+ // 点击按钮事件(返回true时不再执行默认行为)
53
69
  mediaPick: Function,
70
+ // 文件读取前的回调函数,返回 false 可终止文件读取,支持返回 Promise
54
71
  beforeRead: Function,
72
+ // 文件读取完成后的回调函数,获取到对应的 media 对象
55
73
  afterRead: Function,
74
+ // 文件删除前的回调函数,返回 false 可终止文件读取,支持返回 Promise
56
75
  beforeDelete: Function
57
76
  };
58
77
  var stdin_default = defineComponent({
@@ -287,6 +306,7 @@ var stdin_default = defineComponent({
287
306
  lastModified: f.lastModified,
288
307
  type: f.type
289
308
  }),
309
+ // 需要以原始file的信息作为唯一标识
290
310
  uniqueCode: getFileUniqueCode(file),
291
311
  lastModified: f.lastModified,
292
312
  fileSize: f.size,
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  "fill": "none",
12
12
  "fill-rule": "evenodd"
13
13
  }, [_createVNode("g", {
14
- "fill": "#2D4B73"
14
+ "fill": "currentColor"
15
15
  }, [_createVNode("path", {
16
16
  "d": "M15.1171176,1.64705882 L15.1176471,7.41176471 C15.1176471,7.86658744 15.4863537,8.23529412 15.9411765,8.23529412 L15.9411765,8.23529412 L21.7051176,8.23505882 L21.7058824,26.3529412 C21.7058824,27.2625866 20.968469,28 20.0588235,28 L1.94117647,28 C1.031531,28 0.294117647,27.2625866 0.294117647,26.3529412 L0.294117647,3.29411765 C0.294117647,2.38447218 1.031531,1.64705882 1.94117647,1.64705882 L15.1171176,1.64705882 Z M15.1176471,20.5882353 L6.88235294,20.5882353 C6.42753021,20.5882353 6.05882353,20.956942 6.05882353,21.4117647 C6.05882353,21.8665874 6.42753021,22.2352941 6.88235294,22.2352941 L6.88235294,22.2352941 L15.1176471,22.2352941 C15.5724698,22.2352941 15.9411765,21.8665874 15.9411765,21.4117647 C15.9411765,20.956942 15.5724698,20.5882353 15.1176471,20.5882353 L15.1176471,20.5882353 Z M11.5823232,7.99408794 C11.260715,7.6724797 10.739285,7.6724797 10.4176768,7.99408794 L10.4176768,7.99408794 L5.93822044,12.4735443 C5.86099958,12.5507651 5.81761735,12.6554991 5.81761735,12.7647059 C5.81761735,12.9921172 6.00197069,13.1764706 6.22938206,13.1764706 L6.22938206,13.1764706 L8.52941176,13.1764706 L8.52941176,18.1176471 C8.52941176,18.5724698 8.89811844,18.9411765 9.35294118,18.9411765 L9.35294118,18.9411765 L12.6470588,18.9411765 C13.1018816,18.9411765 13.4705882,18.5724698 13.4705882,18.1176471 L13.4705882,18.1176471 L13.4705882,13.1764706 L15.7706179,13.1764706 C15.8798247,13.1764706 15.9845587,13.1330884 16.0617796,13.0558675 C16.2225837,12.8950634 16.2225837,12.6343484 16.0617796,12.4735443 L16.0617796,12.4735443 Z",
17
17
  "transform": "translate(13 10)"
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  "fill": "none",
12
12
  "fill-rule": "evenodd"
13
13
  }, [_createVNode("g", {
14
- "fill": "#2D4B73"
14
+ "fill": "currentColor"
15
15
  }, [_createVNode("path", {
16
16
  "d": "M26.2484746,0.5 C27.2158154,0.5 28,1.28489795 28,2.25432827 L28,19.7456717 C28,20.7145605 27.221896,21.5 26.2484746,21.5 L26.043,21.499 L26.0429993,21.5 L2.46414185,21.5 L2.462,21.499 L1.7515254,21.5 C0.784184634,21.5 5.32907052e-15,20.7151021 5.32907052e-15,19.7456717 L5.32907052e-15,2.25432827 C5.32907052e-15,1.28543952 0.778104007,0.5 1.7515254,0.5 L26.2484746,0.5 Z M25.378032,2.25 L2.62196797,2.25 C2.13483649,2.25 1.75,2.63853971 1.75,3.11782772 L1.75,3.11782772 L1.75,18.8821723 C1.75,18.9217886 1.75278034,18.9608989 1.75816119,18.9993065 L7.9725553,11.29778 C8.88517531,10.1668223 10.4008681,10.1228516 11.3733387,11.216881 L16.625,17.125 L19.6397047,14.7132363 C20.390975,14.11222 21.6193585,14.1071457 22.3809128,14.6999851 L26.249,17.711 L26.25,3.11782772 C26.25,2.68450279 25.9173571,2.31171151 25.4874098,2.25692306 L25.378032,2.25 Z",
17
17
  "transform": "translate(10 13)"
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  "fill": "none",
12
12
  "fill-rule": "evenodd"
13
13
  }, [_createVNode("g", {
14
- "fill": "#2D4B73"
14
+ "fill": "currentColor"
15
15
  }, [_createVNode("path", {
16
16
  "d": "M9.88235294,23.0588235 L11.5294118,23.0588235 L11.5294118,26.3529412 L14.8214926,26.3529412 C15.2423673,26.3529412 15.5896836,26.6644036 15.6406265,27.0725453 L15.6470588,27.1764706 C15.6470588,27.6312933 15.2717263,28 14.8214926,28 L6.59027213,28 C6.13432448,28 5.76470588,27.6344643 5.76470588,27.1764706 C5.76470588,26.7216479 6.14003843,26.3529412 6.59027213,26.3529412 L9.88235294,26.3529412 L9.88235294,23.0588235 Z M10.7058824,0 C14.7993681,0 18.1176471,3.11347096 18.1176471,6.92221282 L18.1176471,12.8424931 C18.1176471,16.665562 14.7910466,19.7647059 10.7058824,19.7647059 C6.61261562,19.7647059 3.29411765,16.6512349 3.29411765,12.8424931 L3.29411765,6.92221282 C3.29411765,3.09914392 6.62093705,0 10.7058824,0 Z M14.0037902,13.1764706 L7.40797447,13.1764706 C6.96348833,13.1764706 6.58823529,13.5451773 6.58823529,14 C6.58823529,14.4227634 6.90095364,14.7667461 7.30514813,14.8171649 L7.40797447,14.8235294 L14.0037902,14.8235294 C14.4140851,14.8235294 14.7653885,14.5093651 14.8170074,14.1033018 L14.8235294,14 L14.8171425,13.8960747 C14.7665592,13.487933 14.4216943,13.1764706 14.0037902,13.1764706 Z M14.0037902,9.05882353 L7.40797447,9.05882353 C6.96348833,9.05882353 6.58823529,9.42753021 6.58823529,9.88235294 C6.58823529,10.3051163 6.90095364,10.649099 7.30514813,10.6995178 L7.40797447,10.7058824 L14.0037902,10.7058824 C14.4140851,10.7058824 14.7653885,10.3917181 14.8170074,9.98565472 L14.8235294,9.88235294 L14.8171425,9.77842765 C14.7665592,9.37028593 14.4216943,9.05882353 14.0037902,9.05882353 Z M14.0037902,4.94117647 L7.40797447,4.94117647 C6.96348833,4.94117647 6.58823529,5.30988315 6.58823529,5.76470588 C6.58823529,6.18746928 6.90095364,6.53145194 7.30514813,6.58187079 L7.40797447,6.58823529 L14.0037902,6.58823529 C14.4140851,6.58823529 14.7653885,6.27407103 14.8170074,5.86800766 L14.8235294,5.76470588 L14.8171425,5.6607806 C14.7665592,5.25263887 14.4216943,4.94117647 14.0037902,4.94117647 Z",
17
17
  "transform": "translate(13.294118 10)"
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  "fill": "none",
12
12
  "fill-rule": "evenodd"
13
13
  }, [_createVNode("g", {
14
- "fill": "#2D4B73"
14
+ "fill": "currentColor"
15
15
  }, [_createVNode("path", {
16
16
  "d": "M22.7478359,0.5 C23.2322802,0.5 23.7508557,0.877567053 23.9022927,1.33187811 L24.791,3.999 L26.2484746,4 C27.2158154,4 28,4.77453349 28,5.74194574 L28,19.7580543 C28,20.7201043 27.221896,21.5 26.2484746,21.5 L1.7515254,21.5 C0.784184634,21.5 0,20.7254665 0,19.7580543 L0,5.74194574 C0,4.77989567 0.778104007,4 1.7515254,4 L11.958,3.999 L12.8477073,1.33187811 C13.0008518,0.872444515 13.5237908,0.5 14.0021641,0.5 L22.7478359,0.5 Z M18.375,6.625 C14.9922559,6.625 12.25,9.36725591 12.25,12.75 C12.25,16.1327441 14.9922559,18.875 18.375,18.875 C21.7577441,18.875 24.5,16.1327441 24.5,12.75 C24.5,9.36725591 21.7577441,6.625 18.375,6.625 Z M5.6875,5.75 L5.55247168,5.75677629 C4.88702668,5.82398941 4.375,6.38293087 4.375,7.0625 C4.375,7.79242742 4.96262627,8.375 5.6875,8.375 L5.6875,8.375 L5.82252832,8.36822371 C6.48797332,8.30101059 7,7.74206913 7,7.0625 L7,7.0625 L6.99322371,6.92747168 C6.92601059,6.26202668 6.36706913,5.75 5.6875,5.75 L5.6875,5.75 Z",
17
17
  "transform": "translate(10 13)"
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  "fill": "none",
12
12
  "fill-rule": "evenodd"
13
13
  }, [_createVNode("g", {
14
- "fill": "#2D4B73"
14
+ "fill": "currentColor"
15
15
  }, [_createVNode("path", {
16
16
  "d": "M19.2451698,0.625 C21.1808341,0.625 22.75,2.19340919 22.75,4.12432622 L22.75,14.6256738 C22.75,16.5582983 21.1863004,18.125 19.2451698,18.125 L3.50483022,18.125 C1.56916594,18.125 0,16.5565908 0,14.6256738 L0,4.12432622 C0,2.19170171 1.56369963,0.625 3.50483022,0.625 L19.2451698,0.625 Z M10.0666465,5.82290404 C9.34681606,5.37301004 8.75,5.700372 8.75,6.56432465 L8.75,6.56432465 L8.75,12.1856754 C8.75,13.0634022 9.3394827,13.3815733 10.0666465,12.927096 L10.0666465,12.927096 L14.4333535,10.197904 C15.1531839,9.74801004 15.1605173,9.00657331 14.4333535,8.55209596 L14.4333535,8.55209596 Z",
17
17
  "transform": "translate(10 12)"
@@ -1 +1 @@
1
- .zt-media-picker__hidden{display:none}.zt-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:var(--zt-text-color);padding:0 16px}.zt-media-picker__title:before{position:absolute;width:4px;height:16px;background:var(--zt-blue);left:0;top:14px;content:" "}.zt-media-picker__title:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-media-picker__line{width:100%;height:92px;display:flex;align-items:center;overflow-x:auto}.zt-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt-media-picker__line:after{content:" ";min-width:16px;height:10px}.zt-media-picker__box{width:48px;display:flex;flex-direction:column;align-items:center}.zt-media-picker__box:first-child{margin-left:16px}.zt-media-picker__box:not(:last-child){margin-right:24px}.zt-media-picker__button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:linear-gradient(135deg,#e6ebf0 0%,#fff 100%,#fff 100%);box-shadow:-4px -4px 8px #fff,4px 4px 8px rgba(45,75,115,.1);border-radius:8px;box-sizing:border-box}.zt-media-picker__button:active{background:rgba(45,75,115,.04);border:1px solid rgba(255,255,255,.75);box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-media-picker__icon{width:32px;height:32px}.zt-media-picker__label{margin-top:8px;font-size:12px;opacity:.8;color:#2d4b73;letter-spacing:0;text-align:center;line-height:16px;-webkit-user-select:none;user-select:none}.zt-media-picker__grid{padding:0 16px 8px!important}.zt-media-picker__delete{box-sizing:content-box;width:20px;height:20px;position:absolute;padding:4px;top:0;right:0}.zt-media-picker .zt-image{width:100%;height:100%}.zt-media-picker .zt-grid-item__content{padding:0}.zt-media-picker__thumbnail{width:100%;height:100%}.zt-media-picker__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-white);background-color:var(--zt-uploader-mask-background);border-radius:4px}.zt-media-picker__mask-icon{font-size:var(--zt-uploader-mask-icon-size)}.zt-media-picker__mask-message{margin-top:6px;padding:0 var(--zt-padding-base);font-size:var(--zt-uploader-mask-message-font-size);line-height:var(--zt-uploader-mask-message-line-height)}.zt-media-picker__loading{width:var(--zt-uploader-loading-icon-size);height:var(--zt-uploader-loading-icon-size);color:var(--zt-uploader-icon-color)}
1
+ :root{--zt-media-picker-image-color: #2d4b73;--zt-media-picker-button-background: linear-gradient(135deg, #e6ebf0 0%, #fff 100%, #fff 100%);--zt-media-picker-button-box-shadow: -4px -4px 8px 0 #fff, 4px 4px 8px 0 rgba(45, 75, 115, .1);--zt-media-picker-button-border: 0;--zt-media-picker-button-active-border: 1px solid rgba(255, 255, 255, .75);--zt-media-picker-button-active-box-shadow: inset 4px 4px 8px 0 rgba(45, 75, 115, .24)}.zt-media-picker__hidden{display:none}.zt-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:var(--zt-text-color);padding:0 16px}.zt-media-picker__title:before{position:absolute;width:4px;height:16px;background:var(--zt-blue);left:0;top:14px;content:" "}.zt-media-picker__title:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-media-picker__line{width:100%;height:92px;display:flex;align-items:center;overflow-x:auto}.zt-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt-media-picker__line:after{content:" ";min-width:16px;height:10px}.zt-media-picker__box{width:48px;display:flex;flex-direction:column;align-items:center}.zt-media-picker__box:first-child{margin-left:16px}.zt-media-picker__box:not(:last-child){margin-right:24px}.zt-media-picker__button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:var(--zt-media-picker-button-background);box-shadow:var(--zt-media-picker-button-box-shadow);border:var(--zt-media-picker-button-border);border-radius:8px;box-sizing:border-box}.zt-media-picker__button:active{background:rgba(45,75,115,.04);border:var(--zt-media-picker-button-active-border);box-shadow:var(--zt-media-picker-button-active-box-shadow)}.zt-media-picker__icon{width:32px;height:32px;color:var(--zt-media-picker-image-color)}.zt-media-picker__label{margin-top:8px;font-size:12px;color:var(--zt-gray-a8);letter-spacing:0;text-align:center;line-height:16px;-webkit-user-select:none;user-select:none}.zt-media-picker__grid{padding:0 16px 8px!important}.zt-media-picker__delete{box-sizing:content-box;width:20px;height:20px;position:absolute;padding:4px;top:0;right:0}.zt-media-picker .zt-image{width:100%;height:100%}.zt-media-picker .zt-grid-item__content{padding:0}.zt-media-picker__thumbnail{width:100%;height:100%}.zt-media-picker__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-white);background-color:var(--zt-uploader-mask-background);border-radius:4px}.zt-media-picker__mask-icon{font-size:var(--zt-uploader-mask-icon-size)}.zt-media-picker__mask-message{margin-top:6px;padding:0 var(--zt-padding-base);font-size:var(--zt-uploader-mask-message-font-size);line-height:var(--zt-uploader-mask-message-line-height)}.zt-media-picker__loading{width:var(--zt-uploader-loading-icon-size);height:var(--zt-uploader-loading-icon-size);color:var(--zt-uploader-icon-color)}.zt-theme-dark{--zt-media-picker-image-color: #ffffff;--zt-media-picker-button-background: linear-gradient(135deg, #111c29 0%, #1d2c3e 100%, #1c2a3c 100%);--zt-media-picker-button-box-shadow: -4px -4px 8px 0 #ffffff14, 4px 4px 8px 0 #000c18cc;--zt-media-picker-button-border: 1px solid #ffffff1f;--zt-media-picker-button-active-border: 1px solid #ffffff1f;--zt-media-picker-button-active-box-shadow: inset 6px 6px 6px 0 #000d1b}
@@ -216,10 +216,13 @@ function getOrientation(arrayBuffer) {
216
216
  function resize(img, {
217
217
  inputType = "image/jpeg",
218
218
  orientation = 1,
219
+ // 图片的方向
219
220
  imageWidth = -1,
220
221
  imageHeight = -1,
222
+ // equalProportion = true, // 等比例拉伸
221
223
  sideLengthLimit = 640,
222
224
  baseOnShortSide = true,
225
+ // 是否以短边为基准缩放
223
226
  resultType = "image"
224
227
  }) {
225
228
  let scale = 1;