feat:更新激光笔功能
This commit is contained in:
@@ -6,38 +6,40 @@
|
||||
width="500"
|
||||
:show-close='false'
|
||||
:close-on-click-modal="false"
|
||||
v-loading="loading"
|
||||
|
||||
>
|
||||
<el-form ref="pwdRef" :model="user" :rules="rules" label-width="100px">
|
||||
<el-form-item label="旧密码" prop="oldPassword">
|
||||
<el-input
|
||||
v-model="user.oldPassword"
|
||||
placeholder="请输入旧密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-input
|
||||
v-model="user.newPassword"
|
||||
placeholder="请输入新密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="confirmPassword">
|
||||
<el-input
|
||||
v-model="user.confirmPassword"
|
||||
placeholder="请确认新密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submit">保存</el-button>
|
||||
<el-button type="danger" @click="close">关闭</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-loading="loading">
|
||||
<el-form ref="pwdRef" :model="user" :rules="rules" label-width="100px">
|
||||
<el-form-item label="旧密码" prop="oldPassword">
|
||||
<el-input
|
||||
v-model="user.oldPassword"
|
||||
placeholder="请输入旧密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-input
|
||||
v-model="user.newPassword"
|
||||
placeholder="请输入新密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="confirmPassword">
|
||||
<el-input
|
||||
v-model="user.confirmPassword"
|
||||
placeholder="请确认新密码"
|
||||
type="password"
|
||||
show-password
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submit">保存</el-button>
|
||||
<el-button type="danger" @click="close">关闭</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -112,6 +114,7 @@ const validatorPasswords = async (rule, value, callback) => {
|
||||
|
||||
/** 提交按钮 */
|
||||
async function submit() {
|
||||
loading.value = true;
|
||||
try {
|
||||
const valid = await proxy.$refs.pwdRef.validate();
|
||||
if (!valid) return;
|
||||
@@ -125,9 +128,7 @@ async function submit() {
|
||||
ElMessage.error(resPwd.data.suggestions.join(', ') || '密码强度校验失败');
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
}
|
||||
const res = await changePwd(user.oldPassword, user.newPassword);
|
||||
if(res.meta.code !== 200){
|
||||
ElMessage.error(res.meta?.message || '密码修改失败');
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:index="resolvePath(onlyOneChild.path)"
|
||||
:class="{ 'submenu-title-noDropdown': !isNest }"
|
||||
>
|
||||
<svg-icon :icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" />
|
||||
<!-- <svg-icon :icon-class="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" /> -->
|
||||
<!-- {{ onlyOneChild.meta.title }} -->
|
||||
<!-- <template #title> -->
|
||||
<span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template v-if="item.meta" #title>
|
||||
<svg-icon :icon-class="item.meta && item.meta.icon" />
|
||||
<!-- <svg-icon :icon-class="item.meta && item.meta.icon" /> -->
|
||||
<span class="menu-title" :title="hasTitle(item.meta.title)">{{ item.meta.title }}</span>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ const settingsStore = useSettingsStore()
|
||||
|
||||
const showLogo = computed(() => settingsStore.sidebarLogo)
|
||||
const sideTheme = computed(() => settingsStore.sideTheme)
|
||||
// const theme = computed(() => settingsStore.theme)
|
||||
const theme = computed(() => settingsStore.theme)
|
||||
const isCollapse = computed(() => !appStore.sidebar.opened)
|
||||
|
||||
const activeMenu = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user