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
@@ -1,30 +1,53 @@
1
1
  @import '../common/abstracts/variable';
2
2
  @import '../common/abstracts/mixin';
3
3
 
4
- @mixin tag-type-style ($normalColor, $normalBg) {
4
+ .oxy-theme-dark {
5
+ @include b(tag) {
6
+ @include when(default) {
7
+ background: $-dark-background4;
8
+ color: $-dark-color3;
9
+
10
+ @include when(plain) {
11
+ background: transparent;
12
+ border-color: $-dark-background7;
13
+ }
14
+
15
+ @include when(round) {
16
+ color: $-dark-color3;
17
+ border-color: $-dark-background7;
18
+ }
19
+ }
20
+
21
+ @include when(dynamic-input) {
22
+ border-color: $-dark-background7;
23
+ }
24
+ }
25
+ }
26
+
27
+ @mixin tag-type-style($normalColor, $normalBg) {
5
28
  background: $normalBg;
6
29
 
7
30
  @include when(plain) {
8
31
  background: transparent;
9
32
  color: $normalColor;
10
- border: 1px solid $normalColor;
11
- padding: 0 8rpx;
33
+ border-color: $normalColor;
34
+ padding: 12rpx 20rpx;
12
35
  }
36
+
13
37
  @include when(round) {
14
- line-height: 1.2;
15
- font-size: $-tag-fs;
16
- padding: 8rpx 22rpx;
38
+ padding: 12rpx 24rpx;
17
39
  background: transparent;
18
40
  color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-color);
19
- border: 1px solid if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color);
41
+ border-color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color);
20
42
  border-radius: $-tag-round-radius;
21
43
  }
44
+
22
45
  @include when(mark) {
23
- padding: 2rpx 12rpx;
46
+ padding: 12rpx 20rpx;
24
47
  border-radius: $-tag-mark-radius;
25
48
 
26
49
  @include when(plain) {
27
- padding: 0 12rpx;
50
+ padding: 8rpx 20rpx;
28
51
  }
29
52
  }
30
53
  @include when(active) {
@@ -32,15 +55,24 @@
32
55
  border-color: $-tag-primary-color;
33
56
  }
34
57
  }
