oxy-uni-ui 2.1.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 (94) hide show
  1. package/attributes.json +1 -1
  2. package/components/common/abstracts/variable.scss +132 -98
  3. package/components/common/util.ts +25 -0
  4. package/components/composables/useDynamicVirtualScroll.ts +80 -0
  5. package/components/oxy-action-sheet/index.scss +6 -6
  6. package/components/oxy-backtop/index.scss +1 -1
  7. package/components/oxy-badge/index.scss +2 -2
  8. package/components/oxy-button/index.scss +3 -6
  9. package/components/oxy-calendar/index.scss +2 -2
  10. package/components/oxy-calendar/oxy-calendar.vue +3 -3
  11. package/components/oxy-calendar-view/monthPanel/month-panel.vue +72 -37
  12. package/components/oxy-calendar-view/monthPanel/types.ts +43 -1
  13. package/components/oxy-calendar-view/types.ts +1 -1
  14. package/components/oxy-calendar-view/utils.ts +12 -1
  15. package/components/oxy-calendar-view/yearPanel/types.ts +36 -2
  16. package/components/oxy-calendar-view/yearPanel/year-panel.vue +64 -45
  17. package/components/oxy-card/index.scss +4 -4
  18. package/components/oxy-cell/index.scss +1 -1
  19. package/components/oxy-cell-group/index.scss +2 -2
  20. package/components/oxy-checkbox/index.scss +73 -218
  21. package/components/oxy-collapse/index.scss +1 -1
  22. package/components/oxy-collapse-item/index.scss +2 -2
  23. package/components/oxy-corner/index.scss +3 -3
  24. package/components/oxy-count-to/oxy-count-to.vue +3 -3
  25. package/components/oxy-count-to/types.ts +1 -1
  26. package/components/oxy-date-strip-item/index.scss +4 -4
  27. package/components/oxy-datetime-picker/types.ts +1 -1
  28. package/components/oxy-datetime-picker-view/types.ts +2 -2
  29. package/components/oxy-fab/index.scss +1 -5
  30. package/components/oxy-file-list/index.scss +2 -2
  31. package/components/oxy-footer/index.scss +2 -2
  32. package/components/oxy-footer/oxy-footer.vue +2 -3
  33. package/components/oxy-form-item/index.scss +0 -5
  34. package/components/oxy-grid/oxy-grid.vue +1 -1
  35. package/components/oxy-grid-item/index.scss +1 -1
  36. package/components/oxy-guidance/index.scss +2 -2
  37. package/components/oxy-img/index.scss +2 -2
  38. package/components/oxy-img-cropper/index.scss +0 -2
  39. package/components/oxy-img-lazy/index.scss +0 -1
  40. package/components/oxy-index-anchor/index.scss +3 -3
  41. package/components/oxy-input/index.scss +2 -2
  42. package/components/oxy-input-number/index.scss +21 -3
  43. package/components/oxy-input-number/oxy-input-number.vue +9 -1
  44. package/components/oxy-keyboard/index.scss +1 -1
  45. package/components/oxy-link/index.scss +11 -10
  46. package/components/oxy-loading/index.scss +1 -1
  47. package/components/oxy-loadmore/index.scss +1 -1
  48. package/components/oxy-message-box/index.scss +7 -7
  49. package/components/oxy-navbar/index.scss +1 -1
  50. package/components/oxy-navbar/oxy-navbar.vue +2 -3
  51. package/components/oxy-password-input/index.scss +4 -4
  52. package/components/oxy-picker/types.ts +1 -1
  53. package/components/oxy-picker-view/oxy-picker-view.vue +8 -5
  54. package/components/oxy-picker-view/types.ts +2 -2
  55. package/components/oxy-progress/index.scss +2 -2
  56. package/components/oxy-radio/index.scss +8 -4
  57. package/components/oxy-radio-group/index.scss +0 -1
  58. package/components/oxy-rich-text/index.scss +2 -6
  59. package/components/oxy-rich-text/mp-html/mp-html.d.ts +2 -0
  60. package/components/oxy-rich-text/mp-html/mp-html.vue +2 -1
  61. package/components/oxy-rich-text/mp-html/node/node.vue +23 -0
  62. package/components/oxy-rich-text/mp-html/parser.js +6 -6
  63. package/components/oxy-rich-text/oxy-rich-text.vue +23 -0
  64. package/components/oxy-search/index.scss +1 -1
  65. package/components/oxy-segmented/index.scss +4 -8
  66. package/components/oxy-select/index.scss +6 -6
  67. package/components/oxy-sidebar-item/index.scss +20 -11
  68. package/components/oxy-slider/index.scss +4 -5
  69. package/components/oxy-sort-button/index.scss +3 -5
  70. package/components/oxy-splitter-panel/index.scss +8 -8
  71. package/components/oxy-step/index.scss +9 -9
  72. package/components/oxy-swiper-nav/index.scss +2 -2
  73. package/components/oxy-switch/index.scss +3 -3
  74. package/components/oxy-tab/index.scss +8 -2
  75. package/components/oxy-tabbar/index.scss +3 -3
  76. package/components/oxy-tabbar/oxy-tabbar.vue +3 -3
  77. package/components/oxy-table/index.scss +0 -1
  78. package/components/oxy-table-col/index.scss +1 -2
  79. package/components/oxy-tabs/index.scss +3 -3
  80. package/components/oxy-tag/index.scss +4 -4
  81. package/components/oxy-text/index.scss +1 -1
  82. package/components/oxy-textarea/index.scss +2 -6
  83. package/components/oxy-toast/index.scss +1 -1
  84. package/components/oxy-tree/index.scss +31 -11
  85. package/components/oxy-tree/oxy-tree.vue +113 -2
  86. package/components/oxy-tree/types.ts +1 -0
  87. package/components/oxy-upload/index.scss +3 -3
  88. package/components/oxy-video-preview/index.scss +3 -3
  89. package/components/oxy-virtual-scroll/index.scss +1 -1
  90. package/components/oxy-voice-player/index.scss +36 -36
  91. package/components/oxy-watermark/index.scss +1 -1
  92. package/package.json +1 -1
  93. package/tags.json +1 -1
  94. package/web-types.json +1 -1
