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
@@ -50,16 +50,29 @@
50
50
  border-radius: $-action-sheet-radius $-action-sheet-radius 0 0;
51
51
  }
52
52
 
53
+ :deep(.oxy-action-sheet__popup--float) {
54
+ border-radius: 0 !important;
55
+ background: transparent !important;
56
+ overflow: visible !important;
57
+ }
58
+
53
59
  @include b(action-sheet) {
54
60
  background-color: $-color-white;
55
- padding-bottom: 1px;
61
+ padding-bottom: 2rpx;
62
+ margin-bottom: var(--window-bottom);
63
+
64
+ @include when(float) {
65
+ margin: 0 20rpx calc(var(--window-bottom) + 20rpx);
66
+ border-radius: $-action-sheet-radius;
67
+ overflow: hidden;
68
+ }
56
69
 
57
70
  @include edeep(popup) {
58
71
  border-radius: $-action-sheet-radius $-action-sheet-radius 0 0;
59
72
  }
60
73
 
61
74
  @include e(actions) {
62
- padding: 8px 0;
75
+ padding: 16rpx 0;
63
76
  max-height: 50vh;
64
77
  overflow-y: auto;
65
78
  -webkit-overflow-scrolling: touch;
@@ -110,14 +123,14 @@
110
123
 
111
124
  @include e(subname) {
112
125
  display: inline-block;
113
- margin-left: 4px;
126
+ margin-left: 8rpx;
114
127
  font-size: $-action-sheet-subname-fs;
115
128
  color: $-action-sheet-subname-color;
116
129
  }
117
130
 
118
131
  @include e(cancel) {
119
132
  display: block;
120
- width: calc(100% - 48px);
133
+ width: calc(100% - 96rpx);
121
134
  line-height: $-action-sheet-cancel-height;
122
135
  padding: 0;
123
136
  color: $-action-sheet-cancel-color;
@@ -127,7 +140,7 @@
127
140
  border: none;
128
141
  background: $-action-sheet-cancel-bg;
129
142
  outline: none;
130
- margin: 0 auto 24px;
143
+ margin: 0 auto 48rpx;
131
144
  font-weight: $-action-sheet-weight;
132
145
 
133
146
  &:active {
@@ -160,15 +173,15 @@
160
173
  }
161
174
 
162
175
  @include e(panels) {
163
- height: 84px;
176
+ height: 168rpx;
164
177
  overflow-y: hidden;
165
178
 
166
179
  &:first-of-type {
167
- margin-top: 20px;
180
+ margin-top: 40rpx;
168
181
  }
169
182
 
170
183
  &:last-of-type {
171
- margin-bottom: 12px;
184
+ margin-bottom: 24rpx;
172
185
  }
173
186
  }
174
187
 
@@ -179,7 +192,7 @@
179
192
  }
180
193
 
181
194
  @include e(panel) {
182
- width: 88px;
195
+ width: 176rpx;
183
196
  flex: 0 0 auto;
184
197
  display: inline-block;
185
198
  padding: $-action-sheet-panel-padding;
@@ -190,7 +203,7 @@
190
203
  width: $-action-sheet-panel-img-fs;
191
204
  height: $-action-sheet-panel-img-fs;
192
205
  margin: 0 auto;
193
- margin-bottom: 7px;
206
+ margin-bottom: 14rpx;
194
207
  border-radius: $-action-sheet-panel-img-radius;
195
208
  }
196
209
 
@@ -201,4 +214,4 @@
201
214
  color: $-action-sheet-color;
202
215
  @include lineEllipsis;
203
216
  }
204
- }
217
+ }
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <view>
3
3
  <oxy-popup
4
- custom-class="oxy-action-sheet__popup"
5
- :custom-style="`${(actions && actions.length) || (panels && panels.length) ? 'background: transparent;' : ''}`"
4
+ :custom-class="popupClass"
5
+ :custom-style="customStyle"
6
+ :max-width="maxWidth"
6
7
  v-model="showPopup"
7
8
  :duration="duration"
8
9
  position="bottom"
@@ -17,20 +18,13 @@
17
18
  @click-modal="handleClickModal"
18
19
  :z-index="zIndex"
19
20
  >
