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
@@ -50,6 +50,8 @@ export interface MpHtmlEmits {
50
50
  (e: 'imgtap', attrs: { src: string; i: number }): void;
51
51
  /** 链接被点击时触发 */
52
52
  (e: 'linktap', attrs: { href: string }): void;
53
+ /** 自定义节点被点击时触发 */
54
+ (e: 'customtap', attrs: Record<string, any> & { innerText?: string }): void;
53
55
  /** 音视频播放时触发 */
54
56
  (e: 'play'): void;
55
57
  /** 媒体加载出错时触发 */
@@ -76,6 +76,7 @@
76
76
  * @event {Function} ready 所有图片加载完毕时触发
77
77
  * @event {Function} imgtap 图片被点击时触发
78
78
  * @event {Function} linktap 链接被点击时触发
79
+ * @event {Function} customtap 自定义节点被点击时触发
79
80
  * @event {Function} play 音视频播放时触发
80
81
  * @event {Function} error 媒体加载出错时触发
81
82
  * @event {Function} pause 音视频暂停时触发
@@ -159,7 +160,7 @@ export default {
159
160
  useAnchor: [Boolean, Number]
160
161
  },
161
162
  // #ifdef VUE3
162
- emits: ['load', 'ready', 'imgtap', 'linktap', 'play', 'error'],
163
+ emits: ['load', 'ready', 'imgtap', 'linktap', 'customtap', 'play', 'error'],
163
164
  // #endif
164
165
  // #ifndef APP-PLUS-NVUE
165
166
  components: {
@@ -596,7 +597,7 @@ export default {
596
597
  /* #ifndef APP-PLUS-NVUE */
597
598
  /* 根节点样式 */
598
599
  ._root {
599
- padding: 2rpx 0;
600
+ padding: 4rpx 0;
600
601
  overflow-x: auto;
601
602
  overflow-y: hidden;
602
603
  -webkit-overflow-scrolling: touch;
@@ -622,10 +623,10 @@ export default {
622
623
  width: auto;
623
624
  max-width: 100%;
624
625
  height: 60rpx;
625
- padding: 0 6rpx;
626
+ padding: 0 8rpx;
626
627
  overflow-x: auto;
627
628
  overflow-y: hidden;
628
- font-size: 28rpx;
629
+ font-size: var(--oxy-fs-content, 32rpx);
629
630
  line-height: 60rpx;
630
631
  white-space: nowrap;
631
632
  padding-bottom: 4rpx;
@@ -663,7 +664,7 @@ export default {
663
664
  display: inline-block;
664
665
  width: 36rpx;
665
666
  height: 36rpx;
666
- margin: 10rpx 2vw;
667
+ margin: 12rpx 2vw;
667
668
  border: 1px solid #dfe2e5;
668
669
  border-radius: 50%;
669
670
  }
@@ -37,6 +37,10 @@
37
37
  <view v-else-if="n.name==='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="linkTap">
38
38
  <node name="span" :childs="n.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+'.'+i+'.children']" style="display:inherit" />
39
39
  </view>
40
+ <!-- 自定义节点 -->
41
+ <view v-else-if="n.name==='custom-node'" :id="n.attrs.id" :class="'_custom-node custom-node '+n.attrs.class" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="customTap">
42
+ <node name="span" :childs="n.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+'.'+i+'.children']" style="display:inherit" />
43
+ </view>
40
44
  <!-- 视频 -->
41
45
  <!-- #ifdef APP-PLUS -->
42
46
  <view v-else-if="n.html" :data-i="i" @tap="mediaTap" :id="n.attrs.id" :class="'_video '+n.attrs.class" :style="n.attrs.style" v-html="n.html" @vplay.stop="play" />
@@ -91,6 +95,7 @@ var inlineTags = {
91
95
  b: true,
92
96
  big: true,
93
97
  code: true,
98
+ 'custom-node': true,
94
99
  del: true,
95
100
  em: true,
96
101
  i: true,
@@ -879,6 +884,19 @@ export default {
879
884
  })
880
885
  }
881
886
  },
887
+ /**
888
+ * @description 自定义节点点击事件
889
+ * @param {Event} e
890
+ */
891
+ customTap (e) {
892
+ if (!this.opts[5]) {
893
+ const node = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}
894
+ const attrs = node.attrs || e
895
+ this.root.$emit('customtap', Object.assign({
896
+ innerText: this.root.getText(node.children || [])
897
+ }, attrs))
898
+ }
899
+ },
882
900
  /**
883
901
  * @description 错误事件
884
902
  * @param {Event} e
@@ -948,7 +966,7 @@ export default {
948
966
 
949
967
  /deep/ .md-th,
950
968
  /deep/ .md-td {
951
- padding: 12rpx 26rpx !important;
969
+ padding: 12rpx 28rpx !important;
952
970
  border: 1px solid #dfe2e5;
953
971
  }
954
972
 
@@ -1001,11 +1019,15 @@ export default {
1001
1019
  }
1002
1020
  /* a 标签默认效果 */
1003
1021
  ._a {
1004
- padding: 3rpx 0 3rpx 0;
1022
+ padding: 4rpx 0 4rpx 0;
1005
1023
  color: #366092;
1006
1024
  word-break: break-all;
1007
1025
  }
1008
1026
 
1027
+ ._custom-node {
1028
+ display: inline;
1029
+ }
1030
+
1009
1031
  /* a 标签点击态效果 */
1010
1032
  ._hover {
1011
1033
  text-decoration: underline;
@@ -1150,6 +1172,7 @@ export default {
1150
1172
  ._abbr,
1151
1173
  ._b,
1152
1174
  ._code,
1175
+ ._custom-node,
1153
1176
  ._del,
1154
1177
  ._em,
1155
1178
  ._i,
@@ -5,14 +5,14 @@
5
5
  // 配置
6
6
  const config = {
7
7
  // 信任的标签(保持标签名不变)
8
- trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
8
+ trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,custom-node,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
9
9
 
10
10
  // 块级标签(转为 div,其他的非信任标签转为 span)
11
11
  blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
12
12
 
13
13
  // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
14
14
  // 行内标签
15
- inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
15
+ inlineTags: makeMap('abbr,b,big,code,custom-node,del,em,i,ins,label,q,small,span,strong,sub,sup'),
16
16
  // #endif
17
17
 
18
18
  // 要移除的标签
@@ -212,7 +212,7 @@ Parser.prototype.expose = function () {
212
212
  // #ifndef APP-PLUS-NVUE
213
213
  for (let i = this.stack.length; i--;) {
214
214
  const item = this.stack[i]
215
- if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
215
+ if (item.c || item.name === 'a' || item.name === 'custom-node' || item.name === 'video' || item.name === 'audio') return
216
216
  item.c = 1
217
217
  }
218
218
  // #endif
@@ -369,8 +369,8 @@ Parser.prototype.onAttrName = function (name) {
369
369
  if (name === 'data-src' && !this.attrs.src) {
370
370
  // data-src 自动转为 src
371
371
  this.attrName = 'src'
372
- } else if (this.tagName === 'img' || this.tagName === 'a') {
373
- // aimg 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
372
+ } else if (this.tagName === 'img' || this.tagName === 'a' || this.tagName === 'custom-node') {
373
+ // aimg、custom-node 标签保留 data- 的属性,可以在相应点击事件中使用
374
374
  this.attrName = name
375
375
  } else {
376
376
  // 剩余的移除以减小大小
@@ -825,7 +825,7 @@ Parser.prototype.popNode = function () {
825
825
  node.name = 'span'
826
826
  }
827
827
 
828
- if (node.name === 'a' || node.name === 'ad'
828
+ if (node.name === 'a' || node.name === 'ad' || node.name === 'custom-node'
829
829
  // #ifdef H5 || APP-PLUS
830
830
  || node.name === 'iframe' // eslint-disable-line
831
831
  // #endif
@@ -16,6 +16,8 @@
16
16
  :tag-style="tagStyle"
17
17
  :markdown="true"
18
18
  :content="contentAi"
19
+ @linktap="handleLinkTap"
20
+ @customtap="handleCustomTap"
19
21
  @remove="remove"
20
22
  ></mp-html>
21
23
  </view>
@@ -103,15 +105,28 @@ import title from './icon/title.svg'
103
105
 
104
106
  const props = defineProps(richTextProps)
105
107
 
108
+ type LinkTapEvent = {
109
+ href: string
110
+ innerText?: string
111
+ [key: string]: unknown
112
+ }
113
+
114
+ type CustomTapEvent = {
115
+ innerText?: string
116
+ [key: string]: unknown
117
+ }
118
+
106
119
  const emit = defineEmits<{
107
120
  save: [value: string]
108
121
  clear: [void]
109
122
  remove: [event: RemoveEvent]
123
+ linktap: [event: LinkTapEvent]
124
+ customtap: [event: CustomTapEvent]
110
125
  }>()
111
126
  const { translate } = useTranslate('richText')
112
127
  const templates = [
113
128
  '<section style="text-align: center; margin: 0 auto;"><section style="border-radius: 8rpx; border: 1px solid #757576; display: inline-block; padding: 10rpx 40rpx;"><span style="font-size: 36rpx; color: #595959;">标题</span></section></section>',
114
- '<div style="width: 100%; box-sizing: border-box; border-radius: 10rpx; background-color: #f6f6f6; padding: 20rpx; margin: 20rpx 0"><div>卡片</div><div style="font-size: 24rpx; color: gray">正文</div></div>',
129
+ '<div style="width: 100%; box-sizing: border-box; border-radius: 10rpx; background-color: #f6f6f6; padding: 20rpx; margin: 20rpx 0"><div>卡片</div><div style="font-size: 32rpx; color: gray">正文</div></div>',
115
130
  '<div style="border: 1px solid gray; box-shadow: 6rpx 6rpx 0 #cfcfce; padding: 20rpx; margin: 20rpx 0">段落</div>'
116
131
  ]
117
132
  const emojis = [
@@ -148,37 +163,37 @@ const customTagStyle = {
148
163
  `,
149
164
  h1: `
150
165
  margin: 36rpx 0 20rpx 0;
151
- font-size: 48rpx;
166
+ font-size: 52rpx;
152
167
  font-weight: 700;
153
168
  color: var(--oxy-rich-text-title-color, #000);
154
169
  `,
155
170
  h2: `
156
171
  margin: 28rpx 0 20rpx 0;
157
- font-size: 40rpx;
172
+ font-size: 44rpx;
158
173
  font-weight: 600;
159
174
  color: var(--oxy-rich-text-title-color, #000);
160
175
  `,
161
176
  h3: `
162
177
  margin: 24rpx 0 16rpx 0;
163
- font-size: 36rpx;
178
+ font-size: 40rpx;
164
179
  font-weight: 600;
165
180
  color: var(--oxy-rich-text-title-color, #000);
166
181
  `,
167
182
  h4: `
168
183
  margin: 24rpx 0 16rpx 0;
169
- font-size: 32rpx;
184
+ font-size: 36rpx;
170
185
  font-weight: 600;
171
186
  color: var(--oxy-rich-text-title-color, #000);
172
187
  `,
173
188
  h5: `
174
189
  margin: 20rpx 0 16rpx 0;
175
- font-size: 30rpx;
190
+ font-size: 34rpx;
176
191
  font-weight: 600;
177
192
  color: var(--oxy-rich-text-title-color, #000);
178
193
  `,
179
194
  h6: `
180
195
  margin: 16rpx 0;
181
- font-size: 28rpx;
196
+ font-size: 32rpx;
182
197
  color: var(--oxy-rich-text-title-color, #000);
183
198
  `,
184
199
  blockquote: `
@@ -244,7 +259,7 @@ const customTagStyle = {
244
259
  white-space: pre;
245
260
  background: var(--oxy-rich-text-code-bg, #2d2d2d);
246
261
  color: var(--oxy-rich-text-code-color, #f8f8f2);
247
- font-size: 26rpx;
262
+ font-size: 30rpx;
248
263
  line-height: 1.65;
249
264
  padding: 24rpx;
250
265
  overflow: auto;
@@ -396,6 +411,14 @@ function remove(e: RemoveEvent): void {
396
411
  emit('remove', e)
397
412
  }
398
413
 
414
+ function handleLinkTap(e: LinkTapEvent): void {
415
+ emit('linktap', e)
416
+ }
417
+
418
+ function handleCustomTap(e: CustomTapEvent): void {
419
+ emit('customtap', e)
420
+ }
421
+
399
422
  // 处理底部弹窗
400
423
  function openDialog(btn: ToolButton): void {
401
424
  dialog.value = true
@@ -48,7 +48,7 @@
48
48
  display: flex;
49
49
  padding: $-search-padding;
50
50
  align-items: center;
51
- background: #fff;
51
+ background: $-search-bg;
52
52
 
53
53
  @include e(block) {
54
54
  flex: 1;
@@ -97,7 +97,7 @@
97
97
  align-items: center;
98
98
  }
99
99
  @include edeep(search-icon) {
100
- margin-right: 16rpx;
100
+ margin-right: $-spacing-16;
101
101
  color: $-search-icon-color;
102
102
  font-size: $-search-icon-size;
103
103
  }
@@ -116,7 +116,7 @@
116
116
  @include edeep(clear) {
117
117
  position: absolute;
118
118
  right: 0;
119
- padding: 12rpx 18rpx 12rpx 14rpx;
119
+ padding: 16rpx 24rpx 16rpx 20rpx;
120
120
  color: $-search-cancel-color;
121
121
  }
122
122
  @include edeep(clear-icon) {
@@ -135,14 +135,14 @@
135
135
  background: $-search-light-bg;
136
136
 
137
137
  .oxy-search__block {
138
- background: #fff;
138
+ background: $-search-light-input-bg;
139
139
  }
140
140
 
141
141
  .oxy-search__cover {
142
- background: #fff;
142
+ background: $-search-light-input-bg;
143
143
  }
144
144
  }
145
145
  @include when(without-cancel) {
146
146
  padding-right: $-search-side-padding;
147
147
  }
148
- }
148
+ }
@@ -24,7 +24,7 @@
24
24
  background-color: $-color-theme;
25
25
 
26
26
  @include when(disabled) {
27
- opacity: 0.6;
27
+ opacity: $-opacity-disabled;
28
28
  }
29
29
  }
30
30
  }
@@ -40,41 +40,40 @@
40
40
  width: 100%;
41
41
  background-color: $-segmented-item-bg-color;
42
42
  padding: $-segmented-padding;
43
- border-radius: 8rpx;
43
+ border-radius: $-segmented-radius;
44
44
  box-sizing: border-box;
45
45
 
46
46
 
47
47
  @include e(item) {
48
48
  position: relative;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
49
52
  text-align: center;
50
- border-radius: 8rpx;
53
+ border-radius: $-segmented-radius;
51
54
  flex: 1;
52
55
  min-width: 0;
53
56
  z-index: 1;
54
57
  min-height: 56rpx;
55
- line-height: 56rpx;
58
+ line-height: $-line-height-base;
56
59
  padding: 0 24rpx;
57
- font-size: 28rpx;
60
+ font-size: $-fs-content;
58
61
  color: $-segmented-item-color;
59
62
  font-weight: 400;
60
63
 
61
- @include when(active) {
62
- font-weight: 550;
63
- }
64
-
65
64
  @include when(large) {
66
65
  min-height: 64rpx;
67
- line-height: 64rpx;
66
+ line-height: $-line-height-base;
68
67
  padding: 0 24rpx;
69
- font-size: 32rpx;
68
+ font-size: $-fs-title;
70
69
  }
71
70
 
72
71
 
73
72
  @include when(small) {
74
73
  min-height: 48rpx;
75
- line-height: 48rpx;
76
- padding: 0 14rpx;
77
- font-size: 24rpx;
74
+ line-height: $-line-height-base;
75
+ padding: 0 16rpx;
76
+ font-size: $-fs-secondary;
78
77
  }
79
78
 
80
79
  @include when(disabled) {
@@ -84,7 +83,7 @@
84
83
 
85
84
  @include m(active) {
86
85
  background-color: $-segmented-item-acitve-bg;
87
- border-radius: 8rpx;
86
+ border-radius: $-segmented-radius;
88
87
  height: calc(100% - $-segmented-padding * 2);
89
88
  @include when(disabled) {
90
89
  opacity: 0.8;