oxy-uni-ui 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/attributes.json +1 -1
  2. package/components/common/abstracts/variable.scss +449 -271
  3. package/components/common/util.ts +25 -0
  4. package/components/composables/useDynamicVirtualScroll.ts +80 -0
  5. package/components/composables/useVirtualScroll.ts +40 -14
  6. package/components/oxy-action-sheet/index.scss +8 -8
  7. package/components/oxy-backtop/index.scss +3 -3
  8. package/components/oxy-badge/index.scss +2 -2
  9. package/components/oxy-button/index.scss +5 -8
  10. package/components/oxy-calendar/index.scss +10 -10
  11. package/components/oxy-calendar/oxy-calendar.vue +3 -3
  12. package/components/oxy-calendar-view/monthPanel/index.scss +4 -5
  13. package/components/oxy-calendar-view/monthPanel/month-panel.vue +72 -37
  14. package/components/oxy-calendar-view/monthPanel/types.ts +43 -1
  15. package/components/oxy-calendar-view/types.ts +1 -1
  16. package/components/oxy-calendar-view/utils.ts +12 -1
  17. package/components/oxy-calendar-view/year/index.scss +1 -1
  18. package/components/oxy-calendar-view/yearPanel/index.scss +3 -3
  19. package/components/oxy-calendar-view/yearPanel/types.ts +36 -2
  20. package/components/oxy-calendar-view/yearPanel/year-panel.vue +64 -45
  21. package/components/oxy-card/index.scss +4 -4
  22. package/components/oxy-cell/index.scss +2 -2
  23. package/components/oxy-cell-group/index.scss +2 -2
  24. package/components/oxy-checkbox/index.scss +75 -220
  25. package/components/oxy-checkbox-group/index.scss +2 -2
  26. package/components/oxy-col-picker/index.scss +3 -3
  27. package/components/oxy-collapse/index.scss +1 -1
  28. package/components/oxy-collapse-item/index.scss +2 -2
  29. package/components/oxy-corner/index.scss +4 -4
  30. package/components/oxy-count-to/oxy-count-to.vue +3 -3
  31. package/components/oxy-count-to/types.ts +1 -1
  32. package/components/oxy-date-strip-item/index.scss +4 -4
  33. package/components/oxy-datetime-picker/index.scss +5 -5
  34. package/components/oxy-datetime-picker/types.ts +1 -1
  35. package/components/oxy-datetime-picker-view/types.ts +2 -2
  36. package/components/oxy-drop-menu/index.scss +3 -3
  37. package/components/oxy-drop-menu-item/index.scss +2 -2
  38. package/components/oxy-fab/index.scss +1 -5
  39. package/components/oxy-file-list/index.scss +22 -22
  40. package/components/oxy-footer/index.scss +2 -2
  41. package/components/oxy-footer/oxy-footer.vue +2 -3
  42. package/components/oxy-form-item/index.scss +0 -5
  43. package/components/oxy-grid/oxy-grid.vue +1 -1
  44. package/components/oxy-grid-item/index.scss +1 -1
  45. package/components/oxy-guidance/index.scss +15 -15
  46. package/components/oxy-img/index.scss +2 -2
  47. package/components/oxy-img-cropper/index.scss +14 -16
  48. package/components/oxy-img-lazy/index.scss +0 -1
  49. package/components/oxy-index-anchor/index.scss +5 -5
  50. package/components/oxy-index-bar/index.scss +3 -3
  51. package/components/oxy-input/index.scss +2 -2
  52. package/components/oxy-input-number/index.scss +21 -3
  53. package/components/oxy-input-number/oxy-input-number.vue +9 -1
  54. package/components/oxy-keyboard/index.scss +3 -3
  55. package/components/oxy-link/index.scss +11 -10
  56. package/components/oxy-loading/index.scss +1 -1
  57. package/components/oxy-loadmore/index.scss +1 -1
  58. package/components/oxy-long-press-menu/index.scss +2 -2
  59. package/components/oxy-message-box/index.scss +10 -10
  60. package/components/oxy-message-box/oxy-message-box.vue +4 -5
  61. package/components/oxy-message-box/types.ts +0 -5
  62. package/components/oxy-navbar/index.scss +1 -1
  63. package/components/oxy-navbar/oxy-navbar.vue +2 -3
  64. package/components/oxy-pagination/index.scss +5 -4
  65. package/components/oxy-password-input/index.scss +4 -4
  66. package/components/oxy-picker/index.scss +14 -14
  67. package/components/oxy-picker/types.ts +1 -1
  68. package/components/oxy-picker-view/index.scss +2 -2
  69. package/components/oxy-picker-view/oxy-picker-view.vue +8 -5
  70. package/components/oxy-picker-view/types.ts +2 -2
  71. package/components/oxy-popover/index.scss +8 -8
  72. package/components/oxy-popup/index.scss +4 -4
  73. package/components/oxy-progress/index.scss +3 -3
  74. package/components/oxy-radio/index.scss +26 -16
  75. package/components/oxy-radio-group/index.scss +2 -3
  76. package/components/oxy-rich-text/index.scss +20 -24
  77. package/components/oxy-rich-text/mp-html/card/card.vue +3 -3
  78. package/components/oxy-rich-text/mp-html/mp-html.d.ts +2 -0
  79. package/components/oxy-rich-text/mp-html/mp-html.vue +6 -5
  80. package/components/oxy-rich-text/mp-html/node/node.vue +25 -2
  81. package/components/oxy-rich-text/mp-html/parser.js +6 -6
  82. package/components/oxy-rich-text/oxy-rich-text.vue +31 -8
  83. package/components/oxy-search/index.scss +6 -6
  84. package/components/oxy-segmented/index.scss +14 -15
  85. package/components/oxy-select/index.scss +117 -69
  86. package/components/oxy-select/oxy-select.vue +24 -11
  87. package/components/oxy-select-picker/index.scss +2 -2
  88. package/components/oxy-sidebar-item/index.scss +22 -13
  89. package/components/oxy-skeleton/index.scss +1 -1
  90. package/components/oxy-slider/index.scss +8 -9
  91. package/components/oxy-sort-button/index.scss +3 -5
  92. package/components/oxy-splitter/index.scss +19 -0
  93. package/components/oxy-splitter/oxy-splitter.vue +409 -0
  94. package/components/oxy-splitter/types.ts +75 -0
  95. package/components/oxy-splitter-panel/index.scss +366 -0
  96. package/components/oxy-splitter-panel/oxy-splitter-panel.vue +432 -0
  97. package/components/oxy-splitter-panel/types.ts +63 -0
  98. package/components/oxy-step/index.scss +13 -13
  99. package/components/oxy-stream-render/oxy-stream-render.vue +230 -4
  100. package/components/oxy-swiper-nav/index.scss +5 -5
  101. package/components/oxy-switch/index.scss +5 -5
  102. package/components/oxy-tab/index.scss +8 -2
  103. package/components/oxy-tabbar/index.scss +5 -5
  104. package/components/oxy-tabbar/oxy-tabbar.vue +3 -3
  105. package/components/oxy-table/index.scss +5 -6
  106. package/components/oxy-table-col/index.scss +4 -5
  107. package/components/oxy-tabs/index.scss +16 -14
  108. package/components/oxy-tag/index.scss +111 -36
  109. package/components/oxy-text/index.scss +1 -1
  110. package/components/oxy-textarea/index.scss +3 -7
  111. package/components/oxy-toast/index.scss +1 -1
  112. package/components/oxy-tooltip/index.scss +1 -1
  113. package/components/oxy-tree/index.scss +35 -15
  114. package/components/oxy-tree/oxy-tree.vue +113 -2
  115. package/components/oxy-tree/types.ts +1 -0
  116. package/components/oxy-upload/index.scss +20 -20
  117. package/components/oxy-video-preview/index.scss +3 -3
  118. package/components/oxy-virtual-scroll/index.scss +2 -2
  119. package/components/oxy-voice-player/index.scss +104 -75
  120. package/components/oxy-watermark/index.scss +1 -1
  121. package/global.d.ts +2 -0
  122. package/package.json +1 -1
  123. package/tags.json +1 -1
  124. package/web-types.json +1 -1
