oxy-uni-ui 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/attributes.json +1 -1
  2. package/components/common/abstracts/variable.scss +396 -321
  3. package/components/common/path.ts +9 -0
  4. package/components/common/util.ts +200 -5
  5. package/components/composables/index.ts +1 -0
  6. package/components/composables/useGlobalLoading.ts +42 -0
  7. package/components/composables/useGlobalMessage.ts +48 -0
  8. package/components/composables/useGlobalToast.ts +84 -0
  9. package/components/composables/usePopover.ts +24 -20
  10. package/components/composables/useVirtualScroll.ts +13 -11
  11. package/components/composables/useWindowResize.ts +35 -0
  12. package/components/oxy-action-sheet/index.scss +24 -11
  13. package/components/oxy-action-sheet/oxy-action-sheet.vue +27 -19
  14. package/components/oxy-action-sheet/types.ts +7 -0
  15. package/components/oxy-backtop/index.scss +3 -3
  16. package/components/oxy-backtop/oxy-backtop.vue +9 -6
  17. package/components/oxy-backtop/types.ts +7 -7
  18. package/components/oxy-badge/index.scss +4 -4
  19. package/components/oxy-badge/oxy-badge.vue +3 -3
  20. package/components/oxy-badge/types.ts +2 -2
  21. package/components/oxy-button/index.scss +5 -5
  22. package/components/oxy-button/oxy-button.vue +5 -1
  23. package/components/oxy-calendar/index.scss +11 -11
  24. package/components/oxy-calendar/oxy-calendar.vue +1 -0
  25. package/components/oxy-calendar/types.ts +5 -0
  26. package/components/oxy-calendar-view/month/index.scss +4 -4
  27. package/components/oxy-calendar-view/month/types.ts +36 -0
  28. package/components/oxy-calendar-view/monthPanel/index.scss +7 -7
  29. package/components/oxy-calendar-view/monthPanel/month-panel.vue +14 -8
  30. package/components/oxy-calendar-view/year/index.scss +4 -4
  31. package/components/oxy-calendar-view/yearPanel/index.scss +4 -4
  32. package/components/oxy-calendar-view/yearPanel/year-panel.vue +21 -5
  33. package/components/oxy-card/index.scss +2 -2
  34. package/components/oxy-cell/index.scss +8 -8
  35. package/components/oxy-cell/oxy-cell.vue +15 -2
  36. package/components/oxy-cell/types.ts +4 -0
  37. package/components/oxy-checkbox/index.scss +8 -8
  38. package/components/oxy-checkbox/oxy-checkbox.vue +2 -2
  39. package/components/oxy-checkbox-group/index.scss +2 -2
  40. package/components/oxy-circle/oxy-circle.vue +10 -7
  41. package/components/oxy-circle/types.ts +5 -5
  42. package/components/oxy-col/oxy-col.vue +2 -2
  43. package/components/oxy-col-picker/index.scss +4 -4
  44. package/components/oxy-col-picker/oxy-col-picker.vue +9 -5
  45. package/components/oxy-col-picker/types.ts +12 -3
  46. package/components/oxy-collapse/index.scss +2 -2
  47. package/components/oxy-collapse-item/oxy-collapse-item.vue +3 -3
  48. package/components/oxy-corner/index.scss +32 -32
  49. package/components/oxy-corner/oxy-corner.vue +15 -3
  50. package/components/oxy-corner/types.ts +15 -1
  51. package/components/oxy-count-to/oxy-count-to.vue +3 -3
  52. package/components/oxy-curtain/index.scss +15 -15
  53. package/components/oxy-curtain/oxy-curtain.vue +4 -2
  54. package/components/oxy-curtain/types.ts +6 -1
  55. package/components/oxy-date-strip/index.scss +10 -0
  56. package/components/oxy-date-strip/oxy-date-strip.vue +198 -0
  57. package/components/oxy-date-strip/types.ts +98 -0
  58. package/components/oxy-date-strip/utils.ts +67 -0
  59. package/components/oxy-date-strip-item/index.scss +94 -0
  60. package/components/oxy-date-strip-item/oxy-date-strip-item.vue +102 -0
  61. package/components/oxy-date-strip-item/types.ts +53 -0
  62. package/components/oxy-datetime-picker/index.scss +11 -11
  63. package/components/oxy-datetime-picker/oxy-datetime-picker.vue +4 -1
  64. package/components/oxy-datetime-picker/types.ts +10 -1
  65. package/components/oxy-drop-menu/index.scss +3 -3
  66. package/components/oxy-drop-menu/oxy-drop-menu.vue +3 -3
  67. package/components/oxy-drop-menu-item/index.scss +1 -1
  68. package/components/oxy-drop-menu-item/oxy-drop-menu-item.vue +4 -3
  69. package/components/oxy-drop-menu-item/types.ts +5 -0
  70. package/components/oxy-echarts/index.scss +17 -0
  71. package/components/oxy-echarts/index.ts +1 -0
  72. package/components/oxy-echarts/oxy-echarts.vue +32 -0
  73. package/components/oxy-echarts/types.ts +18 -0
  74. package/components/oxy-fab/index.scss +8 -8
  75. package/components/oxy-fab/oxy-fab.vue +22 -3
  76. package/components/oxy-file-list/index.scss +42 -15
  77. package/components/oxy-file-list/oxy-file-list.vue +208 -34
  78. package/components/oxy-file-list/types.ts +58 -2
  79. package/components/oxy-floating-panel/oxy-floating-panel.vue +13 -9
  80. package/components/oxy-floating-panel/{type.ts → types.ts} +8 -8
  81. package/components/oxy-footer/index.scss +19 -0
  82. package/components/oxy-footer/oxy-footer.vue +78 -0
  83. package/components/oxy-footer/types.ts +17 -0
  84. package/components/oxy-form-item/types.ts +22 -1
  85. package/components/oxy-gap/oxy-gap.vue +2 -2
  86. package/components/oxy-gap/types.ts +2 -2
  87. package/components/oxy-global-loading/oxy-global-loading.vue +53 -0
  88. package/components/oxy-global-message/oxy-global-message.vue +64 -0
  89. package/components/oxy-global-toast/oxy-global-toast.vue +53 -0
  90. package/components/oxy-grid/oxy-grid.vue +1 -1
  91. package/components/oxy-grid/types.ts +1 -1
  92. package/components/oxy-grid-item/index.scss +1 -1
  93. package/components/oxy-grid-item/oxy-grid-item.vue +7 -5
  94. package/components/oxy-grid-item/types.ts +1 -1
  95. package/components/oxy-guidance/index.scss +75 -0
  96. package/components/oxy-guidance/oxy-guidance.vue +201 -0
  97. package/components/oxy-guidance/types.ts +33 -0
  98. package/components/oxy-icon/oxy-icon.vue +2 -2
  99. package/components/oxy-icon/types.ts +1 -1
  100. package/components/oxy-img/oxy-img.vue +4 -4
  101. package/components/oxy-img/types.ts +3 -3
  102. package/components/oxy-img-cropper/index.scss +12 -12
  103. package/components/oxy-img-cropper/oxy-img-cropper.vue +97 -52
  104. package/components/oxy-img-cropper/types.ts +2 -2
  105. package/components/oxy-img-lazy/index.scss +17 -0
  106. package/components/oxy-img-lazy/oxy-img-lazy.vue +332 -0
  107. package/components/oxy-img-lazy/types.ts +69 -0
  108. package/components/oxy-index-anchor/index.scss +2 -2
  109. package/components/oxy-index-anchor/oxy-index-anchor.vue +2 -2
  110. package/components/oxy-index-anchor/{type.ts → types.ts} +3 -0
  111. package/components/oxy-index-bar/index.scss +3 -3
  112. package/components/oxy-index-bar/oxy-index-bar.vue +3 -3
  113. package/components/oxy-index-bar/{type.ts → types.ts} +2 -2
  114. package/components/oxy-input/index.scss +1 -1
  115. package/components/oxy-input-number/index.scss +5 -5
  116. package/components/oxy-input-number/oxy-input-number.vue +2 -2
  117. package/components/oxy-input-number/types.ts +3 -2
  118. package/components/oxy-keyboard/index.scss +5 -5
  119. package/components/oxy-keyboard/key/index.scss +3 -3
  120. package/components/oxy-keyboard/key/index.vue +2 -2
  121. package/components/oxy-keyboard/key/types.ts +15 -0
  122. package/components/oxy-keyboard/oxy-keyboard.vue +1 -0
  123. package/components/oxy-keyboard/types.ts +5 -0
  124. package/components/oxy-link/index.scss +57 -0
  125. package/components/oxy-link/oxy-link.vue +130 -0
  126. package/components/oxy-link/types.ts +81 -0
  127. package/components/oxy-list/index.scss +7 -1
  128. package/components/oxy-list/oxy-list.vue +4 -3
  129. package/components/oxy-list/types.ts +1 -1
  130. package/components/oxy-loading/oxy-loading.vue +8 -4
  131. package/components/oxy-loading/types.ts +1 -1
  132. package/components/oxy-loadmore/index.scss +3 -3
  133. package/components/oxy-long-press-menu/index.scss +93 -0
  134. package/components/oxy-long-press-menu/oxy-long-press-menu.vue +338 -0
  135. package/components/oxy-long-press-menu/types.ts +34 -0
  136. package/components/oxy-message-box/index.scss +12 -11
  137. package/components/oxy-message-box/oxy-message-box.vue +11 -3
  138. package/components/oxy-message-box/types.ts +14 -0
  139. package/components/oxy-navbar/index.scss +2 -2
  140. package/components/oxy-navbar/oxy-navbar.vue +58 -13
  141. package/components/oxy-navbar/types.ts +8 -1
  142. package/components/oxy-navbar-capsule/types.ts +3 -0
  143. package/components/oxy-notice-bar/index.scss +3 -3
  144. package/components/oxy-notice-bar/oxy-notice-bar.vue +9 -5
  145. package/components/oxy-notice-bar/types.ts +3 -3
  146. package/components/oxy-notify/index.ts +1 -0
  147. package/components/oxy-notify/oxy-notify.vue +3 -2
  148. package/components/oxy-notify/types.ts +7 -0
  149. package/components/oxy-pagination/index.scss +1 -1
  150. package/components/oxy-password-input/oxy-password-input.vue +2 -2
  151. package/components/oxy-password-input/types.ts +1 -1
  152. package/components/oxy-picker/index.scss +45 -2
  153. package/components/oxy-picker/oxy-picker.vue +103 -14
  154. package/components/oxy-picker/types.ts +33 -1
  155. package/components/oxy-picker-view/index.scss +3 -3
  156. package/components/oxy-picker-view/oxy-picker-view.vue +4 -4
  157. package/components/oxy-popover/index.scss +9 -9
  158. package/components/oxy-popup/index.scss +2 -2
  159. package/components/oxy-popup/oxy-popup.vue +35 -2
  160. package/components/oxy-popup/types.ts +8 -1
  161. package/components/oxy-progress/index.scss +3 -3
  162. package/components/oxy-qrcode/draw.ts +398 -0
  163. package/components/oxy-qrcode/index.scss +2 -0
  164. package/components/oxy-qrcode/oxy-qrcode.vue +124 -0
  165. package/components/oxy-qrcode/qrcode.ts +936 -0
  166. package/components/oxy-qrcode/types.ts +42 -0
  167. package/components/oxy-radio/index.scss +13 -13
  168. package/components/oxy-radio/oxy-radio.vue +1 -1
  169. package/components/oxy-radio-group/index.scss +2 -2
  170. package/components/oxy-rate/types.ts +4 -4
  171. package/components/oxy-resize/index.scss +2 -2
  172. package/components/oxy-resize/oxy-resize.vue +4 -4
  173. package/components/oxy-resize/types.ts +3 -0
  174. package/components/oxy-rich-text/icon/emjio.svg +1 -0
  175. package/components/oxy-rich-text/icon/quote.svg +1 -0
  176. package/components/oxy-rich-text/icon/text.svg +1 -0
  177. package/components/oxy-rich-text/icon/title.svg +1 -0
  178. package/components/oxy-rich-text/index.scss +160 -0
  179. package/components/oxy-rich-text/mp-html/card/card.vue +122 -0
  180. package/components/oxy-rich-text/mp-html/card/index.js +7 -0
  181. package/components/oxy-rich-text/mp-html/editable/config.js +15 -0
  182. package/components/oxy-rich-text/mp-html/editable/index.js +553 -0
  183. package/components/oxy-rich-text/mp-html/emoji/index.js +203 -0
  184. package/components/oxy-rich-text/mp-html/highlight/config.js +5 -0
  185. package/components/oxy-rich-text/mp-html/highlight/index.js +96 -0
  186. package/components/oxy-rich-text/mp-html/highlight/prism.css +1 -0
  187. package/components/oxy-rich-text/mp-html/highlight/prism.min.js +7 -0
  188. package/components/oxy-rich-text/mp-html/img-cache/index.js +138 -0
  189. package/components/oxy-rich-text/mp-html/latex/index.js +80 -0
  190. package/components/oxy-rich-text/mp-html/latex/katex.css +1 -0
  191. package/components/oxy-rich-text/mp-html/latex/katex.min.js +1 -0
  192. package/components/oxy-rich-text/mp-html/markdown/index.js +50 -0
  193. package/components/oxy-rich-text/mp-html/markdown/marked.min.js +71 -0
  194. package/components/oxy-rich-text/mp-html/mp-html.d.ts +184 -0
  195. package/components/oxy-rich-text/mp-html/mp-html.vue +684 -0
  196. package/components/oxy-rich-text/mp-html/node/node.vue +1172 -0
  197. package/components/oxy-rich-text/mp-html/parser.js +1428 -0
  198. package/components/oxy-rich-text/mp-html/search/index.js +132 -0
  199. package/components/oxy-rich-text/mp-html/style/index.js +129 -0
  200. package/components/oxy-rich-text/mp-html/style/parser.js +175 -0
  201. package/components/oxy-rich-text/mp-html/template/index.js +67 -0
  202. package/components/oxy-rich-text/mp-html/txv-video/index.js +46 -0
  203. package/components/oxy-rich-text/oxy-rich-text.vue +642 -0
  204. package/components/oxy-rich-text/types.ts +76 -0
  205. package/components/oxy-row/oxy-row.vue +3 -3
  206. package/components/oxy-row/types.ts +1 -1
  207. package/components/oxy-search/index.scss +3 -3
  208. package/components/oxy-segmented/index.scss +16 -16
  209. package/components/oxy-segmented/oxy-segmented.vue +23 -3
  210. package/components/oxy-select/index.scss +331 -0
  211. package/components/oxy-select/oxy-select.vue +456 -0
  212. package/components/oxy-select/types.ts +83 -0
  213. package/components/oxy-select-picker/index.scss +7 -7
  214. package/components/oxy-select-picker/oxy-select-picker.vue +4 -0
  215. package/components/oxy-select-picker/types.ts +7 -1
  216. package/components/oxy-sidebar-item/index.scss +1 -1
  217. package/components/oxy-signature/oxy-signature.vue +18 -10
  218. package/components/oxy-signature/types.ts +106 -13
  219. package/components/oxy-skeleton/oxy-skeleton.vue +6 -6
  220. package/components/oxy-skeleton/types.ts +1 -1
  221. package/components/oxy-slider/index.scss +3 -3
  222. package/components/oxy-sort-button/index.scss +8 -8
  223. package/components/oxy-status-tip/index.scss +4 -4
  224. package/components/oxy-status-tip/oxy-status-tip.vue +5 -5
  225. package/components/oxy-status-tip/types.ts +3 -3
  226. package/components/oxy-step/index.scss +14 -14
  227. package/components/oxy-sticky/oxy-sticky.vue +6 -6
  228. package/components/oxy-stream-render/index.scss +6 -0
  229. package/components/oxy-stream-render/oxy-stream-render.vue +204 -0
  230. package/components/oxy-stream-render/types.ts +8 -0
  231. package/components/oxy-swipe-action/oxy-swipe-action.vue +27 -2
  232. package/components/oxy-swiper/oxy-swiper.vue +6 -6
  233. package/components/oxy-swiper/types.ts +5 -5
  234. package/components/oxy-switch/index.scss +8 -8
  235. package/components/oxy-switch/oxy-switch.vue +2 -2
  236. package/components/oxy-switch/types.ts +1 -1
  237. package/components/oxy-tab/index.scss +11 -1
  238. package/components/oxy-tabbar/index.scss +1 -1
  239. package/components/oxy-tabbar/oxy-tabbar.vue +39 -10
  240. package/components/oxy-table/index.scss +5 -5
  241. package/components/oxy-table/oxy-table.vue +8 -6
  242. package/components/oxy-table/types.ts +2 -2
  243. package/components/oxy-table-col/oxy-table-col.vue +3 -3
  244. package/components/oxy-table-col/types.ts +2 -2
  245. package/components/oxy-tabs/index.scss +43 -15
  246. package/components/oxy-tabs/oxy-tabs.vue +53 -19
  247. package/components/oxy-tabs/types.ts +15 -3
  248. package/components/oxy-tag/index.scss +15 -15
  249. package/components/oxy-text/index.scss +5 -1
  250. package/components/oxy-text/oxy-text.vue +76 -7
  251. package/components/oxy-text/types.ts +12 -0
  252. package/components/oxy-textarea/index.scss +6 -6
  253. package/components/oxy-toast/oxy-toast.vue +24 -8
  254. package/components/oxy-tooltip/index.scss +9 -9
  255. package/components/oxy-tree/index.scss +61 -9
  256. package/components/oxy-tree/oxy-tree.vue +102 -17
  257. package/components/oxy-tree/types.ts +23 -10
  258. package/components/oxy-upload/index.scss +21 -21
  259. package/components/oxy-upload/types.ts +2 -2
  260. package/components/oxy-verification-code/index.scss +6 -0
  261. package/components/oxy-verification-code/oxy-verification-code.vue +187 -0
  262. package/components/oxy-verification-code/types.ts +82 -0
  263. package/components/oxy-video-preview/index.scss +4 -4
  264. package/components/oxy-virtual-scroll/index.scss +4 -4
  265. package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +11 -7
  266. package/components/oxy-virtual-scroll/types.ts +14 -14
  267. package/components/oxy-voice-player/index.scss +908 -0
  268. package/components/oxy-voice-player/oxy-voice-player.vue +821 -0
  269. package/components/oxy-voice-player/types.ts +567 -0
  270. package/components/oxy-waterfall/index.scss +18 -0
  271. package/components/oxy-waterfall/oxy-waterfall.vue +218 -0
  272. package/components/oxy-waterfall/types.ts +90 -0
  273. package/components/oxy-waterfall-item/index.scss +8 -0
  274. package/components/oxy-waterfall-item/oxy-waterfall-item.vue +89 -0
  275. package/components/oxy-waterfall-item/types.ts +16 -0
  276. package/components/oxy-watermark/oxy-watermark.vue +35 -13
  277. package/components/oxy-watermark/types.ts +14 -14
  278. package/global.d.ts +9 -0
  279. package/index.ts +3 -0
  280. package/locale/lang/ar-SA.ts +3 -0
  281. package/locale/lang/en-US.ts +29 -0
  282. package/locale/lang/zh-CN.ts +29 -0
  283. package/package.json +97 -1
  284. package/tags.json +1 -1
  285. package/uni-echarts/changelog.md +2 -0
  286. package/uni-echarts/components/index.js +1 -0
  287. package/uni-echarts/components/uni-echarts/events.js +95 -0
  288. package/uni-echarts/components/uni-echarts/types.d.ts +183 -0
  289. package/uni-echarts/components/uni-echarts/types.js +1 -0
  290. package/uni-echarts/components/uni-echarts/uni-echarts.vue +530 -0
  291. package/uni-echarts/components/uni-echarts/uni-echarts.vue.d.ts +19 -0
  292. package/uni-echarts/global.d.ts +7 -0
  293. package/uni-echarts/index.d.ts +440 -0
  294. package/uni-echarts/index.js +2 -0
  295. package/uni-echarts/package.json +105 -0
  296. package/uni-echarts/shared-core.d.ts +269 -0
  297. package/uni-echarts/shared-core.js +900 -0
  298. package/web-types.json +1 -1
  299. package/components/oxy-number-keyboard/index.scss +0 -78
  300. package/components/oxy-number-keyboard/key/index.scss +0 -81
  301. package/components/oxy-number-keyboard/key/index.vue +0 -78
  302. package/components/oxy-number-keyboard/key/types.ts +0 -11
  303. package/components/oxy-number-keyboard/oxy-number-keyboard.vue +0 -151
  304. package/components/oxy-number-keyboard/types.ts +0 -83
  305. package/components/oxy-tree/components/tree-node-content.vue +0 -72
  306. package/components/oxy-tree/index.ts +0 -51
