w-ui-v1 1.0.15 → 1.0.17
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/index.ts +3 -1
- package/package.json +1 -1
- package/w-detail/w-detail.vue +1 -1
- package/w-login/w-login.vue +3 -0
- package/w-menu/w-menu.vue +1 -1
- package/w-table/w-table.vue +1 -0
- package/w-user/w-user.vue +82 -0
package/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import wSelectPicker from './w-select-picker/w-select-picker.vue'
|
|
|
8
8
|
import wDetail from './w-detail/w-detail.vue'
|
|
9
9
|
import wAdd from './w-add/w-add.vue'
|
|
10
10
|
import WSearch from './w-search/w-search.vue'
|
|
11
|
+
import WUser from './w-user/w-user.vue'
|
|
11
12
|
const coms: any[] = [
|
|
12
13
|
wTest,
|
|
13
14
|
wLogin,
|
|
@@ -17,7 +18,8 @@ const coms: any[] = [
|
|
|
17
18
|
wSelectPicker,
|
|
18
19
|
wDetail,
|
|
19
20
|
wAdd,
|
|
20
|
-
WSearch
|
|
21
|
+
WSearch,
|
|
22
|
+
WUser
|
|
21
23
|
]
|
|
22
24
|
// 批量组件注册
|
|
23
25
|
function install(Vue: App) {
|
package/package.json
CHANGED
package/w-detail/w-detail.vue
CHANGED
package/w-login/w-login.vue
CHANGED
package/w-menu/w-menu.vue
CHANGED
|
@@ -47,7 +47,7 @@ function sheetGotoPage(item: any) {
|
|
|
47
47
|
function goto(item: any) {
|
|
48
48
|
if (item.pageType) {
|
|
49
49
|
uni.navigateTo({
|
|
50
|
-
url: `/pages/table/table?sourceId=${item.id}&
|
|
50
|
+
url: `/pages/table/table?sourceId=${item.id}&pageTitle=${item.title}`,
|
|
51
51
|
})
|
|
52
52
|
return true
|
|
53
53
|
}
|
package/w-table/w-table.vue
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="user">
|
|
3
|
+
<view class="top">
|
|
4
|
+
<view class="circle">
|
|
5
|
+
<wd-icon name="user-circle" size="120rpx" color="#bababa"></wd-icon>
|
|
6
|
+
</view>
|
|
7
|
+
<view class="username">
|
|
8
|
+
<view class="name">
|
|
9
|
+
<text>{{ userInfo['用户名'] }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
13
|
+
<wd-cell-group>
|
|
14
|
+
<wd-cell title="退出登录" icon="logout" :is-link="true" :clickable="true" @click="quit" />
|
|
15
|
+
</wd-cell-group>
|
|
16
|
+
<wd-message-box />
|
|
17
|
+
</view>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { ref } from 'vue';
|
|
22
|
+
import {
|
|
23
|
+
useMessage
|
|
24
|
+
} from 'wot-design-uni'
|
|
25
|
+
defineOptions({
|
|
26
|
+
name: 'WUser'
|
|
27
|
+
})
|
|
28
|
+
const message = useMessage()
|
|
29
|
+
const userInfo = ref({
|
|
30
|
+
'用户名':uni.getStorageSync('userInfo').username,
|
|
31
|
+
})
|
|
32
|
+
const quit = () => {
|
|
33
|
+
message
|
|
34
|
+
.confirm({
|
|
35
|
+
// msg: '提示文案',
|
|
36
|
+
title: '退出登录'
|
|
37
|
+
})
|
|
38
|
+
.then(() => {
|
|
39
|
+
uni.removeStorageSync('token')
|
|
40
|
+
uni.reLaunch({
|
|
41
|
+
url: '/pages/login/login'
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
.catch(() => {
|
|
45
|
+
console.log('点击了取消按钮')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style scoped lang="scss">
|
|
52
|
+
.user {
|
|
53
|
+
background-color: #f5f5f5;
|
|
54
|
+
height: 100vh;
|
|
55
|
+
|
|
56
|
+
.top {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: 25rpx;
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
|
|
62
|
+
.circle {
|
|
63
|
+
background-color: #efefef;
|
|
64
|
+
border-radius: 100%;
|
|
65
|
+
margin-right: 20rpx;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.username {
|
|
69
|
+
font-size: 40rpx;
|
|
70
|
+
|
|
71
|
+
.name {
|
|
72
|
+
margin-bottom: 10rpx;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ic {
|
|
76
|
+
font-size: 30rpx;
|
|
77
|
+
color: #ccc;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|