20
- <view
21
- :class="`oxy-action-sheet ${customClass}`"
22
- :style="`${
23
- (actions && actions.length) || (panels && panels.length)
24
- ? 'margin: 0 10px calc(var(--window-bottom) + 10px) 10px; border-radius: 16px;'
25
- : 'margin-bottom: var(--window-bottom);'
26
- } ${customStyle}`"
27
- >
21
+ <view :class="['oxy-action-sheet', { 'is-float': isFloatMode }, customClass]">
28
22
  <view v-if="title" :class="`oxy-action-sheet__header ${customHeaderClass}`">
29
23
  {{ title }}
30
24
  <oxy-icon custom-class="oxy-action-sheet__close" name="add" @click="close" />
31
25
  </view>
32
26
  <view class="oxy-action-sheet__actions" v-if="actions && actions.length">
33
- <button
27
+ <view
34
28
  v-for="(action, rowIndex) in actions"
35
29
  :key="rowIndex"
36
30
  :class="`oxy-action-sheet__action ${action.disabled ? 'oxy-action-sheet__action--disabled' : ''} ${
@@ -42,20 +36,20 @@
42
36
  <oxy-loading custom-class="`oxy-action-sheet__action-loading" v-if="action.loading" />
43
37
  <view v-else class="oxy-action-sheet__name">{{ action.name }}</view>
44
38
  <view v-if="!action.loading && action.subname" class="oxy-action-sheet__subname">{{ action.subname }}</view>
45
- </button>
39
+ </view>
46
40
  </view>
47
41
  <view v-if="formatPanels && formatPanels.length">
48
42
  <view v-for="(panel, rowIndex) in formatPanels" :key="rowIndex" class="oxy-action-sheet__panels">
49
43
  <view class="oxy-action-sheet__panels-content">
50
44
  <view v-for="(col, colIndex) in panel" :key="colIndex" class="oxy-action-sheet__panel" @click="select(rowIndex, 'panels', colIndex)">
51
- <image class="oxy-action-sheet__panel-img" :src="(col as any).iconUrl" />
52
- <view class="oxy-action-sheet__panel-title">{{ (col as any).title }}</view>
45
+ <image class="oxy-action-sheet__panel-img" :src="col.iconUrl" />
46
+ <view class="oxy-action-sheet__panel-title">{{ col.title }}</view>
53
47
  </view>
54
48
  </view>
55
49
  </view>
56
50
  </view>
57
51
  <slot />
58
- <button v-if="cancelText" class="oxy-action-sheet__cancel" @click="handleCancel">{{ cancelText }}</button>
52
+ <view v-if="cancelText" class="oxy-action-sheet__cancel" @click="handleCancel">{{ cancelText }}</view>
59
53
  </view>
60
54
  </oxy-popup>
61
55
  </view>
@@ -75,17 +69,25 @@ export default {
75
69
  import OxyPopup from '../oxy-popup/oxy-popup.vue'
76
70
  import OxyIcon from '../oxy-icon/oxy-icon.vue'
77
71
  import OxyLoading from '../oxy-loading/oxy-loading.vue'
78
- import { watch, ref } from 'vue'
72
+ import { computed, watch, ref } from 'vue'
79
73
  import { actionSheetProps, type Panel } from './types'
80
74
  import { isArray } from '../common/util'
81
75
 
82
76
  const props = defineProps(actionSheetProps)
83
77
  const emit = defineEmits(['select', 'click-modal', 'cancel', 'closed', 'close', 'open', 'opened', 'update:modelValue'])
84
78
 
85
- const formatPanels = ref<Array<Panel> | Array<Panel[]>>([])
79
+ const formatPanels = ref<Panel[][]>([])
86
80
 
87
81
  const showPopup = ref<boolean>(false)
88
82
 
83
+ const isFloatMode = computed(() => {
84
+ return !!((props.actions && props.actions.length) || (props.panels && props.panels.length))
85
+ })
86
+
87
+ const popupClass = computed(() => {
88
+ return `oxy-action-sheet__popup ${isFloatMode.value ? 'oxy-action-sheet__popup--float' : ''}`
89
+ })
90
+
89
91
  watch(() => props.panels, computedValue, { deep: true, immediate: true })
90
92
 
91
93
  watch(
@@ -113,13 +115,19 @@ function select(rowIndex: number, type: 'action' | 'panels', colIndex?: number)
113
115
  index: rowIndex
114
116
  })
115
117
  } else if (isPanelArray()) {
118
+ if (typeof colIndex !== 'number') {
119
+ return
120
+ }
116
121
  emit('select', {
117
- item: props.panels[Number(colIndex)],
122
+ item: props.panels[colIndex],
118
123
  index: colIndex
119
124
  })
120
125
  } else {
126
+ if (typeof colIndex !== 'number') {
127
+ return
128
+ }
121
129
  emit('select', {
122
- item: (props.panels as Panel[][])[rowIndex][Number(colIndex)],
130
+ item: (props.panels as Panel[][])[rowIndex][colIndex],
123
131
  rowIndex,
124
132
  colIndex
125
133
  })
@@ -95,6 +95,13 @@ export const actionSheetProps = {
95
95
  * @type {number}
96
96
  */
97
97
  zIndex: makeNumberProp(10),
98
+ /**
99
+ * 面板最大宽度,支持 `rpx`、`px`、`%` 等单位;
100
+ * `%` 在弹层打开时按屏幕宽度换算为 `rpx`
101
+ * @default '1200rpx'
102
+ * @type {string}
103
+ */
104
+ maxWidth: makeStringProp('1200rpx'),
98
105
  /**
99
106
  * 弹层内容懒渲染,触发展示时才渲染内容
100
107
  * @default true
@@ -4,8 +4,8 @@
4
4
  @include b(backtop) {
5
5
  position: fixed;
6
6
  background-color: $-backtop-bg;
7
- width: 40px;
8
- height: 40px;
7
+ width: 80rpx;
8
+ height: 80rpx;
9
9
  display: flex;
10
10
  justify-content: center;
11
11
  align-items: center;
@@ -20,6 +20,6 @@
20
20
  }
21
21
 
22
22
  @include when(square) {
23
- border-radius: 4px;
23
+ border-radius: 8rpx;
24
24
  }
25
25
  }
@@ -1,10 +1,6 @@
1
1
  <template>
2
2
  <oxy-transition :show="show" name="fade">
3
- <view
4
- :class="`oxy-backtop ${customClass} is-${shape}`"
5
- :style="`z-index: ${zIndex}; bottom: ${bottom}px; right: ${right}px; ${customStyle}`"
6
- @click="handleBacktop"
7
- >
3
+ <view :class="`oxy-backtop ${customClass} is-${shape}`" :style="rootStyle" @click="handleBacktop">
8
4
  <slot v-if="$slots.default"></slot>
9
5
  <oxy-icon v-else custom-class="oxy-backtop__backicon" name="backtop" :custom-style="iconStyle" />
10
6
  </view>
@@ -26,11 +22,18 @@ export default {
26
22
  import OxyTransition from '../oxy-transition/oxy-transition.vue'
27
23
  import OxyIcon from '../oxy-icon/oxy-icon.vue'
28
24
  import { computed } from 'vue'
25
+ import { unitConvertWithDefault, withDefaultUnit } from '../common/util'
29
26
  import { backtopProps } from './types'
30
27
 
31
28
  const props = defineProps(backtopProps)
32
29
 
33
- const show = computed(() => props.scrollTop > props.top)
30
+ const thresholdTop = computed(() => unitConvertWithDefault(props.top, { defaultUnit: 'rpx' }))
31
+ const show = computed(() => props.scrollTop > thresholdTop.value)
32
+ const rootStyle = computed(() => {
33
+ return `z-index: ${props.zIndex}; bottom: ${withDefaultUnit(props.bottom, 'rpx')}; right: ${withDefaultUnit(props.right, 'rpx')}; ${
34
+ props.customStyle
35
+ }`
36
+ })
34
37
 
35
38
  function handleBacktop() {
36
39
  uni.pageScrollTo({
@@ -1,4 +1,4 @@
1
- import { baseProps, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props'
1
+ import { baseProps, makeNumberProp, makeNumericProp, makeRequiredProp, makeStringProp } from '../common/props'
2
2
 
3
3
  export const backtopProps = {
4
4
  ...baseProps,
@@ -7,9 +7,9 @@ export const backtopProps = {
7
7
  */
8
8
  scrollTop: makeRequiredProp(Number),
9
9
  /**
10
- * 距离顶部多少距离时显示
10
+ * 距离顶部多少距离时显示,支持 `px/rpx`;number 或纯数字字符串按 `rpx` 处理
11
11
  */
12
- top: makeNumberProp(300),
12
+ top: makeNumericProp(600),
13
13
  /**
14
14
  * 返回顶部滚动时间
15
15
  */
@@ -27,11 +27,11 @@ export const backtopProps = {
27
27
  */
28
28
  shape: makeStringProp('circle'),
29
29
  /**
30
- * 距离屏幕底部距离
30
+ * 距离屏幕底部距离,支持 `px/rpx`;number 或纯数字字符串按 `rpx` 处理
31
31
  */
32
- bottom: makeNumberProp(100),
32
+ bottom: makeNumericProp(200),
33
33
  /**
34
- * 距离屏幕右边距离
34
+ * 距离屏幕右边距离,支持 `px/rpx`;number 或纯数字字符串按 `rpx` 处理
35
35
  */
36
- right: makeNumberProp(20)
36
+ right: makeNumericProp(40)
37
37
  }
@@ -22,7 +22,7 @@
22
22
  line-height: $-badge-height;
23
23
  padding: $-badge-padding;
24
24
  background-color: $-badge-bg;
25
- border-radius: calc($-badge-height / 2 + 2px);
25
+ border-radius: calc($-badge-height / 2 + 4rpx);
26
26
  color: $-badge-color;
27
27
  font-size: $-badge-fs;
28
28
  text-align: center;
@@ -32,8 +32,8 @@
32
32
 
33
33
  @include when(fixed) {
34
34
  position: absolute;
35
- top: 0px;
36
- right: 0px;
35
+ top: 0;
36
+ right: 0;
37
37
  transform: translateY(-50%) translateX(50%);
38
38
  }
39
39
 
@@ -60,4 +60,4 @@
60
60
  }
61
61
  }