@@ -21,10 +21,6 @@
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
26
  background: $-rich-text-toolbox-bg-gradient;
@@ -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
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
 
@@ -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: {
@@ -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
@@ -1006,6 +1024,10 @@ export default {
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,10 +105,23 @@ 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 = [
@@ -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
@@ -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
  }
@@ -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
  }
@@ -55,19 +55,15 @@
55
55
  min-width: 0;
56
56
  z-index: 1;
57
57
  min-height: 56rpx;
58
- line-height: 1.2;
58
+ line-height: $-line-height-base;
59
59
  padding: 0 24rpx;
60
60
  font-size: $-fs-content;
61
61
  color: $-segmented-item-color;
62
62
  font-weight: 400;
63
63
 
64
- @include when(active) {
65
- font-weight: 550;
66
- }
67
-
68
64
  @include when(large) {
69
65
  min-height: 64rpx;
70
- line-height: 1.2;
66
+ line-height: $-line-height-base;
71
67
  padding: 0 24rpx;
72
68
  font-size: $-fs-title;
73
69
  }
@@ -75,7 +71,7 @@
75
71
 
76
72
  @include when(small) {
77
73
  min-height: 48rpx;
78
- line-height: 1.2;
74
+ line-height: $-line-height-base;
79
75
  padding: 0 16rpx;
80
76
  font-size: $-fs-secondary;
81
77
  }
@@ -92,7 +92,7 @@
92
92
  display: flex;
93
93
  flex-wrap: wrap;
94
94
  min-width: 0;
95
- padding: 12rpx 0;
95
+ padding: 8rpx 0;
96
96
  }
97
97
 
