hy-app 0.5.7 → 0.5.9

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 (107) hide show
  1. package/components/hy-action-sheet/index.scss +1 -1
  2. package/components/hy-address-picker/index.scss +1 -1
  3. package/components/hy-avatar/index.scss +1 -1
  4. package/components/hy-back-top/index.scss +1 -1
  5. package/components/hy-badge/index.scss +1 -1
  6. package/components/hy-button/index.scss +1 -1
  7. package/components/hy-calendar/index.scss +1 -1
  8. package/components/hy-card/hy-card.vue +1 -1
  9. package/components/hy-card/index.scss +1 -1
  10. package/components/hy-cell-item/hy-cell-item.vue +1 -0
  11. package/components/hy-cell-item/index.scss +1 -1
  12. package/components/hy-check-button/hy-check-button.vue +1 -1
  13. package/components/hy-checkbox/index.scss +1 -1
  14. package/components/hy-checkbox-group/index.scss +1 -1
  15. package/components/hy-checkbox-item/index.scss +1 -1
  16. package/components/hy-code-input/hy-code-input.vue +1 -1
  17. package/components/hy-code-input/index.scss +1 -1
  18. package/components/hy-config-provider/hy-config-provider.vue +4 -2
  19. package/components/hy-config-provider/index.scss +1 -1
  20. package/components/hy-count-down/index.scss +1 -1
  21. package/components/hy-count-to/index.scss +1 -1
  22. package/components/hy-coupon/index.scss +1 -1
  23. package/components/hy-datetime-picker/index.scss +1 -1
  24. package/components/hy-divider/index.scss +1 -1
  25. package/components/hy-dropdown/index.scss +1 -1
  26. package/components/hy-dropdown-item/index.scss +1 -1
  27. package/components/hy-empty/index.scss +1 -1
  28. package/components/hy-flex/index.scss +1 -1
  29. package/components/hy-float-button/hy-float-button.vue +10 -11
  30. package/components/hy-float-button/index.scss +13 -13
  31. package/components/hy-folding-panel-item/index.scss +1 -1
  32. package/components/hy-form-item/index.scss +1 -1
  33. package/components/hy-grid/index.scss +1 -1
  34. package/components/hy-icon/index.scss +1 -1
  35. package/components/hy-image/index.scss +1 -1
  36. package/components/hy-input/hy-input.vue +0 -1
  37. package/components/hy-input/index.scss +1 -1
  38. package/components/hy-input/props.ts +1 -1
  39. package/components/hy-input/typing.d.ts +4 -0
  40. package/components/hy-line/index.scss +1 -1
  41. package/components/hy-line-progress/index.scss +1 -1
  42. package/components/hy-list/index.scss +1 -1
  43. package/components/hy-loading/index.scss +1 -1
  44. package/components/hy-menu/index.scss +1 -1
  45. package/components/hy-modal/index.scss +1 -1
  46. package/components/hy-navbar/hy-navbar.vue +26 -23
  47. package/components/hy-navbar/index.scss +2 -2
  48. package/components/hy-notice-bar/index.scss +1 -1
  49. package/components/hy-notify/index.scss +1 -1
  50. package/components/hy-number-step/index.scss +1 -1
  51. package/components/hy-overlay/index.scss +1 -1
  52. package/components/hy-pagination/index.scss +1 -1
  53. package/components/hy-picker/hy-picker.vue +92 -87
  54. package/components/hy-picker/index.scss +2 -2
  55. package/components/hy-picker/props.ts +1 -1
  56. package/components/hy-popover/index.scss +1 -1
  57. package/components/hy-popup/hy-popup.vue +3 -3
  58. package/components/hy-popup/index.scss +2 -1
  59. package/components/hy-price/index.scss +1 -1
  60. package/components/hy-qrcode/index.scss +1 -1
  61. package/components/hy-radio/index.scss +1 -1
  62. package/components/hy-rate/index.scss +1 -1
  63. package/components/hy-read-more/index.scss +2 -2
  64. package/components/hy-rolling-num/hy-rolling-num.vue +188 -0
  65. package/components/hy-rolling-num/index.scss +34 -0
  66. package/components/hy-rolling-num/props.ts +68 -0
  67. package/components/hy-rolling-num/typing.d.ts +0 -0
  68. package/components/hy-scroll-list/index.scss +1 -1
  69. package/components/hy-search/index.scss +1 -1
  70. package/components/hy-signature/index.scss +1 -1
  71. package/components/hy-slider/index.scss +1 -1
  72. package/components/hy-status-bar/index.scss +1 -1
  73. package/components/hy-steps/index.scss +1 -1
  74. package/components/hy-sticky/hy-sticky.vue +5 -5
  75. package/components/hy-sticky/index.scss +1 -1
  76. package/components/hy-submit-bar/index.scss +1 -1
  77. package/components/hy-subsection/index.scss +1 -1
  78. package/components/hy-swipe-action/index.scss +1 -1
  79. package/components/hy-swiper/index.scss +2 -2
  80. package/components/hy-switch/index.scss +1 -1
  81. package/components/hy-tabbar/hy-tabbar.vue +0 -1
  82. package/components/hy-tabbar/index.scss +1 -1
  83. package/components/hy-tabbar-group/index.scss +1 -1
  84. package/components/hy-tabbar-item/index.scss +1 -1
  85. package/components/hy-table/hy-table.vue +358 -0
  86. package/components/hy-table/index.scss +197 -0
  87. package/components/hy-table/props.ts +47 -0
  88. package/components/hy-table/typing.d.ts +34 -0
  89. package/components/hy-tabs/hy-tabs.vue +21 -23
  90. package/components/hy-tabs/index.scss +1 -1
  91. package/components/hy-tag/index.scss +1 -1
  92. package/components/hy-text/hy-text.vue +1 -1
  93. package/components/hy-text/index.scss +1 -1
  94. package/components/hy-textarea/index.scss +1 -1
  95. package/components/hy-toast/index.scss +2 -1
  96. package/components/hy-tooltip/index.scss +2 -2
  97. package/components/hy-upload/index.scss +1 -1
  98. package/components/hy-warn/hy-warn.vue +2 -2
  99. package/components/hy-warn/index.scss +1 -1
  100. package/components/hy-waterfall/index.scss +1 -1
  101. package/components/hy-watermark/index.scss +1 -1
  102. package/global.d.ts +1 -0
  103. package/index.scss +1 -1
  104. package/libs/css/{mixin.scss → _mixin.scss} +27 -13
  105. package/libs/css/theme.scss +4 -1
  106. package/libs/css/vars.scss +6 -0
  107. package/package.json +2 -2
@@ -0,0 +1,197 @@
1
+ @use "../../libs/css/theme" as *;
2
+ @use "../../libs/css/mixin" as *;
3
+
4
+ /* 变量定义 */
5
+ $border-color: #ebeef5;
6
+ $header-bg: $hy-background--table-header;
7
+ $text-color: #606266;
8
+ $header-text-color: #909399;
9
+ $stripe-bg: $hy-background--table-header;
10
+ $hover-bg: #f5f7fa;
11
+
12
+ /*#1d1d1d*/
13
+
14
+ @include b(table) {
15
+ width: 100%;
16
+ background-color: $hy-background--container;
17
+ border: $hy-border-line;
18
+ position: relative;
19
+ display: flex;
20
+ flex-direction: column;
21
+
22
+ @include e(container) {
23
+ display: flex;
24
+ flex-direction: column;
25
+ height: 100%;
26
+ width: 100%;
27
+ }
28
+
29
+ /* 表头区域 */
30
+ @include e(header) {
31
+ display: flex;
32
+ position: sticky;
33
+ top: 0;
34
+ z-index: 10;
35
+ background-color: $header-bg;
36
+ border-bottom: $hy-border-line;
37
+ }
38
+
39
+ /* 左固定表头 */
40
+ @include e(header--left) {
41
+ position: absolute;
42
+ left: 0;
43
+ top: 0;
44
+ display: flex;
45
+ background-color: $header-bg;
46
+ z-index: 12;
47
+ }
48
+
49
+ /* 中间表头 */
50
+ @include e(header--center) {
51
+ display: flex;
52
+ flex: 1;
53
+ overflow-x: hidden;
54
+ }
55
+
56
+ /* 右固定表头 */
57
+ @include e(header--right) {
58
+ position: absolute;
59
+ right: 0;
60
+ top: 0;
61
+ display: flex;
62
+ background-color: $header-bg;
63
+ z-index: 12;
64
+ }
65
+
66
+ /* 表头单元格 */
67
+ @include e(header__th) {
68
+ @include flex(center);
69
+ padding: 0 20rpx;
70
+ height: 88rpx;
71
+ box-sizing: border-box;
72
+ background-color: $header-bg;
73
+ font-size: 28rpx;
74
+ color: $header-text-color;
75
+ font-weight: bold;
76
+ border-bottom: $hy-border-line;
77
+ border-right: $hy-border-line;
78
+
79
+ &:last-child {
80
+ border-right: none;
81
+ }
82
+ }
83
+
84
+ /* 表头文本 */
85
+ @include e(header__th--text) {
86
+ overflow: hidden;
87
+ text-overflow: ellipsis;
88
+ white-space: nowrap;
89
+ display: block;
90
+ }
91
+
92
+ /* 表头排序 */
93
+ @include e(header__th--sort) {
94
+ @include flex(column);
95
+ margin-left: 8rpx;
96
+
97
+ .hy-icon {
98
+ color: $text-color;
99
+ opacity: 0.3;
100
+ margin-bottom: 2rpx;
101
+
102
+ &:last-child {
103
+ margin-bottom: 0;
104
+ }
105
+
106
+ &.is-active {
107
+ color: $hy-primary;
108
+ opacity: 1;
109
+ }
110
+ }
111
+ }
112
+
113
+ /* 内容区域 */
114
+ @include e(body) {
115
+ flex: 1;
116
+ overflow-y: auto;
117
+ position: relative;
118
+ z-index: 1;
119
+ }
120
+
121
+ /* 内容包装器 */
122
+ @include e(body__wrapper) {
123
+ display: flex;
124
+ width: 100%;
125
+ min-height: 100%;
126
+ }
127
+
128
+ /* 左固定内容 */
129
+ @include e(body--left) {
130
+ position: absolute;
131
+ left: 0;
132
+ top: 0;
133
+ display: flex;
134
+ flex-direction: column;
135
+ background-color: $hy-background--container;
136
+ z-index: 11;
137
+ }
138
+
139
+ /* 中间内容 */
140
+ @include e(body--center) {
141
+ display: flex;
142
+ flex-direction: column;
143
+ flex: 1;
144
+ overflow-x: hidden;
145
+ }
146
+
147
+ /* 右固定内容 */
148
+ @include e(body--right) {
149
+ position: absolute;
150
+ right: 0;
151
+ top: 0;
152
+ display: flex;
153
+ flex-direction: column;
154
+ background-color: $hy-background--container;
155
+ z-index: 11;
156
+ }
157
+
158
+ /* 行 */
159
+ @include e(body__tr) {
160
+ @include flex(row);
161
+ box-sizing: border-box;
162
+ width: 100%;
163
+
164
+ &:nth-child(even) {
165
+ background-color: $stripe-bg;
166
+ }
167
+ }
168
+
169
+ /* 单元格 */
170
+ @include e(body__td) {
171
+ @include flex(center);
172
+ padding: 0 20rpx;
173
+ height: 88rpx;
174
+ box-sizing: border-box;
175
+ font-size: 28rpx;
176
+ color: $text-color;
177
+ border-bottom: $hy-border-line;
178
+ border-right: $hy-border-line;
179
+
180
+ &:last-child {
181
+ border-right: none;
182
+ }
183
+ }
184
+
185
+ /* 省略号 */
186
+ @include e(body__td--ellipsis) {
187
+ overflow: hidden;
188
+ text-overflow: ellipsis;
189
+ white-space: nowrap;
190
+ display: block;
191
+ }
192
+
193
+ /* 加载状态 */
194
+ @include e(body--loading) {
195
+ min-height: 400rpx;
196
+ }
197
+ }
@@ -0,0 +1,47 @@
1
+ import type { PropType } from 'vue'
2
+ import type { ITableColumn } from './typing'
3
+
4
+ const tableProps = {
5
+ /** 数据源 */
6
+ data: {
7
+ type: Array,
8
+ default: () => []
9
+ },
10
+ /** 列配置 */
11
+ columns: {
12
+ type: Array as PropType<ITableColumn[]>,
13
+ default: () => []
14
+ },
15
+ /** 表格高度,如 '500rpx' */
16
+ height: {
17
+ type: [String, Number],
18
+ default: 'auto'
19
+ },
20
+ /** 是否斑马纹 */
21
+ stripe: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ /** 是否带有纵向边框 */
26
+ border: {
27
+ type: Boolean,
28
+ default: true
29
+ },
30
+ /** 加载状态 */
31
+ loading: {
32
+ type: Boolean,
33
+ default: false
34
+ },
35
+ /** 空数据提示 */
36
+ emptyText: {
37
+ type: String,
38
+ default: '暂无数据'
39
+ },
40
+ /** 行数据的唯一键名 */
41
+ rowKey: {
42
+ type: String,
43
+ default: 'id'
44
+ }
45
+ }
46
+
47
+ export default tableProps
@@ -0,0 +1,34 @@
1
+ export interface ITableColumn {
2
+ /** 列标题 */
3
+ title: string
4
+ /** 对应数据字段名 */
5
+ key: string
6
+ /** 列宽 (数字默认 px) */
7
+ width?: number | string
8
+ /** 对齐方式 */
9
+ align?: HyApp.RowCenterType
10
+ /** 是否开启排序 */
11
+ sortable?: boolean
12
+ /** 是否固定 ('left' | 'right' | false) */
13
+ fixed?: 'left' | 'right' | false
14
+ /** 是否开启文本超长省略 */
15
+ ellipsis?: boolean
16
+ /** 开启省略后,是否开启点击显示完整内容(Tooltip) */
17
+ tooltip?: boolean
18
+ }
19
+
20
+ export type SortType = 'asc' | 'desc' | 'normal'
21
+
22
+ interface ISortParams {
23
+ key: string
24
+ type: SortType
25
+ }
26
+
27
+ export interface ITableEmits {
28
+ /** 当某一行被点击时会触发该事件 */
29
+ (e: 'row-click', row: any, index: number): void
30
+ /** 单元格点击触发该事件 */
31
+ (e: 'cell-click', row: any, col: ITableColumn): void
32
+ /** 触发本地排序或远程排序事件 */
33
+ (e: 'sort-change', params: ISortParams): void
34
+ }
@@ -27,14 +27,12 @@
27
27
  ]"
28
28
  >
29
29
  <slot v-if="$slots.icon" name="icon" :record="item" :index="index" />
30
- <template v-else>
31
- <view
32
- class="hy-tabs__wrapper--nav__item--prefix-icon"
33
- v-if="item.icon"
34
- >
35
- <HyIcon :name="item.icon" :customStyle="iconStyle"></HyIcon>
36
- </view>
37
- </template>
30
+ <view
31
+ class="hy-tabs__wrapper--nav__item--prefix-icon"
32
+ v-else-if="item.icon"
33
+ >
34
+ <hy-icon :name="item.icon" :customStyle="iconStyle"></hy-icon>
35
+ </view>
38
36
  <slot
39
37
  v-if="$slots.content"
40
38
  name="content"
@@ -107,17 +105,17 @@
107
105
  </view>
108
106
 
109
107
  <!-- 内容轮播图 -->
110
- <slot name="main">
111
- <swiper
112
- :current="innerCurrent"
113
- @animationfinish="animationFinish"
114
- :style="{ height: swiperHeight }"
115
- >
116
- <swiper-item class="swiper-item" v-for="(item, i) in list" :key="i">
117
- <slot :record="item.content" />
118
- </swiper-item>
119
- </swiper>
120
- </slot>
108
+ <slot v-if="$slots.main" name="main"></slot>
109
+ <swiper
110
+ v-else-if="list.length"
111
+ :current="innerCurrent"
112
+ @animationfinish="animationFinish"
113
+ :style="{ height: swiperHeight }"
114
+ >
115
+ <swiper-item class="swiper-item" v-for="(item, i) in list" :key="i">
116
+ <slot :record="item.content" />
117
+ </swiper-item>
118
+ </swiper>
121
119
  </view>