62
62
  }
63
- }
63
+ }
@@ -23,7 +23,7 @@ export default {
23
23
  <script lang="ts" setup>
24
24
  import { computed, type CSSProperties } from 'vue'
25
25
  import { badgeProps } from './types'
26
- import { addUnit, isDef, isNumber, objToStyle } from '../common/util'
26
+ import { withDefaultUnit, isDef, isNumber, objToStyle } from '../common/util'
27
27
 
28
28
  const props = defineProps(badgeProps)
29
29
  const content = computed(() => {
@@ -43,11 +43,11 @@ const contentStyle = computed(() => {
43
43
  }
44
44
 
45
45
  if (isDef(props.top)) {
46
- style.top = addUnit(props.top)
46
+ style.top = withDefaultUnit(props.top)
47
47
  }
48
48
 
49
49
  if (isDef(props.right)) {
50
- style.right = addUnit(props.right)
50
+ style.right = withDefaultUnit(props.right)
51
51
  }
52
52
  return objToStyle(style)
53
53
  })
@@ -29,11 +29,11 @@ export const badgeProps = {
29
29
  */
30
30
  type: makeStringProp<BadgeType | undefined>(undefined),
31
31
  /**
32
- * 为正时,角标向下偏移对应的像素
32
+ * 为正时,角标向下偏移距离,支持 `px/rpx`
33
33
  */
34
34
  top: numericProp,
35
35
  /**
36
- * 为正时,角标向左偏移对应的像素
36
+ * 为正时,角标向左偏移距离,支持 `px/rpx`
37
37
  */
38
38
  right: numericProp
39
39
  }
@@ -97,7 +97,7 @@
97
97
  }
98
98
 
99
99
  @include e(loading) {
100
- margin-right: 5px;
100
+ margin-right: 10rpx;
101
101
  animation: oxy-rotate 0.8s linear infinite;
102
102
  animation-duration: 2s;
103
103
  }
@@ -154,7 +154,7 @@
154
154
  padding: $-button-medium-padding;
155
155
  border-radius: $-button-medium-radius;
156
156
  font-size: $-button-medium-fs;
157
- min-width: 120px;
157
+ min-width: 240rpx;
158
158
 
159
159
 
160
160
  @include when(round) {
@@ -194,13 +194,13 @@
194
194
 
195
195
 
196
196
  @include when(round) {
197
- border-radius: 999px;
197
+ border-radius: 1998rpx;
198
198
  }
199
199
 
200
200
  @include when(text) {
201
201
  color: $-button-primary-bg-color;
202
202
  min-width: 0;
203
- padding: 4px 0;
203
+ padding: 8rpx 0;
204
204
 
205
205
  &::after {
206
206
  display: none;
@@ -314,7 +314,7 @@
314
314
 
315
315
  @include edeep(icon) {
316
316
  display: block;
317
- margin-right: 6px;
317
+ margin-right: 12rpx;
318
318
  font-size: $-button-icon-fs;
319
319
  vertical-align: middle;
320
320
  }
@@ -17,7 +17,7 @@
17
17
  ]"
18
18
  :hover-start-time="hoverStartTime"
19
19
  :hover-stay-time="hoverStayTime"
20
- :open-type="disabled || loading ? undefined : openType"
20
+ :open-type="openTypeValue"
21
21
  :send-message-title="sendMessageTitle"
22
22
  :send-message-path="sendMessagePath"
23
23
  :send-message-img="sendMessageImg"
@@ -98,6 +98,10 @@ const loadingStyle = computed(() => {
98
98
  return `background-image: url(${loadingIconSvg.value});`
99
99
  })
100
100
 
101
+ const openTypeValue = computed(() => {
102
+ return (props.disabled || props.loading ? undefined : props.openType) as any
103
+ })
104
+
101
105
  watch(
102
106
  () => props.loading,
103
107
  () => {
@@ -61,25 +61,25 @@
61
61
  }
62
62
 
63
63
  @include e(tabs) {
64
- width: 222px;
65
- margin: 10px auto 12px;
64
+ width: 444rpx;
65
+ margin: 20rpx auto 24rpx;
66
66
  }
67
67
 
68
68
  @include e(shortcuts) {
69
- padding: 20px 0;
69
+ padding: 40rpx 0;
70
70
  text-align: center;
71
71
  }
72
72
 
73
73
  @include edeep(tag) {
74
- margin-right: 8px;
74
+ margin-right: 16rpx;
75
75
  }
76
76
 
77
77
  @include e(view) {
78
78
  @include when(show-confirm) {
79
- height: 394px;
79
+ height: 788rpx;
80
80
 
81
81
  @include when(range) {
82
- height: 384px;
82
+ height: 768rpx;
83
83
  }
84
84
  }
85
85
  }
@@ -88,11 +88,11 @@
88
88
  display: flex;
89
89
  justify-content: center;
90
90
  align-items: center;
91
- font-size: 14px;
91
+ font-size: 28rpx;
92
92
 
93
93
  @include when(monthrange) {
94
- padding-bottom: 10px;
95
- box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02);
94
+ padding-bottom: 20rpx;
95
+ box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
96
96
  }
97
97
  }
98
98
 
@@ -106,12 +106,12 @@
106
106
  }
107
107
 
108
108
  @include e(range-sperator) {
109
- margin: 0 24px;
109
+ margin: 0 48rpx;
110
110
  color: rgba(0, 0, 0, 0.25);
111
111
  }
112
112
 
113
113
  @include e(confirm) {
114
- padding: 12px 25px 14px;
114
+ padding: 24rpx 50rpx 28rpx;
115
115
  }
116
116
 
117
117
  @include edeep(cell) {
@@ -43,6 +43,7 @@
43
43
  :close-on-click-modal="closeOnClickModal"
44
44
  :safe-area-inset-bottom="safeAreaInsetBottom"
45
45
  :z-index="zIndex"
46
+ :max-width="popupMaxWidth"
46
47
  :root-portal="rootPortal"
47
48
  @close="close"
48
49
  >
@@ -107,6 +107,11 @@ export const calendarProps = {
107
107
  * 弹框层级
108
108
  */
109
109
  zIndex: makeNumberProp(15),
110
+ /**
111
+ * 弹层最大宽度,支持 `rpx`、`px`、`%` 等单位;
112
+ * `%` 在弹层打开时按屏幕宽度换算为 `rpx`
113
+ */
114
+ popupMaxWidth: makeStringProp('1200rpx'),
110
115
  /**
111
116
  * 是否显示确定按钮
112
117
  */
@@ -26,7 +26,7 @@
26
26
  display: flex;
27
27
  align-items: center;
28
28
  justify-content: center;
29
- height: 45px;
29
+ height: 90rpx;
30
30
  font-size: $-calendar-panel-title-fs;
31
31
  color: $-calendar-panel-title-color;
32
32
  }
@@ -142,7 +142,7 @@
142
142
 
143
143
  @include e(day-top) {
144
144
  position: absolute;
145
- top: 10px;
145
+ top: 20rpx;
146
146
  left: 0;
147
147
  right: 0;
148
148
  line-height: 1.1;
@@ -152,11 +152,11 @@
152
152
 
153
153
  @include e(day-bottom) {
154
154
  position: absolute;
155
- bottom: 10px;
155
+ bottom: 20rpx;
156
156
  left: 0;
157
157
  right: 0;
158
158
  line-height: 1.1;
159
159
  font-size: $-calendar-info-fs;
160
160
  text-align: center;
161
161
  }
162
- }
162
+ }
@@ -3,18 +3,54 @@ import { makeBooleanProp, makeRequiredProp } from '../../common/props'
3
3
  import type { CalendarFormatter, CalendarType } from '../types'
4
4
 
5
5
  export const monthProps = {
6
+ /**
7
+ * 日历选择类型
8
+ */
6
9
  type: makeRequiredProp(String as PropType<CalendarType>),
10
+ /**
11
+ * 当前月份时间戳
12
+ */
7
13
  date: makeRequiredProp(Number),
14
+ /**
15
+ * 已选中的值
16
+ */
8
17
  value: makeRequiredProp([Number, Array, null] as PropType<number | (number | null)[] | null>),
18
+ /**
19
+ * 可选最小日期
20
+ */
9
21
  minDate: makeRequiredProp(Number),
22
+ /**
23
+ * 可选最大日期
24
+ */
10
25
  maxDate: makeRequiredProp(Number),
26
+ /**
27
+ * 每周起始日
28
+ */
11
29
  firstDayOfWeek: makeRequiredProp(Number),
30
+ /**
31
+ * 日期单元格格式化函数
32
+ */
12
33
  formatter: Function as PropType<CalendarFormatter>,
34
+ /**
35
+ * 范围选择最大天数
36
+ */
13
37
  maxRange: Number,
38
+ /**
39
+ * 超出范围提示文案
40
+ */
14
41
  rangePrompt: String,
42
+ /**
43
+ * 范围选择是否允许同一天
44
+ */
15
45
  allowSameDay: makeBooleanProp(false),
46
+ /**
47
+ * 默认时间配置
48
+ */
16
49
  defaultTime: {
17
50
  type: [Array] as PropType<Array<number[]>>
18
51
  },
52
+ /**
53
+ * 是否显示标题
54
+ */
19
55
  showTitle: makeBooleanProp(true)
20
56
  }
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  @include e(weeks) {
11
- box-shadow: 0px 4px 8px 0 rgba(255, 255, 255, 0.02);
11
+ box-shadow: 0 8rpx 16rpx 0 rgba(255, 255, 255, 0.02);
12
12
  color: $-dark-color;
13
13
  }
14
14
 
@@ -25,7 +25,7 @@
25
25
  font-size: $-calendar-fs;
26
26
 
27
27
  @include e(title) {
28
- padding: 5px 0;
28
+ padding: 10rpx 0;
29
29
  text-align: center;
30
30
  font-size: $-calendar-panel-title-fs;
31
31
  color: $-calendar-panel-title-color;
@@ -36,7 +36,7 @@
36
36
  display: flex;
37
37
  height: $-calendar-week-height;
38
38
  line-height: $-calendar-week-height;
39
- box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02);
39
+ box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
40
40
  color: $-calendar-week-color;
41
41
  font-size: $-calendar-week-fs;
42
42
  padding: $-calendar-panel-padding;
@@ -54,7 +54,7 @@
54
54
 
55
55
  @include e(time) {
56
56
  display: flex;
57
- box-shadow: 0px -4px 8px 0px rgba(0, 0, 0, 0.02);
57
+ box-shadow: 0 -8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
58
58
  }
59
59
 
60
60
  @include e(time-label) {
@@ -62,13 +62,13 @@
62
62
  flex: 1;
63
63
  font-size: $-picker-column-fs;
64
64
  text-align: center;
65
- line-height: 125px;
65
+ line-height: 250rpx;
66
66
  color: $-picker-column-color;
67
67
 
68
68
  &::after {
69
69
  position: absolute;
70
70
  content: '';
71
- height: 35px;
71
+ height: 70rpx;
72
72
  top: 50%;
73
73
  left: 0;
74
74
  right: 0;
@@ -86,4 +86,4 @@
86
86
  @include e(time-picker) {
87
87
  flex: 3;
88
88
  }
89
- }
89
+ }