@@ -5,14 +5,14 @@
5
5
  v-model="messageState.show"
6
6
  :close-on-click-modal="messageState.closeOnClickModal"
7
7
  :lazy-render="messageState.lazyRender"
8
- :max-width="popupMaxWidth"
8
+ :max-width="popupWidth"
9
9
  custom-class="oxy-message-box"
10
10
  @click-modal="toggleModal('modal')"
11
11
  :z-index="messageState.zIndex"
12
12
  :duration="200"
13
13
  :root-portal="rootPortal"
14
14
  >
15
- <view :class="rootClass" :style="containerStyle">
15
+ <view :class="rootClass">
16
16
  <view :class="bodyClass">
17
17
  <view v-if="messageState.title" class="oxy-message-box__title">
18
18
  {{ messageState.title }}
@@ -79,9 +79,8 @@ const bodyClass = computed(() => {
79
79
  return `oxy-message-box__body ${!messageState.title ? 'is-no-title' : ''} ${messageState.type === 'prompt' ? 'is-prompt' : ''}`
80
80
  })
81
81
 
82
- const containerStyle = computed(() => {
83
- const width = resolveSizeWithScreenWidth(messageState.width || props.width, { defaultUnit: 'rpx' })
84
- return `width:${width};`
82
+ const popupWidth = computed(() => {
83
+ return resolveSizeWithScreenWidth(messageState.width || props.width, { defaultUnit: 'rpx' })
85
84
  })
86
85
 
87
86
  const messageOptionKey = getMessageDefaultOptionKey(props.selector)
@@ -134,11 +134,6 @@ export const messageBoxProps = {
134
134
  * @default '80%'
135
135
  */
136
136
  width: makeStringProp('80%'),
137
- /**
138
- * 弹层最大宽度,支持 `rpx`、`px`、`%` 等单位;
139
- * `%` 在弹层打开时按屏幕宽度换算为 `rpx`
140
- */
141
- popupMaxWidth: makeStringProp('1200rpx'),
142
137
  /**
143
138
  * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal)
144
139
  */
@@ -88,6 +88,6 @@
88
88
  top: 0;
89
89
  left: 0;
90
90
  width: 100%;
91
- z-index: 500;
91
+ z-index: $-z-index-fixed;
92
92
  }
93
93
  }
@@ -52,7 +52,7 @@ export default {
52
52
  <script lang="ts" setup>
53
53
  import OxyIcon from '../oxy-icon/oxy-icon.vue'
54
54
  import { type CSSProperties, computed, getCurrentInstance, nextTick, onMounted, ref, watch } from 'vue'
55
- import { getRect, isDef, objToStyle, unitConvert } from '../common/util'
55
+ import { convertPxToRpx, getRect, isDef, objToStyle, unitConvert } from '../common/util'
56
56
  import { navbarProps } from './types'
57
57
 
58
58
  const props = defineProps(navbarProps)
@@ -139,8 +139,7 @@ function setPlaceholderHeight() {
139
139
  const rectBottom = Number(res.bottom)
140
140
  const occupiedHeight =
141
141
  rectHeight > 0 ? rectHeight : !Number.isNaN(rectTop) && !Number.isNaN(rectBottom) ? Math.max(rectBottom - rectTop, 0) : 0
142
- const pxPer100Rpx = uni.upx2px(100)
143
- const occupiedHeightInRpx = pxPer100Rpx ? (occupiedHeight / pxPer100Rpx) * 100 : occupiedHeight * 2
142
+ const occupiedHeightInRpx = convertPxToRpx(occupiedHeight)
144
143
 
145
144
  placeholderHeight.value = occupiedHeight ? occupiedHeightInRpx : ''
146
145
  })
@@ -12,7 +12,7 @@
12
12
 
13
13
  @include b(pager) {
14
14
  user-select: none;
15
- background-color: #fff;
15
+ background-color: $-pagination-bg;
16
16
 
17
17
  @include edeep(icon) {
18
18
  font-size: $-pagination-icon-size;
@@ -32,11 +32,12 @@
32
32
  }
33
33
  @include edeep(nav) {
34
34
  min-width: $-pagination-nav-width;
35
+ font-size: $-pagination-nav-fs;
35
36
  @include m(active){
36
- color: rgba(0,0,0,0.65)
37
+ color: $-pagination-nav-active-color;
37
38
  }
38
39
  @include m(disabled){
39
- color: rgba(0,0,0,0.15)
40
+ color: $-pagination-nav-disabled-color;
40
41
  }
41
42
  }
42
43
  @include e(size){
@@ -54,4 +55,4 @@
54
55
  @include e(current){
55
56
  color: $-pagination-nav-current-color;
56
57
  }
57
- }
58
+ }
@@ -51,11 +51,11 @@
51
51
  height: 100%;
52
52
  color: $-password-input-text-color;
53
53
  font-size: $-password-input-font-size;
54
- line-height: 1.2;
54
+ line-height: $-line-height-base;
55
55
  background: $-password-input-background;
56
56
 
57
57
  @include when(border) {
58
- border: 1px solid $-password-input-border-color;
58
+ border: #{$-border-width-base} solid $-password-input-border-color;
59
59
 
60
60
  &:not(:last-child) {
61
61
  border-right: none;
@@ -80,7 +80,7 @@
80
80
  width: $-password-input-dot-size;
81
81
  height: $-password-input-dot-size;
82
82
  background: $-password-input-dot-color;
83
- border-radius: 100%;
83
+ border-radius: $-radius-circle;
84
84
  transform: translate(-50%, -50%);
85
85
  visibility: hidden;
86
86
  }
@@ -121,4 +121,4 @@
121
121
  100% {
122
122
  opacity: 0;
123
123
  }
124
- }
124
+ }
@@ -27,7 +27,7 @@
27
27
 
