wui-components-v2 1.1.69 → 1.1.71
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/api/core/index.ts +74 -74
- package/api/feishu.ts +20 -20
- package/api/index.ts +4 -4
- package/api/login.ts +51 -51
- package/api/menu.ts +45 -45
- package/api/page.ts +114 -114
- package/api/sys.ts +12 -12
- package/api/tree.ts +28 -28
- package/components/action-popup/action-popup.vue +116 -116
- package/components/add-address-list/add-address-list.vue +187 -187
- package/components/add-address-page/add-address-page.vue +77 -77
- package/components/add-address-page/config.ts +297 -297
- package/components/audio-play/audio-play.vue +220 -220
- package/components/batch-upload-file/batch-upload-file.vue +75 -75
- package/components/card-botom-buttons/card-botom-buttons.vue +279 -279
- package/components/custom-date-picker/custom-date-picker.vue +106 -106
- package/components/custom-select-picker/custom-select-picker.vue +95 -95
- package/components/demo-block/demo-block.vue +63 -63
- package/components/demo-card/demo-card.vue +44 -44
- package/components/detail-popup/detail-popup.vue +99 -99
- package/components/evaluation-page/evaluation-page.vue +196 -196
- package/components/fold-card/fold-card.vue +171 -171
- package/components/form-control/form-control.vue +661 -661
- package/components/global-loading/GlobalLoading.md +366 -366
- package/components/global-loading/global-loading.vue +55 -55
- package/components/global-message/GlobalMessage.md +570 -570
- package/components/global-message/global-message.vue +68 -68
- package/components/global-toast/GlobalToast.md +261 -261
- package/components/global-toast/global-toast.vue +56 -56
- package/components/label-value/label-value.vue +144 -144
- package/components/label-value/open-value-more.vue +56 -56
- package/components/list-top-buttons/list-top-buttons.vue +19 -19
- package/components/loading/loading.vue +5 -5
- package/components/login-form/login-form.vue +126 -126
- package/components/login-form-box/login-form-box.vue +65 -65
- package/components/mulselect-picker/mulselect-picker.vue +86 -86
- package/components/phone-login-form/phone-login-form.vue +204 -204
- package/components/privacy-popup/privacy-popup.vue +191 -191
- package/components/product-card/product-card.vue +201 -201
- package/components/scan-input/scan-input.vue +406 -406
- package/components/search/search.vue +128 -128
- package/components/select-col-picker/select-col-picker.vue +168 -168
- package/components/tab-search/tab-search.vue +73 -73
- package/components/tree-select/components/TreeNode.vue +200 -200
- package/components/tree-select/components/index.vue +471 -471
- package/components/tree-select/components/tree-select.vue +56 -56
- package/components/tree-select/index.vue +93 -93
- package/components/user-choose/user-choose.vue +169 -151
- package/components/video-play/video-play.vue +56 -56
- package/components/wui-auto-update-component/wui-auto-update-component.vue +132 -132
- package/components/wui-default/wui-default.vue +49 -49
- package/components/wui-details-page/wui-details-page.vue +147 -147
- package/components/wui-edit-page/wui-edit-page-copy.vue +757 -757
- package/components/wui-edit-page/wui-edit-page.vue +793 -793
- package/components/wui-enume-select-control/wui-enume-select-control.vue +92 -92
- package/components/wui-list/wui-list.vue +235 -235
- package/components/wui-login/wui-login.vue +43 -43
- package/components/wui-login1/wui-login.vue +41 -41
- package/components/wui-menus/wui-menus-top.vue +137 -137
- package/components/wui-menus/wui-menus-top1.vue +8 -8
- package/components/wui-menus/wui-menus.vue +247 -247
- package/components/wui-menus1/components/banner-carousel.vue +320 -320
- package/components/wui-menus1/components/navbar.vue +43 -43
- package/components/wui-menus1/components/quick-panel.vue +55 -55
- package/components/wui-menus1/components/search-bar.vue +49 -49
- package/components/wui-menus1/components/section-menus.vue +208 -208
- package/components/wui-menus1/wui-menus-top.vue +718 -718
- package/components/wui-menus1/wui-menus-top1.vue +398 -398
- package/components/wui-menus1/wui-menus.vue +564 -564
- package/components/wui-notify-info/notify-handle.vue +53 -53
- package/components/wui-notify-info/wui-notify-info.vue +280 -280
- package/components/wui-scan-binding-sensor/wui-scan-binding-sensor.vue +75 -75
- package/components/wui-search-history-babbar/components/SearchBar.vue +70 -70
- package/components/wui-search-history-babbar/wui-search-history-babbar.vue +204 -204
- package/components/wui-select-list/wui-select-list.vue +310 -310
- package/components/wui-select-popup/wui-select-popup.vue +613 -612
- package/components/wui-system-settings/wui-system-settings.vue +144 -144
- package/components/wui-tabbar/wui-tabbar.vue +106 -106
- package/components/wui-tree-page/components/tree-item.vue +238 -238
- package/components/wui-tree-page/wui-tree-page.vue +297 -297
- package/components/wui-update-component/wui-update-component.vue +221 -221
- package/components/wui-user/wui-user.vue +202 -202
- package/composables/types/theme.ts +65 -65
- package/composables/types/user.ts +5 -5
- package/composables/useColorGenerator.ts +221 -221
- package/composables/useCompanyFieldFilter.ts +91 -91
- package/composables/useEnumes.ts +43 -43
- package/composables/useEventBus.ts +37 -37
- package/composables/useGlobalLoading.ts +47 -47
- package/composables/useGlobalMessage.ts +53 -53
- package/composables/useGlobalToast.ts +63 -63
- package/composables/useLocale.ts +54 -54
- package/composables/useManualTheme.ts +179 -179
- package/composables/useMenus.ts +193 -193
- package/composables/useSectionMenus.ts +120 -120
- package/composables/useTabbar.ts +50 -50
- package/composables/useTheme.ts +74 -74
- package/composables/useUser.ts +24 -24
- package/index.d.ts +90 -90
- package/index.ts +83 -83
- package/package.json +24 -24
- package/static/iconfont/iconfont.css +63 -63
- package/store/language.ts +151 -151
- package/store/manualThemeStore.ts +143 -143
- package/store/persist.ts +41 -41
- package/store/themeStore.ts +74 -74
- package/store/userStore.ts +22 -22
- package/styles/dark-mode.css +523 -523
- package/styles/dark-mode.min.css +1 -1
- package/styles/dark-mode.scss +498 -498
- package/type.ts +154 -154
- package/utils/control-tree.ts +353 -353
- package/utils/control-type-supportor.ts +148 -148
- package/utils/eventBus.ts +36 -36
- package/utils/idata-scan.ts +99 -99
- package/utils/index.ts +979 -979
- package/utils/rsaEncrypt.ts +10 -10
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from 'vue'
|
|
3
|
-
import { useDialog } from '@wot-ui/ui'
|
|
4
|
-
import { useUser } from '../../composables/useUser'
|
|
5
|
-
import { generateGradientColor } from '../../utils'
|
|
6
|
-
import { useManualTheme } from '../../composables/useManualTheme'
|
|
7
|
-
import scan from '../scan-input/scan-input.vue'
|
|
8
|
-
import { getUserConfig } from '../../api/login'
|
|
9
|
-
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
10
|
-
|
|
11
|
-
defineOptions({
|
|
12
|
-
name: 'WuiUser',
|
|
13
|
-
})
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
loginPath: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: '/pages/login/index',
|
|
18
|
-
},
|
|
19
|
-
showLogout: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: true,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const { currentThemeColor, isDark } = useManualTheme()
|
|
26
|
-
|
|
27
|
-
// Cell 暗黑样式 - 通过 custom-style 直接注入组件内联样式
|
|
28
|
-
const cellStyle = computed(() => ({
|
|
29
|
-
backgroundColor: isDark.value ? '#161616' : '#fff',
|
|
30
|
-
borderBottom: isDark.value ? '1px solid rgba(255,255,255,0.04)' : 'none',
|
|
31
|
-
}))
|
|
32
|
-
|
|
33
|
-
// CellGroup 暗黑样式
|
|
34
|
-
const cellGroupStyle = computed(() => ({
|
|
35
|
-
backgroundColor: isDark.value ? '#111111' : 'transparent',
|
|
36
|
-
borderRadius: isDark.value ? '10px' : '0',
|
|
37
|
-
}))
|
|
38
|
-
const user = useUser().getUserInfo()
|
|
39
|
-
const dialog = useDialog()
|
|
40
|
-
const toast = useGlobalToast()
|
|
41
|
-
const userInfo = ref({
|
|
42
|
-
name: user.name,
|
|
43
|
-
nickName: user.nickName,
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
// 退出登录
|
|
47
|
-
function quit() {
|
|
48
|
-
dialog
|
|
49
|
-
.confirm({
|
|
50
|
-
title: '退出登录',
|
|
51
|
-
})
|
|
52
|
-
.then(() => {
|
|
53
|
-
uni.removeStorageSync('TOKEN')
|
|
54
|
-
uni.reLaunch({
|
|
55
|
-
url: props.loginPath,
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
.catch(() => {
|
|
59
|
-
console.log('点击了取消按钮')
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// 系统设置
|
|
64
|
-
function setting() {
|
|
65
|
-
uni.navigateTo({
|
|
66
|
-
url: '/pages/system-settings/index',
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
async function clearCache() {
|
|
70
|
-
const res = await getUserConfig()
|
|
71
|
-
if (res.status == 'success') {
|
|
72
|
-
toast.success({ msg: '清除成功!' })
|
|
73
|
-
uni.setStorageSync('userInfo', res.user)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<template>
|
|
79
|
-
<view class="user">
|
|
80
|
-
<view class="top-box">
|
|
81
|
-
<!-- 用户头部信息 -->
|
|
82
|
-
<view
|
|
83
|
-
class="user-header"
|
|
84
|
-
:style="{
|
|
85
|
-
background: isDark
|
|
86
|
-
? 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'
|
|
87
|
-
: generateGradientColor(currentThemeColor.primary, 135, 1, 0.7),
|
|
88
|
-
boxShadow: isDark
|
|
89
|
-
? '0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05)'
|
|
90
|
-
: '0 4px 12px rgba(74, 108, 247, 0.25)',
|
|
91
|
-
border: isDark ? '1px solid rgba(255,255,255,0.06)' : 'none',
|
|
92
|
-
borderRadius: '10px',
|
|
93
|
-
}"
|
|
94
|
-
>
|
|
95
|
-
<view class="user-info">
|
|
96
|
-
<image
|
|
97
|
-
class="avatar"
|
|
98
|
-
src="./user-avatar-fill.png"
|
|
99
|
-
:style="{ borderColor: isDark ? 'rgba(255,255,255,0.2)' : 'rgba(255,255,255,0.3)' }"
|
|
100
|
-
/>
|
|
101
|
-
<view class="user-text">
|
|
102
|
-
<view class="user-name">{{ userInfo.name }}</view>
|
|
103
|
-
<view class="user-nickname">昵称:{{ userInfo.nickName }}</view>
|
|
104
|
-
</view>
|
|
105
|
-
</view>
|
|
106
|
-
</view>
|
|
107
|
-
</view>
|
|
108
|
-
|
|
109
|
-
<view class="mx-[15px] rounded-2">
|
|
110
|
-
<wd-cell-group :custom-style="cellGroupStyle">
|
|
111
|
-
<wd-cell
|
|
112
|
-
title="系统设置"
|
|
113
|
-
icon="setting"
|
|
114
|
-
:is-link="true"
|
|
115
|
-
:clickable="true"
|
|
116
|
-
:custom-style="cellStyle"
|
|
117
|
-
@click="setting"
|
|
118
|
-
/>
|
|
119
|
-
<wd-cell title="清空缓存" :is-link="true" :clickable="true" :custom-style="cellStyle" @click="clearCache" />
|
|
120
|
-
<wd-cell
|
|
121
|
-
v-if="showLogout"
|
|
122
|
-
title="退出登录"
|
|
123
|
-
icon="logout"
|
|
124
|
-
:is-link="true"
|
|
125
|
-
:clickable="true"
|
|
126
|
-
:custom-style="cellStyle"
|
|
127
|
-
@click="quit"
|
|
128
|
-
/>
|
|
129
|
-
</wd-cell-group>
|
|
130
|
-
</view>
|
|
131
|
-
<wd-dialog />
|
|
132
|
-
</view>
|
|
133
|
-
</template>
|
|
134
|
-
|
|
135
|
-
<style scoped lang="scss">
|
|
136
|
-
.user {
|
|
137
|
-
.top-box {
|
|
138
|
-
padding: 15px;
|
|
139
|
-
|
|
140
|
-
.user-header {
|
|
141
|
-
color: white;
|
|
142
|
-
padding: 30px 20px;
|
|
143
|
-
position: relative;
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.user-header::before {
|
|
148
|
-
content: '';
|
|
149
|
-
position: absolute;
|
|
150
|
-
top: -50px;
|
|
151
|
-
right: -50px;
|
|
152
|
-
width: 150px;
|
|
153
|
-
height: 150px;
|
|
154
|
-
background: rgba(255, 255, 255, 0.1);
|
|
155
|
-
border-radius: 50%;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.user-header::after {
|
|
159
|
-
content: '';
|
|
160
|
-
position: absolute;
|
|
161
|
-
bottom: -80px;
|
|
162
|
-
left: -30px;
|
|
163
|
-
width: 200px;
|
|
164
|
-
height: 200px;
|
|
165
|
-
background: rgba(255, 255, 255, 0.05);
|
|
166
|
-
border-radius: 50%;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.user-info {
|
|
170
|
-
display: flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
position: relative;
|
|
173
|
-
z-index: 1;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.avatar {
|
|
177
|
-
width: 120rpx;
|
|
178
|
-
height: 120rpx;
|
|
179
|
-
border-radius: 50%;
|
|
180
|
-
margin-right: 15px;
|
|
181
|
-
object-fit: cover;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.user-text {
|
|
185
|
-
flex: 1;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.user-name {
|
|
189
|
-
font-size: 20px;
|
|
190
|
-
font-weight: 600;
|
|
191
|
-
margin-bottom: 5px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.user-nickname {
|
|
195
|
-
font-size: 14px;
|
|
196
|
-
opacity: 0.9;
|
|
197
|
-
display: flex;
|
|
198
|
-
align-items: center;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import { useDialog } from '@wot-ui/ui'
|
|
4
|
+
import { useUser } from '../../composables/useUser'
|
|
5
|
+
import { generateGradientColor } from '../../utils'
|
|
6
|
+
import { useManualTheme } from '../../composables/useManualTheme'
|
|
7
|
+
import scan from '../scan-input/scan-input.vue'
|
|
8
|
+
import { getUserConfig } from '../../api/login'
|
|
9
|
+
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
10
|
+
|
|
11
|
+
defineOptions({
|
|
12
|
+
name: 'WuiUser',
|
|
13
|
+
})
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
loginPath: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '/pages/login/index',
|
|
18
|
+
},
|
|
19
|
+
showLogout: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true,
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const { currentThemeColor, isDark } = useManualTheme()
|
|
26
|
+
|
|
27
|
+
// Cell 暗黑样式 - 通过 custom-style 直接注入组件内联样式
|
|
28
|
+
const cellStyle = computed(() => ({
|
|
29
|
+
backgroundColor: isDark.value ? '#161616' : '#fff',
|
|
30
|
+
borderBottom: isDark.value ? '1px solid rgba(255,255,255,0.04)' : 'none',
|
|
31
|
+
}))
|
|
32
|
+
|
|
33
|
+
// CellGroup 暗黑样式
|
|
34
|
+
const cellGroupStyle = computed(() => ({
|
|
35
|
+
backgroundColor: isDark.value ? '#111111' : 'transparent',
|
|
36
|
+
borderRadius: isDark.value ? '10px' : '0',
|
|
37
|
+
}))
|
|
38
|
+
const user = useUser().getUserInfo()
|
|
39
|
+
const dialog = useDialog()
|
|
40
|
+
const toast = useGlobalToast()
|
|
41
|
+
const userInfo = ref({
|
|
42
|
+
name: user.name,
|
|
43
|
+
nickName: user.nickName,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
// 退出登录
|
|
47
|
+
function quit() {
|
|
48
|
+
dialog
|
|
49
|
+
.confirm({
|
|
50
|
+
title: '退出登录',
|
|
51
|
+
})
|
|
52
|
+
.then(() => {
|
|
53
|
+
uni.removeStorageSync('TOKEN')
|
|
54
|
+
uni.reLaunch({
|
|
55
|
+
url: props.loginPath,
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
.catch(() => {
|
|
59
|
+
console.log('点击了取消按钮')
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 系统设置
|
|
64
|
+
function setting() {
|
|
65
|
+
uni.navigateTo({
|
|
66
|
+
url: '/pages/system-settings/index',
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
async function clearCache() {
|
|
70
|
+
const res = await getUserConfig()
|
|
71
|
+
if (res.status == 'success') {
|
|
72
|
+
toast.success({ msg: '清除成功!' })
|
|
73
|
+
uni.setStorageSync('userInfo', res.user)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<template>
|
|
79
|
+
<view class="user">
|
|
80
|
+
<view class="top-box">
|
|
81
|
+
<!-- 用户头部信息 -->
|
|
82
|
+
<view
|
|
83
|
+
class="user-header"
|
|
84
|
+
:style="{
|
|
85
|
+
background: isDark
|
|
86
|
+
? 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'
|
|
87
|
+
: generateGradientColor(currentThemeColor.primary, 135, 1, 0.7),
|
|
88
|
+
boxShadow: isDark
|
|
89
|
+
? '0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05)'
|
|
90
|
+
: '0 4px 12px rgba(74, 108, 247, 0.25)',
|
|
91
|
+
border: isDark ? '1px solid rgba(255,255,255,0.06)' : 'none',
|
|
92
|
+
borderRadius: '10px',
|
|
93
|
+
}"
|
|
94
|
+
>
|
|
95
|
+
<view class="user-info">
|
|
96
|
+
<image
|
|
97
|
+
class="avatar"
|
|
98
|
+
src="./user-avatar-fill.png"
|
|
99
|
+
:style="{ borderColor: isDark ? 'rgba(255,255,255,0.2)' : 'rgba(255,255,255,0.3)' }"
|
|
100
|
+
/>
|
|
101
|
+
<view class="user-text">
|
|
102
|
+
<view class="user-name">{{ userInfo.name }}</view>
|
|
103
|
+
<view class="user-nickname">昵称:{{ userInfo.nickName }}</view>
|
|
104
|
+
</view>
|
|
105
|
+
</view>
|
|
106
|
+
</view>
|
|
107
|
+
</view>
|
|
108
|
+
|
|
109
|
+
<view class="mx-[15px] rounded-2">
|
|
110
|
+
<wd-cell-group :custom-style="cellGroupStyle">
|
|
111
|
+
<wd-cell
|
|
112
|
+
title="系统设置"
|
|
113
|
+
icon="setting"
|
|
114
|
+
:is-link="true"
|
|
115
|
+
:clickable="true"
|
|
116
|
+
:custom-style="cellStyle"
|
|
117
|
+
@click="setting"
|
|
118
|
+
/>
|
|
119
|
+
<wd-cell title="清空缓存" :is-link="true" :clickable="true" :custom-style="cellStyle" @click="clearCache" />
|
|
120
|
+
<wd-cell
|
|
121
|
+
v-if="showLogout"
|
|
122
|
+
title="退出登录"
|
|
123
|
+
icon="logout"
|
|
124
|
+
:is-link="true"
|
|
125
|
+
:clickable="true"
|
|
126
|
+
:custom-style="cellStyle"
|
|
127
|
+
@click="quit"
|
|
128
|
+
/>
|
|
129
|
+
</wd-cell-group>
|
|
130
|
+
</view>
|
|
131
|
+
<wd-dialog />
|
|
132
|
+
</view>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<style scoped lang="scss">
|
|
136
|
+
.user {
|
|
137
|
+
.top-box {
|
|
138
|
+
padding: 15px;
|
|
139
|
+
|
|
140
|
+
.user-header {
|
|
141
|
+
color: white;
|
|
142
|
+
padding: 30px 20px;
|
|
143
|
+
position: relative;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.user-header::before {
|
|
148
|
+
content: '';
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: -50px;
|
|
151
|
+
right: -50px;
|
|
152
|
+
width: 150px;
|
|
153
|
+
height: 150px;
|
|
154
|
+
background: rgba(255, 255, 255, 0.1);
|
|
155
|
+
border-radius: 50%;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.user-header::after {
|
|
159
|
+
content: '';
|
|
160
|
+
position: absolute;
|
|
161
|
+
bottom: -80px;
|
|
162
|
+
left: -30px;
|
|
163
|
+
width: 200px;
|
|
164
|
+
height: 200px;
|
|
165
|
+
background: rgba(255, 255, 255, 0.05);
|
|
166
|
+
border-radius: 50%;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.user-info {
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
position: relative;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.avatar {
|
|
177
|
+
width: 120rpx;
|
|
178
|
+
height: 120rpx;
|
|
179
|
+
border-radius: 50%;
|
|
180
|
+
margin-right: 15px;
|
|
181
|
+
object-fit: cover;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.user-text {
|
|
185
|
+
flex: 1;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.user-name {
|
|
189
|
+
font-size: 20px;
|
|
190
|
+
font-weight: 600;
|
|
191
|
+
margin-bottom: 5px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.user-nickname {
|
|
195
|
+
font-size: 14px;
|
|
196
|
+
opacity: 0.9;
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
</style>
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import type { ConfigProviderThemeVars } from '@wot-ui/ui'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 主题色选项接口
|
|
5
|
-
*/
|
|
6
|
-
export interface ThemeColorOption {
|
|
7
|
-
name: string
|
|
8
|
-
value: string
|
|
9
|
-
primary: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 语言选项接口
|
|
14
|
-
*/
|
|
15
|
-
export interface LocaleOption {
|
|
16
|
-
name: string
|
|
17
|
-
value: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 主题类型
|
|
22
|
-
*/
|
|
23
|
-
export type ThemeMode = 'light' | 'dark'
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 主题状态接口
|
|
27
|
-
*/
|
|
28
|
-
export interface ThemeState {
|
|
29
|
-
theme: ThemeMode
|
|
30
|
-
Locale: LocaleOption
|
|
31
|
-
followSystem: boolean
|
|
32
|
-
hasUserSet: boolean
|
|
33
|
-
currentThemeColor: ThemeColorOption
|
|
34
|
-
themeVars: ConfigProviderThemeVars
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 系统主题状态接口(简化版)
|
|
39
|
-
*/
|
|
40
|
-
export interface SystemThemeState {
|
|
41
|
-
theme: ThemeMode
|
|
42
|
-
themeVars: ConfigProviderThemeVars
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 预定义的主题色选项
|
|
47
|
-
*/
|
|
48
|
-
export const themeColorOptions: ThemeColorOption[] = [
|
|
49
|
-
{ name: '深蓝', value: 'sblue', primary: '#2164F3' },
|
|
50
|
-
{ name: '浅蓝', value: 'blue', primary: '#4D7FFF' },
|
|
51
|
-
{ name: '活力橙', value: 'orange', primary: '#FF7D00' },
|
|
52
|
-
{ name: '薄荷绿', value: 'green', primary: '#07C160' },
|
|
53
|
-
{ name: '樱花粉', value: 'pink', primary: '#FF69B4' },
|
|
54
|
-
{ name: '紫罗兰', value: 'purple', primary: '#8A2BE2' },
|
|
55
|
-
{ name: '朱砂红', value: 'red', primary: '#FF4757' },
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 预定义的语言选项
|
|
60
|
-
*/
|
|
61
|
-
export const LocaleOptions: LocaleOption[] = [
|
|
62
|
-
{ name: '简体中文', value: 'zh-CN' },
|
|
63
|
-
{ name: 'English', value: 'en-US' },
|
|
64
|
-
{ name: '阿拉伯语', value: 'ar-SA' },
|
|
65
|
-
]
|
|
1
|
+
import type { ConfigProviderThemeVars } from '@wot-ui/ui'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 主题色选项接口
|
|
5
|
+
*/
|
|
6
|
+
export interface ThemeColorOption {
|
|
7
|
+
name: string
|
|
8
|
+
value: string
|
|
9
|
+
primary: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 语言选项接口
|
|
14
|
+
*/
|
|
15
|
+
export interface LocaleOption {
|
|
16
|
+
name: string
|
|
17
|
+
value: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 主题类型
|
|
22
|
+
*/
|
|
23
|
+
export type ThemeMode = 'light' | 'dark'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 主题状态接口
|
|
27
|
+
*/
|
|
28
|
+
export interface ThemeState {
|
|
29
|
+
theme: ThemeMode
|
|
30
|
+
Locale: LocaleOption
|
|
31
|
+
followSystem: boolean
|
|
32
|
+
hasUserSet: boolean
|
|
33
|
+
currentThemeColor: ThemeColorOption
|
|
34
|
+
themeVars: ConfigProviderThemeVars
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 系统主题状态接口(简化版)
|
|
39
|
+
*/
|
|
40
|
+
export interface SystemThemeState {
|
|
41
|
+
theme: ThemeMode
|
|
42
|
+
themeVars: ConfigProviderThemeVars
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 预定义的主题色选项
|
|
47
|
+
*/
|
|
48
|
+
export const themeColorOptions: ThemeColorOption[] = [
|
|
49
|
+
{ name: '深蓝', value: 'sblue', primary: '#2164F3' },
|
|
50
|
+
{ name: '浅蓝', value: 'blue', primary: '#4D7FFF' },
|
|
51
|
+
{ name: '活力橙', value: 'orange', primary: '#FF7D00' },
|
|
52
|
+
{ name: '薄荷绿', value: 'green', primary: '#07C160' },
|
|
53
|
+
{ name: '樱花粉', value: 'pink', primary: '#FF69B4' },
|
|
54
|
+
{ name: '紫罗兰', value: 'purple', primary: '#8A2BE2' },
|
|
55
|
+
{ name: '朱砂红', value: 'red', primary: '#FF4757' },
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 预定义的语言选项
|
|
60
|
+
*/
|
|
61
|
+
export const LocaleOptions: LocaleOption[] = [
|
|
62
|
+
{ name: '简体中文', value: 'zh-CN' },
|
|
63
|
+
{ name: 'English', value: 'en-US' },
|
|
64
|
+
{ name: '阿拉伯语', value: 'ar-SA' },
|
|
65
|
+
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface UserInfo {
|
|
2
|
-
id: string
|
|
3
|
-
name: string
|
|
4
|
-
nickName: string
|
|
5
|
-
}
|
|
1
|
+
export interface UserInfo {
|
|
2
|
+
id: string
|
|
3
|
+
name: string
|
|
4
|
+
nickName: string
|
|
5
|
+
}
|