eoss-ui 0.4.77 → 0.4.79-beta.0
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/lib/button.js +3 -3
- package/lib/cascader.js +2 -2
- package/lib/date-picker.js +2 -2
- package/lib/eoss-ui.common.js +66 -3
- package/lib/index.js +1 -1
- package/lib/input-number.js +9 -9
- package/lib/input.js +2 -2
- package/lib/label.js +2 -2
- package/lib/layout.js +269 -0
- package/lib/menu.js +2 -2
- package/lib/nav.js +2 -2
- package/lib/notify.js +2 -2
- package/lib/page.js +9 -9
- package/lib/pagination.js +2 -2
- package/lib/player.js +2 -2
- package/lib/qr-code.js +2 -2
- package/lib/radio-group.js +2 -2
- package/lib/retrial-auth.js +2 -2
- package/lib/select-ganged.js +2 -2
- package/lib/select.js +2 -2
- package/lib/selector.js +2 -2
- package/lib/sizer.js +2 -2
- package/lib/steps.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/table-form.js +2 -2
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +2 -2
- package/lib/theme-chalk/layout.css +0 -0
- package/lib/tips.js +9 -9
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/wujie.js +2 -2
- package/lib/wxlogin.js +2 -2
- package/package.json +2 -1
- package/packages/button/src/main.vue +182 -164
- package/packages/form/src/main.vue +10 -6
- package/packages/form/src/table.vue +3 -2
- package/packages/layout/index.js +3 -3
- package/packages/layout/src/item.vue +104 -0
- package/packages/layout/src/main.vue +13 -1419
- package/packages/theme-chalk/lib/layout.css +0 -0
- package/packages/theme-chalk/src/index.scss +1 -0
- package/packages/theme-chalk/src/layout.scss +44 -0
- package/src/index.js +4 -1
- package/packages/layout/src/resetPassword.vue +0 -338
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import './common/var.scss';
|
|
2
|
+
.es-layout {
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
transition: height 200ms ease;
|
|
6
|
+
padding: 6px;
|
|
7
|
+
.es-layout-item {
|
|
8
|
+
position: absolute;
|
|
9
|
+
padding: 6px;
|
|
10
|
+
touch-action: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
.es-card {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
.es-layout-resizable {
|
|
17
|
+
width: 20px;
|
|
18
|
+
height: 20px;
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 6px;
|
|
21
|
+
bottom: 6px;
|
|
22
|
+
z-index: 9999;
|
|
23
|
+
cursor: se-resize;
|
|
24
|
+
}
|
|
25
|
+
.es-layout-resizable-width {
|
|
26
|
+
width: 10px;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 6px;
|
|
29
|
+
right: 6px;
|
|
30
|
+
bottom: 6px;
|
|
31
|
+
z-index: 9998;
|
|
32
|
+
cursor: e-resize;
|
|
33
|
+
}
|
|
34
|
+
.es-layout-resizable-height {
|
|
35
|
+
height: 10px;
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 6px;
|
|
38
|
+
right: 6px;
|
|
39
|
+
bottom: 6px;
|
|
40
|
+
z-index: 9998;
|
|
41
|
+
cursor: s-resize;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import Icons from '../packages/icons/index.js';
|
|
|
22
22
|
import Input from '../packages/input/index.js';
|
|
23
23
|
import InputNumber from '../packages/input-number/index.js';
|
|
24
24
|
import Label from '../packages/label/index.js';
|
|
25
|
+
import Layout from '../packages/layout/index.js';
|
|
25
26
|
import Login from '../packages/login/index.js';
|
|
26
27
|
import Main from '../packages/main/index.js';
|
|
27
28
|
import Menu from '../packages/menu/index.js';
|
|
@@ -74,6 +75,7 @@ const components = [
|
|
|
74
75
|
Input,
|
|
75
76
|
InputNumber,
|
|
76
77
|
Label,
|
|
78
|
+
Layout,
|
|
77
79
|
Login,
|
|
78
80
|
Main,
|
|
79
81
|
Menu,
|
|
@@ -115,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
export default {
|
|
118
|
-
version: '0.4.
|
|
120
|
+
version: '0.4.78',
|
|
119
121
|
install,
|
|
120
122
|
Button,
|
|
121
123
|
ButtonGroup,
|
|
@@ -139,6 +141,7 @@ export default {
|
|
|
139
141
|
Input,
|
|
140
142
|
InputNumber,
|
|
141
143
|
Label,
|
|
144
|
+
Layout,
|
|
142
145
|
Login,
|
|
143
146
|
Main,
|
|
144
147
|
Menu,
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
/**
|
|
3
|
-
* 忘记密码
|
|
4
|
-
*@desc 忘记密码填写表单(通过手机号获取验证码)
|
|
5
|
-
*
|
|
6
|
-
**/
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<div class="rest-password-box" :class="{ 'rest-password-cut': show }">
|
|
10
|
-
<el-menu
|
|
11
|
-
v-if="show"
|
|
12
|
-
:default-active="activeIndex"
|
|
13
|
-
class="rest-menu-cut"
|
|
14
|
-
mode="horizontal"
|
|
15
|
-
@select="handleSelect"
|
|
16
|
-
>
|
|
17
|
-
<el-menu-item index="6">短信验证</el-menu-item>
|
|
18
|
-
<el-menu-item index="11">邮箱验证</el-menu-item>
|
|
19
|
-
</el-menu>
|
|
20
|
-
<es-form
|
|
21
|
-
ref="pwdForm"
|
|
22
|
-
v-loading.fullscreen.lock="submit"
|
|
23
|
-
element-loading-text="修改中..."
|
|
24
|
-
element-loading-spinner="el-icon-loading"
|
|
25
|
-
element-loading-background="rgba(0, 0, 0, 0.65)"
|
|
26
|
-
:model="formData"
|
|
27
|
-
:contents="page"
|
|
28
|
-
class="es-user-info"
|
|
29
|
-
@submit="handleSubmit"
|
|
30
|
-
>
|
|
31
|
-
</es-form>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import {
|
|
37
|
-
initModifyPassword,
|
|
38
|
-
getModifyPassCode,
|
|
39
|
-
codeModifyPass
|
|
40
|
-
} from 'eoss-ui/src/config/api.js';
|
|
41
|
-
import rules from 'eoss-ui/src/utils/rules.js';
|
|
42
|
-
import util from 'eoss-ui/src/utils/util';
|
|
43
|
-
export default {
|
|
44
|
-
name: 'resetPassword',
|
|
45
|
-
props: {
|
|
46
|
-
secret: String,
|
|
47
|
-
isEncrypt: Boolean,
|
|
48
|
-
type: String
|
|
49
|
-
},
|
|
50
|
-
computed: {
|
|
51
|
-
page() {
|
|
52
|
-
return [
|
|
53
|
-
this.activeIndex == '6'
|
|
54
|
-
? {
|
|
55
|
-
type: 'text',
|
|
56
|
-
name: 'target',
|
|
57
|
-
label: '手机号',
|
|
58
|
-
placeholder: '请输入手机号',
|
|
59
|
-
rules: [
|
|
60
|
-
{
|
|
61
|
-
required: true,
|
|
62
|
-
message: '请输入手机号',
|
|
63
|
-
trigger: 'blur'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
...rules.phone,
|
|
67
|
-
trigger: 'blur'
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
: {
|
|
72
|
-
type: 'text',
|
|
73
|
-
name: 'target',
|
|
74
|
-
label: '邮箱地址',
|
|
75
|
-
placeholder: '请输入邮箱地址',
|
|
76
|
-
rules: [
|
|
77
|
-
{
|
|
78
|
-
required: true,
|
|
79
|
-
message: '请输入邮箱地址',
|
|
80
|
-
trigger: 'blur'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: 'email',
|
|
84
|
-
message: '请输入正确的邮箱地址',
|
|
85
|
-
trigger: 'blur'
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: 'password',
|
|
91
|
-
name: 'password',
|
|
92
|
-
label: '新密码',
|
|
93
|
-
placeholder: '请输入新密码',
|
|
94
|
-
showPassword: true,
|
|
95
|
-
rules: [
|
|
96
|
-
this.checkPassword
|
|
97
|
-
? {
|
|
98
|
-
pattern: this.checkPassword,
|
|
99
|
-
message: this.checkPasswordMsg
|
|
100
|
-
? this.checkPasswordMsg
|
|
101
|
-
: '密码格式不合法',
|
|
102
|
-
trigger: 'blur'
|
|
103
|
-
}
|
|
104
|
-
: {},
|
|
105
|
-
{
|
|
106
|
-
required: true,
|
|
107
|
-
message: '请输入新密码',
|
|
108
|
-
trigger: 'blur'
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type: 'password',
|
|
114
|
-
name: 'repassword',
|
|
115
|
-
placeholder: '请确认新密码',
|
|
116
|
-
label: '确认新密码',
|
|
117
|
-
showPassword: true,
|
|
118
|
-
rules: [
|
|
119
|
-
this.checkPassword
|
|
120
|
-
? {
|
|
121
|
-
pattern: this.checkPassword,
|
|
122
|
-
message: this.checkPasswordMsg
|
|
123
|
-
? this.checkPasswordMsg
|
|
124
|
-
: '密码格式不合法',
|
|
125
|
-
trigger: 'blur'
|
|
126
|
-
}
|
|
127
|
-
: {},
|
|
128
|
-
{
|
|
129
|
-
required: true,
|
|
130
|
-
message: '请输入新密码',
|
|
131
|
-
trigger: 'blur'
|
|
132
|
-
},
|
|
133
|
-
{ validator: this.reregExpValidate, trigger: 'blur' }
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'text',
|
|
138
|
-
name: 'verificationCode',
|
|
139
|
-
placeholder: '请输入验证码',
|
|
140
|
-
label: '验证码',
|
|
141
|
-
append: {
|
|
142
|
-
text: this.btnText,
|
|
143
|
-
attrs: { disabled: this.disabled },
|
|
144
|
-
event: this.getVerificationCode
|
|
145
|
-
},
|
|
146
|
-
rules: [
|
|
147
|
-
{
|
|
148
|
-
required: true,
|
|
149
|
-
message: '请输入验证码',
|
|
150
|
-
trigger: 'blur'
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
type: 'submit',
|
|
156
|
-
contents: [
|
|
157
|
-
{
|
|
158
|
-
type: 'primary',
|
|
159
|
-
text: '提交',
|
|
160
|
-
event: 'confirm'
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
];
|
|
165
|
-
},
|
|
166
|
-
show() {
|
|
167
|
-
if (this.type) {
|
|
168
|
-
let types = this.type.split(',');
|
|
169
|
-
return types.length > 1;
|
|
170
|
-
}
|
|
171
|
-
return false;
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
data() {
|
|
175
|
-
return {
|
|
176
|
-
activeIndex: '6',
|
|
177
|
-
checkPassword: null,
|
|
178
|
-
checkPasswordMsg: null,
|
|
179
|
-
btnText: '获取验证码',
|
|
180
|
-
timer: '',
|
|
181
|
-
countdown: 0,
|
|
182
|
-
disabled: false,
|
|
183
|
-
submit: false,
|
|
184
|
-
formData: {}
|
|
185
|
-
};
|
|
186
|
-
},
|
|
187
|
-
created() {
|
|
188
|
-
this.getInitModifyPassword();
|
|
189
|
-
if (this.type) {
|
|
190
|
-
let types = this.type.split(',');
|
|
191
|
-
if (types.length) {
|
|
192
|
-
this.activeIndex = types[0];
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
destroyed() {
|
|
197
|
-
clearInterval(this.timer);
|
|
198
|
-
},
|
|
199
|
-
methods: {
|
|
200
|
-
// 密码再次验证
|
|
201
|
-
reregExpValidate(rule, value, callback) {
|
|
202
|
-
if (value != this.formData.password) {
|
|
203
|
-
callback(new Error('两次密码不一致'));
|
|
204
|
-
} else {
|
|
205
|
-
callback();
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
getInitModifyPassword() {
|
|
209
|
-
util
|
|
210
|
-
.ajax({
|
|
211
|
-
url: initModifyPassword
|
|
212
|
-
})
|
|
213
|
-
.then((res) => {
|
|
214
|
-
if (res.rCode === 0) {
|
|
215
|
-
const results = JSON.parse(JSON.stringify(res.results));
|
|
216
|
-
if (results.checkPassword) {
|
|
217
|
-
this.checkPassword = new RegExp(results.checkPassword);
|
|
218
|
-
}
|
|
219
|
-
if (results.checkPasswordMsg) {
|
|
220
|
-
this.checkPasswordMsg = new RegExp(results.checkPasswordMsg);
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
224
|
-
this.$message.error(msg);
|
|
225
|
-
}
|
|
226
|
-
})
|
|
227
|
-
.catch((err) => {
|
|
228
|
-
if (err.message && err.message !== 'canceled') {
|
|
229
|
-
this.$message.error(err.message);
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
},
|
|
233
|
-
getVerificationCode() {
|
|
234
|
-
if (this.countdown) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
if (!this.formData.target) {
|
|
238
|
-
this.$refs.pwdForm.validateField('target');
|
|
239
|
-
return false;
|
|
240
|
-
} else {
|
|
241
|
-
let flag = false;
|
|
242
|
-
this.$refs.pwdForm.validateField('target', (res) => {
|
|
243
|
-
flag = res != '';
|
|
244
|
-
});
|
|
245
|
-
if (flag) {
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
let data = {
|
|
249
|
-
target: this.formData.target,
|
|
250
|
-
targetType: this.activeIndex == '6' ? 'SMS' : 'EMAIL'
|
|
251
|
-
};
|
|
252
|
-
this.countdown = 60;
|
|
253
|
-
this.getCode(data);
|
|
254
|
-
this.timer = setInterval(() => {
|
|
255
|
-
if (this.countdown > 0) {
|
|
256
|
-
this.countdown--;
|
|
257
|
-
this.disabled = true;
|
|
258
|
-
this.btnText = '重新获取' + this.countdown + 's';
|
|
259
|
-
} else {
|
|
260
|
-
this.btnText = '获取验证码';
|
|
261
|
-
this.disabled = false;
|
|
262
|
-
clearInterval(this.timer);
|
|
263
|
-
}
|
|
264
|
-
}, 1000);
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
getCode(params) {
|
|
268
|
-
util
|
|
269
|
-
.ajax({
|
|
270
|
-
url: getModifyPassCode,
|
|
271
|
-
params: params
|
|
272
|
-
})
|
|
273
|
-
.then((res) => {
|
|
274
|
-
if (res.rCode === 0) {
|
|
275
|
-
this.$message.success(res.msg);
|
|
276
|
-
} else {
|
|
277
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
278
|
-
if (res.rCode === 2) {
|
|
279
|
-
this.btnText = '获取验证码';
|
|
280
|
-
this.disabled = false;
|
|
281
|
-
this.countdown = 0;
|
|
282
|
-
clearInterval(this.timer);
|
|
283
|
-
}
|
|
284
|
-
this.$message.error(msg);
|
|
285
|
-
}
|
|
286
|
-
})
|
|
287
|
-
.catch((err) => {
|
|
288
|
-
if (err.message && err.message !== 'canceled') {
|
|
289
|
-
this.$message.error(err.message);
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
},
|
|
293
|
-
handleSubmit(res) {
|
|
294
|
-
this.submit = true;
|
|
295
|
-
let { repassword, ...data } = res;
|
|
296
|
-
if (this.secret && this.isEncrypt) {
|
|
297
|
-
data.password = util.esmEncrypt({
|
|
298
|
-
data: data.password,
|
|
299
|
-
key: this.secret
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
if (this.activeIndex == '6') {
|
|
303
|
-
data.targetType = 'SMS';
|
|
304
|
-
} else {
|
|
305
|
-
data.targetType = 'EMAIL';
|
|
306
|
-
}
|
|
307
|
-
util
|
|
308
|
-
.ajax({
|
|
309
|
-
method: 'post',
|
|
310
|
-
url: codeModifyPass,
|
|
311
|
-
data: data
|
|
312
|
-
})
|
|
313
|
-
.then((res) => {
|
|
314
|
-
this.submit = false;
|
|
315
|
-
if (res.rCode === 0) {
|
|
316
|
-
this.$message.success(res.msg);
|
|
317
|
-
this.$emit('success');
|
|
318
|
-
} else {
|
|
319
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
320
|
-
this.$message.error(msg);
|
|
321
|
-
}
|
|
322
|
-
})
|
|
323
|
-
.catch((err) => {
|
|
324
|
-
if (err.message && err.message !== 'canceled') {
|
|
325
|
-
this.$message.error(err.message);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
},
|
|
329
|
-
handleSelect(res) {
|
|
330
|
-
this.$refs.pwdForm.resetFields();
|
|
331
|
-
this.activeIndex = res;
|
|
332
|
-
this.btnText = '获取验证码';
|
|
333
|
-
this.disabled = false;
|
|
334
|
-
clearInterval(this.timer);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
</script>
|