98
98
  .oxy-select__tags-item {
@@ -230,7 +230,7 @@
230
230
 
231
231
  .oxy-select__selector-scroll {
232
232
  /* #ifndef APP-NVUE */
233
- max-height: 480rpx;
233
+ max-height: 400rpx;
234
234
  box-sizing: border-box;
235
235
  /* #endif */
236
236
  }
@@ -240,10 +240,10 @@
240
240
  /* #ifndef APP-NVUE */
241
241
  display: flex;
242
242
  /* #endif */
243
- min-height: 88rpx;
243
+ min-height: 72rpx;
244
244
  line-height: 1.4;
245
245
  font-size: $-fs-content;
246
- padding: 20rpx 32rpx;
246
+ padding: 16rpx 24rpx;
247
247
  box-sizing: border-box;
248
248
  transition: background-color 0.2s;
249
249
  }
@@ -262,7 +262,7 @@
262
262
  &.oxy-select_selector-item_active {
263
263
  color: $-color-theme;
264
264
  background-color: $-select-active-bg;
265
- font-weight: 500;
265
+ font-weight: $-fw-medium;
266
266
  }
267
267
  }
268
268
 
@@ -281,7 +281,7 @@
281
281
  font-size: $-fs-secondary;
282
282
 
283
283
  &-icon {
284
- margin-right: 16rpx;
284
+ margin-right: $-spacing-16;
285
285
  animation: rotate 1s linear infinite;
286
286
  }
