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
@@ -32,9 +32,9 @@ export const tableColumnProps = {
32
32
  */
33
33
  label: makeRequiredProp(String),
34
34
  /**
35
- * 列宽度,单位px
35
+ * 列宽度,number 类型按 `rpx` 语义处理,也支持 `px/rpx`
36
36
  */
37
- width: makeNumericProp(100),
37
+ width: makeNumericProp(200),
38
38
  /**
39
39
  * 是否开启列排序
40
40
  */
@@ -30,7 +30,7 @@
30
30
 
31
31
  @include when(active) {
32
32
  color: $-dark-color;
33
- border: 1px solid $-tabs-nav-active-color;
33
+ border: 2rpx solid $-tabs-nav-active-color;
34
34
  background-color: $-dark-background;
35
35
  }
36
36
 
@@ -125,7 +125,7 @@
125
125
 
126
126
  @include e(line) {
127
127
  position: absolute;
128
- bottom: 4px;
128
+ bottom: 8rpx;
129
129
  left: 0;
130
130
  z-index: 1;
131
131
  height: $-tabs-nav-line-height;
@@ -139,6 +139,25 @@
139
139
  }
140
140
  }
141
141
 
142
+ @include edeep(nav-item-pills){
143
+ .oxy-tabs__nav-item-text {
144
+ padding: $-tabs-nav-pills-padding-y $-tabs-nav-pills-padding-x;
145
+ }
146
+ .oxy-tabs__nav-item-badge {
147
+ .oxy-badge__content {
148
+ margin-top: $-tabs-nav-pills-padding-y;
149
+ margin-right: $-tabs-nav-pills-padding-x;
150
+ }
151
+ }
152
+ @include when(active) {
153
+ .oxy-tabs__nav-item-text {
154
+ background-color: $-tabs-nav-pills-bg-color;
155
+ border-radius: $-tabs-nav-pills-border-radius;
156
+ color: $-tabs-nav-pills-color;
157
+ }
158
+ }
159
+ }
160
+
142
161
  @include e(container) {
143
162
  overflow: hidden;
144
163
  }
@@ -179,8 +198,8 @@
179
198
  position: absolute;
180
199
  content: '';
181
200
  top: 0;
182
- left: -24px;
183
- width: 24px;
201
+ left: -48rpx;
202
+ width: 48rpx;
184
203
  height: $-tabs-nav-height - 1;
185
204
  background: $-tabs-nav-map-btn-before-bg;
186
205
  }
@@ -197,7 +216,7 @@
197
216
 
198
217
  @include e(map-header) {
199
218
  position: relative;
200
- padding-left: 17px;
219
+ padding-left: 34rpx;
201
220
  height: $-tabs-nav-height;
202
221
  line-height: $-tabs-nav-height;
203
222
  font-size: $-tabs-nav-map-fs;
@@ -216,7 +235,7 @@
216
235
  @include e(map-body) {
217
236
  display: flex;
218
237
  flex-wrap: wrap;
219
- padding: 20px 15px 10px;
238
+ padding: 40rpx 30rpx 20rpx;
220
239
  background: #fff;
221
240
  transition: transform .3s;
222
241
  transform: scaleY(0);
@@ -243,12 +262,12 @@
243
262
  @include buttonClear;
244
263
  @include lineEllipsis;
245
264
  display: inline-block;
246
- width: 107px;
247
- height: 32px;
248
- line-height: 32px;
265
+ width: 214rpx;
266
+ height: 64rpx;
267
+ line-height: 64rpx;
249
268
  background-color: $-tabs-nav-map-button-back-color;
250
269
  border-color: transparent;
251
- margin-bottom: 10px;
270
+ margin-bottom: 20rpx;
252
271
  border-radius: $-tabs-nav-map-button-radius;
253
272
  color: $-tabs-nav-map-color;
254
273
  font-size: $-tabs-nav-map-fs;
@@ -257,7 +276,7 @@
257
276
 
258
277
  @include when(active) {
259
278
  color: $-tabs-nav-active-color;
260
- border: 1px solid $-tabs-nav-active-color;
279
+ border: 2rpx solid $-tabs-nav-active-color;
261
280
  background-color: $-tabs-nav-bg
262
281
  }
263
282
 
@@ -281,19 +300,28 @@
281
300
  @include when(slide) {
282
301
  .oxy-tabs__nav-item {
283
302
  flex: 0 0 auto;
284
- padding: 0 17px;
303
+ padding: 0 34rpx;
285
304
  }
286
305
  }
287
306
 
288
307
  @include when(map) {
289
308
  .oxy-tabs__nav--wrap {
290
- padding-right: 40px;
309
+ padding-right: 80rpx;
310
+ }
311
+ }
312
+
313
+ @include when(fullscreen) {
314
+ height: 100%;
315
+ display: flex;
316
+ flex-direction: column;
317
+ .oxy-tabs__container {
318
+ flex: 1;
291
319
  }
292
320
  }
293
321
  }
294
322
 
295
323
  @media screen and (max-width: 330px) {
296
324
  .oxy-tabs__map-nav-btn {
297
- width: 90px;
325
+ width: 180rpx;
298
326
  }
299
- }
327
+ }
@@ -2,7 +2,9 @@
2
2
  <template v-if="sticky">