@@ -1,65 +1,122 @@
1
1
  import type { ComponentPublicInstance, ExtractPropTypes } from 'vue'
2
- import { baseProps, numericProp } from '../common/props'
2
+ import { baseProps, makeNumericProp, numericProp } from '../common/props'
3
3
 
4
4
  export const signatureProps = {
5
5
  ...baseProps,
6
+ /**
7
+ * 画笔颜色
8
+ */
6
9
  penColor: {
7
10
  type: String,
8
11
  default: '#000'
9
12
  },
10
- lineWidth: {
11
- type: Number,
12
- default: 3
13
- },
13
+ /**
14
+ * 画笔线宽,支持 number / string(如 '6rpx'、'3px'),number 与纯数字字符串按 rpx 处理
15
+ */
16
+ lineWidth: makeNumericProp(6),
17
+ /**
18
+ * 清空按钮文案
19
+ */
14
20
  clearText: String,
21
+ /**
22
+ * 撤销按钮文案
23
+ */
15
24
  revokeText: String,
25
+ /**
26
+ * 恢复按钮文案
27
+ */
16
28
  restoreText: String,
29
+ /**
30
+ * 确认按钮文案
31
+ */
17
32
  confirmText: String,
33
+ /**
34
+ * 导出图片格式
35
+ */
18
36
  fileType: {
19
37
  type: String,
20
38
  default: 'png'
21
39
  },
40
+ /**
41
+ * 导出质量
42
+ */
22
43
  quality: {
23
44
  type: Number,
24
45
  default: 1
25
46
  },
47
+ /**
48
+ * 导出缩放比例
49
+ */
26
50
  exportScale: {
27
51
  type: Number,
28
52
  default: 1
29
53
  },
54
+ /**
55
+ * 是否禁用签名操作
56
+ */
30
57
  disabled: {
31
58
  type: Boolean,
32
59
  default: false
33
60
  },
61
+ /**
62
+ * 画布高度,支持 number / string(如 '600rpx'、'300px'),number 与纯数字字符串按 rpx 处理
63
+ */
34
64
  height: numericProp,
65
+ /**
66
+ * 画布宽度,支持 number / string(如 '100%'、'700rpx'),number 与纯数字字符串按 rpx 处理
67
+ */
35
68
  width: numericProp,
69
+ /**
70
+ * 画布背景色
71
+ */
36
72
  backgroundColor: String,
73
+ /**
74
+ * 是否禁用页面滚动
75
+ */
37
76
  disableScroll: {
38
77
  type: Boolean,
39
78
  default: true
40
79
  },
80
+ /**
81
+ * 是否启用历史记录
82
+ */
41
83
  enableHistory: {
42
84
  type: Boolean,
43
85
  default: false
44
86
  },
87
+ /**
88
+ * 每次记录步进
89
+ */
45
90
  step: {
46
91
  type: Number,
47
92
  default: 1
48
93
  },
94
+ /**
95
+ * 撤销文案
96
+ */
49
97
  undoText: String,
98
+ /**
99
+ * 重做文案
100
+ */
50
101
  redoText: String,
102
+ /**
103
+ * 是否启用压感
104
+ */
51
105
  pressure: {
52
106
  type: Boolean,
53
107
  default: false
54
108
  },
55
- minWidth: {
56
- type: Number,
57
- default: 2
58
- },
59
- maxWidth: {
60
- type: Number,
61
- default: 6
62
- },
109
+ /**
110
+ * 压感最小线宽,支持 number / string(如 '4rpx'、'2px'),number 与纯数字字符串按 rpx 处理
111
+ */
112
+ minWidth: makeNumericProp(4),
113
+ /**
114
+ * 压感最大线宽,支持 number / string(如 '12rpx'、'6px'),number 与纯数字字符串按 rpx 处理
115
+ */
116
+ maxWidth: makeNumericProp(12),
117
+ /**
118
+ * 压感最小速度阈值
119
+ */
63
120
  minSpeed: {
64
121
  type: Number,
65
122
  default: 1.5
@@ -67,23 +124,59 @@ export const signatureProps = {
67
124
  }
68
125
 
69
126
  export type SignatureResult = {
127
+ /**
128
+ * 临时文件路径
129
+ */
70
130
  tempFilePath: string
131
+ /**
132
+ * 导出是否成功
133
+ */
71
134
  success: boolean
135
+ /**
136
+ * 导出宽度
137
+ */
72
138
  width: number
139
+ /**
140
+ * 导出高度
141
+ */
73
142
  height: number
74
143
  }
75
144
 
76
145
  export interface Line {
146
+ /**
147
+ * 线段点集合
148
+ */
77
149
  points: Point[]
150
+ /**
151
+ * 线段颜色
152
+ */
78
153
  color: string
154
+ /**
155
+ * 线段宽度
156
+ */
79
157
  width: number
158
+ /**
159
+ * 背景色
160
+ */
80
161
  backgroundColor?: string
162
+ /**
163
+ * 是否启用压感
164
+ */
81
165
  isPressure?: boolean
82
166
  }
83
167
 
84
168
  export interface Point {
169
+ /**
170
+ * x 坐标
171
+ */
85
172
  x: number
173
+ /**
174
+ * y 坐标
175
+ */
86
176
  y: number
177
+ /**
178
+ * 时间戳
179
+ */
87
180
  t: number
88
181
  speed?: number
89
182
  distance?: number
@@ -24,16 +24,16 @@ import type { CSSProperties } from 'vue'
24
24
  import { ref, computed, watch } from 'vue'
25
25
  import type { SkeletonRowCol, SkeletonRowColObj } from './types'
26
26
  import { skeletonProps } from './types'
27
- import { isNumber, addUnit } from '../common/util'
27
+ import { isNumber, withDefaultUnit } from '../common/util'
28
28
 
29
29
  const themeMap = {
30
- avatar: [{ type: 'circle', height: '64px', width: '64px' }],
31
- image: [{ type: 'rect', height: '64px', width: '64px' }],
30
+ avatar: [{ type: 'circle', height: '128rpx', width: '128rpx' }],
31
+ image: [{ type: 'rect', height: '128rpx', width: '128rpx' }],
32
32
  text: [
33
33
  1,
34
34
  [
35
- { width: '24%', height: '16px', marginRight: '16px' },
36
- { width: '76%', height: '16px' }
35
+ { width: '24%', height: '32rpx', marginRight: '32rpx' },
36
+ { width: '76%', height: '32rpx' }
37
37
  ]
38
38
  ],
39
39
  paragraph: [1, 1, 1, { width: '55%' }]
@@ -81,7 +81,7 @@ function getColItemStyle(rowCol: SkeletonRowColObj) {
81
81
 
82
82
  for (const name of styleName) {
83
83
  if (Object.prototype.hasOwnProperty.call(rowCol, name)) {
84
- const px = addUnit(rowCol[name])
84
+ const px = withDefaultUnit(rowCol[name])
85
85
 
86
86
  if (name === 'size') {
87
87
  style.width = px
@@ -36,7 +36,7 @@ export const skeletonProps = {
36
36
  * 用于设置行列数量、宽度高度、间距等。
37
37
  * @example
38
38
  * 【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。
39
- * 【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。
39
+ * 【示例二】,`[1, 1, { width: '200rpx' }]` 表示自定义第三行的宽度为 `200rpx`。
40
40
  * 【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度和间距
41
41
  */
42
42
  rowCol: makeArrayProp<SkeletonRowCol>(),
@@ -41,7 +41,7 @@
41
41
  background-color: rgba($color: #fff, $alpha: 0.5);
42
42
  border-radius: 100%;
43
43
  position: absolute;
44
- bottom: calc($-slider-handle-radius * 2 + 8px);
44
+ bottom: calc($-slider-handle-radius * 2 + 16rpx);
45
45
  }
46
46
  @include e(bar-wrapper) {
47
47
  flex: 1;
@@ -70,7 +70,7 @@
70
70
  }
71
71
  }
72
72
  @include e(has-label) {
73
- padding-top: calc($-slider-fs * 1.2 + 8px);
73
+ padding-top: calc($-slider-fs * 1.2 + 16rpx);
74
74
  }
75
75
  @include e(button) {
76
76
  height: calc($-slider-handle-radius * 2);
@@ -79,7 +79,7 @@
79
79
  border-radius: 100%;
80
80
  border: 1px solid $-slider-axie-bg;
81
81
  box-sizing: border-box;
82
- box-shadow: 0 2px 4px 0 rgba($color: #9b9b9b, $alpha: 0.5);
82
+ box-shadow: 0 4rpx 8rpx 0 rgba($color: #9b9b9b, $alpha: 0.5);
83
83
  }
84
84
  @include e(label-min) {
85
85
  margin-right: calc($-slider-handle-radius * 2);
@@ -20,9 +20,9 @@
20
20
  &::after {
21
21
  position: absolute;
22
22
  content: '';
23
- width: 19px;
24
- height: 3px;
25
- bottom: 6px;
23
+ width: 38rpx;
24
+ height: 6rpx;
25
+ bottom: 12rpx;
26
26
  left: 50%;
27
27
  transform: translate(-50%, 0);
28
28
  background: $-sort-button-line-color;
@@ -61,8 +61,8 @@
61
61
 
62
62
  @include e(right) {
63
63
  display: inline-block;
64
- min-width: 14px;
65
- margin-left: 2px;
64
+ min-width: 28rpx;
65
+ margin-left: 4rpx;
66
66
  vertical-align: middle;
67
67
  line-height: 1.1;
68
68
 
@@ -78,12 +78,12 @@
78
78
  @include edeep(icon-up) {
79
79
  display: block !important;
80
80
  line-height: 1.1;
81
- transform: scale(calc((10 / 14))) translate(0, 7px);
81
+ transform: scale(calc((10 / 14))) translate(0, 14rpx);
82
82
  }
83
83
 
84
84
  @include edeep(icon-down) {
85
85
  display: block !important;
86
86
  line-height: 1.1;
87
- transform: scale(calc((10 / 14))) translate(0, -7px);
87
+ transform: scale(calc((10 / 14))) translate(0, -14rpx);
88
88
  }
89
- }
89
+ }
@@ -23,15 +23,15 @@
23
23
 
24
24
  @include edeep(image) {
25
25
  margin: 0 auto;
26
- width: 160px;
27
- height: 160px;
26
+ width: 320rpx;
27
+ height: 320rpx;
28
28
  }
29
29
  @include e(text) {
30
- margin: 20px auto 0;
30
+ margin: 40rpx auto 0;
31
31
  font-size: $-statustip-fs;
32
32
  line-height: $-statustip-line-height;
33
33
  color: $-statustip-color;
34
34
  text-align: center;
35
35
  overflow-wrap: break-word;
36
36
  }
37
- }
37
+ }
@@ -24,7 +24,7 @@ import ImgContent from './images/content.png'
24
24
  import ImgNetwork from './images/network.png'
25
25
  import ImgSearch from './images/search.png'
26
26
  import { computed, type CSSProperties } from 'vue'
27
- import { addUnit, isDef, isObj, objToStyle } from '../common/util'
27
+ import { withDefaultUnit, isDef, isObj, objToStyle } from '../common/util'
28
28
  import { statusTipProps } from './types'
29
29
 
30
30
  const imgs: AnyObject = {
@@ -54,12 +54,12 @@ const imgStyle = computed(() => {
54
54
  let style: CSSProperties = {}
55
55
  if (props.imageSize) {
56
56
  if (isObj(props.imageSize)) {
57
- isDef(props.imageSize.height) && (style.height = addUnit(props.imageSize.height))
58
- isDef(props.imageSize.width) && (style.width = addUnit(props.imageSize.width))
57
+ isDef(props.imageSize.height) && (style.height = withDefaultUnit(props.imageSize.height))
58
+ isDef(props.imageSize.width) && (style.width = withDefaultUnit(props.imageSize.width))
59
59
  } else {
60
60
  style = {
61
- height: addUnit(props.imageSize),
62
- width: addUnit(props.imageSize)
61
+ height: withDefaultUnit(props.imageSize),
62
+ width: withDefaultUnit(props.imageSize)
63
63
  }
64
64
  }
65
65
  }
@@ -4,11 +4,11 @@ import type { ImageMode } from '../oxy-img/types'
4
4
 
5
5
  export type ImageSize = {
6
6
  /**
7
- * 宽度
7
+ * 宽度,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
8
8
  */
9
9
  width: number | string
10
10
  /**
11
- * 高度
11
+ * 高度,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
12
12
  */
13
13
  height: number | string
14
14
  }
@@ -25,7 +25,7 @@ export const statusTipProps = {
25
25
  image: makeStringProp('network'),
26
26
 
27
27
  /**
28
- * 图片大小,默认单位为 `px`。
28
+ * 图片大小,number 类型按 `rpx` 语义处理,也支持 `px/rpx`。
29
29
  * 类型: string 或 number 或 ImageSize
30
30
  * 默认值: 空字符串
31
31
  */
@@ -78,12 +78,12 @@
78
78
  color: $-steps-inactive-color;
79
79
  }
80
80
  @include e(icon-outer) {
81
- width: calc($-steps-icon-size - 2px);
82
- height: calc($-steps-icon-size - 2px);
81
+ width: calc($-steps-icon-size - 4rpx);
82
+ height: calc($-steps-icon-size - 4rpx);
83
83
  border: 1px solid $-steps-inactive-color;
84
84
  color: $-steps-inactive-color;
85
85
  text-align: center;
86
- line-height: calc($-steps-icon-size - 2px);
86
+ line-height: calc($-steps-icon-size - 4rpx);
87
87
  border-radius: 50%;
88
88
  font-size: $-steps-icon-text-fs;
89
89
  }
@@ -105,7 +105,7 @@
105
105
  background: $-steps-line-color;
106
106
  }
107
107
  @include e(content){
108
- margin-top: 7px;
108
+ margin-top: 14rpx;
109
109
  color: $-steps-inactive-color;
110
110
  font-size: $-steps-label-fs;
111
111
  }
@@ -118,8 +118,8 @@
118
118
  }
119
119
  }
120
120
  @include e(description) {
121
- margin-top: 5px;
122
- padding: 0 2px;
121
+ margin-top: 10rpx;
122
+ padding: 0 4rpx;
123
123
  color: $-steps-description-color;
124
124
  }
125
125
  @include when(wait) {
@@ -163,10 +163,10 @@
163
163
  &::after {
164
164
  position: absolute;
165
165
  content: '';
166
- width: $-steps-dot-size + 10px;
167
- height: $-steps-dot-size + 10px;
168
- left: -5px;
169
- top: -5px;
166
+ width: $-steps-dot-size + 20rpx;
167
+ height: $-steps-dot-size + 20rpx;
168
+ left: -10rpx;
169
+ top: -10rpx;
170
170
  border-radius: 50%;
171
171
  background: $-steps-finished-color;
172
172
  opacity: 0.2;
@@ -207,7 +207,7 @@
207
207
  height: 100%;
208
208
 
209
209
  &.is-dot {
210
- top: 6px;
210
+ top: 12rpx;
211
211
 
212
212
  .oxy-step__line {
213
213
  margin-left: -1px;
@@ -216,9 +216,9 @@
216
216
  }
217
217
  }
218
218
  .oxy-step__content {
219
- margin-left: 30px;
219
+ margin-left: 60rpx;
220
220
  margin-top: 0;
221
- padding-bottom: 20px;
221
+ padding-bottom: 40rpx;
222
222
  }
223
223
  .oxy-step__line {
224
224
  top: 0;
@@ -232,4 +232,4 @@
232
232
  margin-top: -1px;
233
233
  }
234
234
  }
235
- }
235
+ }
@@ -24,7 +24,7 @@ export default {
24
24
  <script lang="ts" setup>
25
25
  import OxyResize from '../oxy-resize/oxy-resize.vue'
26
26
  import { computed, getCurrentInstance, reactive, ref, type CSSProperties } from 'vue'
27
- import { addUnit, getRect, objToStyle, pause, uuid } from '../common/util'
27
+ import { getRect, objToStyle, pause, unitConvert, uuid } from '../common/util'
28
28
  import { stickyProps } from './types'
29
29
  import { useParent } from '../composables/useParent'
30
30
  import { STICKY_BOX_KEY } from '../oxy-sticky-box/types'
@@ -49,8 +49,8 @@ const { proxy } = getCurrentInstance() as any
49
49
  const rootStyle = computed(() => {
50
50
  const style: CSSProperties = {
51
51
  'z-index': props.zIndex,
52
- height: addUnit(stickyState.height),
53
- width: addUnit(stickyState.width)
52
+ height: unitConvert(stickyState.height, 0, { output: 'px' }),
53
+ width: unitConvert(stickyState.width, 0, { output: 'px' })
54
54
  }
55
55
  if (!stickyState.boxLeaved) {
56
56
  style['position'] = 'relative'
@@ -61,8 +61,8 @@ const rootStyle = computed(() => {
61
61
  const stickyStyle = computed(() => {
62
62
  const style: CSSProperties = {
63
63
  'z-index': props.zIndex,
64
- height: addUnit(stickyState.height),
65
- width: addUnit(stickyState.width)
64
+ height: unitConvert(stickyState.height, 0, { output: 'px' }),
65
+ width: unitConvert(stickyState.width, 0, { output: 'px' })
66
66
  }
67
67
  if (!stickyState.boxLeaved) {
68
68
  style['position'] = 'relative'
@@ -73,7 +73,7 @@ const stickyStyle = computed(() => {
73
73
  const containerStyle = computed(() => {
74
74
  const style: CSSProperties = {
75
75
  position: stickyState.position as 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed',
76
- top: addUnit(stickyState.top)
76
+ top: unitConvert(stickyState.top, 0, { output: 'px' })
77
77
  }
78
78
  return objToStyle(style)
79
79
  })
@@ -0,0 +1,6 @@
1
+ @import '../common/abstracts/variable';
2
+ @import '../common/abstracts/mixin';
3
+
4
+ @include b(stream-render) {
5
+ display: none;
6
+ }