58
+
35
59
  @include b(tag) {
36
- font-size: $-tag-small-fs;
37
- display: inline-block;
60
+ position: relative;
61
+ font-size: $-tag-fs;
62
+ display: inline-flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ max-width: 100%;
66
+ box-sizing: border-box;
38
67
  color: $-tag-color;
39
- padding: 0 6rpx;
40
- border-radius: 4rpx;
41
- transition: opacity .3s;
68
+ padding: 12rpx 20rpx;
69
+ min-height: 64rpx;
70
+ border: #{$-border-width-base} solid transparent;
71
+ border-radius: $-tag-radius;
72
+ transition: opacity $-transition-duration-base, color $-transition-duration-base, border-color $-transition-duration-base, background-color $-transition-duration-base;
42
73
  vertical-align: middle;
43
- line-height: initial;
74
+ line-height: 1.4;
75
+ white-space: nowrap;
44
76
 
45
77
  @include when(default) {
46
78
  @include tag-type-style($-tag-info-color, $-tag-info-bg);
@@ -58,58 +90,101 @@
58
90
  @include tag-type-style($-tag-success-color, $-tag-success-bg);
59
91
  }
60
92
  @include when(icon) {
61
- font-size: $-tag-fs;
62
- line-height: 1.2;
63
- padding: 4rpx 10rpx;
93
+ padding: 12rpx 20rpx;
64
94
  }
95
+
65
96
  @include when(dynamic) {
66
97
  box-sizing: border-box;
67
- width: 176rpx;
68
- transition: .3s;
98
+ width: auto;
99
+ min-width: 176rpx;
100
+ justify-content: center;
101
+ transition: color .3s, border-color .3s, background-color .3s;
102
+
103
+ .oxy-tag__text {
104
+ display: inline-flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ line-height: inherit;
108
+
109
+ :deep(text) {
110
+ display: inline-block;
111
+ line-height: inherit;
112
+ }
113
+ }
69
114
 
70
115
  &:active {
71
116
  color: $-tag-primary-color;
72
117
  border-color: $-tag-primary-color;
73
118
  }
74
119
  }
120
+
75
121
  @include when(dynamic-input) {
76
122
  border-color: $-tag-primary-color;
123
+ justify-content: flex-start;
77
124
  }
125
+
78
126
  @include edeep(icon) {
79
- display: inline-block;
80
- margin-right: 8rpx;
127
+ display: inline-flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ margin-right: 12rpx;
81
131
  font-size: $-tag-fs;
82
- line-height: 1.2;
83
- vertical-align: baseline;
132
+ line-height: 1;
133
+ vertical-align: middle;
84
134
  }
135
+
85
136
  @include e(text) {
86
137
  display: inline-block;
87
- vertical-align: text-top;
138
+ max-width: 100%;
139
+ overflow: hidden;
140
+ text-overflow: ellipsis;
141
+ white-space: nowrap;
142
+ vertical-align: middle;
88
143
  }
144
+
89
145
  @include e(add-text) {
90
- width: 120rpx;
91
- height: 28rpx;
92
- min-height: 28rpx;
146
+ width: 100%;
147
+ min-width: 0;
148
+ height: 56rpx;
149
+ min-height: 56rpx;
93
150
  display: inline-block;
94
151
  font-size: $-tag-fs;
152
+ line-height: 56rpx;
95
153
  vertical-align: middle;
154
+ color: inherit;
96
155
  padding: 0;
156
+ border: none;
157
+ background: transparent;
158
+ text-align: left;
159
+
160
+ &::placeholder {
161
+ color: $-font-gray-3;
162
+ }
97
163
  }
164
+
98
165
  @include e(close) {
99
- display: inline-block;
100
- margin-left: 48rpx;
101
- margin-right: -8rpx;
166
+ display: inline-flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ margin-left: $-spacing-16;
170
+ margin-right: 0;
102
171
  font-size: $-tag-close-size;
103
- height: 28rpx;
104
- line-height: 1.1;
105
- vertical-align: text-bottom;
172
+ width: $-tag-close-size;
173
+ height: $-tag-close-size;
174
+ line-height: 1;
175
+ vertical-align: middle;
106
176
  color: $-tag-close-color;
177
+ opacity: 0.7;
178
+ transition: opacity $-transition-duration-base, color $-transition-duration-base;
107
179
 
108
180
  &:active {
181
+ opacity: 1;
109
182
  color: $-tag-close-active-color;
110
183
  }
111
184
  }
185
+
112
186
  @include edeep(add) {
113
- vertical-align: bottom;
187
+ vertical-align: middle;
188
+ line-height: 1;
114
189
  }
115
- }
190
+ }
@@ -6,7 +6,7 @@
6
6
  @include b(text) {
7
7
 
8
8
  @include when(bold) {
9
- font-weight: bold;
9
+ font-weight: $-fw-bold;
10
10
  }
11
11
 
12
12
  @for $i from 1 through 5 {
@@ -84,7 +84,7 @@
84
84
  height: 1px;
85
85
  background: $-textarea-border-color;
86
86
  transform: scaleY(0.5);
87
- transition: background-color 0.2s ease-in-out;
87
+ transition: background-color $-transition-duration-base ease-in-out;
88
88
  }
89
89
 
90
90
 
@@ -164,7 +164,7 @@
164
164
  border: none;
165
165
  box-sizing: border-box;
166
166
  word-break: break-word;
167
- min-height: 48rpx;
167
+ min-height: 56rpx;
168
168
 
169
169
  &::-webkit-input-placeholder {
170
170
  color: $-input-placeholder-color;
@@ -203,7 +203,7 @@
203
203
  font-size: $-textarea-count-fs;
204
204
  color: $-textarea-count-color;
205
205
  background: $-textarea-bg;
206
- line-height: 40rpx;
206
+ line-height: $-lh-base;
207
207
  display: inline-flex;
208
208
  }
209
209
 
@@ -257,10 +257,6 @@
257
257
  }
258
258
 
