@mc-markets/ui 1.0.86 → 1.0.90
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/README.md +40 -141
- package/dist/404.html +22 -22
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +5 -13
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbSeparator.vue.d.ts +3 -0
- package/dist/components/Breadcrumb/BreadcrumbSeparator.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/TabCard/TabCard.vue.d.ts.map +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +2 -0
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +605 -661
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/packages/components/Alert/Alert.vue +139 -139
- package/packages/components/Banner/Banner.vue +299 -299
- package/packages/components/Breadcrumb/Breadcrumb.vue +113 -77
- package/packages/components/Breadcrumb/BreadcrumbSeparator.vue +31 -0
- package/packages/components/Button/Button.vue +17 -17
- package/packages/components/DatePicker/DatePicker.vue +85 -86
- package/packages/components/Dialog/Dialog.vue +61 -61
- package/packages/components/Empty/Empty.vue +74 -74
- package/packages/components/Form/Form.vue +30 -30
- package/packages/components/FormItem/FormItem.vue +19 -19
- package/packages/components/Icon/Icon.vue +210 -210
- package/packages/components/Input/Input.vue +15 -15
- package/packages/components/Message/Message.vue +503 -503
- package/packages/components/NotifiMessage/NotifiMessage.vue +293 -293
- package/packages/components/Notification/Notification.vue +19 -19
- package/packages/components/Option/Option.vue +13 -13
- package/packages/components/OptionGroup/OptionGroup.vue +13 -13
- package/packages/components/Pagination/Pagination.vue +61 -61
- package/packages/components/Radio/Radio.vue +67 -67
- package/packages/components/RadioButton/RadioButton.vue +110 -110
- package/packages/components/RadioGroup/RadioGroup.vue +155 -155
- package/packages/components/Select/Select.vue +22 -22
- package/packages/components/Switch/Switch.vue +47 -47
- package/packages/components/TabCard/TabCard.vue +107 -177
- package/packages/components/TabCard/TabCardItem.vue +105 -102
- package/packages/components/Table/Table.vue +17 -17
- package/packages/components/Table/TableColumn.vue +20 -20
- package/packages/components/Tabs/TabPane.vue +79 -79
- package/packages/components/Tabs/Tabs.vue +267 -267
- package/packages/components/Tag/Tag.vue +211 -164
- package/packages/components/Tooltip/Tooltip.vue +58 -58
- package/packages/hooks/useClassName.js +23 -23
- package/packages/styles/README.md +129 -129
- package/packages/styles/components/button.scss +121 -121
- package/packages/styles/components/checkbox.scss +18 -18
- package/packages/styles/components/dialog.scss +47 -47
- package/packages/styles/components/form.scss +18 -18
- package/packages/styles/components/input.scss +14 -14
- package/packages/styles/components/select.scss +62 -60
- package/packages/styles/components/table.scss +37 -37
- package/packages/styles/components/tabs.scss +76 -76
- package/packages/styles/components/tag.scss +142 -142
- package/packages/styles/font/iconfont.scss +363 -363
- package/packages/styles/index.scss +94 -94
- package/packages/styles/variables/border-mode.css +6 -6
- package/packages/styles/variables/color-modes-dark.css +143 -143
- package/packages/styles/variables/index.scss +5 -5
- package/packages/styles/variables/primitives-style.css +112 -112
- package/packages/styles/variables/radius-mode.css +14 -14
- package/packages/styles/variables/spacing-mode.css +20 -20
- package/packages/styles/variables/typography-desktop.css +40 -40
- package/packages/styles/variables/typography-mobile.css +40 -40
- package/packages/utils/classNames.js +23 -23
- package/packages/utils/styleUtils.js +105 -105
- package/dist/components/Breadcrumb/BreadcrumbItem.vue.d.ts +0 -17
- package/dist/components/Breadcrumb/BreadcrumbItem.vue.d.ts.map +0 -1
- package/packages/components/Breadcrumb/BreadcrumbItem.vue +0 -142
|
@@ -1,293 +1,293 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<teleport to="body">
|
|
3
|
-
<transition-group name="notification" tag="div" class="notification-container">
|
|
4
|
-
<div
|
|
5
|
-
v-for="notification in notifications"
|
|
6
|
-
:key="notification.id"
|
|
7
|
-
:class="[
|
|
8
|
-
'custom-notification',
|
|
9
|
-
`notification-${notification.position}`
|
|
10
|
-
]"
|
|
11
|
-
>
|
|
12
|
-
<!-- 图标 -->
|
|
13
|
-
<div class="notification-icon">
|
|
14
|
-
<img
|
|
15
|
-
src="https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/MCImages/userCenter/icon-quota-tip.png"
|
|
16
|
-
alt="notification icon"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<!-- 内容区域 -->
|
|
21
|
-
<div class="notification-content">
|
|
22
|
-
<!-- 标题 -->
|
|
23
|
-
<div class="notification-title">{{ notification.title }}</div>
|
|
24
|
-
|
|
25
|
-
<!-- 消息内容 -->
|
|
26
|
-
<div class="notification-message">{{ notification.message }}</div>
|
|
27
|
-
|
|
28
|
-
<!-- 自定义插槽内容 -->
|
|
29
|
-
<div v-if="notification.slotContent" class="notification-action">
|
|
30
|
-
<component :is="notification.slotContent" />
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<!-- 关闭按钮 -->
|
|
35
|
-
<button
|
|
36
|
-
v-if="notification.showClose"
|
|
37
|
-
class="notification-close"
|
|
38
|
-
@click="closeNotification(notification.id)"
|
|
39
|
-
>
|
|
40
|
-
×
|
|
41
|
-
</button>
|
|
42
|
-
</div>
|
|
43
|
-
</transition-group>
|
|
44
|
-
</teleport>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
import { ref } from 'vue'
|
|
49
|
-
|
|
50
|
-
// 全局通知列表
|
|
51
|
-
const notifications = ref([])
|
|
52
|
-
let notificationId = 0
|
|
53
|
-
|
|
54
|
-
// 创建 NotifiMessage 静态方法对象
|
|
55
|
-
const NotifiMessage = {
|
|
56
|
-
// 默认配置
|
|
57
|
-
defaultOptions: {
|
|
58
|
-
title: '',
|
|
59
|
-
message: '',
|
|
60
|
-
duration: 4500,
|
|
61
|
-
position: 'top-right',
|
|
62
|
-
showClose: true,
|
|
63
|
-
offset: 20
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
// 显示通知
|
|
67
|
-
show(options = {}) {
|
|
68
|
-
const config = {
|
|
69
|
-
...this.defaultOptions,
|
|
70
|
-
...options,
|
|
71
|
-
id: ++notificationId
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 添加到通知列表
|
|
75
|
-
notifications.value.push(config)
|
|
76
|
-
|
|
77
|
-
// 如果设置了自动关闭时间,则自动关闭
|
|
78
|
-
if (config.duration > 0) {
|
|
79
|
-
setTimeout(() => {
|
|
80
|
-
this.close(config.id)
|
|
81
|
-
}, config.duration)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return {
|
|
85
|
-
close: () => this.close(config.id)
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
// 关闭指定通知
|
|
90
|
-
close(id) {
|
|
91
|
-
const index = notifications.value.findIndex(n => n.id === id)
|
|
92
|
-
if (index > -1) {
|
|
93
|
-
notifications.value.splice(index, 1)
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
// 关闭所有通知
|
|
98
|
-
closeAll() {
|
|
99
|
-
notifications.value = []
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
// 便捷方法
|
|
103
|
-
success(options = {}) {
|
|
104
|
-
return this.show(options)
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
warning(options = {}) {
|
|
108
|
-
return this.show(options)
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
error(options = {}) {
|
|
112
|
-
return this.show(options)
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// 关闭通知的方法
|
|
117
|
-
const closeNotification = (id) => {
|
|
118
|
-
const index = notifications.value.findIndex(n => n.id === id)
|
|
119
|
-
if (index > -1) {
|
|
120
|
-
notifications.value.splice(index, 1)
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
// Vue 组件定义
|
|
126
|
-
export default {
|
|
127
|
-
name: 'MNotifiMessage',
|
|
128
|
-
setup() {
|
|
129
|
-
return {
|
|
130
|
-
notifications,
|
|
131
|
-
closeNotification
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// 导出类供直接使用
|
|
137
|
-
export { NotifiMessage }
|
|
138
|
-
</script>
|
|
139
|
-
|
|
140
|
-
<style lang="scss">
|
|
141
|
-
.notification-container {
|
|
142
|
-
position: fixed;
|
|
143
|
-
z-index: 9999;
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.custom-notification {
|
|
148
|
-
position: fixed;
|
|
149
|
-
top: 20px;
|
|
150
|
-
right: 20px;
|
|
151
|
-
width: 400px;
|
|
152
|
-
background: #201F24;
|
|
153
|
-
border-radius: 12px;
|
|
154
|
-
padding: 16px;
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: flex-start;
|
|
157
|
-
gap: 4px;
|
|
158
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
159
|
-
pointer-events: auto;
|
|
160
|
-
z-index: 9999;
|
|
161
|
-
|
|
162
|
-
// 多个通知的堆叠效果
|
|
163
|
-
&:nth-child(2) { top: 100px; }
|
|
164
|
-
&:nth-child(3) { top: 180px; }
|
|
165
|
-
&:nth-child(4) { top: 260px; }
|
|
166
|
-
&:nth-child(5) { top: 340px; }
|
|
167
|
-
|
|
168
|
-
.notification-icon {
|
|
169
|
-
flex-shrink: 0;
|
|
170
|
-
width: 40px;
|
|
171
|
-
height: 40px;
|
|
172
|
-
border-radius: 50%;
|
|
173
|
-
display: flex;
|
|
174
|
-
align-items: center;
|
|
175
|
-
justify-content: center;
|
|
176
|
-
position: relative;
|
|
177
|
-
transform: translate(-9px, -8px);
|
|
178
|
-
|
|
179
|
-
img {
|
|
180
|
-
width: 100%;
|
|
181
|
-
height: 100%;
|
|
182
|
-
object-fit: contain;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.notification-content {
|
|
187
|
-
flex: 1;
|
|
188
|
-
|
|
189
|
-
.notification-title {
|
|
190
|
-
color: #FFFFFF;
|
|
191
|
-
font-size: 16px;
|
|
192
|
-
font-weight: 600;
|
|
193
|
-
margin-bottom: 8px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.notification-message {
|
|
197
|
-
color: rgba(255, 255, 255, 0.8);
|
|
198
|
-
font-size: 14px;
|
|
199
|
-
line-height: 1.5;
|
|
200
|
-
margin-bottom: 16px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.notification-action {
|
|
204
|
-
.custom-action-link {
|
|
205
|
-
color: #FFD905;
|
|
206
|
-
font-size: 14px;
|
|
207
|
-
font-weight: 500;
|
|
208
|
-
cursor: pointer;
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: center;
|
|
211
|
-
gap: 6px;
|
|
212
|
-
transition: all 0.2s ease;
|
|
213
|
-
|
|
214
|
-
&:hover {
|
|
215
|
-
color: #FFF;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
span {
|
|
219
|
-
line-height: 1;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.arrow {
|
|
223
|
-
transition: transform 0.2s ease;
|
|
224
|
-
display: flex;
|
|
225
|
-
align-items: center;
|
|
226
|
-
line-height: 1;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&:hover .arrow {
|
|
230
|
-
transform: translateX(2px);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.notification-close {
|
|
237
|
-
position: absolute;
|
|
238
|
-
top: 12px;
|
|
239
|
-
right: 12px;
|
|
240
|
-
width: 20px;
|
|
241
|
-
height: 20px;
|
|
242
|
-
border: none;
|
|
243
|
-
background: transparent;
|
|
244
|
-
color: var(--icon-tertiary, #999);
|
|
245
|
-
border-radius: 50%;
|
|
246
|
-
cursor: pointer;
|
|
247
|
-
display: flex;
|
|
248
|
-
align-items: center;
|
|
249
|
-
justify-content: center;
|
|
250
|
-
font-size: 24px;
|
|
251
|
-
line-height: 1;
|
|
252
|
-
opacity: 0.6;
|
|
253
|
-
transition: opacity 0.2s ease;
|
|
254
|
-
|
|
255
|
-
&:hover {
|
|
256
|
-
opacity: 1;
|
|
257
|
-
background: rgba(0, 0, 0, 0.1);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// 动画效果
|
|
263
|
-
.notification-enter-active {
|
|
264
|
-
transition: all 0.3s ease;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.notification-leave-active {
|
|
268
|
-
transition: all 0.3s ease;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.notification-enter-from {
|
|
272
|
-
opacity: 0;
|
|
273
|
-
transform: translateX(100%);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.notification-leave-to {
|
|
277
|
-
opacity: 0;
|
|
278
|
-
transform: translateX(100%);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.notification-move {
|
|
282
|
-
transition: transform 0.3s ease;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// 响应式设计
|
|
286
|
-
@media (max-width: 480px) {
|
|
287
|
-
.custom-notification {
|
|
288
|
-
width: calc(100vw - 40px);
|
|
289
|
-
left: 20px !important;
|
|
290
|
-
right: 20px !important;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<transition-group name="notification" tag="div" class="notification-container">
|
|
4
|
+
<div
|
|
5
|
+
v-for="notification in notifications"
|
|
6
|
+
:key="notification.id"
|
|
7
|
+
:class="[
|
|
8
|
+
'custom-notification',
|
|
9
|
+
`notification-${notification.position}`
|
|
10
|
+
]"
|
|
11
|
+
>
|
|
12
|
+
<!-- 图标 -->
|
|
13
|
+
<div class="notification-icon">
|
|
14
|
+
<img
|
|
15
|
+
src="https://cfdsaas-pre.oss-cn-hongkong.aliyuncs.com/mc-assets/MCImages/userCenter/icon-quota-tip.png"
|
|
16
|
+
alt="notification icon"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- 内容区域 -->
|
|
21
|
+
<div class="notification-content">
|
|
22
|
+
<!-- 标题 -->
|
|
23
|
+
<div class="notification-title">{{ notification.title }}</div>
|
|
24
|
+
|
|
25
|
+
<!-- 消息内容 -->
|
|
26
|
+
<div class="notification-message">{{ notification.message }}</div>
|
|
27
|
+
|
|
28
|
+
<!-- 自定义插槽内容 -->
|
|
29
|
+
<div v-if="notification.slotContent" class="notification-action">
|
|
30
|
+
<component :is="notification.slotContent" />
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- 关闭按钮 -->
|
|
35
|
+
<button
|
|
36
|
+
v-if="notification.showClose"
|
|
37
|
+
class="notification-close"
|
|
38
|
+
@click="closeNotification(notification.id)"
|
|
39
|
+
>
|
|
40
|
+
×
|
|
41
|
+
</button>
|
|
42
|
+
</div>
|
|
43
|
+
</transition-group>
|
|
44
|
+
</teleport>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import { ref } from 'vue'
|
|
49
|
+
|
|
50
|
+
// 全局通知列表
|
|
51
|
+
const notifications = ref([])
|
|
52
|
+
let notificationId = 0
|
|
53
|
+
|
|
54
|
+
// 创建 NotifiMessage 静态方法对象
|
|
55
|
+
const NotifiMessage = {
|
|
56
|
+
// 默认配置
|
|
57
|
+
defaultOptions: {
|
|
58
|
+
title: '',
|
|
59
|
+
message: '',
|
|
60
|
+
duration: 4500,
|
|
61
|
+
position: 'top-right',
|
|
62
|
+
showClose: true,
|
|
63
|
+
offset: 20
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
// 显示通知
|
|
67
|
+
show(options = {}) {
|
|
68
|
+
const config = {
|
|
69
|
+
...this.defaultOptions,
|
|
70
|
+
...options,
|
|
71
|
+
id: ++notificationId
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 添加到通知列表
|
|
75
|
+
notifications.value.push(config)
|
|
76
|
+
|
|
77
|
+
// 如果设置了自动关闭时间,则自动关闭
|
|
78
|
+
if (config.duration > 0) {
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
this.close(config.id)
|
|
81
|
+
}, config.duration)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
close: () => this.close(config.id)
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
// 关闭指定通知
|
|
90
|
+
close(id) {
|
|
91
|
+
const index = notifications.value.findIndex(n => n.id === id)
|
|
92
|
+
if (index > -1) {
|
|
93
|
+
notifications.value.splice(index, 1)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// 关闭所有通知
|
|
98
|
+
closeAll() {
|
|
99
|
+
notifications.value = []
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// 便捷方法
|
|
103
|
+
success(options = {}) {
|
|
104
|
+
return this.show(options)
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
warning(options = {}) {
|
|
108
|
+
return this.show(options)
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
error(options = {}) {
|
|
112
|
+
return this.show(options)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 关闭通知的方法
|
|
117
|
+
const closeNotification = (id) => {
|
|
118
|
+
const index = notifications.value.findIndex(n => n.id === id)
|
|
119
|
+
if (index > -1) {
|
|
120
|
+
notifications.value.splice(index, 1)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Vue 组件定义
|
|
126
|
+
export default {
|
|
127
|
+
name: 'MNotifiMessage',
|
|
128
|
+
setup() {
|
|
129
|
+
return {
|
|
130
|
+
notifications,
|
|
131
|
+
closeNotification
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 导出类供直接使用
|
|
137
|
+
export { NotifiMessage }
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style lang="scss">
|
|
141
|
+
.notification-container {
|
|
142
|
+
position: fixed;
|
|
143
|
+
z-index: 9999;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.custom-notification {
|
|
148
|
+
position: fixed;
|
|
149
|
+
top: 20px;
|
|
150
|
+
right: 20px;
|
|
151
|
+
width: 400px;
|
|
152
|
+
background: #201F24;
|
|
153
|
+
border-radius: 12px;
|
|
154
|
+
padding: 16px;
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: flex-start;
|
|
157
|
+
gap: 4px;
|
|
158
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
159
|
+
pointer-events: auto;
|
|
160
|
+
z-index: 9999;
|
|
161
|
+
|
|
162
|
+
// 多个通知的堆叠效果
|
|
163
|
+
&:nth-child(2) { top: 100px; }
|
|
164
|
+
&:nth-child(3) { top: 180px; }
|
|
165
|
+
&:nth-child(4) { top: 260px; }
|
|
166
|
+
&:nth-child(5) { top: 340px; }
|
|
167
|
+
|
|
168
|
+
.notification-icon {
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
width: 40px;
|
|
171
|
+
height: 40px;
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
position: relative;
|
|
177
|
+
transform: translate(-9px, -8px);
|
|
178
|
+
|
|
179
|
+
img {
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
object-fit: contain;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.notification-content {
|
|
187
|
+
flex: 1;
|
|
188
|
+
|
|
189
|
+
.notification-title {
|
|
190
|
+
color: #FFFFFF;
|
|
191
|
+
font-size: 16px;
|
|
192
|
+
font-weight: 600;
|
|
193
|
+
margin-bottom: 8px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.notification-message {
|
|
197
|
+
color: rgba(255, 255, 255, 0.8);
|
|
198
|
+
font-size: 14px;
|
|
199
|
+
line-height: 1.5;
|
|
200
|
+
margin-bottom: 16px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.notification-action {
|
|
204
|
+
.custom-action-link {
|
|
205
|
+
color: #FFD905;
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
font-weight: 500;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
gap: 6px;
|
|
212
|
+
transition: all 0.2s ease;
|
|
213
|
+
|
|
214
|
+
&:hover {
|
|
215
|
+
color: #FFF;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
span {
|
|
219
|
+
line-height: 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.arrow {
|
|
223
|
+
transition: transform 0.2s ease;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
line-height: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&:hover .arrow {
|
|
230
|
+
transform: translateX(2px);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.notification-close {
|
|
237
|
+
position: absolute;
|
|
238
|
+
top: 12px;
|
|
239
|
+
right: 12px;
|
|
240
|
+
width: 20px;
|
|
241
|
+
height: 20px;
|
|
242
|
+
border: none;
|
|
243
|
+
background: transparent;
|
|
244
|
+
color: var(--icon-tertiary, #999);
|
|
245
|
+
border-radius: 50%;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
font-size: 24px;
|
|
251
|
+
line-height: 1;
|
|
252
|
+
opacity: 0.6;
|
|
253
|
+
transition: opacity 0.2s ease;
|
|
254
|
+
|
|
255
|
+
&:hover {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
background: rgba(0, 0, 0, 0.1);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// 动画效果
|
|
263
|
+
.notification-enter-active {
|
|
264
|
+
transition: all 0.3s ease;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.notification-leave-active {
|
|
268
|
+
transition: all 0.3s ease;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.notification-enter-from {
|
|
272
|
+
opacity: 0;
|
|
273
|
+
transform: translateX(100%);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.notification-leave-to {
|
|
277
|
+
opacity: 0;
|
|
278
|
+
transform: translateX(100%);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.notification-move {
|
|
282
|
+
transition: transform 0.3s ease;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// 响应式设计
|
|
286
|
+
@media (max-width: 480px) {
|
|
287
|
+
.custom-notification {
|
|
288
|
+
width: calc(100vw - 40px);
|
|
289
|
+
left: 20px !important;
|
|
290
|
+
right: 20px !important;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
</style>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-notification v-bind="$attrs" class="mc-notification">
|
|
3
|
-
<!-- 其他插槽 -->
|
|
4
|
-
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
5
|
-
<slot :name="name" />
|
|
6
|
-
</template>
|
|
7
|
-
</el-notification>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: "MNotification",
|
|
13
|
-
};
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<style lang="scss">
|
|
17
|
-
// Notification 基础样式
|
|
18
|
-
// 如需自定义样式,可以在这里添加
|
|
19
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-notification v-bind="$attrs" class="mc-notification">
|
|
3
|
+
<!-- 其他插槽 -->
|
|
4
|
+
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
5
|
+
<slot :name="name" />
|
|
6
|
+
</template>
|
|
7
|
+
</el-notification>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: "MNotification",
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style lang="scss">
|
|
17
|
+
// Notification 基础样式
|
|
18
|
+
// 如需自定义样式,可以在这里添加
|
|
19
|
+
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-option v-bind="$attrs">
|
|
3
|
-
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
4
|
-
<slot :name="name" />
|
|
5
|
-
</template>
|
|
6
|
-
</el-option>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup>
|
|
10
|
-
defineOptions({
|
|
11
|
-
name: 'MOption'
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-option v-bind="$attrs">
|
|
3
|
+
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
4
|
+
<slot :name="name" />
|
|
5
|
+
</template>
|
|
6
|
+
</el-option>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'MOption'
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-option-group v-bind="$attrs">
|
|
3
|
-
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
4
|
-
<slot :name="name" />
|
|
5
|
-
</template>
|
|
6
|
-
</el-option-group>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup>
|
|
10
|
-
defineOptions({
|
|
11
|
-
name: 'MOptionGroup'
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-option-group v-bind="$attrs">
|
|
3
|
+
<template v-for="(_, name) in $slots" :key="name" #[name]>
|
|
4
|
+
<slot :name="name" />
|
|
5
|
+
</template>
|
|
6
|
+
</el-option-group>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'MOptionGroup'
|
|
12
|
+
})
|
|
13
|
+
</script>
|