st-comp 0.0.202 → 0.0.204
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/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +29 -29
- package/es/FactorWarning.js +33 -33
- package/es/Kline.js +17 -17
- package/es/KlineBasic.js +26 -26
- package/es/KlineConfig.js +61 -61
- package/es/KlineNew.js +16 -16
- package/es/KlinePlus.js +19 -19
- package/es/Map.cjs +1 -1
- package/es/Map.js +1 -102944
- package/es/Pagination.js +73 -73
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.js +38 -38
- package/es/User.cjs +1 -1
- package/es/User.js +758 -711
- package/es/VarSelectDialog.js +24 -24
- package/es/VarietyAutoComplete.js +10 -10
- package/es/VarietySearch.js +34 -34
- package/es/VarietyTextCopy.js +12 -12
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-eaef9418.js → _initCloneObject-4ff4ab39.js} +7 -7
- package/es/{base-a5af3db3.js → base-ff0e366f.js} +40 -40
- package/es/{castArray-7741a212.js → castArray-15070be9.js} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-1a9362d1.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-e9e47f9a.js} +1 -1
- package/es/{dropdown-a59bba73.js → dropdown-b3b26078.js} +13 -13
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-a52b6885.js} +16 -16
- package/es/{el-button-c95adb85.js → el-button-65aa0485.js} +39 -39
- package/es/{el-checkbox-7421ccd3.js → el-checkbox-feb78213.js} +31 -31
- package/es/{el-dialog-41ab8417.js → el-dialog-234e3137.js} +15 -15
- package/es/{el-divider-4e059794.js → el-divider-4fe55ebe.js} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-ceecb81c.js} +5 -5
- package/es/{el-form-item-c53c374d.js → el-form-item-a68893fa.js} +34 -34
- package/es/{el-input-2f75c4ba.js → el-input-77c46a8a.js} +55 -55
- package/es/{el-input-number-5193fe6d.js → el-input-number-23da18a4.js} +31 -31
- package/es/{el-loading-f6022062.js → el-loading-025e8c34.js} +5 -5
- package/es/{el-menu-item-7e881203.js → el-menu-item-b1e678ba.js} +22 -22
- package/es/{el-message-e544a8f5.js → el-message-8d817082.js} +23 -23
- package/es/{el-message-box-a93d2f6a.js → el-message-box-db6c3469.js} +11 -11
- package/es/{el-overlay-09ad71cd.js → el-overlay-3ebd4a6a.js} +56 -56
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-5d93ad96.js} +20 -20
- package/es/{el-popper-b4f97157.js → el-popper-ba55a170.js} +109 -109
- package/es/{el-segmented-b868d074.js → el-segmented-2813a6dc.js} +8 -8
- package/es/{el-select-95627997.js → el-select-71af6fab.js} +64 -64
- package/es/{el-table-column-376cd907.js → el-table-column-5d64176c.js} +15 -15
- package/es/{el-tag-66cab138.js → el-tag-ca50befb.js} +15 -15
- package/es/{el-text-ac60d0f2.js → el-text-697ca5b5.js} +2 -2
- package/es/{index-960806da.js → index-269b8a8c.js} +36 -36
- package/es/{index-d91dc23f.js → index-56abb80d.js} +12 -12
- package/es/{index-844bdd85.js → index-730c5d79.js} +34 -34
- package/es/{index-e5566b94.js → index-7b6ba27d.js} +43 -43
- package/es/{index-a871c3eb.js → index-8525fbd3.js} +27 -27
- package/es/{index-1f7d4f70.js → index-923df02f.js} +2 -2
- package/es/{index-d77a7336.js → index-93a8960e.js} +1 -1
- package/es/{index-88546436.js → index-c30bd093.js} +17 -17
- package/es/{index-57672682.js → index-fca9441b.js} +3 -3
- package/es/raf-8e05a7f4.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-41b4f625.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-815d48a6.js → use-form-common-props-b342410c.js} +67 -67
- package/es/{use-global-config-b5e9d3d5.js → use-global-config-409a5a22.js} +14 -14
- package/es/{validator-764a9db0.js → validator-46456823.js} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-06571d5b.js} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-87c8697d.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +29 -29
- package/lib/{index-a45d1494.js → index-41eb55d2.js} +1155 -1108
- package/lib/{python-82d17c8d.js → python-89c64241.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/User/components/EditInfoDialog/Mobile.vue +114 -10
- package/packages/User/components/EditInfoDialog/index.vue +32 -7
- package/packages/User/components/EditPasswordDialog.vue +97 -69
- package/packages/User/components/SetPasswordDialog.vue +87 -59
- package/packages/User/index.vue +5 -2
- package/src/pages/User/index.vue +1 -1
- package/es/raf-80ef0c0a.js +0 -6
package/package.json
CHANGED
|
@@ -9,16 +9,16 @@ const visible = ref(false);
|
|
|
9
9
|
const ruleFormRef = ref();
|
|
10
10
|
const ruleForm = reactive({
|
|
11
11
|
mobile: "",
|
|
12
|
+
verifyCode: "",
|
|
12
13
|
});
|
|
13
14
|
const rules = reactive({
|
|
14
15
|
mobile: [
|
|
15
16
|
{ required: true, message: "请输入手机号", trigger: "blur" },
|
|
16
17
|
{
|
|
17
18
|
validator: (rule, value, callback) => {
|
|
18
|
-
const regex = /^1[3-9]\d{9}$/;
|
|
19
19
|
if (value === userData.mobile) {
|
|
20
20
|
callback("新手机号与旧手机号相同");
|
|
21
|
-
} else if (!
|
|
21
|
+
} else if (!validatePhone(value)) {
|
|
22
22
|
callback("手机号格式错误");
|
|
23
23
|
} else {
|
|
24
24
|
callback();
|
|
@@ -27,8 +27,40 @@ const rules = reactive({
|
|
|
27
27
|
trigger: "blur",
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
|
+
verifyCode: [{ required: true, message: "请输入验证码", trigger: "blur" }],
|
|
30
31
|
});
|
|
31
32
|
|
|
33
|
+
const smsTimer = ref(null);
|
|
34
|
+
const smsInterval = ref(0);
|
|
35
|
+
const smsInterval_init = 60;
|
|
36
|
+
|
|
37
|
+
// 手机号校验
|
|
38
|
+
const validatePhone = (mobile) => {
|
|
39
|
+
return /^1[3-9]\d{9}$/.test(mobile);
|
|
40
|
+
};
|
|
41
|
+
// 获取短信验证码
|
|
42
|
+
const getSms = async () => {
|
|
43
|
+
// 校验手机号格式
|
|
44
|
+
if (!ruleForm.mobile) return false;
|
|
45
|
+
if (!validatePhone(ruleForm.mobile)) return ElMessage.error("手机号格式错误");
|
|
46
|
+
|
|
47
|
+
// 接口请求
|
|
48
|
+
const params = {
|
|
49
|
+
type: 5,
|
|
50
|
+
userId: userData.id,
|
|
51
|
+
mobile: ruleForm.mobile,
|
|
52
|
+
};
|
|
53
|
+
await stConfig.request.post("/invest/sys/commonSms", params);
|
|
54
|
+
ElMessage.success("短信验证码已发送");
|
|
55
|
+
|
|
56
|
+
// 间隔设置
|
|
57
|
+
smsInterval.value = smsInterval_init;
|
|
58
|
+
smsTimer.value = setInterval(() => {
|
|
59
|
+
smsInterval.value -= 1;
|
|
60
|
+
if (smsInterval.value === 0) clearInterval(smsTimer.value);
|
|
61
|
+
}, 1000);
|
|
62
|
+
};
|
|
63
|
+
|
|
32
64
|
// 打开
|
|
33
65
|
const handleOpen = () => {
|
|
34
66
|
ruleForm.mobile = "";
|
|
@@ -57,21 +89,23 @@ const handleSubmit = () => {
|
|
|
57
89
|
|
|
58
90
|
<template>
|
|
59
91
|
<div class="mobile">
|
|
60
|
-
<el-text
|
|
61
|
-
|
|
92
|
+
<el-text v-if="userData.mobile">
|
|
93
|
+
{{ userData.mobile }}
|
|
94
|
+
</el-text>
|
|
95
|
+
<el-button
|
|
62
96
|
class="btn"
|
|
63
|
-
size="small"
|
|
64
|
-
type="primary"
|
|
65
97
|
@click="handleOpen"
|
|
66
98
|
>
|
|
67
99
|
{{ userData.mobile ? "更换手机号" : "立即绑定" }}
|
|
68
|
-
</el-
|
|
100
|
+
</el-button>
|
|
69
101
|
</div>
|
|
70
102
|
<!-- 手机号绑定窗口 -->
|
|
71
103
|
<el-dialog
|
|
104
|
+
modal-class="mobile-dialog"
|
|
72
105
|
v-model="visible"
|
|
73
|
-
width="
|
|
106
|
+
width="400"
|
|
74
107
|
title="手机号绑定"
|
|
108
|
+
align-center
|
|
75
109
|
append-to-body
|
|
76
110
|
destroy-on-close
|
|
77
111
|
>
|
|
@@ -79,13 +113,41 @@ const handleSubmit = () => {
|
|
|
79
113
|
ref="ruleFormRef"
|
|
80
114
|
:rules="rules"
|
|
81
115
|
:model="ruleForm"
|
|
116
|
+
hide-required-asterisk
|
|
82
117
|
>
|
|
83
118
|
<el-form-item
|
|
84
|
-
label="
|
|
119
|
+
label="新手机:"
|
|
85
120
|
prop="mobile"
|
|
86
121
|
>
|
|
87
122
|
<el-input v-model="ruleForm.mobile" />
|
|
88
123
|
</el-form-item>
|
|
124
|
+
<el-form-item
|
|
125
|
+
label="验证码:"
|
|
126
|
+
prop="verifyCode"
|
|
127
|
+
>
|
|
128
|
+
<el-input
|
|
129
|
+
class="sms-input"
|
|
130
|
+
v-model="ruleForm.verifyCode"
|
|
131
|
+
placeholder="验证码"
|
|
132
|
+
>
|
|
133
|
+
<template #suffix>
|
|
134
|
+
<span
|
|
135
|
+
v-if="smsInterval"
|
|
136
|
+
class="get-button disabled"
|
|
137
|
+
>
|
|
138
|
+
重新发送({{ smsInterval }})
|
|
139
|
+
</span>
|
|
140
|
+
<span
|
|
141
|
+
v-else
|
|
142
|
+
class="get-button"
|
|
143
|
+
:class="{ disabled: !ruleForm.mobile }"
|
|
144
|
+
@click.stop="getSms"
|
|
145
|
+
>
|
|
146
|
+
获取验证码
|
|
147
|
+
</span>
|
|
148
|
+
</template>
|
|
149
|
+
</el-input>
|
|
150
|
+
</el-form-item>
|
|
89
151
|
</el-form>
|
|
90
152
|
<template #footer>
|
|
91
153
|
<el-button @click="visible = false"> 取消 </el-button>
|
|
@@ -99,12 +161,54 @@ const handleSubmit = () => {
|
|
|
99
161
|
</el-dialog>
|
|
100
162
|
</template>
|
|
101
163
|
|
|
164
|
+
<style lang="scss">
|
|
165
|
+
.mobile-dialog {
|
|
166
|
+
.el-dialog {
|
|
167
|
+
padding: 0;
|
|
168
|
+
.el-dialog__header {
|
|
169
|
+
padding: 10px;
|
|
170
|
+
}
|
|
171
|
+
.el-dialog__body {
|
|
172
|
+
border: 1px solid rgba(220, 223, 230, 0.5);
|
|
173
|
+
backdrop-filter: opacity(0.2);
|
|
174
|
+
border-left: none;
|
|
175
|
+
border-right: none;
|
|
176
|
+
padding: 18px 20px;
|
|
177
|
+
box-sizing: border-box;
|
|
178
|
+
}
|
|
179
|
+
.el-dialog__footer {
|
|
180
|
+
padding: 10px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
102
185
|
<style lang="scss" scoped>
|
|
103
186
|
.mobile {
|
|
104
187
|
display: flex;
|
|
105
|
-
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: 10px;
|
|
106
190
|
.btn {
|
|
107
191
|
cursor: pointer;
|
|
108
192
|
}
|
|
109
193
|
}
|
|
194
|
+
.mobile-dialog {
|
|
195
|
+
.el-form {
|
|
196
|
+
.el-input {
|
|
197
|
+
width: 260px;
|
|
198
|
+
}
|
|
199
|
+
.sms-input {
|
|
200
|
+
.get-button {
|
|
201
|
+
color: var(--el-color-primary);
|
|
202
|
+
line-height: 16px;
|
|
203
|
+
border-left: var(--el-border);
|
|
204
|
+
padding-left: 10px;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
}
|
|
207
|
+
.disabled {
|
|
208
|
+
color: var(--el-color-info);
|
|
209
|
+
cursor: not-allowed;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
110
214
|
</style>
|
|
@@ -83,33 +83,35 @@ defineExpose({
|
|
|
83
83
|
modal-class="edit-info"
|
|
84
84
|
v-model="visible"
|
|
85
85
|
title="设置资料"
|
|
86
|
-
width="
|
|
86
|
+
width="400"
|
|
87
|
+
align-center
|
|
87
88
|
destroy-on-close
|
|
88
89
|
:z-index="200"
|
|
89
90
|
>
|
|
90
91
|
<el-form
|
|
91
92
|
ref="ruleFormRef"
|
|
93
|
+
label-width="auto"
|
|
92
94
|
:rules="rules"
|
|
93
95
|
:model="ruleForm"
|
|
94
96
|
>
|
|
95
97
|
<!-- 用户名 -->
|
|
96
|
-
<el-form-item label="
|
|
97
|
-
<el-text
|
|
98
|
+
<el-form-item label="用户名:">
|
|
99
|
+
<el-text>{{ userData.username }}</el-text>
|
|
98
100
|
</el-form-item>
|
|
99
101
|
<!-- 手机号 -->
|
|
100
|
-
<el-form-item label="
|
|
102
|
+
<el-form-item label="手机号:">
|
|
101
103
|
<Mobile />
|
|
102
104
|
</el-form-item>
|
|
103
105
|
<!-- 昵称 -->
|
|
104
106
|
<el-form-item
|
|
105
|
-
label="
|
|
107
|
+
label="昵称:"
|
|
106
108
|
prop="nickName"
|
|
107
109
|
>
|
|
108
110
|
<el-input v-model="ruleForm.nickName" />
|
|
109
111
|
</el-form-item>
|
|
110
112
|
<!-- 邮箱 -->
|
|
111
113
|
<el-form-item
|
|
112
|
-
label="
|
|
114
|
+
label="邮箱:"
|
|
113
115
|
prop="email"
|
|
114
116
|
>
|
|
115
117
|
<el-input v-model="ruleForm.email" />
|
|
@@ -127,10 +129,33 @@ defineExpose({
|
|
|
127
129
|
</el-dialog>
|
|
128
130
|
</template>
|
|
129
131
|
|
|
132
|
+
<style lang="scss">
|
|
133
|
+
.edit-info {
|
|
134
|
+
.el-dialog {
|
|
135
|
+
padding: 0;
|
|
136
|
+
.el-dialog__header {
|
|
137
|
+
padding: 10px;
|
|
138
|
+
}
|
|
139
|
+
.el-dialog__body {
|
|
140
|
+
border: 1px solid rgba(220, 223, 230, 0.5);
|
|
141
|
+
backdrop-filter: opacity(0.2);
|
|
142
|
+
border-left: none;
|
|
143
|
+
border-right: none;
|
|
144
|
+
padding: 18px 20px;
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
}
|
|
147
|
+
.el-dialog__footer {
|
|
148
|
+
padding: 10px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
130
153
|
<style lang="scss" scoped>
|
|
131
154
|
.edit-info {
|
|
132
155
|
.el-form {
|
|
133
|
-
|
|
156
|
+
.el-input {
|
|
157
|
+
width: 260px;
|
|
158
|
+
}
|
|
134
159
|
}
|
|
135
160
|
}
|
|
136
161
|
</style>
|
|
@@ -66,75 +66,103 @@ defineExpose({
|
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
68
|
<template>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
<el-dialog
|
|
70
|
+
modal-class="edit-password"
|
|
71
|
+
v-model="visible"
|
|
72
|
+
title="修改密码"
|
|
73
|
+
width="400"
|
|
74
|
+
align-center
|
|
75
|
+
destroy-on-close
|
|
76
|
+
:z-index="200"
|
|
77
|
+
>
|
|
78
|
+
<el-form
|
|
79
|
+
ref="ruleFormRef"
|
|
80
|
+
:rules="rules"
|
|
81
|
+
:model="ruleForm"
|
|
82
|
+
label-width="auto"
|
|
83
|
+
hide-required-asterisk
|
|
84
|
+
:validate-on-rule-change="false"
|
|
85
|
+
@submit.native.prevent="handleSubmit(ruleFormRef)"
|
|
86
|
+
@keyup.enter.native="handleSubmit(ruleFormRef)"
|
|
76
87
|
>
|
|
77
|
-
<el-form
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
:model="ruleForm"
|
|
81
|
-
label-width="auto"
|
|
82
|
-
:validate-on-rule-change="false"
|
|
83
|
-
@submit.native.prevent="handleSubmit(ruleFormRef)"
|
|
84
|
-
@keyup.enter.native="handleSubmit(ruleFormRef)"
|
|
88
|
+
<el-form-item
|
|
89
|
+
label="原密码:"
|
|
90
|
+
prop="password"
|
|
85
91
|
>
|
|
86
|
-
<el-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<el-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<el-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
确认
|
|
136
|
-
</el-button>
|
|
137
|
-
</template>
|
|
138
|
-
</el-dialog>
|
|
139
|
-
</div>
|
|
92
|
+
<el-input
|
|
93
|
+
v-model="ruleForm.password"
|
|
94
|
+
type="password"
|
|
95
|
+
:show-password="true"
|
|
96
|
+
/>
|
|
97
|
+
</el-form-item>
|
|
98
|
+
<el-form-item
|
|
99
|
+
label="新密码:"
|
|
100
|
+
prop="newPassword"
|
|
101
|
+
>
|
|
102
|
+
<el-input
|
|
103
|
+
v-model="ruleForm.newPassword"
|
|
104
|
+
type="password"
|
|
105
|
+
:show-password="true"
|
|
106
|
+
@focus="
|
|
107
|
+
() => {
|
|
108
|
+
ruleFormRef.clearValidate(['newPassword']);
|
|
109
|
+
isFocusNewPassword = true;
|
|
110
|
+
}
|
|
111
|
+
"
|
|
112
|
+
@blur="isFocusNewPassword = false"
|
|
113
|
+
/>
|
|
114
|
+
<PasswordPrompt
|
|
115
|
+
ref="PasswordPromptRef"
|
|
116
|
+
:value="ruleForm.newPassword"
|
|
117
|
+
:isFocus="isFocusNewPassword"
|
|
118
|
+
/>
|
|
119
|
+
</el-form-item>
|
|
120
|
+
<el-form-item
|
|
121
|
+
label="确认密码:"
|
|
122
|
+
prop="newPassword2"
|
|
123
|
+
>
|
|
124
|
+
<el-input
|
|
125
|
+
v-model="ruleForm.newPassword2"
|
|
126
|
+
type="password"
|
|
127
|
+
:show-password="true"
|
|
128
|
+
/>
|
|
129
|
+
</el-form-item>
|
|
130
|
+
</el-form>
|
|
131
|
+
<template #footer>
|
|
132
|
+
<el-button @click="visible = false"> 取消 </el-button>
|
|
133
|
+
<el-button
|
|
134
|
+
type="primary"
|
|
135
|
+
@click="handleSubmit(ruleFormRef)"
|
|
136
|
+
>
|
|
137
|
+
确认
|
|
138
|
+
</el-button>
|
|
139
|
+
</template>
|
|
140
|
+
</el-dialog>
|
|
140
141
|
</template>
|
|
142
|
+
|
|
143
|
+
<style lang="scss">
|
|
144
|
+
.edit-password {
|
|
145
|
+
.el-dialog {
|
|
146
|
+
padding: 0;
|
|
147
|
+
.el-dialog__header {
|
|
148
|
+
padding: 10px;
|
|
149
|
+
}
|
|
150
|
+
.el-dialog__body {
|
|
151
|
+
border: 1px solid rgba(220, 223, 230, 0.5);
|
|
152
|
+
backdrop-filter: opacity(0.2);
|
|
153
|
+
border-left: none;
|
|
154
|
+
border-right: none;
|
|
155
|
+
padding: 18px 20px;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
.el-form {
|
|
158
|
+
.el-input {
|
|
159
|
+
width: 260px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.el-dialog__footer {
|
|
164
|
+
padding: 10px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -68,65 +68,93 @@ defineExpose({
|
|
|
68
68
|
</script>
|
|
69
69
|
|
|
70
70
|
<template>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
<el-dialog
|
|
72
|
+
modal-class="set-password"
|
|
73
|
+
v-model="visible"
|
|
74
|
+
title="设置密码"
|
|
75
|
+
width="400"
|
|
76
|
+
align-center
|
|
77
|
+
destroy-on-close
|
|
78
|
+
:z-index="200"
|
|
79
|
+
>
|
|
80
|
+
<el-form
|
|
81
|
+
ref="ruleFormRef"
|
|
82
|
+
:rules="rules"
|
|
83
|
+
:model="ruleForm"
|
|
84
|
+
label-width="auto"
|
|
85
|
+
hide-required-asterisk
|
|
86
|
+
:validate-on-rule-change="false"
|
|
87
|
+
@submit.native.prevent="handleSubmit(ruleFormRef)"
|
|
88
|
+
@keyup.enter.native="handleSubmit(ruleFormRef)"
|
|
78
89
|
>
|
|
79
|
-
<el-form
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:model="ruleForm"
|
|
83
|
-
label-width="auto"
|
|
84
|
-
:validate-on-rule-change="false"
|
|
85
|
-
@submit.native.prevent="handleSubmit(ruleFormRef)"
|
|
86
|
-
@keyup.enter.native="handleSubmit(ruleFormRef)"
|
|
90
|
+
<el-form-item
|
|
91
|
+
label="密码:"
|
|
92
|
+
prop="newPassword"
|
|
87
93
|
>
|
|
88
|
-
<el-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<el-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
确认
|
|
128
|
-
</el-button>
|
|
129
|
-
</template>
|
|
130
|
-
</el-dialog>
|
|
131
|
-
</div>
|
|
94
|
+
<el-input
|
|
95
|
+
v-model="ruleForm.newPassword"
|
|
96
|
+
type="password"
|
|
97
|
+
:show-password="true"
|
|
98
|
+
@focus="
|
|
99
|
+
() => {
|
|
100
|
+
ruleFormRef.clearValidate(['newPassword']);
|
|
101
|
+
isFocusNewPassword = true;
|
|
102
|
+
}
|
|
103
|
+
"
|
|
104
|
+
@blur="isFocusNewPassword = false"
|
|
105
|
+
/>
|
|
106
|
+
<PasswordPrompt
|
|
107
|
+
ref="PasswordPromptRef"
|
|
108
|
+
:value="ruleForm.newPassword"
|
|
109
|
+
:isFocus="isFocusNewPassword"
|
|
110
|
+
/>
|
|
111
|
+
</el-form-item>
|
|
112
|
+
<el-form-item
|
|
113
|
+
label="确认密码:"
|
|
114
|
+
prop="newPassword2"
|
|
115
|
+
>
|
|
116
|
+
<el-input
|
|
117
|
+
v-model="ruleForm.newPassword2"
|
|
118
|
+
type="password"
|
|
119
|
+
:show-password="true"
|
|
120
|
+
/>
|
|
121
|
+
</el-form-item>
|
|
122
|
+
</el-form>
|
|
123
|
+
<template #footer>
|
|
124
|
+
<el-button @click="visible = false"> 取消 </el-button>
|
|
125
|
+
<el-button
|
|
126
|
+
type="primary"
|
|
127
|
+
@click="handleSubmit(ruleFormRef)"
|
|
128
|
+
>
|
|
129
|
+
确认
|
|
130
|
+
</el-button>
|
|
131
|
+
</template>
|
|
132
|
+
</el-dialog>
|
|
132
133
|
</template>
|
|
134
|
+
|
|
135
|
+
<style lang="scss">
|
|
136
|
+
.set-password {
|
|
137
|
+
.el-dialog {
|
|
138
|
+
padding: 0;
|
|
139
|
+
.el-dialog__header {
|
|
140
|
+
padding: 10px;
|
|
141
|
+
}
|
|
142
|
+
.el-dialog__body {
|
|
143
|
+
border: 1px solid rgba(220, 223, 230, 0.5);
|
|
144
|
+
backdrop-filter: opacity(0.2);
|
|
145
|
+
border-left: none;
|
|
146
|
+
border-right: none;
|
|
147
|
+
padding: 18px 20px;
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
.el-form {
|
|
150
|
+
.el-input {
|
|
151
|
+
width: 260px;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
.el-dialog__footer {
|
|
156
|
+
padding: 10px;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
</style>
|
package/packages/User/index.vue
CHANGED
|
@@ -46,22 +46,25 @@ provide("userData", userData);
|
|
|
46
46
|
</div>
|
|
47
47
|
<template #dropdown>
|
|
48
48
|
<el-dropdown-menu>
|
|
49
|
-
<!--
|
|
49
|
+
<!-- 插槽 -->
|
|
50
50
|
<slot name="dropdown-items"></slot>
|
|
51
|
-
<!--
|
|
51
|
+
<!-- 设置资料 -->
|
|
52
52
|
<el-dropdown-item @click="EditInfoDialogRef?.open()">设置资料</el-dropdown-item>
|
|
53
|
+
<!-- 设置密码 -->
|
|
53
54
|
<el-dropdown-item
|
|
54
55
|
v-if="userData.canSet"
|
|
55
56
|
@click="SetPasswordDialogRef?.open()"
|
|
56
57
|
>
|
|
57
58
|
设置密码
|
|
58
59
|
</el-dropdown-item>
|
|
60
|
+
<!-- 修改密码 -->
|
|
59
61
|
<el-dropdown-item
|
|
60
62
|
v-else
|
|
61
63
|
@click="EditPasswordDialogRef?.open()"
|
|
62
64
|
>
|
|
63
65
|
修改密码
|
|
64
66
|
</el-dropdown-item>
|
|
67
|
+
<!-- 退出登录 -->
|
|
65
68
|
<el-dropdown-item @click="handleLoginOut">退出登录</el-dropdown-item>
|
|
66
69
|
</el-dropdown-menu>
|
|
67
70
|
</template>
|
package/src/pages/User/index.vue
CHANGED