259
259
  @include when(auto-height) {
260
- &:not(.is-cell) {
261
- padding: 10rpx 0;
262
- }
263
-
264
260
  &::after {
265
261
  display: block;
266
262
  }
@@ -8,7 +8,7 @@
8
8
  background-color: $-toast-bg;
9
9
  border-radius: $-toast-radius;
10
10
  color: $-toast-color;
11
- transition: all 0.2s;
11
+ transition: all $-transition-duration-base;
12
12
  font-size: $-toast-fs;
13
13
  box-sizing: border-box;
14
14
  box-shadow: $-toast-box-shadow;
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  @include edeep(close-icon) {
57
- font-size: 24rpx;
57
+ font-size: calc(2 * #{$-tooltip-close-size});
58
58
  position: absolute;
59
59
  right: -16rpx;
60
60
  top: -20rpx;
@@ -2,49 +2,53 @@
2
2
  @import '../common/abstracts/mixin';
3
3
  @import '../oxy-virtual-scroll/index.scss';
4
4
 
5
- .oxy-tree {
5
+ @include b(tree) {
6
6
  position: relative;
7
- &__virtual-scroll {
7
+
8
+ @include e(virtual-scroll) {
8
9
  position: relative;
9
10
  overflow: hidden;
10
11
  }
11
12
 
12
- &__view {
13
+ @include e(view) {
13
14
  height: 100%;
14
15
  }
15
16
 
16
- &__container {
17
+ @include e(container) {
17
18
  position: relative;
18
19
  }
19
20
 
20
- &__items {
21
+ @include e(items) {
21
22
  position: absolute;
22
23
  top: 0;
23
24
  left: 0;
24
25
  right: 0;
25
26
  }
26
- .oxy-tree__search{
27
+
28
+ @include e(search) {
27
29
  display: flex;
28
- :deep(.oxy-button){
30
+
31
+ :deep(.oxy-button) {
29
32
  min-width: 120rpx;
30
33
  }
34
+
31
35
  :deep(.oxy-tree__search-input) {
32
36
  flex: 1;
33
37
  background-color: $-tree-search-input-color;
34
- padding: 12rpx 24rpx;
35
- border-radius: 8rpx;
36
- margin-bottom: 16rpx;
37
- margin-right: 24rpx;
38
- .oxy-input__icon{
38
+ padding: 16rpx 24rpx;
39
+ border-radius: $-tree-search-input-radius;
40
+ margin-bottom: 20rpx;
41
+ margin-right: $-spacing-24;
42
+
43
+ .oxy-input__icon {
39
44
  background: transparent;
40
45
  }
41
46
  }
42
47
  }
43
-
44
-
45
48
  }
46
49
 
47
50
  .oxy-tree-node-content {
51
+ position: relative;
48
52
  display: flex;
49
53
  width: 100%;
50
54
  align-items: center;
@@ -83,7 +87,7 @@
83
87
 
84
88
  &.is-disabled {
85
89
  color: $-tree-node-disabled-color;
86
- opacity: $-button-disabled-opacity;
90
+ opacity: $-tree-disabled-opacity;
87
91
 
88
92
  :deep(.oxy-tree-node-icon) {
89
93
  color: $-tree-node-disabled-color;
@@ -132,4 +136,20 @@
132
136
  min-width: 0;
133
137
  @include lineEllipsis;
134
138
  }
139
+
140
+ .oxy-tree-line-vertical {
141
+ position: absolute;
142
+ width: 1px;
143
+ border-left: 1px dashed $-tree-node-icon-color;
144
+ pointer-events: none;
145
+ z-index: 0;
146
+ }
147
+ .oxy-tree-line-horizontal {
148
+ position: absolute;
149
+ top: 50%;
150
+ height: 1px;
151
+ border-top: 1px dashed $-tree-node-icon-color;
152
+ pointer-events: none;
153
+ z-index: 0;
154
+ }
135
155
  }
@@ -21,6 +21,22 @@
21
21
  <view class="oxy-tree__items" :style="{ transform: `translateY(${unitConvert(virtualOffsetY, 0, { output: 'px' })})` }">
22
22
  <view v-for="(item, index) in virtualData" :key="index">
23
23
  <view class="oxy-tree-node-content" :style="getNodeStyle(item)" :class="getNodeClass(item)" @click="handleNodeClick(item)">
24
+ <!-- 结构线 -->
25
+ <block v-if="showLine">
26
+ <view
27
+ v-for="l in item.level - 1"
28
+ :key="'line-' + l"
29
+ class="oxy-tree-line-vertical"
30
+ :style="getAncestorLineStyle(item, l)"
31
+ v-show="shouldShowAncestorLine(item, l)"
32
+ ></view>
33
+ <view v-if="hasHorizontalLine(item)" class="oxy-tree-line-horizontal" :style="getHorizontalLineStyle(item)"></view>
34
+
35
+ <view v-if="shouldShowRootVerticalLine(item)" class="oxy-tree-line-vertical" :style="getRootVerticalLineStyle(item)"></view>
36
+
37
+ <view v-if="shouldShowOwnChildrenLine(item)" class="oxy-tree-line-vertical" :style="getOwnChildrenLineStyle(item)"></view>
38
+ </block>
39
+
24
40
  <!-- 兼容支付宝、微信小程序 -->
25
41
  <view class="oxy-tree-node-toggle" @tap.stop="handleClickExpand(item)">
26
42
  <oxy-icon
@@ -69,8 +85,8 @@ export default {
69
85
  </script>
70
86
 
71
87
  <script lang="ts" setup>
72
- import { computed, nextTick, provide, type Ref, ref, toRefs, watch } from 'vue'
73
- import type { RawTreeNode, Tree, TreeInstance, TreeNode } from './types'
88
+ import { computed, nextTick, type CSSProperties, type Ref, ref, toRefs, watch } from 'vue'
89
+ import type { RawTreeNode, Tree, TreeNode } from './types'
74
90
  import { treeProps, type TreeExpose } from './types'
75
91
  import { isSetsEqual, useTreeMethods } from './utils'
76
92
  import { useVirtualScroll } from '../composables/useVirtualScroll'
@@ -85,6 +101,7 @@ const {
85
101
  expandAll,
86
102
  showCheckbox,
87
103
  checkStrictly,
104
+ showLine,
88
105
  selectionLeafOnly,
89
106
  height,
90
107
  itemHeight,
@@ -469,6 +486,100 @@ const handleFilter = () => {
469
486
  filter(searchValue.value)
470
487
  }
471
488
 
489
+ const isAncestorLast = (node: TreeNode, level: number) => {
490
+ let current: TreeNode | undefined = node
491
+ let steps = node.level - level
492
+ while (steps > 0 && current) {
493
+ current = current.parent
494
+ steps--
495
+ }
496
+ return current ? current.isLast : false
497
+ }
498
+
499
+ const TREE_LINE_ICON_BOX_SIZE = '56rpx'
500
+ const TREE_LINE_ICON_SIZE = '32rpx'
501
+ const TREE_LINE_GAP_OFFSET = '2px'
502
+ const ZERO_LENGTH = '0px'
503
+ const HALF_HEIGHT = '50%'
504
+
505
+ const toRpxLength = (value: number) => {
506
+ return value === 0 ? ZERO_LENGTH : `${value}rpx`
507
+ }
508
+
509
+ const getLineLeft = (l: number) => {
510
+ const indent = Number(props.indent || 32)
511
+ return `calc(${toRpxLength(indent * (l - 1))} + var(--oxy-tree-node-icon-box-size, ${TREE_LINE_ICON_BOX_SIZE}) / 2)`
512
+ }
513
+
514
+ const getLineGap = () => {
515
+ return `var(--oxy-tree-node-icon-size, ${TREE_LINE_ICON_SIZE}) / 2 + ${TREE_LINE_GAP_OFFSET}`
516
+ }
517
+
518
+ const getLineWidth = (isLeaf: boolean) => {
519
+ const indent = Number(props.indent || 32)
520
+ const indentStr = toRpxLength(indent)
521
+ if (isLeaf) {
522
+ return `calc(${indentStr} + var(--oxy-tree-node-icon-box-size, ${TREE_LINE_ICON_BOX_SIZE}) / 2)`
523
+ }
524
+ return `calc(${indentStr} - var(--oxy-tree-node-icon-size, ${TREE_LINE_ICON_SIZE}) / 2 - ${TREE_LINE_GAP_OFFSET})`
525
+ }
526
+
527
+ const hasHorizontalLine = (node: TreeNode) => {
528
+ return node.level > 1
529
+ }
530
+
531
+ const shouldShowAncestorLine = (node: TreeNode, level: number) => {
532
+ if (level === node.level - 1) {
533
+ return true
534
+ }
535
+ if (level === 1 && !isAncestorLast(node, 1)) {
536
+ return true
537
+ }
538
+ return !isAncestorLast(node, level + 1)
539
+ }
540
+
541
+ const getAncestorLineStyle = (node: TreeNode, level: number): CSSProperties => {
542
+ const shouldExtendToBottom = level === 1 && !isAncestorLast(node, 1)
543
+ const isLastBranch = level === node.level - 1 && node.isLast
544
+
545
+ return {
546
+ left: getLineLeft(level),
547
+ top: 0,
548
+ bottom: shouldExtendToBottom ? 0 : isLastBranch ? HALF_HEIGHT : 0
549
+ }
550
+ }
551
+
552
+ const getHorizontalLineStyle = (node: TreeNode): CSSProperties => {
553
+ return {
554
+ left: getLineLeft(node.level - 1),
555
+ width: getLineWidth(node.isLeaf)
556
+ }
557
+ }
558
+
559
+ const shouldShowRootVerticalLine = (node: TreeNode) => {
560
+ return node.level === 1 && node.index > 0
561
+ }
562
+
563
+ const getRootVerticalLineStyle = (node: TreeNode): CSSProperties => {
564
+ return {
565
+ left: getLineLeft(1),
566
+ top: 0,
567
+ bottom: node.isLeaf ? (node.isLast ? HALF_HEIGHT : 0) : `calc(${HALF_HEIGHT} + ${getLineGap()})`
568
+ }
569
+ }
570
+
571
+ const shouldShowOwnChildrenLine = (node: TreeNode) => {
572
+ return !node.isLeaf && (expandedKeySet.value.has(node.key) || (node.level === 1 && !node.isLast))
573
+ }
574
+
575
+ const getOwnChildrenLineStyle = (node: TreeNode): CSSProperties => {
576
+ return {
577
+ left: getLineLeft(node.level),
578
+ top: `calc(${HALF_HEIGHT} + ${getLineGap()})`,
579
+ bottom: 0
580
+ }
581
+ }
582
+
472
583
  defineExpose<TreeExpose>({
473
584
  toggleExpand,
474
585
  toggleChecked,
@@ -43,6 +43,7 @@ export const treeProps = {
43
43
  defaultExpandedKeys: makeArrayProp<string>(),
44
44
  expandAll: makeBooleanProp(false),
45
45
  checkStrictly: makeBooleanProp(false),
46
+ showLine: makeBooleanProp(false),
46
47
  modelValue: {
47
48
  type: [Array<string>, String],
48
49
  default: ''
@@ -39,7 +39,7 @@
39
39
  font-size: $-upload-evoke-icon-size;
40
40
  background-color: $-upload-evoke-bg;
41
41
  color: $-upload-evoke-color;
42
- margin-bottom: 24rpx;
42
+ margin-bottom: 28rpx;
43
43
 
44
44
  @include when(disabled) {
45
45
  color: $-upload-evoke-disabled-color;
@@ -47,13 +47,13 @@
47
47
  }
48
48
 
49
49
  @include e(evoke-file) {
50
- border-radius: 16rpx;
50
+ border-radius: $-upload-file-radius;
51
51
  }
52
52
 
53
53
  @include e(evoke-num) {
54
- font-size: 28rpx;
55
- line-height: 28rpx;
56
- margin-top: 16rpx;
54
+ font-size: $-fs-content;
55
+ line-height: $-fs-content;
56
+ margin-top: 20rpx;
57
57
  }
58
58
 
59
59
  @include edeep(evoke-icon) {
@@ -75,7 +75,7 @@
75
75
  position: relative;
76
76
  width: $-upload-size;
77
77
  height: $-upload-size;
78
- margin: 0 24rpx 24rpx 0;
78
+ margin: 0 24rpx 28rpx 0;
79
79
  }
80
80
 
81
81
  @include e(preview-list) {
@@ -106,9 +106,9 @@
106
106
  font-size: $-upload-file-fs;
107
107
  color: $-upload-file-color;
108
108
  box-sizing: border-box;
109
- padding: 0 8rpx;
109
+ padding: 0 12rpx;
110
110
  text-align: center;
111
- margin-top: 16rpx;
111
+ margin-top: 20rpx;
112
112
  @include lineEllipsis()
113
113
  }
114
114
 
@@ -117,12 +117,12 @@
117
117
  top: 50%;
118
118
  left: 50%;
119
119
  transform: translate(-50%, -50%);
120
- font-size: 48rpx;
120
+ font-size: $-upload-preview-icon-size;
121
121
  color: $-color-white;
122
122
 
123
123
  &::before {
124
- background-color: rgba(0, 0, 0, 0.5);
125
- border-radius: 50%;
124
+ background-color: $-upload-video-play-bg;
125
+ border-radius: $-radius-circle;
126
126
  }
127
127
  }
128
128
 
@@ -142,7 +142,7 @@
142
142
  content: "";
143
143
  width: 100%;
144
144
  height: 100%;
145
- border-radius: 50%;
145
+ border-radius: $-radius-circle;
146
146
  background-color: $-color-white;
147
147
  left: 0;
148
148
  z-index: -1;
@@ -159,7 +159,7 @@
159
159
  @include e(progress-txt) {
160
160
  font-size: $-upload-progress-fs;
161
161
  line-height: $-upload-progress-fs;
162
- margin-top: 18rpx;
162
+ margin-top: 20rpx;
163
163
  color: $-color-white;
164
164
  }
165
165
 
@@ -182,9 +182,9 @@
182
182
  .oxy-upload__status-content:not(.oxy-upload__mask) {
183
183
  border: 1px solid $-color-border;
184
184
  box-sizing: border-box;
185
- border-radius: 16rpx;
185
+ border-radius: $-upload-file-radius;
186
186
  .oxy-upload__picture {
187
- border-radius: 16rpx;
187
+ border-radius: $-upload-file-radius;
188
188
  }
189
189
  .oxy-upload__picture-icon {
190
190
  width: 64rpx;
@@ -192,7 +192,7 @@
192
192
  }
193
193
  }
194
194
  .oxy-upload__mask {
195
- border-radius: 16rpx;
195
+ border-radius: $-upload-file-radius;
196
196
  }
197
197
  :deep(.oxy-tooltip) {
198
198
  width: 100%;
@@ -205,12 +205,12 @@
205
205
  .oxy-upload____status-content-name {
206
206
  display: block;
207
207
  width: 100%;
208
- font-size: $-upload-file-fs;
208
+ font-size: $-upload-preview-name-fs;
209
209
  color: $-upload-file-color;
210
210
  box-sizing: border-box;
211
- padding: 0 8rpx;
211
+ padding: 0 12rpx;
212
212
  text-align: center;
213
- margin-top: 16rpx;
213
+ margin-top: 20rpx;
214
214
  white-space: nowrap;
215
215
  overflow: hidden;
216
216
  text-overflow: ellipsis;
@@ -219,7 +219,7 @@
219
219
 
220
220
  &.oxy-upload__position-right {
221
221
  .oxy-upload__evoke {
222
- margin-right: 24rpx;
222
+ margin-right: $-spacing-24;
223
223
  }
224
224
  }
225
225
  }
@@ -5,7 +5,7 @@
5
5
  position: fixed;
6
6
  top: 0;
7
7
  left: 0;
8
- z-index: 999;
8
+ z-index: $-z-index-overlay;
9
9
  width: 100%;
10
10
  height: 100%;
11
11
  display: flex;
@@ -17,7 +17,7 @@
17
17
  @include e(video) {
18
18
  width: 100%;
19
19
  height: 484rpx;
20
- transition: all 0.3s ease;
20
+ transition: all $-transition-duration-slow ease;
21
21
  }
22
22
 
23
23
  @include edeep(close) {
@@ -31,4 +31,4 @@
31
31
  font-size: $-video-preview-close-font-size;
32
32
  color: $-video-preview-close-color;
33
33
  }
34
- }
34
+ }
@@ -24,8 +24,8 @@
24
24
  bottom: 40rpx;
25
25
  width: 80rpx;
26
26
  height: 80rpx;
27
- background: rgba(0, 0, 0, 0.6);
28
- border-radius: 50%;
27
+ background: $-virtual-scroll-back-top-bg;
28
+ border-radius: $-radius-circle;
29
29
  display: flex;
30
30
  align-items: center;
31
31
  justify-content: center;