3
3
  <oxy-sticky-box>
4
4
  <view
5
- :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''}`"
5
+ :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''} ${
6
+ fullscreen ? 'is-fullscreen' : ''
7
+ }`"
6
8
  :style="customStyle"
7
9
  >
8
10
  <oxy-sticky :offset-top="offsetTop">
@@ -14,17 +16,32 @@
14
16
  @click="handleSelect(index)"
15
17
  v-for="(item, index) in children"
16
18
  :key="index"
17
- :class="`oxy-tabs__nav-item ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`"
19
+ :class="`oxy-tabs__nav-item ${props.pills ? 'oxy-tabs__nav-item-pills' : ''} ${state.activeIndex === index ? 'is-active' : ''} ${
20
+ item.disabled ? 'is-disabled' : ''
21
+ }`"
18
22
  :style="state.activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''"
19
23
  >
20
24
  <oxy-badge v-if="item.badgeProps" v-bind="item.badgeProps">
21
- <text class="oxy-tabs__nav-item-text">{{ item.title }}</text>
25
+ <text
26
+ class="oxy-tabs__nav-item-text"
27
+ :style="props.pills && props.pillsColor && state.activeIndex === index ? 'background-color:' + props.pillsColor : ''"
28
+ >
29
+ {{ item.title }}
30
+ </text>
22
31
  </oxy-badge>
23
- <text v-else class="oxy-tabs__nav-item-text">{{ item.title }}</text>
24
-
25
- <view class="oxy-tabs__line oxy-tabs__line--inner" v-if="state.activeIndex === index && state.useInnerLine"></view>
32
+ <text
33
+ v-else
34
+ class="oxy-tabs__nav-item-text"
35
+ :style="props.pills && props.pillsColor && state.activeIndex === index ? 'background-color:' + props.pillsColor : ''"
36
+ >
37
+ {{ item.title }}
38
+ </text>
39
+ <view
40
+ class="oxy-tabs__line oxy-tabs__line--inner"
41
+ v-if="!props.pills && state.activeIndex === index && state.useInnerLine"
42
+ ></view>
26
43
  </view>
27
- <view class="oxy-tabs__line" :style="state.lineStyle"></view>
44
+ <view v-if="!props.pills" class="oxy-tabs__line" :style="state.lineStyle"></view>
28
45
  </view>
29
46
  </scroll-view>
30
47
  </view>
@@ -75,7 +92,11 @@
75
92
  </template>
76
93
 
77
94
  <template v-else>
78
- <view :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''}`">
95
+ <view
96
+ :class="`oxy-tabs ${customClass} ${innerSlidable ? 'is-slide' : ''} ${mapNum < children.length && mapNum !== 0 ? 'is-map' : ''} ${
97
+ fullscreen ? 'is-fullscreen' : ''
98
+ }`"
99
+ >
79
100
  <view class="oxy-tabs__nav">
80
101
  <view class="oxy-tabs__nav--wrap">
81
102
  <scroll-view :scroll-x="innerSlidable" scroll-with-animation :scroll-left="state.scrollLeft">
@@ -84,16 +105,29 @@
84
105
  v-for="(item, index) in children"
85
106
  @click="handleSelect(index)"
86
107
  :key="index"
87
- :class="`oxy-tabs__nav-item ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`"
108
+ :class="`oxy-tabs__nav-item ${props.pills ? 'oxy-tabs__nav-item-pills' : ''} ${state.activeIndex === index ? 'is-active' : ''} ${
109
+ item.disabled ? 'is-disabled' : ''
110
+ }`"
88
111
  :style="state.activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''"
89
112
  >
90
113
  <oxy-badge custom-class="oxy-tabs__nav-item-badge" v-if="item.badgeProps" v-bind="item.badgeProps">
91
- <text class="oxy-tabs__nav-item-text">{{ item.title }}</text>
114
+ <text
115
+ class="oxy-tabs__nav-item-text"
116
+ :style="props.pills && props.pillsColor && state.activeIndex === index ? 'background-color:' + props.pillsColor : ''"
117
+ >
118
+ {{ item.title }}
119
+ </text>
92
120
  </oxy-badge>
93
- <text v-else class="oxy-tabs__nav-item-text">{{ item.title }}</text>
94
- <view class="oxy-tabs__line oxy-tabs__line--inner" v-if="state.activeIndex === index && state.useInnerLine"></view>
121
+ <text
122
+ v-else
123
+ class="oxy-tabs__nav-item-text"
124
+ :style="props.pills && props.pillsColor && state.activeIndex === index ? 'background-color:' + props.pillsColor : ''"
125
+ >
126
+ {{ item.title }}
127
+ </text>
128
+ <view class="oxy-tabs__line oxy-tabs__line--inner" v-if="!props.pills && state.activeIndex === index && state.useInnerLine"></view>
95
129
  </view>
96
- <view class="oxy-tabs__line" :style="state.lineStyle"></view>
130
+ <view v-if="!props.pills" class="oxy-tabs__line" :style="state.lineStyle"></view>
97
131
  </view>
98
132
  </scroll-view>
99
133
  </view>
@@ -145,7 +179,7 @@ import OxyIcon from '../oxy-icon/oxy-icon.vue'
145
179
  import OxySticky from '../oxy-sticky/oxy-sticky.vue'
146
180
  import OxyStickyBox from '../oxy-sticky-box/oxy-sticky-box.vue'
147
181
  import { computed, getCurrentInstance, onMounted, watch, nextTick, reactive, type CSSProperties, type ComponentInstance } from 'vue'
148
- import { addUnit, checkNumRange, debounce, getRect, isDef, isNumber, isString, objToStyle } from '../common/util'
182
+ import { withDefaultUnit, checkNumRange, debounce, getRect, isDef, isNumber, isString, objToStyle, unitConvert } from '../common/util'
149
183
  import { useTouch } from '../composables/useTouch'
150
184
  import { TABS_KEY, tabsProps, type TabsExpose } from './types'
151
185
  import { useChildren } from '../composables/useChildren'
@@ -316,23 +350,23 @@ async function updateLineStyle(animation: boolean = true) {
316
350
  try {
317
351
  const lineStyle: CSSProperties = {}
318
352
  if (isDef(lineWidth)) {
319
- lineStyle.width = addUnit(lineWidth)
353
+ lineStyle.width = withDefaultUnit(lineWidth)
320
354
  } else {
321
355
  if (autoLineWidth) {
322
356
  const textRects = await getRect($itemText, true, proxy)
323
357
  const textWidth = Number(textRects[state.activeIndex].width)
324
- lineStyle.width = addUnit(textWidth)
358
+ lineStyle.width = unitConvert(textWidth, 0, { output: 'px' })
325
359
  }
326
360
  }
327
361
  if (isDef(lineHeight)) {
328
- lineStyle.height = addUnit(lineHeight)
329
- lineStyle.borderRadius = `calc(${addUnit(lineHeight)} / 2)`
362
+ lineStyle.height = withDefaultUnit(lineHeight)
363
+ lineStyle.borderRadius = `calc(${withDefaultUnit(lineHeight)} / 2)`
330
364
  }
331
365
  const rects = await getRect($item, true, proxy)
332
366
  const rect = rects[state.activeIndex]
333
367
  let left = rects.slice(0, state.activeIndex).reduce((prev, curr) => prev + Number(curr.width), 0) + Number(rect.width) / 2
334
368
  if (left) {
335
- lineStyle.transform = `translateX(${left}px) translateX(-50%)`
369
+ lineStyle.transform = `translateX(${unitConvert(left, 0, { output: 'px' })}) translateX(-50%)`
336
370
  if (animation) {
337
371
  lineStyle.transition = 'width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);'
338
372
  }
@@ -52,11 +52,11 @@ export const tabsProps = {
52
52
  */
53
53
  autoLineWidth: makeBooleanProp(false),
54
54
  /**
55
- * 底部条宽度,单位像素
55
+ * 底部条宽度,支持 `px/rpx`
56
56
  */
57
57
  lineWidth: numericProp,
58
58
  /**
59
- * 底部条高度,单位像素
59
+ * 底部条高度,支持 `px/rpx`
60
60
  */
61
61
  lineHeight: numericProp,
62
62
  /**
@@ -80,7 +80,19 @@ export const tabsProps = {
80
80
  * 可选值:'auto' | 'always'
81
81
  * @default auto
82
82
  */
83
- slidable: makeStringProp<TabsSlidable>('auto')
83
+ slidable: makeStringProp<TabsSlidable>('auto'),
84
+ /**
85
+ * 是否开启胶囊模式
86
+ */
87
+ pills: makeBooleanProp(false),
88
+ /**
89
+ * 胶囊背景颜色
90
+ */
91
+ pillsColor: makeStringProp(''),
92
+ /**
93
+ * 是否开启全屏模式
94
+ */
95
+ fullscreen: makeBooleanProp(false)
84
96
  }
85
97
 
86
98
  export type TabsExpose = {
@@ -8,23 +8,23 @@
8
8
  background: transparent;
9
9
  color: $normalColor;
10
10
  border: 1px solid $normalColor;
11
- padding: 0 4px;
11
+ padding: 0 8rpx;
12
12
  }
13
13
  @include when(round) {
14
14
  line-height: 1.2;
15
15
  font-size: $-tag-fs;
16
- padding: 4px 11px;
16
+ padding: 8rpx 22rpx;
17
17
  background: transparent;
18
18
  color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-color);
19
19
  border: 1px solid if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color);
20
20
  border-radius: $-tag-round-radius;
21
21
  }
22
22
  @include when(mark) {
23
- padding: 1px 6px;
23
+ padding: 2rpx 12rpx;
24
24
  border-radius: $-tag-mark-radius;
25
25
 
26
26
  @include when(plain) {
27
- padding: 0 6px;
27
+ padding: 0 12rpx;
28
28
  }
29
29
  }
30
30
  @include when(active) {
@@ -36,8 +36,8 @@
36
36
  font-size: $-tag-small-fs;
37
37
  display: inline-block;
38
38
  color: $-tag-color;
39
- padding: 0 3px;
40
- border-radius: 2px;
39
+ padding: 0 6rpx;
40
+ border-radius: 4rpx;
41
41
  transition: opacity .3s;
42
42
  vertical-align: middle;
43
43
  line-height: initial;
@@ -60,11 +60,11 @@
60
60
  @include when(icon) {
61
61
  font-size: $-tag-fs;
62
62
  line-height: 1.2;
63
- padding: 2px 5px;
63
+ padding: 4rpx 10rpx;
64
64
  }
65
65
  @include when(dynamic) {
66
66
  box-sizing: border-box;
67
- width: 88px;
67
+ width: 176rpx;
68
68
  transition: .3s;
69
69
 
70
70
  &:active {
@@ -77,7 +77,7 @@
77
77
  }
78
78
  @include edeep(icon) {
79
79
  display: inline-block;
80
- margin-right: 4px;
80
+ margin-right: 8rpx;
81
81
  font-size: $-tag-fs;
82
82
  line-height: 1.2;
83
83
  vertical-align: baseline;
@@ -87,9 +87,9 @@
87
87
  vertical-align: text-top;
88
88
  }
89
89
  @include e(add-text) {
90
- width: 60px;
91
- height: 14px;
92
- min-height: 14px;
90
+ width: 120rpx;
91
+ height: 28rpx;
92
+ min-height: 28rpx;
93
93
  display: inline-block;
94
94
  font-size: $-tag-fs;
95
95
  vertical-align: middle;
@@ -97,10 +97,10 @@
97
97
  }
98
98
  @include e(close) {
99
99
  display: inline-block;
100
- margin-left: 24px;
101
- margin-right: -4px;
100
+ margin-left: 48rpx;
101
+ margin-right: -8rpx;
102
102
  font-size: $-tag-close-size;
103
- height: 14px;
103
+ height: 28rpx;
104
104
  line-height: 1.1;
105
105
  vertical-align: text-bottom;
106
106
  color: $-tag-close-color;
@@ -34,4 +34,8 @@
34
34
  @include when(success) {
35
35
  color: $-text-success-color;
36
36
  }
37
- }
37
+
38
+ @include e(btn) {
39
+ color: $-text-primary-color;
40
+ }
41
+ }
@@ -1,8 +1,16 @@
1
1
  <template>
2
- <text @click="handleClick" :class="rootClass" :style="rootStyle">
2
+ <oxy-tooltip v-if="props.tooltip && isTextOverflow" :content="formattedText">
3
+ <text @click="handleClick" :class="`${rootClass} is-lines-${props.lines}`" :style="rootStyle">
4
+ <slot v-if="$slots.prefix || prefix" name="prefix">{{ prefix }}</slot>
5
+ <text>{{ formattedText }}</text>
6
+ <slot v-if="$slots.suffix || suffix" name="suffix">{{ suffix }}</slot>
7
+ </text>
8
+ </oxy-tooltip>
9
+ <text v-else :id="textId" @click="handleClick" :class="rootClass" :style="rootStyle">
3
10
  <slot v-if="$slots.prefix || prefix" name="prefix">{{ prefix }}</slot>
4
- <text>{{ formattedText }}</text>
11
+ <text>{{ props.toggleExpand && isTextOverflow && !expanded ? realText : formattedText }}</text>
5
12
  <slot v-if="$slots.suffix || suffix" name="suffix">{{ suffix }}</slot>
13
+ <text v-if="props.toggleExpand && isTextOverflow" class="oxy-text__btn" @click.stop="handleToggle">{{ expanded ? '收起' : '展开' }}</text>
6
14
  </text>
7
15
  </template>
8
16
 
@@ -18,15 +26,24 @@ export default {
18
26
  </script>
19
27
 
20
28
  <script lang="ts" setup>
21
- import { computed, ref, watch } from 'vue'
22
- import { isDef, objToStyle } from '../common/util'
29
+ import { computed, ref, watch, nextTick, getCurrentInstance } from 'vue'
30
+ import { isDef, objToStyle, uuid, getRect } from '../common/util'
23
31
  import { textProps } from './types'
24
32
  import dayjs from '../../dayjs'
33
+ import OxyTooltip from '../oxy-tooltip/oxy-tooltip.vue'
25
34
 
26
35
  // 获取组件的 props 和 emit 函数
27
36
  const props = defineProps(textProps)
28
37
  const emit = defineEmits(['click'])
29
38
 
39
+ const { proxy } = getCurrentInstance() as any
40
+ const textId = ref<string>(`oxy-text${uuid()}`)
41
+ const expanded = ref<boolean>(false)
42
+ const isTextOverflow = ref<boolean>(false)
43
+ const realText = ref<string>('')
44
+ const offset = ref<number>(0)
45
+ const showTooltip = ref<boolean>(false)
46
+
30
47
  // 存储文本类名的响应式变量
31
48
  const textClass = ref<string>('')
32
49
 
@@ -39,7 +56,9 @@ watch(
39
56
  color: props.color,
40
57
  bold: props.bold,
41
58
  lines: props.lines,
42
- format: props.format
59
+ format: props.format,
60
+ toggleExpand: props.toggleExpand,
61
+ tooltip: props.tooltip
43
62
  }),
44
63
  ({ type }) => {
45
64
  // 验证 type 属性
@@ -77,12 +96,12 @@ const rootStyle = computed(() => {
77
96
 
78
97
  // 计算文本类名的函数
79
98
  function computeTextClass() {
80
- const { type, color, bold, lines } = props
99
+ const { type, color, bold, lines, toggleExpand, tooltip } = props
81
100
  const textClassList: string[] = []
82
101
  if (!color) {
83
102
  textClassList.push(`is-${type}`)
84
103
  }
85
- if (isDef(lines)) {
104
+ if (isDef(lines) && !toggleExpand && !tooltip) {
86
105
  textClassList.push(`is-lines-${lines}`)
87
106
  }
88
107
  bold && textClassList.push('is-bold')
@@ -128,6 +147,56 @@ const formattedText = computed(() => {
128
147
  return formatText(`${text}`, format, mode)
129
148
  })
130
149
 
150
+ watch(
151
+ formattedText,
152
+ (value) => {
153
+ nextTick(() => {
154
+ if (props.toggleExpand || props.tooltip) {
155
+ realText.value = value
156
+ offset.value = realText.value.length
157
+ const view = uni.createSelectorQuery().in(proxy).select(`#${textId.value}`)
158
+ view
159
+ .fields({ computedStyle: ['fontSize', 'lineHeight'] }, (res: any) => {
160
+ getRect(`#${textId.value}`, true, proxy)
161
+ .then((rects: any) => {
162
+ if (res && Array.isArray(rects) && rects.length && props.lines) {
163
+ const lines = rects[0].height / Number.parseFloat(res.lineHeight.replace('px', ''))
164
+ isTextOverflow.value = lines > props.lines
165
+ if (props.toggleExpand && isTextOverflow.value) {
166
+ const size = Math.floor(rects[0].width / Number.parseFloat(res.fontSize.replace('px', '')))
167
+ // 中英文字符长度区分
168
+ const length = size * props.lines - 4
169
+ let realOffset = 0
170
+ let realLength = 0
171
+ for (let i = 0; i < offset.value; i++) {
172
+ if (realText.value.charCodeAt(i) > 127) {
173
+ realLength += 1
174
+ } else {
175
+ realLength += 0.5
176
+ }
177
+ realOffset++
178
+ if (realLength >= length) {
179
+ offset.value = realOffset
180
+ break
181
+ }
182
+ }
183
+ realText.value = `${value.substring(0, offset.value)}...`
184
+ }
185
+ }
186
+ })
187
+ .catch(() => {})
188
+ })
189
+ .exec()
190
+ }
191
+ })
192
+ },
193
+ { deep: true, immediate: true }
194
+ )
195
+
196
+ function handleToggle() {
197
+ expanded.value = !expanded.value
198
+ }
199
+
131
200
  // 处理点击事件
