hy-app 0.1.5 → 0.2.0

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 (166) hide show
  1. package/components/hy-address-picker/hy-address-picker.vue +11 -0
  2. package/components/hy-address-picker/index.scss +1 -1
  3. package/components/hy-avatar/hy-avatar.vue +11 -0
  4. package/components/hy-avatar/index.scss +8 -8
  5. package/components/hy-back-top/hy-back-top.vue +13 -2
  6. package/components/hy-back-top/index.scss +11 -1
  7. package/components/hy-badge/hy-badge.vue +11 -0
  8. package/components/hy-badge/index.scss +18 -40
  9. package/components/hy-button/hy-button.vue +15 -5
  10. package/components/hy-button/index.scss +25 -45
  11. package/components/hy-calendar/header.vue +12 -12
  12. package/components/hy-calendar/hy-calendar.vue +11 -2
  13. package/components/hy-calendar/index.scss +140 -131
  14. package/components/hy-calendar/month.vue +18 -18
  15. package/components/hy-card/hy-card.vue +11 -0
  16. package/components/hy-card/index.scss +12 -12
  17. package/components/hy-card/props.ts +2 -2
  18. package/components/hy-cell/hy-cell.vue +22 -13
  19. package/components/hy-cell/index.scss +55 -28
  20. package/components/hy-cell/props.ts +2 -3
  21. package/components/hy-cell/typing.d.ts +3 -10
  22. package/components/hy-check-button/hy-check-button.vue +13 -2
  23. package/components/hy-check-button/index.scss +0 -5
  24. package/components/hy-checkbox/hy-checkbox.vue +31 -8
  25. package/components/hy-checkbox/index.scss +15 -5
  26. package/components/hy-checkbox/props.ts +1 -2
  27. package/components/hy-checkbox/typing.d.ts +1 -1
  28. package/components/hy-config-provider/hy-config-provider.vue +52 -0
  29. package/components/hy-config-provider/index.scss +21 -0
  30. package/components/hy-config-provider/props.ts +13 -0
  31. package/components/hy-config-provider/typing.d.ts +28 -0
  32. package/components/hy-count-down/hy-count-down.vue +11 -0
  33. package/components/hy-count-down/index.scss +13 -1
  34. package/components/hy-count-to/hy-count-to.vue +12 -1
  35. package/components/hy-count-to/index.scss +14 -1
  36. package/components/hy-count-to/props.ts +1 -1
  37. package/components/hy-datetime-picker/hy-datetime-picker.vue +11 -0
  38. package/components/hy-datetime-picker/index.scss +1 -1
  39. package/components/hy-divider/hy-divider.vue +11 -0
  40. package/components/hy-divider/index.scss +1 -1
  41. package/components/hy-dropdown/hy-dropdown.vue +13 -1
  42. package/components/hy-dropdown/index.scss +4 -1
  43. package/components/hy-dropdown/props.ts +2 -2
  44. package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
  45. package/components/hy-dropdown-item/index.scss +35 -2
  46. package/components/hy-empty/hy-empty.vue +22 -10
  47. package/components/hy-empty/index.scss +17 -3
  48. package/components/hy-empty/props.ts +1 -5
  49. package/components/hy-empty/typing.d.ts +3 -18
  50. package/components/hy-float-button/hy-float-button.vue +11 -0
  51. package/components/hy-float-button/index.scss +13 -2
  52. package/components/hy-float-button/props.ts +3 -3
  53. package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
  54. package/components/hy-folding-panel/index.scss +4 -1
  55. package/components/hy-form/hy-form.vue +25 -9
  56. package/components/hy-form/index.scss +12 -2
  57. package/components/hy-grid/hy-grid.vue +11 -0
  58. package/components/hy-grid/index.scss +1 -1
  59. package/components/hy-icon/hy-icon.vue +12 -1
  60. package/components/hy-icon/index.scss +16 -7
  61. package/components/hy-icon/props.ts +2 -2
  62. package/components/hy-image/hy-image.vue +11 -0
  63. package/components/hy-image/index.scss +4 -3
  64. package/components/hy-input/hy-input.vue +31 -3
  65. package/components/hy-input/index.scss +12 -2
  66. package/components/hy-input/props.ts +1 -1
  67. package/components/hy-input/typing.d.ts +8 -0
  68. package/components/hy-line/hy-line.vue +11 -0
  69. package/components/hy-line/index.scss +4 -1
  70. package/components/hy-line-progress/hy-line-progress.vue +17 -2
  71. package/components/hy-line-progress/index.scss +20 -8
  72. package/components/hy-line-progress/props.ts +4 -4
  73. package/components/hy-line-progress/typing.d.ts +4 -0
  74. package/components/hy-list/hy-list.vue +23 -8
  75. package/components/hy-list/index.scss +1 -4
  76. package/components/hy-loading/hy-loading.vue +11 -0
  77. package/components/hy-loading/index.scss +2 -2
  78. package/components/hy-login/TheUserLogin.vue +63 -106
  79. package/components/hy-login/hy-login.vue +269 -266
  80. package/components/hy-login/props.ts +1 -1
  81. package/components/hy-login/typing.d.ts +5 -0
  82. package/components/hy-modal/hy-modal.vue +15 -7
  83. package/components/hy-modal/index.scss +19 -3
  84. package/components/hy-navbar/hy-navbar.vue +11 -0
  85. package/components/hy-navbar/index.scss +14 -3
  86. package/components/hy-navbar/props.ts +1 -1
  87. package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
  88. package/components/hy-notice-bar/index.scss +35 -35
  89. package/components/hy-number-step/hy-number-step.vue +15 -8
  90. package/components/hy-number-step/index.scss +34 -25
  91. package/components/hy-number-step/props.ts +4 -4
  92. package/components/hy-overlay/index.scss +3 -1
  93. package/components/hy-picker/hy-picker.vue +12 -0
  94. package/components/hy-picker/index.scss +7 -3
  95. package/components/hy-picker/props.ts +1 -1
  96. package/components/hy-popup/hy-popup.vue +11 -0
  97. package/components/hy-popup/index.scss +10 -1
  98. package/components/hy-price/hy-price.vue +11 -0
  99. package/components/hy-price/index.scss +4 -1
  100. package/components/hy-qrcode/hy-qrcode.vue +11 -0
  101. package/components/hy-qrcode/index.scss +4 -1
  102. package/components/hy-radio/hy-radio.vue +19 -3
  103. package/components/hy-radio/index.scss +17 -5
  104. package/components/hy-radio/props.ts +1 -2
  105. package/components/hy-rate/hy-rate.vue +11 -0
  106. package/components/hy-rate/index.scss +6 -6
  107. package/components/hy-read-more/hy-read-more.vue +23 -2
  108. package/components/hy-read-more/index.scss +29 -2
  109. package/components/hy-read-more/props.ts +2 -7
  110. package/components/hy-scroll-list/hy-scroll-list.vue +31 -9
  111. package/components/hy-scroll-list/index.scss +10 -1
  112. package/components/hy-scroll-list/props.ts +2 -2
  113. package/components/hy-search/hy-search.vue +11 -0
  114. package/components/hy-search/index.scss +25 -4
  115. package/components/hy-search/props.ts +2 -2
  116. package/components/hy-slider/hy-slider.vue +11 -0
  117. package/components/hy-slider/index.scss +3 -2
  118. package/components/hy-slider/props.ts +1 -1
  119. package/components/hy-steps/hy-steps.vue +38 -20
  120. package/components/hy-steps/index.scss +57 -17
  121. package/components/hy-steps/props.ts +2 -2
  122. package/components/{hy-submitBar/hy-submitBar.vue → hy-submit-bar/hy-submit-bar.vue} +13 -34
  123. package/components/hy-submit-bar/index.scss +45 -0
  124. package/components/hy-subsection/hy-subsection.vue +12 -0
  125. package/components/hy-subsection/index.scss +28 -8
  126. package/components/hy-subsection/props.ts +3 -3
  127. package/components/hy-swiper/hy-swiper.vue +11 -0
  128. package/components/hy-swiper/index.scss +13 -2
  129. package/components/hy-switch/hy-switch.vue +17 -3
  130. package/components/hy-switch/index.scss +25 -7
  131. package/components/hy-switch/props.ts +1 -2
  132. package/components/hy-switch/typing.d.ts +3 -3
  133. package/components/hy-tabs/hy-tabs.vue +27 -15
  134. package/components/hy-tabs/index.scss +25 -4
  135. package/components/hy-tabs/props.ts +4 -10
  136. package/components/hy-tag/hy-tag.vue +13 -7
  137. package/components/hy-tag/index.scss +27 -115
  138. package/components/hy-text/hy-text.vue +12 -1
  139. package/components/hy-text/index.scss +20 -37
  140. package/components/hy-textarea/hy-textarea.vue +16 -5
  141. package/components/hy-textarea/index.scss +16 -5
  142. package/components/hy-toast/hy-toast.vue +12 -1
  143. package/components/hy-toast/index.scss +26 -26
  144. package/components/hy-tooltip/hy-tooltip.vue +11 -0
  145. package/components/hy-tooltip/index.scss +3 -3
  146. package/components/hy-tooltip/props.ts +1 -1
  147. package/components/hy-upload/hy-upload.vue +11 -0
  148. package/components/hy-upload/index.scss +12 -1
  149. package/components/hy-warn/hy-warn.vue +22 -11
  150. package/components/hy-warn/index.scss +46 -1
  151. package/components/hy-waterfall/hy-waterfall.vue +11 -0
  152. package/components/hy-waterfall/index.scss +1 -1
  153. package/config/icon.ts +4 -0
  154. package/libs/css/common.scss +9 -0
  155. package/libs/css/mixin.scss +78 -0
  156. package/package.json +2 -2
  157. package/public/font/iconfont.css +3 -3
  158. package/store/userInfo.ts +26 -25
  159. package/theme.scss +76 -60
  160. package/typing/modules/common.d.ts +4 -0
  161. package/utils/colorGradient.ts +1 -1
  162. package/utils/inside.ts +3 -0
  163. package/components/hy-submitBar/Index.vue +0 -17
  164. package/components/hy-submitBar/index.scss +0 -9
  165. /package/components/{hy-submitBar → hy-submit-bar}/props.ts +0 -0
  166. /package/components/{hy-submitBar → hy-submit-bar}/typing.d.ts +0 -0
