no message
This commit is contained in:
parent
3431ba8ece
commit
ce4912273c
@ -1,20 +1,15 @@
|
||||
<!--
|
||||
* @Descripttion: 弹窗扩展组件
|
||||
* @version: 2.0
|
||||
* @Author: sakuya
|
||||
* @Date: 2021年8月27日08:51:52
|
||||
* @LastEditors: sakuya
|
||||
* @LastEditTime: 2022年5月14日15:13:41
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="sc-dialog" ref="scDialog">
|
||||
<div class="x-dialog" ref="xDialog">
|
||||
<el-dialog ref="dialog" v-model="dialogVisible" :fullscreen="isFullscreen" v-bind="$attrs" :show-close="false">
|
||||
<template #header>
|
||||
<slot name="header">
|
||||
<span class="el-dialog__title">{{ title }}</span>
|
||||
</slot>
|
||||
<div class="sc-dialog__headerbtn">
|
||||
<div class="x-dialog__headerbtn">
|
||||
<button v-if="showFullscreen" aria-label="fullscreen" type="button" @click="setFullscreen">
|
||||
<el-icon v-if="isFullscreen" class="el-dialog__close"><el-icon-bottom-left /></el-icon>
|
||||
<el-icon v-else class="el-dialog__close"><el-icon-full-screen /></el-icon>
|
||||
@ -74,11 +69,11 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.sc-dialog__headerbtn {position: absolute;top: var(--el-dialog-padding-primary);right: var(--el-dialog-padding-primary);}
|
||||
.sc-dialog__headerbtn button {padding: 0;background: transparent;border: none;outline: none;cursor: pointer;font-size: var(--el-message-close-size,16px);margin-left: 15px;color: var(--el-color-info);}
|
||||
.sc-dialog__headerbtn button:hover .el-dialog__close {color: var(--el-color-primary);}
|
||||
.sc-dialog:deep(.el-dialog).is-fullscreen {display: flex;flex-direction: column;top:0px !important;left:0px !important;}
|
||||
.sc-dialog:deep(.el-dialog).is-fullscreen .el-dialog__header {}
|
||||
.sc-dialog:deep(.el-dialog).is-fullscreen .el-dialog__body {flex:1;overflow: auto;}
|
||||
.sc-dialog:deep(.el-dialog).is-fullscreen .el-dialog__footer {padding-bottom: 10px;border-top: 1px solid var(--el-border-color-base);}
|
||||
.x-dialog__headerbtn {position: absolute;top: var(--el-dialog-padding-primary);right: var(--el-dialog-padding-primary);}
|
||||
.x-dialog__headerbtn button {padding: 0;background: transparent;border: none;outline: none;cursor: pointer;font-size: var(--el-message-close-size,16px);margin-left: 15px;color: var(--el-color-info);}
|
||||
.x-dialog__headerbtn button:hover .el-dialog__close {color: var(--el-color-primary);}
|
||||
.x-dialog:deep(.el-dialog).is-fullscreen {display: flex;flex-direction: column;top:0px !important;left:0px !important;}
|
||||
.x-dialog:deep(.el-dialog).is-fullscreen .el-dialog__header {}
|
||||
.x-dialog:deep(.el-dialog).is-fullscreen .el-dialog__body {flex:1;overflow: auto;}
|
||||
.x-dialog:deep(.el-dialog).is-fullscreen .el-dialog__footer {padding-bottom: 10px;border-top: 1px solid var(--el-border-color-base);}
|
||||
</style>
|
@ -42,12 +42,12 @@
|
||||
export default {
|
||||
name: 'userCenter',
|
||||
components: {
|
||||
account: defineAsyncComponent(() => import('@/views/userCenter/user/account')),
|
||||
seting: defineAsyncComponent(() => import('@/views/userCenter/user/seting')),
|
||||
pushSettings: defineAsyncComponent(() => import('@/views/userCenter/user/pushSettings')),
|
||||
password: defineAsyncComponent(() => import('@/views/userCenter/user/password')),
|
||||
space: defineAsyncComponent(() => import('@/views/userCenter/user/space')),
|
||||
logs: defineAsyncComponent(() => import('@/views/userCenter/user/logs')),
|
||||
account: defineAsyncComponent(() => import('./components/account')),
|
||||
seting: defineAsyncComponent(() => import('./components/seting')),
|
||||
pushSettings: defineAsyncComponent(() => import('./components/pushSettings')),
|
||||
password: defineAsyncComponent(() => import('./components/password')),
|
||||
space: defineAsyncComponent(() => import('./components/space')),
|
||||
logs: defineAsyncComponent(() => import('./components/logs')),
|
||||
},
|
||||
props: {
|
||||
modelValue: { type: Object, default: () => {} },
|
||||
@ -111,23 +111,8 @@
|
||||
page: "account"
|
||||
}
|
||||
},
|
||||
//路由跳转进来 判断from是否有特殊标识做特殊处理
|
||||
beforeRouteEnter (to, from, next){
|
||||
next((vm)=>{
|
||||
if(from.is){
|
||||
//删除特殊标识,防止标签刷新重复执行
|
||||
delete from.is
|
||||
//执行特殊方法
|
||||
vm.$alert('路由跳转过来后含有特殊标识,做特殊处理', '提示', {
|
||||
type: 'success',
|
||||
center: true
|
||||
}).then(() => {}).catch(() => {})
|
||||
}
|
||||
})
|
||||
},
|
||||
created() {
|
||||
// var userInfo = this.$tool.data.get('user');
|
||||
this.user = this.modelValue
|
||||
|
||||
},
|
||||
methods: {
|
||||
updateValue(event) {
|
||||
|
@ -1,64 +1,13 @@
|
||||
<template>
|
||||
<x-user></x-user>
|
||||
<x-user v-model="user"></x-user>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'userCenter',
|
||||
components: {
|
||||
account: defineAsyncComponent(() => import('./user/account')),
|
||||
seting: defineAsyncComponent(() => import('./user/seting')),
|
||||
pushSettings: defineAsyncComponent(() => import('./user/pushSettings')),
|
||||
password: defineAsyncComponent(() => import('./user/password')),
|
||||
space: defineAsyncComponent(() => import('./user/space')),
|
||||
logs: defineAsyncComponent(() => import('./user/logs')),
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
menu: [
|
||||
{
|
||||
groupName: "基本设置",
|
||||
list: [
|
||||
{
|
||||
icon: "el-icon-postcard",
|
||||
title: "账号信息",
|
||||
component: "account"
|
||||
},
|
||||
{
|
||||
icon: "el-icon-operation",
|
||||
title: "个人设置",
|
||||
component: "seting"
|
||||
},
|
||||
{
|
||||
icon: "el-icon-lock",
|
||||
title: "密码",
|
||||
component: "password"
|
||||
},
|
||||
{
|
||||
icon: "el-icon-bell",
|
||||
title: "通知设置",
|
||||
component: "pushSettings"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
groupName: "数据管理",
|
||||
list: [
|
||||
{
|
||||
icon: "el-icon-coin",
|
||||
title: "存储空间信息",
|
||||
component: "space"
|
||||
},
|
||||
{
|
||||
icon: "el-icon-clock",
|
||||
title: "操作日志",
|
||||
component: "logs"
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
user: {
|
||||
avatar:''
|
||||
},
|
||||
|
4
src/x.js
4
src/x.js
@ -16,7 +16,7 @@ import scFormTable from './components/scFormTable'
|
||||
import scTableSelect from './components/scTableSelect'
|
||||
import scPageHeader from './components/scPageHeader'
|
||||
import scSelect from './components/scSelect'
|
||||
import scDialog from './components/scDialog'
|
||||
import xDialog from './components/xDialog'
|
||||
import scForm from './components/scForm'
|
||||
import XItem from './components/scForm/item'
|
||||
import xUser from './components/xUser'
|
||||
@ -56,7 +56,7 @@ export default {
|
||||
app.component('scTableSelect', scTableSelect);
|
||||
app.component('scPageHeader', scPageHeader);
|
||||
app.component('scSelect', scSelect);
|
||||
app.component('scDialog', scDialog);
|
||||
app.component('xDialog', xDialog);
|
||||
app.component('scForm', scForm);
|
||||
app.component('scTitle', scTitle);
|
||||
app.component('scWaterMark', scWaterMark);
|
||||
|
Loading…
Reference in New Issue
Block a user