287
287
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  @include m(disabled) {
19
19
  color: $-dark-color-gray;
20
-
20
+
21
21
  &:active {
22
22
  background-color: $-dark-background2;
23
23
  }
@@ -39,26 +39,35 @@
39
39
  box-sizing: border-box;
40
40
  white-space: wrap;
41
41
  line-height: $-sidebar-item-line-height;
42
+ transition: background-color $-sidebar-transition-duration $-sidebar-transition-timing-function,
43
+ border-radius $-sidebar-transition-duration $-sidebar-transition-timing-function;
42
44
 
43
45
  &:active {
44
46
  background-color: $-sidebar-hover-bg;
45
47
  }
46
48
 
49
+ &::before {
50
+ position: absolute;
51
+ top: 50%;
52
+ left: 0;
53
+ width: $-sidebar-active-border-width;
54
+ height: $-sidebar-active-border-height;
55
+ background: $-sidebar-active-color;
56
+ transform: translateY(-50%) scaleY(0.5);
57
+ transform-origin: center;
58
+ opacity: 0;
59
+ content: '';
60
+ border-radius: $-sidebar-active-border-width;
61
+ transition: all $-sidebar-transition-duration $-sidebar-transition-timing-function;
62
+ }
63
+
47
64
  @include m(active) {
48
- font-weight: 600;
49
65
  background: $-sidebar-active-bg;
50
66
  color: $-sidebar-active-color;
51
67
 
52
68
  &::before {
53
- position: absolute;
54
- top: 50%;
55
- left: 0;
56
- width: $-sidebar-active-border-width;
57
- height: $-sidebar-active-border-height;
58
- background: $-sidebar-active-color;
59
- transform: translateY(-50%);
60
- content: '';
61
- border-radius: $-sidebar-active-border-width;
69
+ transform: translateY(-50%) scaleY(1);
70
+ opacity: 1;
62
71
  }
63
72
 
64
73
  &:active {
@@ -34,12 +34,11 @@
34
34
  @include e(label) {
35
35
  text-align: center;
36
36
  width: calc($-slider-handle-radius * 2);
37
- line-height: calc($-slider-handle-radius * 2);
38
37
  font-size: $-slider-fs;
39
- line-height: 1.2;
38
+ line-height: $-line-height-base;
40
39
  color: $-slider-color;
41
40
  background-color: $-slider-label-bg;
42
- border-radius: 100%;
41
+ border-radius: $-radius-circle;
43
42
  position: absolute;
44
43
  bottom: calc($-slider-handle-radius * 2 + 16rpx);
45
44
  }
@@ -76,8 +75,8 @@
76
75
  height: calc($-slider-handle-radius * 2);
77
76
  width: calc($-slider-handle-radius * 2);
78
77
  background: $-slider-handle-bg;
79
- border-radius: 100%;
80
- border: 1px solid $-slider-axie-bg;
78
+ border-radius: $-radius-circle;
79
+ border: #{$-border-width-base} solid $-slider-axie-bg;
81
80
  box-sizing: border-box;
82
81
  box-shadow: 0 4rpx 8rpx 0 $-slider-button-shadow-color;
83
82
  }
@@ -64,9 +64,7 @@
64
64
  min-width: 28rpx;
65
65
  margin-left: 4rpx;
66
66
  vertical-align: middle;
67
- line-height: 1.1;
68
-
69
- @include when(active) {
67
+ line-height: $-line-height-tight;
70
68
 
71
69
  :deep(.oxy-sort-button__icon-up),
72
70
  :deep(.oxy-sort-button__icon-down) {
@@ -77,13 +75,13 @@
77
75
 
78
76
  @include edeep(icon-up) {
79
77
  display: block !important;
80
- line-height: 1.1;
78
+ line-height: $-line-height-tight;
81
79
  transform: scale(calc((10 / 14))) translate(0, 14rpx);
82
80
  }
83
81
 
84
82
  @include edeep(icon-down) {
85
83
  display: block !important;
86
- line-height: 1.1;
84
+ line-height: $-line-height-tight;
87
85
  transform: scale(calc((10 / 14))) translate(0, -14rpx);
88
86
  }
89
87
  }
@@ -23,7 +23,7 @@
23
23
  justify-content: center;
24
24
  flex-shrink: 0;
25
25
  background-color: transparent;
26
- transition: background-color 0.16s ease, box-shadow 0.16s ease;
26
+ transition: background-color $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
27
27
 
28
28
  &::before {
29
29
  position: absolute;
@@ -31,7 +31,7 @@
31
31
  content: '';
32
32
  background-color: $-splitter-line-color;
33
33
  border-radius: $-splitter-bar-radius;
34
- transition: background-color 0.16s ease, opacity 0.16s ease;
34
+ transition: background-color $-transition-duration-fast ease, opacity $-transition-duration-fast ease;
35
35
  }
36
36
 
37
37
  &::after {
@@ -42,7 +42,7 @@
42
42
  background-color: $-splitter-grip-active-color;
43
43
  opacity: 0;
44
44
  pointer-events: none;
45
- transition: opacity 0.16s ease, transform 0.16s ease;
45
+ transition: opacity $-transition-duration-fast ease, transform $-transition-duration-fast ease;
46
46
  }
47
47
 
48
48
  &.has-action {
@@ -157,11 +157,11 @@
157
157
  width: calc(#{$-splitter-action-size} - 2rpx);
158
158
  height: calc(#{$-splitter-action-size} * 1.72);
159
159
  border-radius: $-splitter-action-radius;
160
- border: 1px solid $-splitter-action-border;
160
+ border: #{$-border-width-base} solid $-splitter-action-border;
161
161
  background-color: $-splitter-action-bg;
162
162
  box-shadow: $-splitter-action-shadow;
163
163
  color: $-splitter-arrow-color;
164
- transition: opacity 0.16s ease, box-shadow 0.16s ease;
164
+ transition: opacity $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
165
165
 
166
166
  .oxy-splitter-panel__bar--horizontal & {
167
167
  left: 50%;
@@ -189,11 +189,11 @@
189
189
  align-items: center;
190
190
  justify-content: center;
191
191
  border-radius: $-splitter-action-group-radius;
192
- border: 1px solid $-splitter-action-border;
192
+ border: #{$-border-width-base} solid $-splitter-action-border;
193
193
  background-color: $-splitter-action-bg;
194
194
  box-shadow: $-splitter-action-shadow;
195
195
  overflow: hidden;
196
- transition: opacity 0.16s ease, box-shadow 0.16s ease;
196
+ transition: opacity $-transition-duration-fast ease, box-shadow $-transition-duration-fast ease;
197
197
 
198
198
  .oxy-splitter-panel__bar--horizontal & {
199
199
  left: 50%;
@@ -249,7 +249,7 @@
249
249
  border-radius: $-splitter-grip-radius;
250
250
  background-color: $-splitter-grip-color;
251
251
  opacity: 0.9;
252
- transition: background-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
252
+ transition: background-color $-transition-duration-fast ease, opacity $-transition-duration-fast ease, transform $-transition-duration-fast ease;
253
253
 
254
254
  .oxy-splitter-panel__bar--horizontal & {
255
255
  top: 50%;
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  :deep(.oxy-step__icon-outer),:deep(.oxy-step__icon-inner){
33
- color: $-dark-color3;
33
+ color: $-dark-color3;
34
34
  border-color: $-dark-color-gray;
35
35
  }
36
36
  }
@@ -67,9 +67,9 @@
67
67
  @include when(dot) {
68
68
  width: $-steps-dot-size;
69
69
  height: $-steps-dot-size;
70
- border: 1px solid transparent;
70
+ border: #{$-border-width-base} solid transparent;
71
71
  margin-left: -1px;
72
- border-radius: 50%;
72
+ border-radius: $-radius-circle;
73
73
  background: transparent;
74
74
  }
75
75
  }
@@ -80,11 +80,11 @@
80
80
  @include e(icon-outer) {
81
81
  width: calc($-steps-icon-size - 4rpx);
82
82
  height: calc($-steps-icon-size - 4rpx);
83
- border: 1px solid $-steps-inactive-color;
83
+ border: #{$-border-width-base} solid $-steps-inactive-color;
84
84
  color: $-steps-inactive-color;
85
85
  text-align: center;
86
86
  line-height: calc($-steps-icon-size - 4rpx);
87
- border-radius: 50%;
87
+ border-radius: $-radius-circle;
88
88
  font-size: $-steps-icon-text-fs;
89
89
  }
90
90
  @include e(line) {
@@ -101,17 +101,17 @@
101
101
  display: block;
102
102
  width: 100%;
103
103
  height: 100%;
104
- border-radius: 50%;
104
+ border-radius: $-radius-circle;
105
105
  background: $-steps-line-color;
106
106
  }
107
107
  @include e(content){
108
- margin-top: 16rpx;
108
+ margin-top: $-spacing-16;
109
109
  color: $-steps-inactive-color;
110
110
  font-size: $-steps-label-fs;
111
111
  }
112
112
  @include e(title) {
113
113
  font-weight: $-steps-title-fw;
114
- line-height: 1.43;
114
+ line-height: $-line-height-loose;
115
115
 
116
116
  @include when(description) {
117
117
  font-size: $-steps-title-fs;
@@ -167,7 +167,7 @@
167
167
  height: $-steps-dot-size + 20rpx;
168
168
  left: -10rpx;
169
169
  top: -10rpx;
170
- border-radius: 50%;
170
+ border-radius: $-radius-circle;
171
171
  background: $-steps-finished-color;
172
172
  opacity: 0.2;
173
173
  }
@@ -10,7 +10,7 @@
10
10
  transform: translateY(-50%);
11
11
  width: $-swiper-nav-btn-size;
12
12
  height: $-swiper-nav-btn-size;
13
- border-radius: 50%;
13
+ border-radius: $-radius-circle;
14
14
  background: $-swiper-nav-btn-bg-color;
15
15
 
16
16
  &::after {
@@ -68,7 +68,7 @@
68
68
  width: $-swiper-nav-dot-size;
69
69
  height: $-swiper-nav-dot-size;
70
70
  background: $-swiper-nav-dot-color;
71
- border-radius: 50%;
71
+ border-radius: $-radius-circle;
72
72
  margin: 0 12rpx;
73
73
  transition: all 0.4s ease-in;
74
74
 
@@ -27,7 +27,7 @@
27
27
  top: 4rpx;
28
28
  left: 4rpx;
29
29
  background: $-switch-circle-bg;
30
- border-radius: 50%;
30
+ border-radius: $-radius-circle;
31
31
  transition: left .3s ease-out;
32
32
  box-shadow: 0 4rpx 8rpx 0 $-switch-inactive-shadow-color;
33
33
 
@@ -40,7 +40,7 @@
40
40
  left: 50%;
41
41
  transform: translate(-50%, -50%) scale(0.5);
42
42
  border: 2rpx solid $-switch-border-color;
43
- border-radius: 50%;
43
+ border-radius: $-radius-circle;
44
44
  }
45
45
  }
46
46
  @include when(checked) {
@@ -53,6 +53,6 @@
53
53
  }
54
54
  }
55
55
  @include when(disabled) {
56
- opacity: 0.5;
56
+ opacity: $-opacity-muted;
57
57
  }
58
58
  }
@@ -10,17 +10,23 @@
10
10
  @include e(body) {
11
11
  @include m(inactive) {
12
12
  height: 0;
13
- transition: height 0.3s ease-in-out;
13
+ transition: height $-transition-duration-slow ease-in-out;
14
14
  }
15
15
  }
16
16
  }
17
17
 
18
18
  .is-fullscreen {
19
19
  .oxy-tab {
20
- height: 100%;
20
+ height: auto;
21
21
  overflow: hidden;
22
22
  .oxy-tab__body {
23
23
  height: 100%;
24
24
  }
25
25
  }
26
+
27
+ .oxy-tabs__body.is-animated {
28
+ .oxy-tab {
29
+ height: 100%;
30
+ }
31
+ }
26
32
  }
@@ -22,8 +22,8 @@
22
22
  }
23
23
 
24
24
  @include m(round) {
25
- margin-left: 32rpx;
26
- margin-right: 32rpx;
25
+ margin-left: $-spacing-32;
26
+ margin-right: $-spacing-32;
27
27
  border-radius: $-tabbar-round-radius;
28
28
  box-shadow: $-tabbar-box-shadow;
29
29
 
@@ -57,6 +57,6 @@
57
57
  left: 0;
58
58
  bottom: 0;
59
59
  right: 0;
60
- z-index: 500;
60
+ z-index: $-z-index-fixed;
61
61
  }
62
62
  }
@@ -23,7 +23,7 @@ export default {
23
23
  <script lang="ts" setup>
24
24
  import { getCurrentInstance, onMounted, ref, watch, nextTick, computed, type CSSProperties } from 'vue'
25
25
  import type { TabbarItem } from '../oxy-tabbar-item/types'
26
- import { getRect, isDef, objToStyle } from '../common/util'
26
+ import { convertPxToRpx, getRect, isDef, objToStyle } from '../common/util'
27
27
  import { useChildren } from '../composables/useChildren'
28
28
  import { useWindowResize } from '../composables/useWindowResize'
29
29
  import { TABBAR_KEY, tabbarProps } from './types'
@@ -103,9 +103,9 @@ function setPlaceholderHeight() {
103
103
  .then((res) => {
104
104
  const rectHeight = Number(res.height) || 0
105
105
  const rectTop = Number(res.top)
106
- const { windowHeight = 0, windowWidth = 0 } = uni.getSystemInfoSync()
106
+ const { windowHeight = 0 } = uni.getSystemInfoSync()
107
107
  const occupiedHeight = windowHeight && !Number.isNaN(rectTop) ? Math.max(windowHeight - rectTop, 0) : rectHeight
108
- const occupiedHeightInRpx = windowWidth ? (occupiedHeight * 750) / windowWidth : occupiedHeight * 2
108
+ const occupiedHeightInRpx = convertPxToRpx(occupiedHeight)
109
109
 
110
110
  placeholderHeight.value = occupiedHeight ? occupiedHeightInRpx : ''
111
111
  })
@@ -110,7 +110,6 @@
110
110
  &::after {
111
111
  content: ' ';
112
112
  position: absolute;
113
- height: 100%;
114
113
  right: -30rpx;
115
114
  top: 0;
116
115
  width: 30rpx;
@@ -21,7 +21,7 @@
21
21
 
22
22
  @include m(fixed) {
23
23
  position: sticky;
24
- z-index: 1;
24
+ z-index: $-z-index-sticky;
25
25
  left: 0;
26
26
  }
27
27
 
@@ -33,7 +33,6 @@
33
33
  right: -30rpx;
34
34
  top: 0;
35
35
  width: 30rpx;
36
- height: 100%;
37
36
  background: $-table-fixed-shadow-light;
38
37
  }
39
38
  }