132
201
  function handleClick(event: Event) {
133
202
  emit('click', event)
@@ -79,6 +79,18 @@ export const textProps = {
79
79
  * 文本显示的行数,如果设置,超出此行数,将会显示省略号。最大值为5。
80
80
  */
81
81
  lines: Number,
82
+ /**
83
+ * 文本超出,展开收起显示全部
84
+ * 类型:boolean
85
+ * 默认值:false
86
+ */
87
+ toggleExpand: makeBooleanProp(false),
88
+ /**
89
+ * 文本超出,tooltip显示全部
90
+ * 类型:boolean
91
+ * 默认值:false
92
+ */
93
+ tooltip: makeBooleanProp(false),
82
94
  /**
83
95
  * 文本行高
84
96
  * 类型:string
@@ -144,11 +144,11 @@
144
144
  box-sizing: border-box;
145
145
 
146
146
  @include when(show-limit) {
147
- padding-bottom: 36px;
147
+ padding-bottom: 72rpx;
148
148
  }
149
149
 
150
150
  @include when(suffix) {
151
- padding-right: calc($-textarea-icon-size + 8px);
151
+ padding-right: calc($-textarea-icon-size + 16rpx);
152
152
  }
153
153
  }
154
154
 
@@ -164,7 +164,7 @@
164
164
  border: none;
165
165
  box-sizing: border-box;
166
166
  word-break: break-word;
167
- min-height: 24px;
167
+ min-height: 48rpx;
168
168
 
169
169
  &::-webkit-input-placeholder {
170
170
  color: $-input-placeholder-color;
@@ -198,12 +198,12 @@
198
198
 
199
199
  @include e(count) {
200
200
  position: absolute;
201
- bottom: 8px;
201
+ bottom: 16rpx;
202
202
  right: 0;
203
203
  font-size: $-textarea-count-fs;
204
204
  color: $-textarea-count-color;
205
205
  background: $-textarea-bg;
206
- line-height: 20px;
206
+ line-height: 40rpx;
207
207
  display: inline-flex;
208
208
  }
209
209
 
@@ -258,7 +258,7 @@
258
258
 
259
259
  @include when(auto-height) {
260
260
  &:not(.is-cell) {
261
- padding: 5px 0;
261
+ padding: 10rpx 0;
262
262
  }
263
263
 
264
264
  &::after {
@@ -31,8 +31,10 @@
31
31
  :class-prefix="classPrefix"
32
32
  :name="iconClass"
33
33
  ></oxy-icon>
34
- <!--文本-->
35
- <view v-if="msg" class="oxy-toast__msg">{{ msg }}</view>
34
+ <!--文本/插槽内容-->
35
+ <view v-if="hasContent" class="oxy-toast__msg">
36
+ <slot>{{ msg }}</slot>
37
+ </view>
36
38
  </view>
37
39
  </oxy-transition>
38
40
  </template>
@@ -54,13 +56,14 @@ import OxyLoading from '../oxy-loading/oxy-loading.vue'
54
56
  import OxyOverlay from '../oxy-overlay/oxy-overlay.vue'
55
57
  import OxyTransition from '../oxy-transition/oxy-transition.vue'
56
58
 
57
- import { computed, inject, onBeforeMount, ref, watch, type CSSProperties } from 'vue'
59
+ import { computed, inject, onBeforeMount, ref, useSlots, watch, type CSSProperties } from 'vue'
58
60
  import base64 from '../common/base64'
59
61
  import { defaultOptions, getToastOptionKey, toastIcon } from '.'
60
62
  import { toastProps, type ToastDirection, type ToastLoadingType, type ToastOptions, type ToastProps } from './types'
61
- import { addUnit, isDef, isFunction, objToStyle } from '../common/util'
63
+ import { withDefaultUnit, isDef, isFunction, objToStyle } from '../common/util'
62
64
 
63
65
  const props = defineProps(toastProps)
66
+ const slots = useSlots()
64
67
  const iconName = ref<string>('') // 图标类型
65
68
  const msg = ref<string>('') // 消息内容
66
69
  const position = ref<string>('middle')
@@ -124,10 +127,19 @@ const transitionStyle = computed(() => {
124
127
  return objToStyle(style)
125
128
  })
126
129
 
130
+ const hasCustomContent = computed(() => {
131
+ const slotNodes = slots.default?.()
132
+ return !!slotNodes?.length
133
+ })
134
+
135
+ const hasContent = computed(() => {
136
+ return !!msg.value || hasCustomContent.value
137
+ })
138
+
127
139
  const rootClass = computed(() => {
128
140
  return `oxy-toast ${props.customClass} oxy-toast--${position.value} ${
129
- (iconName.value !== 'loading' || msg.value) && (iconName.value || iconClass.value) ? 'oxy-toast--with-icon' : ''
130
- } ${iconName.value === 'loading' && !msg.value ? 'oxy-toast--loading' : ''} ${direction.value === 'vertical' ? 'is-vertical' : ''}`
141
+ (iconName.value !== 'loading' || hasContent.value) && (iconName.value || iconClass.value) ? 'oxy-toast--with-icon' : ''
142
+ } ${iconName.value === 'loading' && !hasContent.value ? 'oxy-toast--loading' : ''} ${direction.value === 'vertical' ? 'is-vertical' : ''}`
131
143
  })
132
144
 
133
145
  const svgStyle = computed(() => {
@@ -184,8 +196,12 @@ function mergeOptionsWithProps(option: ToastOptions, props: ToastProps) {
184
196
  zIndex.value = isDef(option.zIndex!) ? option.zIndex! : props.zIndex
185
197
  loadingType.value = isDef(option.loadingType!) ? option.loadingType! : props.loadingType
186
198
  loadingColor.value = isDef(option.loadingColor!) ? option.loadingColor! : props.loadingColor
187
- iconSize.value = isDef(option.iconSize) ? addUnit(option.iconSize) : isDef(props.iconSize) ? addUnit(props.iconSize) : undefined
188
- loadingSize.value = isDef(option.loadingSize) ? addUnit(option.loadingSize) : isDef(props.loadingSize) ? addUnit(props.loadingSize) : undefined
199
+ iconSize.value = isDef(option.iconSize) ? withDefaultUnit(option.iconSize) : isDef(props.iconSize) ? withDefaultUnit(props.iconSize) : undefined
200
+ loadingSize.value = isDef(option.loadingSize)
201
+ ? withDefaultUnit(option.loadingSize)
202
+ : isDef(props.loadingSize)
203
+ ? withDefaultUnit(props.loadingSize)
204
+ : undefined
189
205
  cover.value = isDef(option.cover!) ? option.cover! : props.cover
190
206
  classPrefix.value = isDef(option.classPrefix) ? option.classPrefix : props.classPrefix
191
207
  direction.value = isDef(option.direction) ? option.direction : props.direction