w-ui-v1 1.0.39 → 1.0.41
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/package.json +2 -4
- package/w-detail/w-detail.vue +1 -1
- package/w-form-message-box/w-form-message-box.vue +6 -0
- package/w-menu/w-menu.vue +1 -1
- package/w-search/w-search.vue +14 -5
- package/w-user/user-avatar-fill.png +0 -0
- package/w-user/w-user.vue +141 -104
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-ui-v1",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "w-ui",
|
|
5
5
|
"author": "wgxshh",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "index.ts",
|
|
8
|
-
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
-
},
|
|
8
|
+
|
|
11
9
|
"peerDependencies": {
|
|
12
10
|
"wot-design-uni": "^1.7.0",
|
|
13
11
|
"z-paging": "^2.8.5"
|
package/w-detail/w-detail.vue
CHANGED
|
@@ -85,6 +85,12 @@ function withSlot() {
|
|
|
85
85
|
message
|
|
86
86
|
.confirm({
|
|
87
87
|
title: pageConf.value?.title,
|
|
88
|
+
cancelButtonProps: {
|
|
89
|
+
round:false
|
|
90
|
+
},
|
|
91
|
+
confirmButtonProps: {
|
|
92
|
+
round:false
|
|
93
|
+
},
|
|
88
94
|
beforeConfirm:({ resolve }) => {
|
|
89
95
|
toast.loading(`${pageConf.value?.title}中...`)
|
|
90
96
|
customButtonSave(page.value.sourceId,props.itemData.code,model).then((res)=>{
|
package/w-menu/w-menu.vue
CHANGED
package/w-search/w-search.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:placeholder="`请选择${item.title}`" :source-id="item.sourceId" filterable />
|
|
15
15
|
<wd-input v-else-if="item.extControlType === 'text'" type="text" :label="item.title"
|
|
16
16
|
v-model="searchData[item.sourceId]" :placeholder="`请输入${item.title}`" clearable />
|
|
17
|
-
<wd-picker v-else-if="item.extControlType === '
|
|
17
|
+
<wd-picker v-else-if="item.extControlType === 'multiselect'" :columns="Enumcolumn[item.mstrucId]"
|
|
18
18
|
:label="item.title" :placeholder="`请选择${item.title}`" v-model="searchData[item.sourceId]" clearable />
|
|
19
19
|
<view v-else-if="item.extControlType === 'int'">
|
|
20
20
|
<wd-input type="number" :label="item.title" v-model="searchData[item.sourceId]"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
:placeholder="`请输入${item.title}`" clearable />
|
|
33
33
|
</view>
|
|
34
34
|
<view class="search-btn">
|
|
35
|
-
<wd-button size="small" icon="refresh" @click="clear" type="info">重置</wd-button>
|
|
36
|
-
<wd-button size="small" icon="search" @click="search">确定</wd-button>
|
|
35
|
+
<wd-button size="small" icon="refresh" :round="false" @click="clear" type="info">重置</wd-button>
|
|
36
|
+
<wd-button size="small" icon="search" :round="false" @click="search">确定</wd-button>
|
|
37
37
|
|
|
38
38
|
</view>
|
|
39
39
|
|
|
@@ -153,6 +153,9 @@ async function getEnumer() {
|
|
|
153
153
|
if (item.extControlType === 'select') {
|
|
154
154
|
params.push(`mstrucIds=${item.mstrucId}`)
|
|
155
155
|
}
|
|
156
|
+
if (item.extControlType === 'multiselect') {
|
|
157
|
+
params.push(`mstrucIds=${item.mstrucId}`)
|
|
158
|
+
}
|
|
156
159
|
|
|
157
160
|
});
|
|
158
161
|
if (!params.length) return
|
|
@@ -164,8 +167,9 @@ async function getEnumer() {
|
|
|
164
167
|
|
|
165
168
|
<style scoped lang="scss">
|
|
166
169
|
.search-box {
|
|
170
|
+
|
|
167
171
|
.left {
|
|
168
|
-
position: relative;
|
|
172
|
+
// position: relative;
|
|
169
173
|
|
|
170
174
|
.search-icon {
|
|
171
175
|
position: absolute;
|
|
@@ -176,7 +180,12 @@ async function getEnumer() {
|
|
|
176
180
|
}
|
|
177
181
|
|
|
178
182
|
.search-btn {
|
|
179
|
-
|
|
183
|
+
z-index: 1;
|
|
184
|
+
background-color: #fff;
|
|
185
|
+
height: 30px;
|
|
186
|
+
position: sticky;
|
|
187
|
+
bottom: 0;
|
|
188
|
+
padding: 20rpx;
|
|
180
189
|
display: flex;
|
|
181
190
|
justify-content: space-between;
|
|
182
191
|
|
|
Binary file
|
package/w-user/w-user.vue
CHANGED
|
@@ -1,112 +1,149 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
<view class="user">
|
|
3
|
+
<view class="top-box">
|
|
4
|
+
<!-- 用户头部信息 -->
|
|
5
|
+
<view class="user-header">
|
|
6
|
+
<view class="user-info">
|
|
7
|
+
<!-- <img src="user.avatar" class="avatar" alt="用户头像"> -->
|
|
8
|
+
<image class="avatar" src="./user-avatar-fill.png" mode=""></image>
|
|
9
|
+
<view class="user-text">
|
|
10
|
+
<view class="user-name">{{ userInfo.name }}</view>
|
|
11
|
+
<view class="user-nickname">
|
|
12
|
+
昵称:{{ userInfo.nickName }}
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
</view>
|
|
18
|
+
|
|
19
|
+
<wd-cell-group>
|
|
20
|
+
<wd-cell title="个人信息" icon="user" v-if="userInfo.viewPersonalInfoable" :is-link="true" :clickable="true"
|
|
21
|
+
@click="goUserInfo" />
|
|
22
|
+
<!-- <wd-cell title="修改密码" icon="keywords" :is-link="true" :clickable="true" /> -->
|
|
23
|
+
<wd-cell title="退出登录" icon="logout" :is-link="true" :clickable="true" @click="quit" />
|
|
24
|
+
</wd-cell-group>
|
|
25
|
+
<wd-message-box />
|
|
26
|
+
</view>
|
|
26
27
|
</template>
|
|
27
28
|
|
|
28
29
|
<script setup lang="ts">
|
|
29
|
-
import { ref } from 'vue';
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
} from 'wot-design-uni'
|
|
33
|
-
defineOptions({
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
const message = useMessage()
|
|
37
|
-
const userInfo = ref({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
//退出登录
|
|
44
|
-
const quit = () => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
//查看用户信息
|
|
63
|
-
const goUserInfo = () => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
30
|
+
import { ref } from 'vue';
|
|
31
|
+
import {
|
|
32
|
+
useMessage
|
|
33
|
+
} from 'wot-design-uni'
|
|
34
|
+
defineOptions({
|
|
35
|
+
name: 'WUser'
|
|
36
|
+
})
|
|
37
|
+
const message = useMessage()
|
|
38
|
+
const userInfo = ref({
|
|
39
|
+
name: uni.getStorageSync('userInfo').name,
|
|
40
|
+
nickName: uni.getStorageSync('userInfo').nickName,
|
|
41
|
+
viewPersonalInfoable: uni.getStorageSync('userInfo').viewPersonalInfoable
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
//退出登录
|
|
45
|
+
const quit = () => {
|
|
46
|
+
message
|
|
47
|
+
.confirm({
|
|
48
|
+
// msg: '提示文案',
|
|
49
|
+
title: '退出登录'
|
|
50
|
+
})
|
|
51
|
+
.then(() => {
|
|
52
|
+
uni.removeStorageSync('token')
|
|
53
|
+
uni.reLaunch({
|
|
54
|
+
url: '/pages/login/login'
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
.catch(() => {
|
|
58
|
+
console.log('点击了取消按钮')
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//查看用户信息
|
|
64
|
+
const goUserInfo = () => {
|
|
65
|
+
uni.navigateTo({
|
|
66
|
+
url: `/pages/detail/detail?sourceId=${uni.getStorageSync('userInfo').gtmplSourceId}&code=${uni.getStorageSync('userInfo').id}`
|
|
67
|
+
})
|
|
68
|
+
}
|
|
68
69
|
</script>
|
|
69
70
|
|
|
70
71
|
<style scoped lang="scss">
|
|
71
|
-
.user {
|
|
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
|
-
|
|
72
|
+
.user {
|
|
73
|
+
background-color: #f5f5f5;
|
|
74
|
+
height: 100vh;
|
|
75
|
+
|
|
76
|
+
.top-box {
|
|
77
|
+
padding: 15px;
|
|
78
|
+
.user-header {
|
|
79
|
+
border-radius: 10px;
|
|
80
|
+
margin: auto;
|
|
81
|
+
background: linear-gradient(135deg, #4a6cf7 0%, #2541b2 100%);
|
|
82
|
+
color: white;
|
|
83
|
+
padding: 30px 20px;
|
|
84
|
+
box-shadow: 0 4px 12px rgba(74, 108, 247, 0.2);
|
|
85
|
+
position: relative;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.user-header::before {
|
|
90
|
+
content: "";
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: -50px;
|
|
93
|
+
right: -50px;
|
|
94
|
+
width: 150px;
|
|
95
|
+
height: 150px;
|
|
96
|
+
background: rgba(255, 255, 255, 0.1);
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.user-header::after {
|
|
101
|
+
content: "";
|
|
102
|
+
position: absolute;
|
|
103
|
+
bottom: -80px;
|
|
104
|
+
left: -30px;
|
|
105
|
+
width: 200px;
|
|
106
|
+
height: 200px;
|
|
107
|
+
background: rgba(255, 255, 255, 0.05);
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.user-info {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
position: relative;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.avatar {
|
|
119
|
+
width: 140rpx;
|
|
120
|
+
height: 140rpx;
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
123
|
+
margin-right: 15px;
|
|
124
|
+
object-fit: cover;
|
|
125
|
+
// background-color: #fff;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.user-text {
|
|
129
|
+
flex: 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.user-name {
|
|
133
|
+
font-size: 20px;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
margin-bottom: 5px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.user-nickname {
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
opacity: 0.9;
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
}
|
|
112
149
|
</style>
|