parent
131b230e3b
commit
d47f995605
7 changed files with 518 additions and 9 deletions
@ -0,0 +1,116 @@ |
||||
<!-- 自定义菜单 --> |
||||
<!DOCTYPE html> |
||||
<html lang=""> |
||||
<head> |
||||
<title></title> |
||||
<!-- <#include "/include/head-file.ftl"/> --> |
||||
<!--#include virtual="../include/head-file.ftl" --> |
||||
</head> |
||||
<body> |
||||
<div id="custom-menu" class="ms-custom-menu"> |
||||
<el-container class="ms-custom-container"> |
||||
<el-aside> |
||||
<el-container> |
||||
<el-header>公众号</el-header> |
||||
<el-main></el-main> |
||||
<el-footer> |
||||
<el-button icon="el-icon-date"></el-button> |
||||
<div class="ms-create-menu"> |
||||
<el-dropdown placement='top' :hide-on-click='false'> |
||||
<el-button type="primary">新建菜单</el-button> |
||||
<el-dropdown-menu slot="dropdown"> |
||||
<el-dropdown-item> |
||||
<el-button type="text" icon='el-icon-plus'></el-button> |
||||
</el-dropdown-item> |
||||
</el-dropdown-menu> |
||||
</el-dropdown> |
||||
<el-button icon="el-icon-plus"></el-button> |
||||
</div> |
||||
</el-footer> |
||||
</el-aside> |
||||
<el-main> |
||||
<el-card class="custom-menu-card" shadow="never"> |
||||
<div slot="header" class="clearfix"> |
||||
<span>新建菜单</span> |
||||
</div> |
||||
<el-form ref="customMenuForm" :rule='customMenuFormRules' :model="customMenuForm" label-width="80px"> |
||||
<el-form-item label="菜单名称" prop='name' class="ms-custom-menu-name"> |
||||
<el-input v-model="customMenuForm.name" size='mini'></el-input> |
||||
<span>菜单名称字数不多于5个汉字或10个字母</span> |
||||
</el-form-item> |
||||
<el-form-item label="菜单内容" prop='content'> |
||||
<el-input v-model="customMenuForm.content"></el-input> |
||||
<el-tabs v-model="activeName" @tab-click="handleClick"> |
||||
<el-tab-pane label="图片" name="first"> |
||||
<span slot="label"><i class="el-icon-picture"></i>图片</span> |
||||
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" |
||||
:on-preview="handlePictureCardPreview" :on-remove="handleRemove"> |
||||
<i class="el-icon-plus"></i> |
||||
</el-upload> |
||||
<el-dialog :visible.sync="dialogVisible"> |
||||
<img width="100%" :src="dialogImageUrl" alt=""> |
||||
</el-dialog> |
||||
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" |
||||
:on-preview="handlePictureCardPreview" :on-remove="handleRemove"> |
||||
<i class="el-icon-plus"></i> |
||||
</el-upload> |
||||
<el-dialog :visible.sync="dialogVisible"> |
||||
<img width="100%" :src="dialogImageUrl" alt=""> |
||||
</el-dialog> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图文管理" name="second"> |
||||
<span slot="label"><i class="el-icon-picture"></i>图文管理</span> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-card> |
||||
</el-main> |
||||
</el-container> |
||||
</div> |
||||
</body> |
||||
|
||||
</html> |
||||
<script> |
||||
var customMenuVue = new Vue({ |
||||
el: "#custom-menu", |
||||
data: { |
||||
customMenuForm: { |
||||
name: '', |
||||
content: "", |
||||
}, |
||||
customMenuFormRules: { |
||||
name: [{ |
||||
required: true, |
||||
message: '请输入菜单名称', |
||||
trigger: 'blur' |
||||
}, |
||||
{ |
||||
min: 1, |
||||
max: 5, |
||||
message: '长度在 1 到 5 个字符', |
||||
trigger: 'blur' |
||||
} |
||||
], |
||||
// content:[{ required: true, message: '请输入菜单名称', trigger: 'blur' }, |
||||
// { min: 1, max: 5, message: '长度在 1 到 5 个字符', trigger: 'blur' }] |
||||
}, |
||||
dialogImageUrl: '', |
||||
dialogVisible: false, |
||||
activeName: 'first' |
||||
}, |
||||
methods: { |
||||
handleRemove(file, fileList) { |
||||
console.log(file, fileList); |
||||
}, |
||||
handlePictureCardPreview(file) { |
||||
this.dialogImageUrl = file.url; |
||||
this.dialogVisible = true; |
||||
}, |
||||
handleClick(tab, event) { |
||||
console.log(tab, event); |
||||
} |
||||
} |
||||
|
||||
}) |
||||
</script> |
||||
@ -0,0 +1,68 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title></title> |
||||
<#include "/include/head-file.ftl"/> |
||||
</head> |
||||
<body> |
||||
<div id="app"> |
||||
<el-container> |
||||
<!--左侧--> |
||||
<el-aside width="140px"> |
||||
<div class="weixin"> |
||||
<i></i> 吕小布微信号 |
||||
</div> |
||||
<el-menu class="ms-admin-menu" default-active="0"> |
||||
<el-submenu :index="i+''" v-for="(menu,i) in menuList" @click="menuActive = menu"> |
||||
<template slot="title"> |
||||
<span v-text="menu.title"></span> |
||||
</template> |
||||
</el-submenu> |
||||
</el-menu> |
||||
</el-aside> |
||||
<el-main> |
||||
<el-container> |
||||
<el-header> |
||||
|
||||
</el-header> |
||||
<el-main> |
||||
|
||||
</el-main> |
||||
</el-container> |
||||
</el-main> |
||||
</el-container> |
||||
</div> |
||||
</body> |
||||
</html> |
||||
|
||||
<script> |
||||
new Vue({ |
||||
el: "#app", |
||||
data: { |
||||
menuList: [{ |
||||
title: '图文素材', |
||||
sub: [{ |
||||
title: '图文' |
||||
}, { |
||||
title: '图片' |
||||
}], |
||||
}, { |
||||
title: '自定义菜单', |
||||
sub: [{ |
||||
title: '文章管理' |
||||
}, { |
||||
title: '栏目管理' |
||||
}] |
||||
}, { |
||||
title: '自动回复', |
||||
sub: [{ |
||||
title: '关注时回复' |
||||
}, { |
||||
title: '消息回复' |
||||
}, { |
||||
title: '关键字回复' |
||||
}] |
||||
}, ], //左侧导航列表 |
||||
} |
||||
}) |
||||
</script> |
||||
@ -0,0 +1,193 @@ |
||||
/* |
||||
*这里的值严格按照UI设计图标注值来进行设置 |
||||
*/ |
||||
/* |
||||
*颜色 |
||||
*/ |
||||
/* |
||||
*页面的边距 |
||||
*/ |
||||
/* |
||||
*字体 |
||||
*/ |
||||
/* |
||||
*头像 |
||||
*/ |
||||
/* |
||||
* 按钮 |
||||
*/ |
||||
/* |
||||
*对常见的多行样式进行了方法封装,方便调用,加快开发效率 |
||||
*/ |
||||
html, |
||||
body { |
||||
min-height: 100vh; |
||||
background-color: #eee; |
||||
margin: 0; |
||||
font-weight: initial !important; |
||||
font-size: 14px !important; |
||||
color: #333 !important; |
||||
} |
||||
html *, |
||||
body * { |
||||
text-decoration: none !important; |
||||
font-family: Verdana, Arial, Helvetica, sans-serif; |
||||
box-sizing: border-box; |
||||
} |
||||
.ms-ellipsis { |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
display: block; |
||||
} |
||||
.ms-align-center { |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
input::-webkit-input-placeholder, |
||||
textarea::-webkit-input-placeholder { |
||||
font-weight: initial; |
||||
font-size: 12px; |
||||
color: #999; |
||||
resize: none; |
||||
} |
||||
*::-webkit-scrollbar { |
||||
width: 8px; |
||||
height: 8px; |
||||
} |
||||
/*定义滚动条轨道 内阴影+圆角*/ |
||||
*::-webkit-scrollbar-track { |
||||
border-radius: 10px; |
||||
/*滚动条的背景区域的圆角*/ |
||||
background-color: #eee; |
||||
/*滚动条的背景颜色*/ |
||||
} |
||||
/*定义滑块 内阴影+圆角*/ |
||||
*::-webkit-scrollbar-thumb { |
||||
border-radius: 10px; |
||||
/*滚动条的圆角*/ |
||||
background-color: #ddd; |
||||
/*滚动条的背景颜色*/ |
||||
} |
||||
.ms-container { |
||||
margin: 12px; |
||||
height: 100%; |
||||
padding: 14px 14px 0 14px; |
||||
background: #fff; |
||||
} |
||||
.ms-header { |
||||
padding: 10px; |
||||
margin: 0; |
||||
border-bottom: 1px solid #ddd; |
||||
background: #fff; |
||||
height: 50px; |
||||
} |
||||
.ms-pagination { |
||||
padding: 20px 0; |
||||
text-align: right; |
||||
} |
||||
.ms-fr { |
||||
float: right; |
||||
} |
||||
.ms-tr { |
||||
text-align: right; |
||||
} |
||||
.el-button + .el-button { |
||||
margin-left: 0; |
||||
} |
||||
.ms-custom-menu { |
||||
color: #f2f2f6; |
||||
} |
||||
.ms-custom-menu .ms-custom-container { |
||||
margin: 10px; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside { |
||||
background: #fff; |
||||
width: 280px !important; |
||||
height: 470px !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-header { |
||||
height: 40px !important; |
||||
line-height: 40px !important; |
||||
font-weight: initial; |
||||
font-size: 16px; |
||||
color: #fff; |
||||
text-align: center; |
||||
background: #323232; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-main { |
||||
padding: 0; |
||||
width: 280px !important; |
||||
height: 379px !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer { |
||||
white-space: nowrap; |
||||
padding: 0; |
||||
font-size: 0; |
||||
background-color: #FAFAFA; |
||||
width: 280px !important; |
||||
height: 50px !important; |
||||
display: flex; |
||||
justify-content: flex-start; |
||||
border-top: 1px solid #ddd !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer > .el-button { |
||||
width: 40px !important; |
||||
height: 50px !important; |
||||
padding: 0 !important; |
||||
border: none !important; |
||||
border-right: 1px solid #ddd !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .el-button { |
||||
border-radius: 0 !important; |
||||
height: 50px !important; |
||||
background: transparent !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu { |
||||
flex: 1; |
||||
font-size: 0; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-button, |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-dropdown { |
||||
flex: 1; |
||||
border: none !important; |
||||
background: transparent !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-button span, |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-dropdown span { |
||||
color: #333; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-dropdown { |
||||
flex: .5; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-dropdown > .el-button { |
||||
width: 100%; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-aside .el-container .el-footer .ms-create-menu .el-button--default { |
||||
border-left: 1px solid #ddd !important; |
||||
padding: 0 !important; |
||||
flex: .5; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-main { |
||||
padding: 0 20px; |
||||
flex: 1; |
||||
height: 470px; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-main .custom-menu-card .ms-custom-menu-name .el-form-item__content { |
||||
display: flex; |
||||
justify-content: flex-start; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-main .custom-menu-card .ms-custom-menu-name .el-form-item__content .el-input { |
||||
width: 153px !important; |
||||
height: 30px !important; |
||||
} |
||||
.ms-custom-menu .ms-custom-container .el-main .custom-menu-card .ms-custom-menu-name .el-form-item__content span { |
||||
margin-left: 10px; |
||||
font-weight: initial; |
||||
font-size: 12px; |
||||
color: #999; |
||||
} |
||||
@ -0,0 +1,96 @@ |
||||
@import "../ms-admin/4.7.0/less/app.less"; |
||||
// 自定义菜单 |
||||
.ms-custom-menu{ |
||||
color: rgb(242, 242, 246); |
||||
.ms-custom-container{ |
||||
margin: 10px; |
||||
.ms-flex(); |
||||
// 侧边 |
||||
.el-aside{ |
||||
background: #fff; |
||||
.ms-width-height(280px,470px) !important; |
||||
// 微信界面 |
||||
.el-container{ |
||||
// 头部 |
||||
.el-header{ |
||||
.ms-line-height(40px) !important; |
||||
.ms-font(16px,#fff); |
||||
text-align: center; |
||||
background: #323232; |
||||
} |
||||
.el-main{ |
||||
padding: 0; |
||||
.ms-width-height(280px,379px) !important; |
||||
} |
||||
.el-footer{ |
||||
white-space: nowrap; |
||||
padding: 0; |
||||
font-size: 0; |
||||
background-color: #FAFAFA; |
||||
.ms-width-height(280px,50px) !important; |
||||
.ms-flex(flex-start); |
||||
border-top: 1px solid @borderColor !important; |
||||
>.el-button{ |
||||
.ms-width-height(40px,50px) !important; |
||||
padding:0 !important; |
||||
border: none !important; |
||||
border-right: 1px solid @borderColor !important; |
||||
} |
||||
.el-button{ |
||||
border-radius: 0 !important; |
||||
height:50px !important; |
||||
background: transparent !important; |
||||
} |
||||
.ms-create-menu{ |
||||
flex: 1; |
||||
font-size: 0; |
||||
.ms-flex(space-between); |
||||
.el-button,.el-dropdown{ |
||||
flex: 1; |
||||
border: none !important; |
||||
background: transparent !important; |
||||
span{ |
||||
color:#333; |
||||
} |
||||
} |
||||
.el-dropdown{ |
||||
flex: .5; |
||||
>.el-button{ |
||||
width: 100%; |
||||
} |
||||
} |
||||
// 添加菜单 |
||||
.el-button--default{ |
||||
border-left: 1px solid @borderColor !important; |
||||
padding:0 !important; |
||||
flex: .5; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
// 内容 |
||||
.el-main{ |
||||
padding: 0 20px; |
||||
flex: 1; |
||||
height: 470px; |
||||
// 内容区域卡片 |
||||
.custom-menu-card{ |
||||
// 内容菜单表单 |
||||
.ms-custom-menu-name{ |
||||
.el-form-item__content{ |
||||
.el-input{ |
||||
.ms-width-height(153px,30px) !important; |
||||
} |
||||
.ms-flex(flex-start); |
||||
span{ |
||||
margin-left: 10px; |
||||
.ms-font(@auxiliarySize,@auxiliaryColor); |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue