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
@@ -180,6 +180,31 @@ export function unitConvertWithDefault(value: number | string | null | undefined
180
180
  return unitConvert(withDefaultUnit(value, defaultUnit), base)
181
181
  }
182
182
 
183
+ /**
184
+ * 将 px 数值转换为 rpx 数值。
185
+ *
186
+ * 优先级:
187
+ * - 1) 优先使用 `uni.upx2px(100)` 反推,确保与平台运行时换算一致
188
+ * - 2) 回退到 `windowWidth` 按 `750` 基准换算
189
+ * - 3) 仍不可用时返回原值,避免使用固定倍数造成系统性偏差
190
+ *
191
+ * @param pxValue px 语义数值。
192
+ * @returns rpx 语义数值。
193
+ */
194
+ export function convertPxToRpx(pxValue: number) {
195
+ const pxPer100Rpx = uni.upx2px(100)
196
+ if (pxPer100Rpx > 0) {
197
+ return (pxValue / pxPer100Rpx) * 100
198
+ }
199
+
200
+ const { windowWidth = 0 } = uni.getSystemInfoSync()
201
+ if (windowWidth > 0) {
202
+ return (pxValue * 750) / windowWidth
203
+ }
204
+
205
+ return pxValue
206
+ }
207
+
183
208
  /**
184
209
  * 将长度值解析为样式字符串,仅对 `%` 做屏宽换算。
185
210
  *
@@ -0,0 +1,80 @@
1
+ import { ref, computed, type Ref } from 'vue'
2
+
3
+ export interface DynamicVirtualScrollItem {
4
+ top: number
5
+ height: number
6
+ [key: string]: any
7
+ }
8
+
9
+ export interface UseDynamicVirtualScrollOptions<T extends DynamicVirtualScrollItem> {
10
+ data: Ref<T[]>
11
+ scrollTop: Ref<number>
12
+ viewportHeight: Ref<number>
13
+ buffer?: number
14
+ }
15
+
16
+ export function useDynamicVirtualScroll<T extends DynamicVirtualScrollItem>(options: UseDynamicVirtualScrollOptions<T>) {
17
+ const { data, scrollTop, viewportHeight, buffer = 0 } = options
18
+
19
+ const visibleData = computed(() => {
20
+ const st = scrollTop.value
21
+ const sh = viewportHeight.value
22
+ const buf = buffer || sh // 默认上下多预留一屏高度
23
+
24
+ const minTop = st - buf
25
+ const maxTop = st + sh + buf
26
+
27
+ // 二分查找第一个进入可视区的元素
28
+ let left = 0
29
+ let right = data.value.length - 1
30
+ let startIndex = 0
31
+
32
+ while (left <= right) {
33
+ const mid = Math.floor((left + right) / 2)
34
+ const item = data.value[mid]
35
+ if (item.top + item.height > minTop) {
36
+ startIndex = mid
37
+ right = mid - 1
38
+ } else {
39
+ left = mid + 1
40
+ }
41
+ }
42
+
43
+ // 从 startIndex 往后取,直到超出可视区
44
+ const result = []
45
+ for (let i = startIndex; i < data.value.length; i++) {
46
+ const item = data.value[i]
47
+ if (item.top < maxTop) {
48
+ result.push({ ...item, index: i })
49
+ } else {
50
+ break
51
+ }
52
+ }
53
+
54
+ return result
55
+ })
56
+
57
+ const getTargetIndex = (st: number) => {
58
+ let left = 0
59
+ let right = data.value.length - 1
60
+ let targetIndex = 0
61
+
62
+ while (left <= right) {
63
+ const mid = Math.floor((left + right) / 2)
64
+ const item = data.value[mid]
65
+ if (st < item.top + item.height) {
66
+ targetIndex = mid
67
+ right = mid - 1
68
+ } else {
69
+ left = mid + 1
70
+ }
71
+ }
72
+
73
+ return targetIndex
74
+ }
75
+
76
+ return {
77
+ visibleData,
78
+ getTargetIndex
79
+ }
80
+ }
@@ -55,6 +55,9 @@ export function useVirtualScroll(options: UseVirtualScrollOptions): UseVirtualSc
55
55
  const totalHeight = computed(() => {
56
56
  return displayData.value.length * unitConvertWithDefault(itemHeight.value, { defaultUnit: 'rpx' })
57
57
  })
58
+ const backToTopThresholdInPx = computed(() => {
59
+ return unitConvertWithDefault(backToTopThreshold.value, { defaultUnit: 'rpx' })
60
+ })
58
61
 
59
62
  // 监听数据变化
60
63
  watch(
@@ -73,6 +76,7 @@ export function useVirtualScroll(options: UseVirtualScrollOptions): UseVirtualSc
73
76
  if (!virtual.value) {
74
77
  // 非虚拟滚动模式:直接使用全部数据
75
78
  virtualData.value = displayData.value
79
+ startIndex.value = 0
76
80
  virtualOffsetY.value = 0
77
81
  return
78
82
  }
@@ -101,52 +105,74 @@ export function useVirtualScroll(options: UseVirtualScrollOptions): UseVirtualSc
101
105
  if (!virtual.value) return // 非虚拟模式不处理
102
106
 
103
107
  if (virtualEngine.value) {
104
- const { visibleData, offsetY } = virtualEngine.value.updateVisibleData(_scrollTop.value || 0)
108
+ const { visibleData, offsetY, startIndex: engineStartIndex } = virtualEngine.value.updateVisibleData(_scrollTop.value || 0)
105
109
  virtualData.value = visibleData
110
+ startIndex.value = engineStartIndex
106
111
  virtualOffsetY.value = offsetY
107
112
  }
108
113
  }
109
114
 
115
+ function syncProgrammaticScrollState(scrollTopValue: number) {
116
+ _scrollTop.value = scrollTopValue
117
+ showBackTopBtn.value = scrollTopValue > backToTopThresholdInPx.value
118
+ updateVisibleData()
119
+ }
120
+
110
121
  // 滚动事件处理
111
122
  function onScroll(scrollTopValue: number) {
112
123
  _scrollTop.value = scrollTopValue
113
- showBackTopBtn.value = scrollTopValue > unitConvertWithDefault(backToTopThreshold.value, { defaultUnit: 'rpx' })
124
+ showBackTopBtn.value = scrollTopValue > backToTopThresholdInPx.value
114
125
  updateVisibleData()
115
126
  }
116
127
 
117
128
  // 滚动到顶部
118
129
  function scrollToTop() {
119
- scrollTop.value = 0
120
- nextTick(() => {
121
- scrollTop.value = 0
122
- })
130
+ scrollToPosition('0px')
123
131
  }
124
132
 
125
133
  // 滚动到底部
126
134
  function scrollToBottom() {
127
- scrollToPosition(totalHeight.value)
135
+ scrollToPosition(`${totalHeight.value}px`)
128
136
  }
129
137
 
130
138
  // 滚动到指定位置
131
139
  function scrollToPosition(position: number | string) {
132
- scrollTop.value = unitConvertWithDefault(position, { defaultUnit: 'rpx' })
140
+ const targetScrollTop = unitConvertWithDefault(position, { defaultUnit: 'rpx' })
141
+
142
+ // scroll-view 在绑定值重复时可能不触发滚动,先同步当前真实滚动值再设置目标值
143
+ if (scrollTop.value === targetScrollTop) {
144
+ scrollTop.value = _scrollTop.value
145
+ nextTick(() => {
146
+ scrollTop.value = targetScrollTop
147
+ syncProgrammaticScrollState(targetScrollTop)
148
+ })
149
+ return
150
+ }
151
+
152
+ scrollTop.value = targetScrollTop
153
+ syncProgrammaticScrollState(targetScrollTop)
133
154
  }
134
155
 
135
156
  // 滚动到指定元素
136
157
  function scrollToElement(item: any) {
137
- const index = data.value.findIndex((o) => item[idKey.value] && o[idKey.value] && o[idKey.value] === item[idKey.value])
138
- if (index > 0) {
158
+ const targetId = item?.[idKey.value]
159
+ if (targetId === undefined || targetId === null) return
160
+
161
+ const index = data.value.findIndex((o) => o?.[idKey.value] === targetId)
162
+ if (index >= 0) {
139
163
  const scrollDistance = unitConvertWithDefault(itemHeight.value, { defaultUnit: 'rpx' }) * index
140
- scrollToPosition(scrollDistance)
164
+ scrollToPosition(`${scrollDistance}px`)
141
165
  }
142
166
  }
143
167
 
144
168
  // 根据ID滚动到指定元素
145
169
  function scrollToElementById(id: string | number) {
146
- const index = data.value.findIndex((o) => id && o[idKey.value] && o[idKey.value] === id)
147
- if (index > 0) {
170
+ if (id === undefined || id === null) return
171
+
172
+ const index = data.value.findIndex((o) => o?.[idKey.value] === id)
173
+ if (index >= 0) {
148
174
  const scrollDistance = unitConvertWithDefault(itemHeight.value, { defaultUnit: 'rpx' }) * index
149
- scrollToPosition(scrollDistance)
175
+ scrollToPosition(`${scrollDistance}px`)
150
176
  }
151
177
  }
152
178
 
@@ -57,7 +57,7 @@
57
57
  }
58
58
 
59
59
  @include b(action-sheet) {
60
- background-color: $-color-white;
60
+ background-color: $-action-sheet-bg;
61
61
  padding-bottom: 2rpx;
62
62
  margin-bottom: var(--window-bottom);
63
63
 
@@ -72,7 +72,7 @@
72
72
  }
73
73
 
74
74
  @include e(actions) {
75
- padding: 16rpx 0;
75
+ padding: 20rpx 0;
76
76
  max-height: 50vh;
77
77
  overflow-y: auto;
78
78
  -webkit-overflow-scrolling: touch;
@@ -111,7 +111,7 @@
111
111
  line-height: initial;
112
112
  }
113
113
  }
114
-
114
+
115
115
  @include edeep(action-loading){
116
116
  width: $-action-sheet-loading-size;
117
117
  height: $-action-sheet-loading-size;
@@ -123,7 +123,7 @@
123
123
 
124
124
  @include e(subname) {
125
125
  display: inline-block;
126
- margin-left: 8rpx;
126
+ margin-left: 12rpx;
127
127
  font-size: $-action-sheet-subname-fs;
128
128
  color: $-action-sheet-subname-color;
129
129
  }
@@ -169,7 +169,7 @@
169
169
  color: $-action-sheet-close-color;
170
170
  font-size: $-action-sheet-close-fs;
171
171
  transform: rotate(-45deg);
172
- line-height: 1.1;
172
+ line-height: $-line-height-tight;
173
173
  }
174
174
 
175
175
  @include e(panels) {
@@ -181,7 +181,7 @@
181
181
  }
182
182
 
183
183
  &:last-of-type {
184
- margin-bottom: 24rpx;
184
+ margin-bottom: $-spacing-24;
185
185
  }
186
186
  }
187
187
 
@@ -203,13 +203,13 @@
203
203
  width: $-action-sheet-panel-img-fs;
204
204
  height: $-action-sheet-panel-img-fs;
205
205
  margin: 0 auto;
206
- margin-bottom: 14rpx;
206
+ margin-bottom: $-spacing-16;
207
207
  border-radius: $-action-sheet-panel-img-radius;
208
208
  }
209
209
 
210
210
  @include e(panel-title) {
211
211
  font-size: $-action-sheet-subname-fs;
212
- line-height: 1.2;
212
+ line-height: $-line-height-base;
213
213
  text-align: center;
214
214
  color: $-action-sheet-color;
215
215
  @include lineEllipsis;
@@ -16,10 +16,10 @@
16
16
  }
17
17
 
18
18
  @include when(circle) {
19
- border-radius: 50%;
19
+ border-radius: $-radius-circle;
20
20
  }
21
21
 
22
22
  @include when(square) {
23
- border-radius: 8rpx;
23
+ border-radius: $-backtop-square-radius;
24
24
  }
25
- }
25
+ }
@@ -28,7 +28,7 @@
28
28
  text-align: center;
29
29
  white-space: nowrap;
30
30
  border: $-badge-border;
31
- font-weight: 500;
31
+ font-weight: $-fw-medium;
32
32
 
33
33
  @include when(fixed) {
34
34
  position: absolute;
@@ -41,7 +41,7 @@
41
41
  height: $-badge-dot-size;
42
42
  width: $-badge-dot-size;
43
43
  padding: 0;
44
- border-radius: 50%;
44
+ border-radius: $-radius-circle;
45
45
  }
46
46
 
47
47
  @each $type in (primary, success, warning, info, danger) {
@@ -47,7 +47,6 @@
47
47
  display: inline-block;
48
48
  outline: none;
49
49
  -webkit-appearance: none;
50
- outline: none;
51
50
  background: transparent;
52
51
  box-sizing: border-box;
53
52
  border: none;
@@ -97,7 +96,7 @@
97
96
  }
98
97
 
99
98
  @include e(loading) {
100
- margin-right: 10rpx;
99
+ margin-right: 12rpx;
101
100
  animation: oxy-rotate 0.8s linear infinite;
102
101
  animation-duration: 2s;
103
102
  }
@@ -109,8 +108,6 @@
109
108
  background-repeat: no-repeat;
110
109
  }
111
110
 
112
- @include when(loading) {}
113
-
114
111
  @include when(primary) {
115
112
  background: $-button-primary-bg-color;
116
113
  color: $-button-primary-color;
@@ -161,7 +158,7 @@
161
158
 
162
159
  @include when(icon) {
163
160
  min-width: 0;
164
- border-radius: 50%;
161
+ border-radius: $-radius-circle;
165
162
  }
166
163
 
167
164
  @include when(text) {
@@ -194,7 +191,7 @@
194
191
 
195
192
 
196
193
  @include when(round) {
197
- border-radius: 1998rpx;
194
+ border-radius: $-button-round-radius;
198
195
  }
199
196
 
200
197
  @include when(text) {
@@ -223,7 +220,7 @@
223
220
 
224
221
  @include when(plain) {
225
222
  background: $-button-plain-bg-color;
226
- border: 1px solid currentColor;
223
+ border: #{$-border-width-base} solid currentColor;
227
224
 
228
225
  @include when(primary) {
229
226
  color: $-button-primary-bg-color;
@@ -295,7 +292,7 @@
295
292
  width: $-button-icon-size;
296
293
  height: $-button-icon-size;
297
294
  padding: 0;
298
- border-radius: 50%;
295
+ border-radius: $-radius-circle;
299
296
  color: $-button-icon-color;
300
297
 
301
298
  &::after {
@@ -62,7 +62,7 @@
62
62
 
63
63
  @include e(tabs) {
64
64
  width: 444rpx;
65
- margin: 20rpx auto 24rpx;
65
+ margin: 24rpx auto 28rpx;
66
66
  }
67
67
 
68
68
  @include e(shortcuts) {
@@ -71,7 +71,7 @@
71
71
  }
72
72
 
73
73
  @include edeep(tag) {
74
- margin-right: 16rpx;
74
+ margin-right: $-spacing-16;
75
75
  }
76
76
 
77
77
  @include e(view) {
@@ -88,30 +88,30 @@
88
88
  display: flex;
89
89
  justify-content: center;
90
90
  align-items: center;
91
- font-size: 28rpx;
91
+ font-size: $-fs-content;
92
92
 
93
93
  @include when(monthrange) {
94
- padding-bottom: 20rpx;
95
- box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
94
+ padding-bottom: $-spacing-24;
95
+ box-shadow: $-calendar-panel-shadow-light;
96
96
  }
97
97
  }
98
98
 
99
99
  @include e(range-label-item) {
100
100
  flex: 1;
101
- color: rgba(0, 0, 0, 0.85);
101
+ color: $-calendar-day-color;
102
102
 
103
103
  @include when(placeholder) {
104
- color: rgba(0, 0, 0, 0.25);
104
+ color: $-calendar-disabled-color;
105
105
  }
106
106
  }
107
107
 
108
108
  @include e(range-sperator) {
109
109
  margin: 0 48rpx;
110
- color: rgba(0, 0, 0, 0.25);
110
+ color: $-calendar-disabled-color;
111
111
  }
112
112
 
113
113
  @include e(confirm) {
114
- padding: 24rpx 50rpx 28rpx;
114
+ padding: 28rpx 52rpx 32rpx;
115
115
  }
116
116
 
117
117
  @include edeep(cell) {
@@ -155,4 +155,4 @@
155
155
  color: $-cell-clear-color;
156
156
  line-height: $-cell-line-height;
157
157
  }
158
- }
158
+ }
@@ -238,7 +238,7 @@ const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm', 'o
238
238
  const pickerShow = ref<boolean>(false)
239
239
  const calendarValue = ref<null | number | number[]>(null)
240
240
  const lastCalendarValue = ref<null | number | number[]>(null)
241
- const panelHeight = ref<number>(338)
241
+ const panelHeight = ref<number>(676)
242
242
  const confirmBtnDisabled = ref<boolean>(true)
243
243
  const currentTab = ref<number>(0)
244
244
  const lastTab = ref<number>(0)
@@ -294,7 +294,7 @@ watch(
294
294
  const index = newValue.indexOf('range') > -1 ? rangeTabs.indexOf(newValue) || 0 : tabs.indexOf(newValue)
295
295
  currentTab.value = index
296
296
  }
297
- panelHeight.value = props.showConfirm ? 338 : 400
297
+ panelHeight.value = props.showConfirm ? 676 : 800
298
298
  currentType.value = deepClone(newValue)
299
299
  },
300
300
  {
@@ -306,7 +306,7 @@ watch(
306
306
  watch(
307
307
  () => props.showConfirm,
308
308
  (val) => {
309
- panelHeight.value = val ? 338 : 400
309
+ panelHeight.value = val ? 676 : 800
310
310
  },
311
311
  {
312
312
  deep: true,
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  @include e(weeks) {
11
- box-shadow: 0 8rpx 16rpx 0 rgba(255, 255, 255, 0.02);
11
+ box-shadow: $-calendar-panel-shadow-dark;
12
12
  color: $-dark-color;
13
13
  }
14
14
 
@@ -25,18 +25,17 @@
25
25
  font-size: $-calendar-fs;
26
26
 
27
27
  @include e(title) {
28
- padding: 10rpx 0;
28
+ padding: 16rpx 24rpx;
29
29
  text-align: center;
30
30
  font-size: $-calendar-panel-title-fs;
31
31
  color: $-calendar-panel-title-color;
32
- padding: $-calendar-panel-padding;
33
32
  }
34
33
 
35
34
  @include e(weeks) {
36
35
  display: flex;
37
36
  height: $-calendar-week-height;
38
37
  line-height: $-calendar-week-height;
39
- box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
38
+ box-shadow: $-calendar-panel-shadow-light;
40
39
  color: $-calendar-week-color;
41
40
  font-size: $-calendar-week-fs;
42
41
  padding: $-calendar-panel-padding;
@@ -54,7 +53,7 @@
54
53
 
55
54
  @include e(time) {
56
55
  display: flex;
57
- box-shadow: 0 -8rpx 16rpx 0 rgba(0, 0, 0, 0.02);
56
+ box-shadow: $-calendar-panel-shadow-reverse-light;
58
57
  }
59
58
 
60
59
  @include e(time-label) {