28
28
  @include b(picker) {
29
29
  @include edeep(popup) {
30
- border-radius: 32rpx 32rpx 0 0;
30
+ border-radius: $-action-sheet-radius $-action-sheet-radius 0 0;
31
31
  }
32
32
 
33
33
  @include edeep(cell) {
@@ -91,7 +91,7 @@
91
91
  font-size: $-picker-toolbar-fs;
92
92
  color: $-picker-toolbar-finish-color;
93
93
  background: transparent;
94
- padding: 48rpx 30rpx 28rpx 30rpx;
94
+ padding: 48rpx 32rpx 32rpx 32rpx;
95
95
 
96
96
  @include m(cancel) {
97
97
  color: $-picker-toolbar-cancel-color;
@@ -109,23 +109,23 @@
109
109
  }
110
110
 
111
111
  @include e(search) {
112
- padding: 0 32rpx 24rpx 32rpx;
113
- background: #fff;
112
+ padding: 0 32rpx 28rpx 32rpx;
113
+ background: $-picker-search-bg;
114
114
  }
115
115
 
116
116
  @include e(search-input) {
117
117
  display: flex;
118
118
  align-items: center;
119
- height: 72rpx;
119
+ height: 80rpx;
120
120
  padding: 0 24rpx;
121
- background: #f5f5f5;
122
- border-radius: 36rpx;
121
+ background: $-picker-column-select-bg;
122
+ border-radius: $-picker-search-radius;
123
123
 
124
124
  input {
125
125
  flex: 1;
126
126
  height: 100%;
127
- margin-left: 16rpx;
128
- font-size: 28rpx;
127
+ margin-left: 20rpx;
128
+ font-size: $-fs-content;
129
129
  background: transparent;
130
130
  border: none;
131
131
  outline: none;
@@ -133,8 +133,8 @@
133
133
  }
134
134
 
135
135
  @include e(search-icon) {
136
- font-size: 32rpx;
137
- color: #999;
136
+ font-size: $-picker-search-icon-size;
137
+ color: $-picker-search-icon-color;
138
138
  }
139
139
 
140
140
  @include e(search-clear) {
@@ -143,11 +143,11 @@
143
143
  justify-content: center;
144
144
  width: 32rpx;
145
145
  height: 32rpx;
146
- margin-left: 8rpx;
146
+ margin-left: 12rpx;
147
147
  }
148
148
 
149
149
  @include e(search-clear-icon) {
150
- font-size: 32rpx;
151
- color: #999;
150
+ font-size: $-picker-search-icon-size;
151
+ color: $-picker-search-icon-color;
152
152
  }
153
153
  }
@@ -103,7 +103,7 @@ export const pickerProps = {
103
103
  /**
104
104
  * 选项总高度
105
105
  */
106
- columnsHeight: makeNumberProp(217),
106
+ columnsHeight: makeNumberProp(434),
107
107
  /**
108
108
  * 选项值对应的键名
109
109
  */
@@ -26,7 +26,7 @@
26
26
 
27
27
  @include b(picker-view) {
28
28
  position: relative;
29
- padding: 20rpx 0;
29
+ padding: 24rpx 0;
30
30
 
31
31
  @include e(columns) {
32
32
  position: relative;
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  @include edeep(roller) {
67
- background: rgba(245, 245, 245, 1);
67
+ background: $-picker-column-select-bg;
68
68
  z-index: 0;
69
69
 
70
70
  &::before,
@@ -3,12 +3,12 @@
3
3
  <view class="oxy-picker-view__loading" v-if="loading">
4
4
  <oxy-loading :color="loadingColor" />
5
5
  </view>
6
- <view :style="`height: ${(columnsHeight - 20) * 2}rpx;`">
6
+ <view :style="`height: ${innerColumnsHeight}rpx;`">
7
7
  <picker-view
8
8
  mask-class="oxy-picker-view__mask"
9
9
  indicator-class="oxy-picker-view__roller"
10
- :indicator-style="`height: ${itemHeight * 2}rpx;`"
11
- :style="`height: ${(columnsHeight - 20) * 2}rpx;`"
10
+ :indicator-style="`height: ${itemHeight}rpx;`"
11
+ :style="`height: ${innerColumnsHeight}rpx;`"
12
12
  :value="selectedIndex"
13
13
  :immediate-change="immediateChange"
14
14
  @change="onChange"
@@ -22,7 +22,7 @@
22
22
  :class="`oxy-picker-view-column__item ${row['disabled'] ? 'oxy-picker-view-column__item--disabled' : ''} ${
23
23
  selectedIndex[colIndex] == rowIndex ? 'oxy-picker-view-column__item--active' : ''
24
24
  }`"
25
- :style="`line-height: ${itemHeight * 2}rpx;`"
25
+ :style="`line-height: ${itemHeight}rpx;`"
26
26
  >
27
27
  {{ row[labelKey] }}
28
28
  </view>
@@ -44,13 +44,16 @@ export default {
44
44
  </script>
45
45
  <script lang="ts" setup>
46
46
  import OxyLoading from '../oxy-loading/oxy-loading.vue'
47
- import { getCurrentInstance, ref, watch, nextTick } from 'vue'
47
+ import { computed, getCurrentInstance, ref, watch, nextTick } from 'vue'
48
48
  import { deepClone, getType, isArray, isDef, isEqual, range } from '../common/util'
49
49
  import { formatArray, pickerViewProps, type ColumnItem, type PickerViewExpose } from './types'
50
50
 
51
51
  const props = defineProps(pickerViewProps)
52
52
  const emit = defineEmits(['change', 'pickstart', 'pickend', 'update:modelValue'])
53
53
 
54
+ // Root has 24rpx vertical padding on top and bottom; compensate here to keep visual viewport stable.
55
+ const innerColumnsHeight = computed(() => Math.max(props.columnsHeight - 48, props.itemHeight))
56
+
54
57
  const formatColumns = ref<ColumnItem[][]>([]) // 格式化后的列数据
55
58
  const selectedIndex = ref<Array<number>>([]) // 格式化之后,每列选中的下标集合
56
59
 
@@ -29,11 +29,11 @@ export const pickerViewProps = {
29
29
  /**
30
30
  * picker内部滚筒高
31
31
  */
32
- columnsHeight: makeNumberProp(217),
32
+ columnsHeight: makeNumberProp(434),
33
33
  /**
34
34
  * picker item的高度
35
35
  */
36
- itemHeight: makeNumberProp(35),
36
+ itemHeight: makeNumberProp(70),
37
37
  /**
38
38
  * 选项对象中,value对应的 key
39
39
  */
@@ -5,17 +5,17 @@
5
5
  @include b(popover) {
6
6
 
7
7
  @include e(pos) {
8
- background: rgb(75, 76, 77);
8
+ background: $-popover-dark-bg;
9
9
  color: $-dark-color;
10
- box-shadow: 0 4rpx 20rpx 0 rgba(75, 76, 77, 0.1);
10
+ box-shadow: $-popover-dark-box-shadow;
11
11
  }
12
12
 
13
13
  @include e(menu) {
14
- background: rgb(75, 76, 77);
14
+ background: $-popover-dark-bg;
15
15
  }
16
16
 
17
17
  @include e(inner) {
18
- background-color: rgb(75, 76, 77);
18
+ background-color: $-popover-dark-bg;
19
19
  }
20
20
 
21
21
  @include e(menu-inner) {
@@ -23,7 +23,7 @@
23
23
  @include halfPixelBorder("top", 0, $-dark-border-color);
24
24
  }
25
25
 
26
- @include squareArrow($-popover-arrow-size, rgb(75, 76, 77), $-popover-z-index - 1, $-popover-arrow-box-shadow);
26
+ @include squareArrow($-popover-arrow-size, $-popover-dark-bg, $-popover-z-index - 1, $-popover-arrow-box-shadow);
27
27
 
28
28
  }
29
29
  }
@@ -34,8 +34,8 @@
34
34
 
35
35
  @include edeep(icon) {
36
36
  vertical-align: middle;
37
- font-size: 36rpx;
38
- margin-right: 10rpx;
37
+ font-size: $-popover-trigger-icon-size;
38
+ margin-right: 12rpx;
39
39
  }
40
40
 
41
41
  @include e(menu-inner) {
@@ -104,7 +104,7 @@
104
104
  }
105
105
 
106
106
  @include edeep(close-icon) {
107
- font-size: 24rpx;
107
+ font-size: calc(2 * #{$-tooltip-close-size});
108
108
  position: absolute;
109
109
  right: -16rpx;
110
110
  top: -20rpx;
@@ -21,7 +21,7 @@
21
21
  position: fixed;
22
22
  max-height: 100%;
23
23
  overflow-y: auto;
24
- background: #fff;
24
+ background: $-popup-bg;
25
25
  }
26
26
  }
27
27
  }
@@ -30,8 +30,8 @@
30
30
  @include b(popup) {
31
31
  @include edeep(close) {
32
32
  position: absolute;
33
- top: 20rpx;
34
- right: 20rpx;
33
+ top: 24rpx;
34
+ right: 24rpx;
35
35
  color: $-popup-close-color;
36
36
  font-size: $-popup-close-size;
37
37
  transform: rotate(-45deg);
@@ -81,4 +81,4 @@
81
81
  bottom: 0;
82
82
  left: 0;
83
83
  }
84
- }
84
+ }
@@ -21,7 +21,7 @@
21
21
  position: relative;
22
22
  flex: 1;
23
23
  height: $-progress-height;
24
- border-radius: calc($-progress-height / 2);
24
+ border-radius: $-progress-radius;
25
25
  background: $-progress-bg;
26
26
  }
27
27
  @include e(inner) {
@@ -30,7 +30,7 @@
30
30
  top: 0;
31
31
  left: 0;
32
32
  height: 100%;
33
- border-radius: calc($-progress-height / 2);
33
+ border-radius: $-progress-radius;
34
34
  background: $-progress-color;
35
35
  transition-property: width;
36
36
  transition-timing-function: linear;
@@ -48,7 +48,7 @@
48
48
  }
49
49
  @include edeep(label) {
50
50
  width: 60rpx;
51
- margin-left: 18rpx;
51
+ margin-left: 20rpx;
52
52
  color: $-progress-label-color;
53
53
  font-size: $-progress-label-fs;
54
54
  }
@@ -32,25 +32,25 @@
32
32
 
33
33
  @include when(button) {
34
34
  .oxy-radio__label {
35
- border-color: #c8c9cc;
36
- background: #3a3a3c;
35
+ border-color: $-color-gray-5;
36
+ background: $-dark-border-color;
37
37
  color: $-dark-color-gray;
38
38
  }
39
39
  @include when(checked) {
40
40
  .oxy-radio__label {
41
- border-color: #c8c9cc;
42
- background: #3a3a3c;
43
- color: #c8c9cc;
41
+ border-color: $-color-gray-5;
42
+ background: $-dark-border-color;
43
+ color: $-color-gray-5;
44
44
  }
45
45
  }
46
46
  }
47
47
 
48
48
  @include when(dot) {
49
49
  .oxy-radio__shape {
50
- border-color: #c8c9cc;
51
- background: #3a3a3c;
50
+ border-color: $-color-gray-5;
51
+ background: $-dark-border-color;
52
52
  &::before {
53
- background-color: #c8c9cc;
53
+ background-color: $-color-gray-5;
54
54
  }
55
55
  }
56
56
  }
@@ -92,7 +92,7 @@
92
92
  vertical-align: top;
93
93
  font-size: $-radio-label-fs;
94
94
  color: $-radio-label-color;
95
- line-height: 40rpx;
95
+ line-height: $-lh-base;
96
96
  word-break: break-all;
97
97
  }
98
98
  @include when(checked) {
@@ -109,8 +109,10 @@
109
109
 
110
110
  @include when(dot) {
111
111
  .oxy-radio__shape {
112
+ width: $-radio-dot-shape-size;
113
+ height: $-radio-dot-shape-size;
112
114
  border: 4rpx solid $-radio-dot-border-color;
113
- border-radius: 50%;
115
+ border-radius: $-radius-circle;
114
116
  position: relative;
115
117
  display: inline-block;
116
118
  box-sizing: border-box;
@@ -123,8 +125,8 @@
123
125
  height: $-radio-dot-size;
124
126
  left: calc(50% - #{$-radio-dot-size / 2});
125
127
  top: calc(50% - #{$-radio-dot-size / 2});
126
- border-radius: 50%;
127
- background-color: #fff;
128
+ border-radius: $-radius-circle;
129
+ background-color: $-color-white;
128
130
  transform: scale(0);
129
131
  transition: transform .2s ease-in;
130
132
  }
@@ -145,17 +147,23 @@
145
147
  @include when(button) {
146
148
  display: inline-block;
147
149
  margin-top: 0;
148
- margin-right: 20rpx;
150
+ margin-right: $-spacing-24;
149
151
 
150
152
  .oxy-radio__shape {
151
153
  display: none;
152
154
  }
153
155
  .oxy-radio__label {
156
+ display: inline-flex;
157
+ align-items: center;
158
+ justify-content: center;
154
159
  height: $-radio-button-height;
155
160
  min-width: $-radio-button-min-width;
156
161
  max-width: $-radio-button-max-width;
157
- padding: 10rpx 30rpx;
162
+ padding: 16rpx 32rpx;
158
163
  margin-right: 0;
164
+ line-height: 1.2;
165
+ text-align: center;
166
+ vertical-align: middle;
159
167
  border-radius: $-radio-button-radius;
160
168
  background-color: $-radio-button-bg;
161
169
  font-size: $-radio-button-fs;
@@ -257,11 +265,11 @@
257
265
 
258
266
  // 以下内容用于解决父子组件样式隔离的问题 —— START
259
267
  @include when(cell-radio) {
260
- padding: 26rpx 30rpx;
268
+ padding: 32rpx 32rpx;
261
269
  margin: 0;
262
270
 
263
271
  @include when(large) {
264
- padding: 28rpx 30rpx;
272
+ padding: 32rpx 32rpx;
265
273
  }
266
274
  }
267
275
 
@@ -288,6 +296,8 @@
288
296
 
289
297
  @include when(dot) {
290
298
  .oxy-radio__shape {
299
+ width: $-radio-dot-shape-large-size;
300
+ height: $-radio-dot-shape-large-size;
291
301
  &::before {
292
302
  width: $-radio-dot-large-size;
293
303
  height: $-radio-dot-large-size;
@@ -11,11 +11,10 @@
11
11
  background-color: $-radio-bg;
12
12
  font-size: 0;
13
13
 
14
- // 上下40rpx 左右30rpx 内部间隔24rpx
14
+ // 顶部与两侧留白适当放大,避免按钮组在16px基准字号下过于紧凑
15
15
  @include when(button) {
16
16
  width: 100%;
17
- height: 100%;
18
- padding: 16rpx 6rpx 40rpx 30rpx;
17
+ padding: 24rpx 32rpx 40rpx 32rpx;
19
18
  box-sizing: border-box;
20
19
  overflow: hidden;
21
20
  height: auto;
@@ -21,13 +21,9 @@
21
21
 
22
22
  }
23
23
 
24
- :deep(.mp-html) {
25
- // Styles are now handled via tagStyle prop
26
- }
27
-
28
24
  .editor_toolbox {
29
25
  width: 100%;
30
- background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
26
+ background: $-rich-text-toolbox-bg-gradient;
31
27
  padding: 8rpx 16rpx;
32
28
  box-sizing: border-box;
33
29
  flex-wrap: wrap;
@@ -35,7 +31,7 @@
35
31
  display: flex;
36
32
  align-items: center;
37
33
  border-bottom: 1px solid $-color-border-light;
38
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
34
+ box-shadow: $-rich-text-toolbox-shadow;
39
35
 
40
36
  .oxy-icon {
41
37
  cursor: pointer;
@@ -44,18 +40,18 @@
44
40
  display: inline-flex;
45
41
  align-items: center;
46
42
  justify-content: center;
47
- border-radius: 12rpx;
43
+ border-radius: $-rich-text-toolbox-icon-radius;
48
44
  transition: all 0.2s ease;
49
45
  color: $-color-secondary;
50
- font-size: 36rpx;
46
+ font-size: $-rich-text-toolbox-icon-size;
51
47
 
52
48
  &:hover {
53
- background-color: rgba(0, 0, 0, 0.05);
49
+ background-color: $-rich-text-toolbox-icon-hover-bg;
54
50
  color: $-color-theme;
55
51
  }
56
52
 
57
53
  &:active {
58
- background-color: rgba(0, 0, 0, 0.08);
54
+ background-color: $-rich-text-toolbox-icon-active-bg;
59
55
  }
60
56
  }
61
57
 
@@ -64,18 +60,18 @@
64
60
  height: 32rpx;
65
61
  cursor: pointer;
66
62
  padding: 16rpx;
67
- border-radius: 12rpx;
63
+ border-radius: $-rich-text-toolbox-icon-radius;
68
64
  transition: all 0.2s ease;
69
65
  box-sizing: content-box;
70
66
  display: inline-block;
71
67
  vertical-align: middle;
72
68
 
73
69
  &:hover {
74
- background-color: rgba(0, 0, 0, 0.05);
70
+ background-color: $-rich-text-toolbox-icon-hover-bg;
75
71
  }
76
72
 
77
73
  &:active {
78
- background-color: rgba(0, 0, 0, 0.08);
74
+ background-color: $-rich-text-toolbox-icon-active-bg;
79
75
  }
80
76
  }
81
77
 
@@ -84,19 +80,19 @@
84
80
  width: 32rpx;
85
81
  height: 32rpx;
86
82
  padding: 16rpx;
87
- border-radius: 12rpx;
83
+ border-radius: $-rich-text-toolbox-icon-radius;
88
84
  transition: all 0.2s ease;
89
85
  box-sizing: content-box;
90
86
  display: inline-block;
91
87
  vertical-align: middle;
92
88
 
93
89
  &:hover {
94
- background-color: rgba(0, 0, 0, 0.05);
90
+ background-color: $-rich-text-toolbox-icon-hover-bg;
95
91
  transform: translateY(-2rpx);
96
92
  }
97
93
 
98
94
  &:active {
99
- background-color: rgba(0, 0, 0, 0.08);
95
+ background-color: $-rich-text-toolbox-icon-active-bg;
100
96
  transform: translateY(0);
101
97
  }
102
98
  }
@@ -107,10 +103,10 @@
107
103
  }
108
104
 
109
105
  .dialog-title {
110
- font-size: 32rpx;
111
- line-height: 92rpx;
106
+ font-size: $-fs-title;
107
+ line-height: 100rpx;
112
108
  text-align: center;
113
- height: 92rpx;
109
+ height: 100rpx;
114
110
  font-weight: $-fw-semibold;
115
111
  color: $-color-black;
116
112
 
@@ -121,8 +117,8 @@
121
117
 
122
118
  .oxy-rich-text__emoji-content {
123
119
  display: flex;
124
- font-size: 40rpx;
125
- line-height: 70rpx;
120
+ font-size: $-rich-text-emoji-fs;
121
+ line-height: 80rpx;
126
122
  text-align: center;
127
123
 
128
124
  .oxy-rich-text__emoji-block {
@@ -138,12 +134,12 @@
138
134
  }
139
135
 
140
136
  .oxy-rich-text__link-input {
141
- margin-bottom: 32rpx;
137
+ margin-bottom: $-spacing-32;
142
138
 
143
139
  .oxy-rich-text__link-label {
144
- font-size: 28rpx;
140
+ font-size: $-fs-content;
145
141
  color: $-color-secondary;
146
- margin-bottom: 16rpx;
142
+ margin-bottom: $-spacing-16;
147
143
  }
148
144
  }
149
145
 
@@ -71,7 +71,7 @@
71
71
  .card {
72
72
 
73
73
  width: 80%;
74
- margin: 10rpx auto;
74
+ margin: 12rpx auto;
75
75
  max-width: 700rpx;
76
76
  max-height: 140rpx;
77
77
 
@@ -82,7 +82,7 @@
82
82
  justify-content: space-between;
83
83
  align-items: center;
84
84
 
85
- padding: 20rpx 0 20rpx 10rpx;
85
+ padding: 20rpx 0 20rpx 12rpx;
86
86
  border-radius: 12rpx;
87
87
 
88
88
  &-img {
@@ -119,4 +119,4 @@
119
119
  line-height: 37rpx;
120
120
  }
121
121
  }
122
- </style>
122
+ </style>