122
120
  </template>
123
121
 
@@ -197,7 +195,7 @@ onMounted(() => {
197
195
  })
198
196
 
199
197
  /**
200
- * @description 设置线左边距离
198
+ * 设置线左边距离
201
199
  */
202
200
  const setLineLeft = () => {
203
201
  const tabItem = props.list[innerCurrent.value]
@@ -263,7 +261,7 @@ const setScrollLeft = () => {
263
261
  scrollLeft.value = Math.max(0, scrollLeft_1)
264
262
  }
265
263
  /**
266
- * @description 获取所有标签的尺寸
264
+ * 获取所有标签的尺寸
267
265
  * */
268
266
  const resize = () => {
269
267
  // 如果不存在list,则不处理
@@ -300,7 +298,7 @@ const resize = () => {
300
298
  )
301
299
  }
302
300
  /**
303
- * @description 获取导航菜单的尺寸
301
+ * 获取导航菜单的尺寸
304
302
  * */
305
303
  const getTabsRect = () => {
306
304
  return new Promise((resolve) => {
@@ -308,7 +306,7 @@ const getTabsRect = () => {
308
306
  })
309
307
  }
310
308
  /**
311
- * @description 获取所有标签的尺寸
309
+ * 获取所有标签的尺寸
312
310
  * */
313
311
  const getAllItemRect = () => {
314
312
  return new Promise((resolve) => {
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(tabs) {
5
5
  @include e(wrapper) {
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
 
5
5
  @include b(tag){
@@ -229,7 +229,7 @@ const toLink = () => {
229
229
 
230
230
  <style scoped lang="scss">
231
231
  @import './index.scss';
232
- @import '../../libs/css/mixin.scss';
232
+ @import '../../libs/css/mixin';
233
233
  /*超出出现省略号*/
234
234
  .hy-text__value--lines {
235
235
  @include multiEllipsis(v-bind(lines));
@@ -1,4 +1,4 @@
1
- @use "../../libs/css/mixin.scss" as *;
1
+ @use "../../libs/css/mixin" as *;
2
2
  @use "../../libs/css/theme" as *;
3
3
 
4
4
 
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(textarea) {
5
5
  border-radius: $hy-border-radius-sm;
@@ -1,4 +1,4 @@
1
- @use "../../libs/css/mixin.scss" as *;
1
+ @use "../../libs/css/mixin" as *;
2
2
  @use "../../libs/css/theme" as *;
3
3
 
4
4
  @include b(toast){
@@ -13,6 +13,7 @@
13
13
  max-width: 600rpx;
14
14
  /* #endif */
15
15
  position: relative;
16
+ z-index: 10090;
16
17
 
17
18
  @include m(loading) {
18
19
  flex-direction: column;
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
  $hy-tooltip--z-index: 998;
5
5
  $hy-tooltip--background-color: rgb(50, 50, 51);
@@ -8,7 +8,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
8
8
  position: relative;
9
9
  @include flex;
10
10
 
11
- @include squareArrow(6px, $hy-tooltip--background-color, $hy-tooltip--z-index, $hy-box-shadow);
11
+ @include squareArrow(6px, $hy-tooltip--background-color, -1, $hy-box-shadow);
12
12
 
13
13
  @include edeep(popup) {
14
14
  position: absolute;
@@ -1,4 +1,4 @@
1
- @use "../../libs/css/mixin.scss" as *;
1
+ @use "../../libs/css/mixin" as *;
2
2
  @use "../../libs/css/theme" as *;
3
3
 
4
4
  $hy-upload-image-width: 80px !default;
@@ -6,7 +6,7 @@
6
6
  :style="customStyle"
7
7
  >
8
8
  <view class="hy-warn__icon--left tips" v-if="showIcon">
9
- <HyIcon :name="iconName(type)" size="21" :color="iconColor"></HyIcon>
9
+ <hy-icon :name="iconName(type)" size="21" :color="iconColor"></hy-icon>
10
10
  </view>
11
11
  <view
12
12
  class="hy-warn__content"
@@ -51,7 +51,7 @@
51
51
  <slot name="right"></slot>
52
52
  </view>
53
53
  <view class="hy-warn__close" v-if="closable" @tap.stop="closeHandler">
54
- <HyIcon :name="IconConfig.CLOSE" :color="iconColor" size="15"></HyIcon>
54
+ <hy-icon :name="IconConfig.CLOSE" :color="iconColor" size="15"></hy-icon>
55
55
  </view>
56
56
  </view>
57
57
  </HyTransition>
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(warn) {
5
5
  position: relative;
@@ -1,4 +1,4 @@
1
- @use "../../libs/css/mixin.scss" as *;
1
+ @use "../../libs/css/mixin" as *;
2
2
 
3
3
  @include b(waterfall) {
4
4
  @include flex;
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/theme" as *;
2
- @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(watermark) {
5
5
  position: absolute;
package/global.d.ts CHANGED
@@ -58,6 +58,7 @@ declare module 'vue' {
58
58
  HyRadio: (typeof import('./components/hy-radio/hy-radio.vue'))['default']
59
59
  HyRate: (typeof import('./components/hy-rate/hy-rate.vue'))['default']
60
60
  HyReadMore: (typeof import('./components/hy-read-more/hy-read-more.vue'))['default']
61
+ HyRollingNum: (typeof import('./components/hy-rolling-num/hy-rolling-num.vue'))['default']
61
62
  HyScrollList: (typeof import('./components/hy-scroll-list/hy-scroll-list.vue'))['default']
62
63
  HySearch: (typeof import('./components/hy-search/hy-search.vue'))['default']
63
64
  HySignature: (typeof import('./components/hy-signature/hy-signature.vue'))['default']
package/index.scss CHANGED
@@ -1,4 +1,4 @@
1
1
  @use "./libs/css/common.scss";
2
2
  @use "./libs/css/vars.scss";
3
- @use "./libs/css/mixin.scss";
3
+ @use "libs/css/mixin";
4
4
  @use "./libs/css/theme.scss";
@@ -12,24 +12,37 @@
12
12
  }
13
13
 
14
14
  /* 加上-- */
15
- @mixin m($modifier) {
16
- $selector: &;
17
- $currentSelector: '';
18
- @each $unit in $modifier {
19
- $currentSelector: #{$currentSelector +
20
- $selector +
21
- config.$modifier-separator +
22
- $unit +
23
- ','};
15
+ @mixin m($modifier...) {
16
+ $selectors: "";
17
+
18
+ @each $item in $modifier {
19
+ $selectors: #{$selectors + & + config.$modifier-separator + $item + ","};
24
20
  }
25
21
 
26
22
  @at-root {
27
- #{$currentSelector} {
23
+ #{$selectors} {
28
24
  @content;
29
25
  }
30
26
  }
31
27
  }
32
28
 
29
+ /* 定义状态(m) */
30
+ @mixin mdeep($modifier...) {
31
+ $selectors: "";
32
+
33
+ @each $item in $modifier {
34
+ $selectors: #{$selectors + & + config.$modifier-separator + $item + ","};
35
+ }
36
+
37
+ @at-root {
38
+ :deep() {
39
+ #{$selectors} {
40
+ @content;
41
+ }
42
+ }
43
+ }
44
+ }
45
+
33
46
  /* 定义元素(e)__,对于伪类,会自动将 e 嵌套在 伪类 底下 */
34
47
  @mixin e($element...) {
35
48
  $selector: &;
@@ -101,14 +114,15 @@
101
114
 
102
115
  /* 状态,生成 is-$state 类名 */
103
116
  @mixin is($states...) {
104
- @at-root {
105
- @each $state in $states {
106
- &.#{config.$state-prefix + $state} {
117
+ @each $state in $states {
118
+ @at-root {
119
+ #{&}.#{config.$state-prefix + $state} {
107
120
  @content;
108
121
  }
109
122
  }
110
123
  }
111
124
  }
125
+
112
126
  /* 添加伪类元素 */
113
127
  @mixin pseudo($pseudo) {
114
128
  @at-root #{&}#{':#{$pseudo}'} {
@@ -47,10 +47,13 @@ $hy-background--disabled: var(--hy-background--disabled, rgba(0, 0, 0, 0.04)); /
47
47
  $hy-background--track: var(--hy-background--track, #F6F6F6) !default; // 轨道背景色
48
48
  $hy-background--empty: var(--hy-background--empty, #F3F3F3) !default; // 搜索背景色
49
49
  $hy-background--hover: var(--hy-background--hover, rgba(0,0,0,0.05)) !default; // 点击状态
50
- $hy-light-background-mask: var(--hy-light-background-mask, rgba(0, 0, 0, 0.5)); //遮罩颜色
50
+ $hy-background-mask: var(--hy-background-mask, rgba(0, 0, 0, 0.5)); //遮罩颜色
51
51
  $hy-background--active: var(--hy-background--active, #FFFFFF); // 选中背景色
52
52
  $hy-background--close: var(--hy-background--close, #f0f0f0); // 关闭背景色
53
53
  $hy-background--box: var(--hy-background--box, #FFFFFF); // 盒子背景色
54
+ $hy-background--table-header: var(--hy-background--table-header, #FAFAFA); // 表头背景色
55
+ $hy-background-image--mask--two-flanks: var(--hy-background-image--mask--two-flanks, linear-gradient(180deg, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6)),
56
+ linear-gradient(0deg, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6))); // 向两边形成雾霾形状
54
57
 
55
58
  /* 文字尺寸 */
56
59
  $hy-font-size-sm: 24rpx; // 提示文字大小
@@ -21,6 +21,9 @@
21
21
  --hy-background--active: #FFFFFF;
22
22
  --hy-background--close: #f0f0f0;
23
23
  --hy-background--box: #FFFFFF;
24
+ --hy-background--table-header: #FAFAFA;
25
+ --hy-background-image--mask--two-flanks: linear-gradient(180deg, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6)),
26
+ linear-gradient(0deg, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6));
24
27
 
25
28
  --hy-border-line: 1rpx solid #e8e8e8;
26
29
  --hy-border-color: #c2c2c4;
@@ -54,6 +57,9 @@
54
57
  --hy-background--active: #000000;
55
58
  --hy-background--close: #323233;
56
59
  --hy-background--box: #4b4c4d;
60
+ --hy-background--table-header: #1D1D1D;
61
+ --hy-background-image--mask--two-flanks: linear-gradient(180deg, hsla(0, 0%, 15%, 0.95), hsla(0, 0%, 10%, 0.6)),
62
+ linear-gradient(0deg, hsla(0, 0%, 15%, 0.95), hsla(0, 0%, 10%, 0.6));
57
63
 
58
64
  --hy-border-line: 1rpx solid #3c3f44;
59
65
  --hy-border-color: #3c3f44;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.5.7",
4
- "description": "feat: 新增sticky组件",
3
+ "version": "0.5.9",
4
+ "description": "feat: 新增表格组件组件",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},