hy-app 0.5.11 → 0.5.12
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.
- package/components/hy-button/hy-button.vue +289 -275
- package/components/hy-button/index.scss +24 -1
- package/components/hy-button/props.ts +143 -135
- package/components/hy-button/typing.d.ts +35 -30
- package/components/hy-coupon/hy-coupon.vue +183 -172
- package/components/hy-coupon/index.scss +12 -16
- package/components/hy-coupon/props.ts +108 -103
- package/components/hy-form/hy-form.vue +220 -220
- package/components/hy-input/hy-input.vue +333 -333
- package/components/hy-input/index.scss +1 -2
- package/components/hy-input/props.ts +186 -186
- package/components/hy-notice-bar/hy-row-notice.vue +121 -121
- package/components/hy-parse/node/node.vue +619 -422
- package/components/hy-parse/parser.js +1253 -1060
- package/components/hy-table/hy-table.vue +579 -358
- package/components/hy-table/index.scss +134 -159
- package/components/hy-table/props.ts +62 -47
- package/components/hy-table/typing.d.ts +29 -34
- package/components/hy-tabs/hy-tabs.vue +335 -335
- package/components/hy-text/hy-text.vue +237 -237
- package/components/hy-text/props.ts +115 -115
- package/components/hy-textarea/hy-textarea.vue +198 -197
- package/components/hy-textarea/index.scss +2 -3
- package/components/hy-toast/hy-toast.vue +190 -190
- package/libs/css/theme.scss +1 -0
- package/libs/css/vars.scss +2 -2
- package/libs/typing/modules/common.d.ts +139 -139
- package/libs/utils/inside.ts +336 -350
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,275 +1,289 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- #ifndef APP-NVUE -->
|
|
3
|
-
<button
|
|
4
|
-
:hover-start-time="Number(hoverStartTime)"
|
|
5
|
-
:hover-stay-time="Number(hoverStayTime)"
|
|
6
|
-
:form-type="formType"
|
|
7
|
-
:open-type="openType"
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
@
|
|
19
|
-
@
|
|
20
|
-
@
|
|
21
|
-
@
|
|
22
|
-
@
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
:
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
46
|
-
:
|
|
47
|
-
:
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<!-- #
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:hover-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
:
|
|
91
|
-
:
|
|
92
|
-
:
|
|
93
|
-
:
|
|
94
|
-
:
|
|
95
|
-
:
|
|
96
|
-
:
|
|
97
|
-
:
|
|
98
|
-
:
|
|
99
|
-
:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
import {
|
|
133
|
-
import type {
|
|
134
|
-
import
|
|
135
|
-
|
|
136
|
-
import
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return '
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
//
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
style.
|
|
199
|
-
style.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
style.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (props.size === '
|
|
237
|
-
if (props.size === '
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<!-- #ifndef APP-NVUE -->
|
|
3
|
+
<button
|
|
4
|
+
:hover-start-time="Number(hoverStartTime)"
|
|
5
|
+
:hover-stay-time="Number(hoverStayTime)"
|
|
6
|
+
:form-type="formType"
|
|
7
|
+
:open-type="openType"
|
|
8
|
+
:lang="lang"
|
|
9
|
+
:scope="scope"
|
|
10
|
+
:data-name="dataName"
|
|
11
|
+
:app-parameter="appParameter"
|
|
12
|
+
:hover-stop-propagation="hoverStopPropagation"
|
|
13
|
+
:send-message-title="sendMessageTitle"
|
|
14
|
+
:send-message-path="sendMessagePath"
|
|
15
|
+
:session-from="sessionFrom"
|
|
16
|
+
:send-message-img="sendMessageImg"
|
|
17
|
+
:show-message-card="showMessageCard"
|
|
18
|
+
@getphonenumber="getphonenumber"
|
|
19
|
+
@getuserinfo="getuserinfo"
|
|
20
|
+
@getAuthorize="getAuthorize"
|
|
21
|
+
@error="error"
|
|
22
|
+
@opensetting="opensetting"
|
|
23
|
+
@launchapp="launchapp"
|
|
24
|
+
@agreeprivacyauthorization="agreeprivacyauthorization"
|
|
25
|
+
:hover-class="!disabled && !loading ? 'hy-button--active' : ''"
|
|
26
|
+
:style="[baseColor, customStyle]"
|
|
27
|
+
@click="clickHandler"
|
|
28
|
+
:class="['hy-button', border ? '' : 'hy-button__no-border', bemClass, customClass]"
|
|
29
|
+
>
|
|
30
|
+
<template v-if="loading">
|
|
31
|
+
<HyLoading :mode="loadingMode" :size="loadingSize" :color="loadingColor"></HyLoading>
|
|
32
|
+
<text class="hy-button__loading-text" :style="[{ fontSize: textSize + 'px' }]">
|
|
33
|
+
{{ loadingText || text }}
|
|
34
|
+
</text>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else>
|
|
37
|
+
<hy-icon
|
|
38
|
+
v-if="icon?.name"
|
|
39
|
+
:name="icon?.name"
|
|
40
|
+
:color="iconColorCom"
|
|
41
|
+
:size="icon?.size || textSize * 1.35"
|
|
42
|
+
:bold="icon?.bold"
|
|
43
|
+
:customPrefix="icon?.customPrefix"
|
|
44
|
+
:imgMode="icon?.imgMode"
|
|
45
|
+
:width="icon?.width"
|
|
46
|
+
:height="icon?.height"
|
|
47
|
+
:top="icon?.top"
|
|
48
|
+
:stop="icon?.stop"
|
|
49
|
+
:round="icon?.round"
|
|
50
|
+
:customStyle="icon?.customStyle || { marginRight: '2px' }"
|
|
51
|
+
></hy-icon>
|
|
52
|
+
<!-- @slot 插入默认的值 -->
|
|
53
|
+
<slot v-if="$slots.default"></slot>
|
|
54
|
+
<text v-else class="hy-button__text" :style="[{ fontSize: textSize + 'px' }]">{{
|
|
55
|
+
text
|
|
56
|
+
}}</text>
|
|
57
|
+
</template>
|
|
58
|
+
</button>
|
|
59
|
+
<!-- #endif -->
|
|
60
|
+
|
|
61
|
+
<!-- #ifdef APP-NVUE -->
|
|
62
|
+
<view
|
|
63
|
+
:hover-start-time="Number(hoverStartTime)"
|
|
64
|
+
:hover-stay-time="Number(hoverStayTime)"
|
|
65
|
+
class="hy-button"
|
|
66
|
+
:hover-class="
|
|
67
|
+
!disabled && !loading && !color && (plain || type === 'info')
|
|
68
|
+
? 'hy-button--active--plain'
|
|
69
|
+
: !disabled && !loading && !plain
|
|
70
|
+
? 'hy-button--active'
|
|
71
|
+
: ''
|
|
72
|
+
"
|
|
73
|
+
@click="clickHandler"
|
|
74
|
+
:class="bemClass"
|
|
75
|
+
:style="[baseColor, customStyle]"
|
|
76
|
+
>
|
|
77
|
+
<template v-if="loading">
|
|
78
|
+
<HyLoading :mode="loadingMode" :size="loadingSize" :color="loadingColor"></HyLoading>
|
|
79
|
+
<text
|
|
80
|
+
class="hy-button__loading-text"
|
|
81
|
+
:style="[nvueTextStyle]"
|
|
82
|
+
:class="[plain && `hy-button__text--plain--${type}`]"
|
|
83
|
+
>
|
|
84
|
+
{{ loadingText || text }}
|
|
85
|
+
</text>
|
|
86
|
+
</template>
|
|
87
|
+
<template v-else>
|
|
88
|
+
<hy-icon
|
|
89
|
+
v-if="icon?.name"
|
|
90
|
+
:name="icon?.name"
|
|
91
|
+
:color="iconColorCom"
|
|
92
|
+
:size="icon?.size || textSize * 1.35"
|
|
93
|
+
:bold="icon?.bold"
|
|
94
|
+
:customPrefix="icon?.customPrefix"
|
|
95
|
+
:imgMode="icon?.imgMode"
|
|
96
|
+
:width="icon?.width"
|
|
97
|
+
:height="icon?.height"
|
|
98
|
+
:top="icon?.top"
|
|
99
|
+
:stop="icon?.stop"
|
|
100
|
+
:round="icon?.round"
|
|
101
|
+
:customStyle="icon?.customStyle || { marginRight: '2px' }"
|
|
102
|
+
></hy-icon>
|
|
103
|
+
<text
|
|
104
|
+
class="hy-button__text"
|
|
105
|
+
:style="[
|
|
106
|
+
{
|
|
107
|
+
marginLeft: icon ? '2px' : 0
|
|
108
|
+
},
|
|
109
|
+
nvueTextStyle
|
|
110
|
+
]"
|
|
111
|
+
:class="[plain && `hy-button__text--plain--${type}`]"
|
|
112
|
+
>
|
|
113
|
+
{{ text }}
|
|
114
|
+
</text>
|
|
115
|
+
</template>
|
|
116
|
+
</view>
|
|
117
|
+
<!-- #endif -->
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script lang="ts">
|
|
121
|
+
export default {
|
|
122
|
+
name: 'hy-button',
|
|
123
|
+
options: {
|
|
124
|
+
addGlobalClass: true,
|
|
125
|
+
virtualHost: true,
|
|
126
|
+
styleIsolation: 'shared'
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<script setup lang="ts">
|
|
132
|
+
import { computed } from 'vue'
|
|
133
|
+
import type { CSSProperties } from 'vue'
|
|
134
|
+
import { ColorConfig, bem, throttle } from '../../libs'
|
|
135
|
+
import type { IButtonEmits } from './typing'
|
|
136
|
+
import buttonProps from '../hy-button/props'
|
|
137
|
+
// 组件
|
|
138
|
+
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
139
|
+
import HyLoading from '../hy-loading/hy-loading.vue'
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 该组件内部实现以uni-app的基础button组件为基础,进行二次封装
|
|
143
|
+
* @displayName hy-button
|
|
144
|
+
*/
|
|
145
|
+
defineOptions({})
|
|
146
|
+
|
|
147
|
+
const props = defineProps(buttonProps)
|
|
148
|
+
const emit = defineEmits<IButtonEmits>()
|
|
149
|
+
|
|
150
|
+
const textColor = (ColorConfig as any)[props.type]
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @description 生成bem风格的类名
|
|
154
|
+
*/
|
|
155
|
+
const bemClass = computed(() => {
|
|
156
|
+
// this.bem为一个computed变量,在mixin中
|
|
157
|
+
if (!props.color) {
|
|
158
|
+
return bem('button', props, ['type', 'shape', 'size'], ['disabled', 'plain', 'hairline'])
|
|
159
|
+
} else {
|
|
160
|
+
// 由于nvue的原因,在有color参数时,不需要传入type,否则会生成type相关的类型,影响最终的样式
|
|
161
|
+
return bem('button', props, ['shape', 'size'], ['disabled', 'plain', 'hairline'])
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
const loadingColor = computed(() => {
|
|
166
|
+
if (props.plain) {
|
|
167
|
+
// 如果有设置color值,则用color值,否则使用type主题颜色
|
|
168
|
+
return props.color ? props.color : ''
|
|
169
|
+
}
|
|
170
|
+
if (props.type === 'info') {
|
|
171
|
+
return '#c9c9c9'
|
|
172
|
+
}
|
|
173
|
+
return '#fff'
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
const iconColorCom = computed((): string => {
|
|
177
|
+
// 如果是镂空状态,设置了color就用color值,否则使用主题颜色,
|
|
178
|
+
if (props.icon?.color) return props.icon?.color
|
|
179
|
+
if (props.plain) {
|
|
180
|
+
return props.color ? props.color : ''
|
|
181
|
+
} else {
|
|
182
|
+
return '#ffffff'
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
const baseColor = computed((): CSSProperties => {
|
|
186
|
+
let style: CSSProperties = {}
|
|
187
|
+
if (props.color) {
|
|
188
|
+
// 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
|
|
189
|
+
style.color = props.plain ? props.color : 'white'
|
|
190
|
+
if (!props.plain) {
|
|
191
|
+
// 非镂空,背景色使用自定义的颜色
|
|
192
|
+
style['background'] = props.color
|
|
193
|
+
}
|
|
194
|
+
if (props.color.indexOf('gradient') !== -1) {
|
|
195
|
+
// 如果自定义的颜色为渐变色,不显示边框,以及通过backgroundImage设置渐变色
|
|
196
|
+
// weex文档说明可以写borderWidth的形式,为什么这里需要分开写?
|
|
197
|
+
// 因为weex是阿里巴巴为了部门业绩考核而做的你懂的东西,所以需要这么写才有效
|
|
198
|
+
style.borderTopWidth = 0
|
|
199
|
+
style.borderRightWidth = 0
|
|
200
|
+
style.borderBottomWidth = 0
|
|
201
|
+
style.borderLeftWidth = 0
|
|
202
|
+
if (!props.plain) {
|
|
203
|
+
style.backgroundImage = props.color
|
|
204
|
+
}
|
|
205
|
+
} else {
|
|
206
|
+
// 非渐变色,则设置边框相关的属性
|
|
207
|
+
style.borderColor = props.color
|
|
208
|
+
style.borderWidth = '1px'
|
|
209
|
+
style.borderStyle = 'solid'
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
// 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
|
|
213
|
+
// style.color = props.plain ? textColor : "";
|
|
214
|
+
}
|
|
215
|
+
return style
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
// nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
|
|
219
|
+
const nvueTextStyle = computed((): CSSProperties => {
|
|
220
|
+
let style: CSSProperties = {}
|
|
221
|
+
// 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
|
|
222
|
+
if (props.type === 'info') {
|
|
223
|
+
style.color = '#323233'
|
|
224
|
+
}
|
|
225
|
+
if (props.color) {
|
|
226
|
+
style.color = props.plain ? props.color : 'white'
|
|
227
|
+
}
|
|
228
|
+
style.fontSize = textSize.value + 'px'
|
|
229
|
+
return style
|
|
230
|
+
})
|
|
231
|
+
/**
|
|
232
|
+
* 字体大小
|
|
233
|
+
* */
|
|
234
|
+
const textSize = computed((): number => {
|
|
235
|
+
let fontSize = 14
|
|
236
|
+
if (props.size === 'large') fontSize = 16
|
|
237
|
+
if (props.size === 'medium') fontSize = 14
|
|
238
|
+
if (props.size === 'small') fontSize = 12
|
|
239
|
+
if (props.size === 'mini') fontSize = 10
|
|
240
|
+
return fontSize
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
const clickHandler = (e: any) => {
|
|
244
|
+
// 非禁止并且非加载中,才能点击
|
|
245
|
+
if (!props.disabled && !props.loading) {
|
|
246
|
+
// 进行节流控制,每this.throttle毫秒内,只在开始处执行
|
|
247
|
+
throttle(() => {
|
|
248
|
+
emit('click', e)
|
|
249
|
+
}, props.throttleTime)
|
|
250
|
+
}
|
|
251
|
+
// 是否阻止事件传播
|
|
252
|
+
props.stop && e.stopPropagation()
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* 支付宝小程序授权
|
|
257
|
+
* @param e
|
|
258
|
+
*/
|
|
259
|
+
function getAuthorize(e: any) {
|
|
260
|
+
if (props.scope === 'phoneNumber') {
|
|
261
|
+
getphonenumber(e)
|
|
262
|
+
} else if (props.scope === 'userInfo') {
|
|
263
|
+
getuserinfo(e)
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const getphonenumber = (e: any) => {
|
|
268
|
+
emit('getphonenumber', e)
|
|
269
|
+
}
|
|
270
|
+
const getuserinfo = (e: any) => {
|
|
271
|
+
emit('getuserinfo', e)
|
|
272
|
+
}
|
|
273
|
+
const error = (e: any) => {
|
|
274
|
+
emit('error', e)
|
|
275
|
+
}
|
|
276
|
+
const opensetting = (e: any) => {
|
|
277
|
+
emit('opensetting', e)
|
|
278
|
+
}
|
|
279
|
+
const launchapp = (e: any) => {
|
|
280
|
+
emit('launchapp', e)
|
|
281
|
+
}
|
|
282
|
+
const agreeprivacyauthorization = (e: any) => {
|
|
283
|
+
emit('agreeprivacyauthorization', e)
|
|
284
|
+
}
|
|
285
|
+
</script>
|
|
286
|
+
|
|
287
|
+
<style lang="scss" scoped>
|
|
288
|
+
@import './index.scss';
|
|
289
|
+
</style>
|
|
@@ -15,8 +15,31 @@
|
|
|
15
15
|
/* #endif */
|
|
16
16
|
flex-direction: row;
|
|
17
17
|
|
|
18
|
+
/* 亮光效果 */
|
|
19
|
+
&::before {
|
|
20
|
+
content: '';
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: -100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
background: linear-gradient(
|
|
27
|
+
90deg,
|
|
28
|
+
transparent,
|
|
29
|
+
rgba(255, 255, 255, 0.4),
|
|
30
|
+
transparent
|
|
31
|
+
);
|
|
32
|
+
transition: left 0.7s;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
}
|
|
35
|
+
&:active::before {
|
|
36
|
+
left: 100%;
|
|
37
|
+
transition: left 0.2s;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
18
41
|
/* 去除原生按钮边框 */
|
|
19
|
-
|
|
42
|
+
&::after {
|
|
20
43
|
border: none !important;
|
|
21
44
|
}
|
|
22
45
|
|