@@ -1,169 +1,178 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- /* 主样式 */
5
- .u-calendar {
6
- &__confirm {
7
- padding: 7px 18px;
4
+ @include b(theme) {
5
+ @include m(dark) {
6
+ background-color: $hy-dark-background;
7
+ color: $hy-dark-color;
8
8
  }
9
9
  }
10
10
 
11
- /* 头部样式 */
12
- .u-calendar-header {
13
- display: flex;
14
- flex-direction: column;
15
- padding-bottom: 4px;
16
-
17
- &__title {
18
- font-size: 16px;
19
- color: $hy-color-title;
20
- text-align: center;
21
- height: 42px;
22
- line-height: 42px;
23
- font-weight: bold;
11
+ /* 主样式 */
12
+ @include b(calendar){
13
+ /* 确认按钮 */
14
+ &__confirm {
15
+ padding: 7px 18px;
24
16
  }
25
17
 
26
- &__subtitle {
27
- font-size: 14px;
28
- color: $u-main-color;
29
- height: 40px;
30
- text-align: center;
31
- line-height: 40px;
32
- font-weight: bold;
33
- }
18
+ /* 头部样式 */
19
+ &-header {
20
+ display: flex;
21
+ flex-direction: column;
22
+ padding-bottom: 4px;
34
23
 
35
- &__weekdays {
36
- @include flex;
37
- justify-content: space-between;
24
+ &__title {
25
+ font-size: 16px;
26
+ color: $hy-color-title;
27
+ text-align: center;
28
+ height: 42px;
29
+ line-height: 42px;
30
+ font-weight: bold;
31
+ }
38
32
 
39
- &__weekday {
40
- font-size: 13px;
41
- color: $u-main-color;
42
- line-height: 30px;
43
- flex: 1;
33
+ &__subtitle {
34
+ font-size: 14px;
35
+ color: $hy-color-hint;
36
+ height: 40px;
44
37
  text-align: center;
38
+ line-height: 40px;
39
+ font-weight: bold;
45
40
  }
46
- }
47
- }
48
41
 
49
- /* 内容样式 */
50
- .u-calendar-month-wrapper {
51
- margin-top: 4px;
52
- }
42
+ &__weekdays {
43
+ @include flex;
44
+ justify-content: space-between;
53
45
 
54
- .u-calendar-month {
55
- &__title {
56
- display: flex;
57
- flex-direction: column;
58
- font-size: 14px;
59
- line-height: 42px;
60
- height: 42px;
61
- color: $u-main-color;
62
- text-align: center;
63
- font-weight: bold;
46
+ &__weekday {
47
+ font-size: 13px;
48
+ color: $hy-tips-color;
49
+ line-height: 30px;
50
+ flex: 1;
51
+ text-align: center;
52
+ }
53
+ }
64
54
  }
65
55
 
66
- &__days {
67
- position: relative;
68
- @include flex;
69
- flex-wrap: wrap;
70
-
71
- &__month-mark-wrapper {
72
- position: absolute;
73
- top: 0;
74
- bottom: 0;
75
- left: 0;
76
- right: 0;
77
- @include flex;
78
- justify-content: center;
79
- align-items: center;
80
56
 
81
- &__text {
82
- font-size: 155px;
83
- color: rgba(231, 232, 234, 0.83);
84
- }
57
+ &-month {
58
+ &__title {
59
+ display: flex;
60
+ flex-direction: column;
61
+ font-size: 14px;
62
+ line-height: 42px;
63
+ height: 42px;
64
+ color: $hy-color-hint;
65
+ text-align: center;
66
+ font-weight: bold;
67
+ }
68
+
69
+ /* 内容样式 */
70
+ &-wrapper {
71
+ margin-top: 4px;
85
72
  }
86
73
 
87
- &__day {
74
+ &__days {
75
+ position: relative;
88
76
  @include flex;
89
- padding: 2px;
90
- /* #ifndef APP-NVUE */
91
- // vue下使用css进行宽度计算,因为某些安卓机会无法进行js获取父元素宽度进行计算得出,会有偏移
92
- width: calc(100% / 7);
93
- box-sizing: border-box;
94
- /* #endif */
95
-
96
- &__select {
97
- flex: 1;
77
+ flex-wrap: wrap;
78
+
79
+ &__month-mark-wrapper {
80
+ position: absolute;
81
+ top: 0;
82
+ bottom: 0;
83
+ left: 0;
84
+ right: 0;
98
85
  @include flex;
99
- align-items: center;
100
86
  justify-content: center;
101
- position: relative;
102
-
103
- &__dot {
104
- width: 7px;
105
- height: 7px;
106
- border-radius: 100px;
107
- background-color: $u-error;
108
- position: absolute;
109
- top: 12px;
110
- right: 7px;
111
- }
87
+ align-items: center;
112
88
 
113
- &__buttom-info {
114
- color: $u-content-color;
115
- text-align: center;
116
- position: absolute;
117
- bottom: 5px;
118
- font-size: 10px;
119
- text-align: center;
120
- left: 0;
121
- right: 0;
89
+ &__text {
90
+ font-size: 155px;
91
+ color: $hy-info-dark;
92
+ }
93
+ }
122
94
 
123
- &--selected {
124
- color: #ffffff;
95
+ &__day {
96
+ @include flex;
97
+ padding: 2px;
98
+ /* #ifndef APP-NVUE */
99
+ // vue下使用css进行宽度计算,因为某些安卓机会无法进行js获取父元素宽度进行计算得出,会有偏移
100
+ width: calc(100% / 7);
101
+ box-sizing: border-box;
102
+ /* #endif */
103
+
104
+ &__select {
105
+ flex: 1;
106
+ @include flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ position: relative;
110
+
111
+ &__dot {
112
+ width: 7px;
113
+ height: 7px;
114
+ border-radius: 100px;
115
+ background-color: $hy-error;
116
+ position: absolute;
117
+ top: 12px;
118
+ right: 7px;
125
119
  }
126
120
 
127
- &--disabled {
128
- color: #cacbcd;
121
+ &__buttom-info {
122
+ color: $hy-color-hint;
123
+ text-align: center;
124
+ position: absolute;
125
+ bottom: 5px;
126
+ font-size: 10px;
127
+ text-align: center;
128
+ left: 0;
129
+ right: 0;
130
+
131
+ &--selected {
132
+ color: #ffffff;
133
+ }
134
+
135
+ &--disabled {
136
+ color: #cacbcd;
137
+ }
129
138
  }
130
- }
131
139
 
132
- &__info {
133
- text-align: center;
134
- font-size: 16px;
140
+ &__info {
141
+ text-align: center;
142
+ font-size: 16px;
135
143
 
136
- &--selected {
137
- color: #ffffff;
138
- }
144
+ &--selected {
145
+ color: #ffffff;
146
+ }
139
147
 
140
- &--disabled {
141
- color: #cacbcd;
148
+ &--disabled {
149
+ color: $hy-info-dark;
150
+ }
142
151
  }
143
- }
144
152
 
145
- &--selected {
146
- background-color: $u-primary;
147
- @include flex;
148
- justify-content: center;
149
- align-items: center;
150
- flex: 1;
151
- border-radius: 3px;
152
- }
153
+ &--selected {
154
+ background-color: var(--hy-theme-dark, $hy-primary);
155
+ @include flex;
156
+ justify-content: center;
157
+ align-items: center;
158
+ flex: 1;
159
+ border-radius: 3px;
160
+ }
153
161
 
154
- &--range-selected {
155
- opacity: 0.3;
156
- border-radius: 0;
157
- }
162
+ &--range-selected {
163
+ opacity: 0.3;
164
+ border-radius: 0;
165
+ }
158
166
 
159
- &--range-start-selected {
160
- border-top-right-radius: 0;
161
- border-bottom-right-radius: 0;
162
- }
167
+ &--range-start-selected {
168
+ border-top-right-radius: 0;
169
+ border-bottom-right-radius: 0;
170
+ }
163
171
 
164
- &--range-end-selected {
165
- border-top-left-radius: 0;
166
- border-bottom-left-radius: 0;
172
+ &--range-end-selected {
173
+ border-top-left-radius: 0;
174
+ border-bottom-left-radius: 0;
175
+ }
167
176
  }
168
177
  }
169
178
  }
@@ -1,43 +1,43 @@
1
1
  <template>
2
- <view class="u-calendar-month-wrapper" ref="u-calendar-month-wrapper">
2
+ <view class="hy-calendar-month-wrapper" ref="hy-calendar-month-wrapper">
3
3
  <view
4
4
  v-for="(item, index) in months"
5
5
  :key="index"
6
- :class="[`u-calendar-month-${index}`]"
7
- :ref="`u-calendar-month-${index}`"
6
+ :class="[`hy-calendar-month-${index}`]"
7
+ :ref="`hy-calendar-month-${index}`"
8
8
  :id="`month-${index}`"
9
9
  >
10
- <text v-if="index !== 0" class="u-calendar-month__title"
10
+ <text v-if="index !== 0" class="hy-calendar-month__title"
11
11
  >{{ item.year }}年{{ item.month }}月</text
12
12
  >
13
- <view class="u-calendar-month__days">
13
+ <view class="hy-calendar-month__days">
14
14
  <view
15
15
  v-if="showMark"
16
- class="u-calendar-month__days__month-mark-wrapper"
16
+ class="hy-calendar-month__days__month-mark-wrapper"
17
17
  >
18
- <text class="u-calendar-month__days__month-mark-wrapper__text">{{
18
+ <text class="hy-calendar-month__days__month-mark-wrapper__text">{{
19
19
  item.month
20
20
  }}</text>
21
21
  </view>
22
22
  <view
23
- class="u-calendar-month__days__day"
23
+ class="hy-calendar-month__days__day"
24
24
  v-for="(item1, index1) in item.date"
25
25
  :key="index1"
26
26
  :style="[dayStyle(index, index1, item1)]"
27
27
  @tap="clickHandler(index, index1, item1)"
28
28
  :class="[
29
- item1.selected && 'u-calendar-month__days__day__select--selected',
29
+ item1.selected && 'hy-calendar-month__days__day__select--selected',
30
30
  ]"
31
31
  >
32
32
  <view
33
- class="u-calendar-month__days__day__select"
33
+ class="hy-calendar-month__days__day__select"
34
34
  :style="[daySelectStyle(index, index1, item1)]"
35
35
  >
36
36
  <text
37
- class="u-calendar-month__days__day__select__info"
37
+ class="hy-calendar-month__days__day__select__info"
38
38
  :class="[
39
39
  item1.disabled || isForbid(item1)
40
- ? 'u-calendar-month__days__day__select__info--disabled'
40
+ ? 'hy-calendar-month__days__day__select__info--disabled'
41
41
  : '',
42
42
  ]"
43
43
  :style="[textStyle(item1)]"
@@ -45,10 +45,10 @@
45
45
  >
46
46
  <text
47
47
  v-if="getBottomInfo(index, index1, item1)"
48
- class="u-calendar-month__days__day__select__buttom-info"
48
+ class="hy-calendar-month__days__day__select__buttom-info"
49
49
  :class="[
50
50
  item1.disabled || isForbid(item1)
51
- ? 'u-calendar-month__days__day__select__buttom-info--disabled'
51
+ ? 'hy-calendar-month__days__day__select__buttom-info--disabled'
52
52
  : '',
53
53
  ]"
54
54
  :style="[textStyle(item1)]"
@@ -56,7 +56,7 @@
56
56
  >
57
57
  <text
58
58
  v-if="item1.dot"
59
- class="u-calendar-month__days__day__select__dot"
59
+ class="hy-calendar-month__days__day__select__dot"
60
60
  ></text>
61
61
  </view>
62
62
  </view>
@@ -69,7 +69,7 @@
69
69
  import { addUnit, colorGradient, deepClone, getRect, sleep } from "../../utils";
70
70
  import dayjs from "dayjs/esm/index";
71
71
  export default {
72
- name: "u-calendar-month",
72
+ name: "hy-calendar-month",
73
73
  props: {
74
74
  // 是否显示月份背景色
75
75
  showMark: {
@@ -363,7 +363,7 @@ export default {
363
363
  // 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度
364
364
  getWrapperWidth() {
365
365
  // #ifndef APP-NVUE
366
- getRect(".u-calendar-month-wrapper").then((size) => {
366
+ getRect(".hy-calendar-month-wrapper").then((size) => {
367
367
  this.width = size.width;
368
368
  });
369
369
  // #endif
@@ -371,7 +371,7 @@ export default {
371
371
  getMonthRect() {
372
372
  // 获取每个月份数据的尺寸,用于父组件在scroll-view滚动事件中,监听当前滚动到了第几个月份
373
373
  const promiseAllArr = this.months.map((item, index) =>
374
- this.getMonthRectByPromise(`u-calendar-month-${index}`),
374
+ this.getMonthRectByPromise(`hy-calendar-month-${index}`),
375
375
  );
376
376
  // 一次性返回
377
377
  Promise.all(promiseAllArr).then((sizes) => {
@@ -70,6 +70,17 @@
70
70
  </view>
71
71
  </template>
72
72
 
73
+ <script lang="ts">
74
+ export default {
75
+ name: 'hy-card',
76
+ options: {
77
+ addGlobalClass: true,
78
+ virtualHost: true,
79
+ styleIsolation: 'shared'
80
+ }
81
+ }
82
+ </script>
83
+
73
84
  <script setup lang="ts">
74
85
  import defaultProps from "./props";
75
86
  import type IProps from "./typing";
@@ -1,7 +1,17 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- .hy-card {
4
+ /* 暗色主题 */
5
+ @include b(theme){
6
+ @include m(dark) {
7
+ @include b(card) {
8
+ color: $hy-dark-color;
9
+ background-color: $hy-dark-background--container;
10
+ }
11
+ }
12
+ }
13
+
14
+ @include b(card) {
5
15
  position: relative;
6
16
  overflow: hidden;
7
17
  font-size: 28rpx;
@@ -27,7 +37,6 @@
27
37
  }
28
38
 
29
39
  &--left {
30
- color: #303133ff;
31
40
  display: flex;
32
41
 
33
42
  &__thumb {
@@ -36,8 +45,7 @@
36
45
 
37
46
  &__title {
38
47
  max-width: 400rpx;
39
- height: 20px;
40
- @include line-feed;
48
+ @include lineEllipsis;
41
49
  }
42
50
  }
43
51
 
@@ -46,12 +54,4 @@
46
54
  margin-left: 6rpx;
47
55
  }
48
56
  }
49
-
50
- &__body {
51
- color: $hy-bg-color;
52
- }
53
-
54
- &__foot {
55
- color: $hy-text-color-grey;
56
- }
57
57
  }
@@ -3,8 +3,8 @@ import type IProps from "./typing";
3
3
  const defaultProps: IProps = {
4
4
  full: false,
5
5
  title: "",
6
- titleColor: "#303133",
7
- titleSize: "15px",
6
+ titleColor: "",
7
+ titleSize: "18px",
8
8
  subTitle: "",
9
9
  subTitleColor: "#909399",
10
10
  subTitleSize: "13",
@@ -1,29 +1,27 @@
1
1
  <template>
2
2
  <view :style="customStyle" class="hy-cell">
3
3
  <view
4
- class="hy-cell__title"
5
- :style="{ borderBottom: titleBorder ? '1rpx solid #c8c7cc66' : '' }"
4
+ :class="['hy-cell--title', showVertical && 'hy-cell--title__vertical']"
6
5
  v-if="title || $slots['title']"
7
6
  >
8
7
  <slot name="title" :title="title">
9
- <view class="hy-cell__title-nav">
10
- <view
11
- class="hy-cell__title-nav--ver"
12
- :style="{ background: verticalColor }"
13
- v-if="showVertical"
14
- ></view>
15
- <text class="hy-cell__title-nav--text">{{ title }}</text>
16
- </view>
8
+ <text class="hy-cell--title__text">{{ title }}</text>
17
9
  </slot>
18
10
  </view>
19
- <view class="hy-cell__body">
11
+ <view
12
+ class="hy-cell__body"
13
+ :style="{ 'border-radius': addUnit(borderRadius) }"
14
+ >
20
15
  <slot>
21
16
  <template v-for="(item, i) in list" :key="i">
22
17
  <view
23
18
  :class="ItemClass"
24
19
  :hover-class="containerClass(item)"
25
20
  :hover-stay-time="250"
26
- :style="{ borderBottom: border ? '1rpx solid #c8c7cc66' : '' }"
21
+ :style="{
22
+ borderBottom:
23
+ border && i !== list.length - 1 ? '1rpx solid #c8c7cc66' : '',
24
+ }"
27
25
  @tap="clickHandler($event, item, i)"
28
26
  >
29
27
  <view class="hy-cell__body--container__content">
@@ -130,6 +128,16 @@
130
128
  </view>
131
129
  </template>
132
130
 
131
+ <script lang="ts">
132
+ export default {
133
+ name: "hy-cell",
134
+ options: {
135
+ virtualHost: true,
136
+ styleIsolation: "shared",
137
+ },
138
+ };
139
+ </script>
140
+
133
141
  <script setup lang="ts">
134
142
  import defaultProps from "./props";
135
143
  import type IProps from "./typing";
@@ -138,9 +146,10 @@ import { IconConfig } from "../../config";
138
146
 
139
147
  import HyIcon from "../hy-icon/hy-icon.vue";
140
148
  import { computed, toRefs } from "vue";
149
+ import { addUnit } from "@/package";
141
150
 
142
151
  const props = withDefaults(defineProps<IProps>(), defaultProps);
143
- const { size, disabled, clickable } = toRefs(props);
152
+ const { size, disabled, clickable, borderRadius } = toRefs(props);
144
153
  const emit = defineEmits(["click"]);
145
154
 
146
155
  /**