|
|
@@ -4,11 +4,7 @@
|
|
|
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
<el-breadcrumb-item>主题定制</el-breadcrumb-item>
|
|
|
</el-breadcrumb> -->
|
|
|
- <el-tabs
|
|
|
- v-model="activeName"
|
|
|
- @tab-click="handleClick"
|
|
|
- style="margin-top: 50px"
|
|
|
- >
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick" style="margin-top: 50px">
|
|
|
<el-tab-pane label="首页主题" name="first">
|
|
|
<el-form
|
|
|
ref="form"
|
|
|
@@ -32,11 +28,7 @@
|
|
|
multiple
|
|
|
:show-file-list="false"
|
|
|
>
|
|
|
- <img
|
|
|
- v-if="userDetail.logo_url"
|
|
|
- :src="userDetail.logo_url"
|
|
|
- class="avatar"
|
|
|
- />
|
|
|
+ <img v-if="userDetail.logo_url" :src="userDetail.logo_url" class="avatar" />
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
<p>图片不能大于2MB,格式:jpg、png</p>
|
|
|
@@ -66,12 +58,10 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="buttonFoot">
|
|
|
- <el-button type="primary" @click="(editDialogVisible = false), addr()"
|
|
|
- >保 存</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click=";(editDialogVisible = false), addr()">保 存</el-button>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="投屏标题设置" name="second">
|
|
|
+ <!-- <el-tab-pane label="投屏标题设置" name="second">
|
|
|
<el-form
|
|
|
:rules="rules"
|
|
|
ref="projectioninfo"
|
|
|
@@ -130,14 +120,9 @@
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
</div>
|
|
|
- </el-tab-pane>
|
|
|
+ </el-tab-pane> -->
|
|
|
<el-tab-pane label="菜单设置" name="fourth">
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- label-position="left"
|
|
|
- :model="menu"
|
|
|
- label-width="100px"
|
|
|
- >
|
|
|
+ <el-form ref="form" label-position="left" :model="menu" label-width="100px">
|
|
|
<el-form-item label="菜单名称:">
|
|
|
<div style="display: flex; flex-wrap: wrap">
|
|
|
<el-input
|
|
|
@@ -151,11 +136,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="buttonFoot">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="(editDialogVisible = false), addr3()"
|
|
|
- >保 存</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click=";(editDialogVisible = false), addr3()">保 存</el-button>
|
|
|
</div></el-tab-pane
|
|
|
>
|
|
|
</el-tabs>
|
|
|
@@ -201,40 +182,40 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
-//例如:import 《组件名称》 from '《组件路径》';
|
|
|
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
+// 例如:import 《组件名称》 from '《组件路径》';
|
|
|
|
|
|
export default {
|
|
|
- //import引入的组件需要注入到对象中才能使用
|
|
|
+ // import引入的组件需要注入到对象中才能使用
|
|
|
components: {},
|
|
|
data() {
|
|
|
- //这里存放数据
|
|
|
+ // 这里存放数据
|
|
|
return {
|
|
|
- activeName: "first",
|
|
|
- btnState: "1",
|
|
|
- radio: 1, //是否显示扫码下载
|
|
|
+ activeName: 'first',
|
|
|
+ btnState: '1',
|
|
|
+ radio: 1, // 是否显示扫码下载
|
|
|
userDetail: {
|
|
|
- title_name: "", //主题
|
|
|
- logo_url: "", //logo
|
|
|
- copyright: "", //版权
|
|
|
- system_name: "", //系统入口
|
|
|
- screen_name: "", //投屏入口
|
|
|
- }, //主题定制参数
|
|
|
+ title_name: '', // 主题
|
|
|
+ logo_url: '', // logo
|
|
|
+ copyright: '', // 版权
|
|
|
+ system_name: '', // 系统入口
|
|
|
+ screen_name: '' // 投屏入口
|
|
|
+ }, // 主题定制参数
|
|
|
projectioninfo: {
|
|
|
- title_name: "投屏名称", //主题名称
|
|
|
- corporate_name: "公司名称", //公司名称
|
|
|
- childrens: [],
|
|
|
- }, //投屏参数
|
|
|
+ title_name: '投屏名称', // 主题名称
|
|
|
+ corporate_name: '公司名称', // 公司名称
|
|
|
+ childrens: []
|
|
|
+ }, // 投屏参数
|
|
|
projectioninfoChildren: {},
|
|
|
- menu: [], //菜单
|
|
|
+ menu: [], // 菜单
|
|
|
menuChildren: {},
|
|
|
// 裁剪组件的基础配置option
|
|
|
- cropperVisible: false, //上传图片弹框
|
|
|
+ cropperVisible: false, // 上传图片弹框
|
|
|
option: {
|
|
|
img: null,
|
|
|
size: 1,
|
|
|
full: false,
|
|
|
- outputType: "png",
|
|
|
+ outputType: 'png',
|
|
|
canMove: true,
|
|
|
fixed: false,
|
|
|
// fixedNumber: [16, 9],
|
|
|
@@ -248,279 +229,275 @@ export default {
|
|
|
autoCropHeight: 150,
|
|
|
centerBox: false,
|
|
|
high: true,
|
|
|
- max: 99999,
|
|
|
+ max: 99999
|
|
|
},
|
|
|
- img_file: "",
|
|
|
- imageSrc: "", //后端返回的图片链接
|
|
|
+ img_file: '',
|
|
|
+ imageSrc: '', // 后端返回的图片链接
|
|
|
rules: {
|
|
|
- title_name: [
|
|
|
- { max: 18, message: "输入不得超过18个字符", trigger: "change" },
|
|
|
- ],
|
|
|
- project_info: [
|
|
|
- { max: 14, message: "输入不得超过14个字符", trigger: "change" },
|
|
|
- ],
|
|
|
- },
|
|
|
- };
|
|
|
+ title_name: [{ max: 18, message: '输入不得超过18个字符', trigger: 'change' }],
|
|
|
+ project_info: [{ max: 14, message: '输入不得超过14个字符', trigger: 'change' }]
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- //监听属性 类似于data概念
|
|
|
+ // 监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
- //监控data中的数据变化
|
|
|
+ // 监控data中的数据变化
|
|
|
watch: {
|
|
|
radio(val) {
|
|
|
- //console.log("radio", val);
|
|
|
- },
|
|
|
+ // console.log("radio", val);
|
|
|
+ }
|
|
|
},
|
|
|
- //方法集合
|
|
|
+ // 方法集合
|
|
|
methods: {
|
|
|
// 切换
|
|
|
handleClick(tab, event) {
|
|
|
- //console.log(tab.name, event);
|
|
|
- if (tab.name == "first") {
|
|
|
- this.getIndexData();
|
|
|
- } else if (tab.name == "second") {
|
|
|
- this.getTouPingData();
|
|
|
- } else if (tab.name == "fourth") {
|
|
|
- this.getMenuData();
|
|
|
+ // console.log(tab.name, event);
|
|
|
+ if (tab.name == 'first') {
|
|
|
+ this.getIndexData()
|
|
|
+ } else if (tab.name == 'second') {
|
|
|
+ this.getTouPingData()
|
|
|
+ } else if (tab.name == 'fourth') {
|
|
|
+ this.getMenuData()
|
|
|
}
|
|
|
},
|
|
|
getIndexData() {
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/home/info/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/home/info/'
|
|
|
}).then((res) => {
|
|
|
if (res.data.data && res.data.data.items) {
|
|
|
- this.userDetail = res.data.data.items;
|
|
|
- localStorage.setItem("newLogo", res.data.data.items.logo_url);
|
|
|
- localStorage.setItem("qrCodeIsShow", res.data.data.items.is_show);
|
|
|
- localStorage.setItem("newTitleName", res.data.data.items.title_name);
|
|
|
+ this.userDetail = res.data.data.items
|
|
|
+ localStorage.setItem('newLogo', res.data.data.items.logo_url)
|
|
|
+ localStorage.setItem('qrCodeIsShow', res.data.data.items.is_show)
|
|
|
+ localStorage.setItem('newTitleName', res.data.data.items.title_name)
|
|
|
if (res.data.data.items.is_show == true) {
|
|
|
- this.radio = 1;
|
|
|
+ this.radio = 1
|
|
|
} else {
|
|
|
- this.radio = 0;
|
|
|
+ this.radio = 0
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
getTouPingData() {
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/projection/info/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/projection/info/'
|
|
|
}).then((res) => {
|
|
|
if (res.data.data && res.data.data.items) {
|
|
|
- this.projectioninfo = res.data.data.items;
|
|
|
+ this.projectioninfo = res.data.data.items
|
|
|
this.projectioninfo.childrens.forEach((item) => {
|
|
|
- const [,] = Object.keys(item);
|
|
|
- const [key, value] = Object.values(item);
|
|
|
- this.$set(this.projectioninfoChildren, key, value);
|
|
|
- });
|
|
|
+ const [,] = Object.keys(item)
|
|
|
+ const [key, value] = Object.values(item)
|
|
|
+ this.$set(this.projectioninfoChildren, key, value)
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
getMenuData() {
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/menu/info/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/menu/info/'
|
|
|
}).then((res) => {
|
|
|
if (res.data.data && res.data.data.items) {
|
|
|
- this.menu = res.data.data.items;
|
|
|
+ this.menu = res.data.data.items
|
|
|
this.menu.forEach((item) => {
|
|
|
- const [,] = Object.keys(item);
|
|
|
- const [key, value] = Object.values(item);
|
|
|
- this.$set(this.menuChildren, key, value);
|
|
|
- });
|
|
|
+ const [,] = Object.keys(item)
|
|
|
+ const [key, value] = Object.values(item)
|
|
|
+ this.$set(this.menuChildren, key, value)
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 编辑保存
|
|
|
addr() {
|
|
|
- var img = this.imageSrc !== "" ? this.imageSrc : this.img_file; //图片链接
|
|
|
+ var img = this.imageSrc !== '' ? this.imageSrc : this.img_file // 图片链接
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/home/modify/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/home/modify/',
|
|
|
data: this.qs.stringify({
|
|
|
logo_url: img,
|
|
|
copyright: this.userDetail.copyright,
|
|
|
title_name: this.userDetail.title_name,
|
|
|
- is_show: this.radio ? true : false,
|
|
|
+ is_show: !!this.radio,
|
|
|
system_name: this.userDetail.system_name,
|
|
|
- screen_name: this.userDetail.screen_name,
|
|
|
- }),
|
|
|
+ screen_name: this.userDetail.screen_name
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.code == 0) {
|
|
|
- localStorage.setItem("newLogo", res.data.data.items.logo_url);
|
|
|
- localStorage.setItem("qrCodeIsShow", res.data.data.items.is_show);
|
|
|
- localStorage.setItem("newTitleName", res.data.data.items.title_name);
|
|
|
+ localStorage.setItem('newLogo', res.data.data.items.logo_url)
|
|
|
+ localStorage.setItem('qrCodeIsShow', res.data.data.items.is_show)
|
|
|
+ localStorage.setItem('newTitleName', res.data.data.items.title_name)
|
|
|
// this.$resetMessage.success(res.data.data.msg);
|
|
|
// } else {
|
|
|
}
|
|
|
- this.$resetMessage.success(res.data.msg);
|
|
|
- location.reload();
|
|
|
- });
|
|
|
+ this.$resetMessage.success(res.data.msg)
|
|
|
+ location.reload()
|
|
|
+ })
|
|
|
},
|
|
|
// 编辑保存
|
|
|
addr2() {
|
|
|
- const keys = Object.keys(this.projectioninfoChildren);
|
|
|
- const values = Object.values(this.projectioninfoChildren);
|
|
|
+ const keys = Object.keys(this.projectioninfoChildren)
|
|
|
+ const values = Object.values(this.projectioninfoChildren)
|
|
|
const children = keys.map((v, i) => {
|
|
|
- const projection_id = v;
|
|
|
- const title_name = values[i];
|
|
|
- return { projection_id, title_name };
|
|
|
- });
|
|
|
- this.projectioninfo.childrens = children;
|
|
|
+ const projection_id = v
|
|
|
+ const title_name = values[i]
|
|
|
+ return { projection_id, title_name }
|
|
|
+ })
|
|
|
+ this.projectioninfo.childrens = children
|
|
|
// //console.log(children, this.projectioninfo.childrens);
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/projection/modify/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/projection/modify/',
|
|
|
data: this.qs.stringify({
|
|
|
- title_name: this.projectioninfo.title_name || "",
|
|
|
- corporate_name: this.projectioninfo.corporate_name || "",
|
|
|
- childrens: JSON.stringify(this.projectioninfo.childrens),
|
|
|
- }),
|
|
|
+ title_name: this.projectioninfo.title_name || '',
|
|
|
+ corporate_name: this.projectioninfo.corporate_name || '',
|
|
|
+ childrens: JSON.stringify(this.projectioninfo.childrens)
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
// if (res.data.code == 0) {
|
|
|
// this.$resetMessage.success(res.data.data.items.msg);
|
|
|
// } else {
|
|
|
// }
|
|
|
- this.$resetMessage.success(res.data.data.items.msg);
|
|
|
- });
|
|
|
+ this.$resetMessage.success(res.data.data.items.msg)
|
|
|
+ })
|
|
|
},
|
|
|
// 编辑保存
|
|
|
addr3() {
|
|
|
- const keys = Object.keys(this.menuChildren);
|
|
|
- const values = Object.values(this.menuChildren);
|
|
|
+ const keys = Object.keys(this.menuChildren)
|
|
|
+ const values = Object.values(this.menuChildren)
|
|
|
const children = keys.map((v, i) => {
|
|
|
- const menu_id = v;
|
|
|
- const title_name = values[i];
|
|
|
- return { menu_id, title_name };
|
|
|
- });
|
|
|
- this.menu = children;
|
|
|
+ const menu_id = v
|
|
|
+ const title_name = values[i]
|
|
|
+ return { menu_id, title_name }
|
|
|
+ })
|
|
|
+ this.menu = children
|
|
|
this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/theme/menu/modify/",
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/theme/menu/modify/',
|
|
|
data: this.qs.stringify({
|
|
|
// title_name: this.menu.title_name,
|
|
|
// corporate_name: this.menu.corporate_name,
|
|
|
- menu_list: JSON.stringify(this.menu),
|
|
|
- }),
|
|
|
+ menu_list: JSON.stringify(this.menu)
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
// if (res.data.code == 0) {
|
|
|
// this.$resetMessage.success(res.data.data.items.msg);
|
|
|
// } else {
|
|
|
- this.$resetMessage.success(res.data.data.items.msg);
|
|
|
+ this.$resetMessage.success(res.data.data.items.msg)
|
|
|
// }
|
|
|
- location.reload();
|
|
|
- });
|
|
|
+ location.reload()
|
|
|
+ })
|
|
|
},
|
|
|
// 上传过图片编辑保存
|
|
|
ImgUploadSectionFile(param) {
|
|
|
- let that = this;
|
|
|
- let formData = new FormData();
|
|
|
- var dataUrlA = that.blobToFile(that.ulrData, param.file.name);
|
|
|
- formData.append("img_type", "/index/motif"); //首页图片
|
|
|
- formData.append("file", dataUrlA); //首页图片
|
|
|
- formData.append("token", localStorage.getItem("session")); //上传图片
|
|
|
+ let that = this
|
|
|
+ let formData = new FormData()
|
|
|
+ var dataUrlA = that.blobToFile(that.ulrData, param.file.name)
|
|
|
+ formData.append('img_type', '/index/motif') // 首页图片
|
|
|
+ formData.append('file', dataUrlA) // 首页图片
|
|
|
+ formData.append('token', localStorage.getItem('session')) // 上传图片
|
|
|
that
|
|
|
.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/v2/util/upload/img/",
|
|
|
- data: formData,
|
|
|
+ method: 'POST',
|
|
|
+ url: '/api/v2/util/upload/img/',
|
|
|
+ data: formData
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- if (res.data.data.items.img_url !== "") {
|
|
|
- that.imageSrc = res.data.data.items.img_url;
|
|
|
- that.userDetail.logo_url = res.data.data.items.img_url;
|
|
|
+ if (res.data.data.items.img_url !== '') {
|
|
|
+ that.imageSrc = res.data.data.items.img_url
|
|
|
+ that.userDetail.logo_url = res.data.data.items.img_url
|
|
|
} else {
|
|
|
that.$message.error({
|
|
|
- message: "上传图片失败,请重试",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
+ message: '上传图片失败,请重试',
|
|
|
+ duration: 1500
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- //console.log(err);
|
|
|
- });
|
|
|
- that.clearUploadBox();
|
|
|
+ // console.log(err);
|
|
|
+ })
|
|
|
+ that.clearUploadBox()
|
|
|
},
|
|
|
clearUploadBox() {
|
|
|
- this.userDetail.log_url = "";
|
|
|
- this.img_file = "";
|
|
|
+ this.userDetail.log_url = ''
|
|
|
+ this.img_file = ''
|
|
|
},
|
|
|
handleChange(file, fileList) {
|
|
|
if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(file.raw.name)) {
|
|
|
- alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种");
|
|
|
- return false;
|
|
|
+ alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
|
|
|
+ return false
|
|
|
}
|
|
|
- let reader = new FileReader();
|
|
|
+ let reader = new FileReader()
|
|
|
reader.onload = (e) => {
|
|
|
- let data;
|
|
|
- if (typeof e.target.result === "object") {
|
|
|
+ let data
|
|
|
+ if (typeof e.target.result === 'object') {
|
|
|
// 把Array Buffer转化为blob 如果是base64不需要
|
|
|
- data = window.URL.createObjectURL(new Blob([e.target.result]));
|
|
|
+ data = window.URL.createObjectURL(new Blob([e.target.result]))
|
|
|
} else {
|
|
|
- data = e.target.result;
|
|
|
+ data = e.target.result
|
|
|
}
|
|
|
- this.option.img = data;
|
|
|
- };
|
|
|
- this.cropperVisible = true;
|
|
|
- reader.readAsArrayBuffer(file.raw);
|
|
|
- this.fileList = fileList;
|
|
|
+ this.option.img = data
|
|
|
+ }
|
|
|
+ this.cropperVisible = true
|
|
|
+ reader.readAsArrayBuffer(file.raw)
|
|
|
+ this.fileList = fileList
|
|
|
},
|
|
|
cropperFinish() {
|
|
|
- var that = this;
|
|
|
+ var that = this
|
|
|
that.$refs.cropper.getCropData((data) => {
|
|
|
- that.userDetail.log_url = data;
|
|
|
- that.ulrData = data;
|
|
|
- that.cropperVisible = false;
|
|
|
- that.btnShow = true;
|
|
|
- that.$refs.upload.submit();
|
|
|
- that.$refs.upload.clearFiles();
|
|
|
- });
|
|
|
+ that.userDetail.log_url = data
|
|
|
+ that.ulrData = data
|
|
|
+ that.cropperVisible = false
|
|
|
+ that.btnShow = true
|
|
|
+ that.$refs.upload.submit()
|
|
|
+ that.$refs.upload.clearFiles()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// base64转换为blob文件类型
|
|
|
dataURLtoFile(dataurl) {
|
|
|
- var arr = dataurl.split(","),
|
|
|
+ var arr = dataurl.split(','),
|
|
|
mime = arr[0].match(/:(.*?);/)[1],
|
|
|
bstr = atob(arr[1]),
|
|
|
n = bstr.length,
|
|
|
- u8arr = new Uint8Array(n);
|
|
|
+ u8arr = new Uint8Array(n)
|
|
|
while (n--) {
|
|
|
- u8arr[n] = bstr.charCodeAt(n);
|
|
|
+ u8arr[n] = bstr.charCodeAt(n)
|
|
|
}
|
|
|
- return new Blob([u8arr], { type: mime });
|
|
|
+ return new Blob([u8arr], { type: mime })
|
|
|
},
|
|
|
|
|
|
// blob转换为file文件类型
|
|
|
blobToFile(dataurl, filename) {
|
|
|
- var arr = dataurl.split(","),
|
|
|
+ var arr = dataurl.split(','),
|
|
|
mime = arr[0].match(/:(.*?);/)[1],
|
|
|
bstr = atob(arr[1]),
|
|
|
n = bstr.length,
|
|
|
- u8arr = new Uint8Array(n);
|
|
|
+ u8arr = new Uint8Array(n)
|
|
|
while (n--) {
|
|
|
- u8arr[n] = bstr.charCodeAt(n);
|
|
|
+ u8arr[n] = bstr.charCodeAt(n)
|
|
|
}
|
|
|
- return new File([u8arr], filename, { type: mime });
|
|
|
- },
|
|
|
+ return new File([u8arr], filename, { type: mime })
|
|
|
+ }
|
|
|
},
|
|
|
- //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- this.getIndexData(); //首页
|
|
|
+ this.getIndexData() // 首页
|
|
|
// this.getTouPingData(); //投屏
|
|
|
// this.getMenuData(); //菜单
|
|
|
},
|
|
|
- beforeCreate() {}, //生命周期 - 创建之前
|
|
|
- beforeMount() {}, //生命周期 - 挂载之前
|
|
|
- beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
- updated() {}, //生命周期 - 更新之后
|
|
|
- beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
- destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
-};
|
|
|
+ beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
+ beforeMount() {}, // 生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, // 生命周期 - 更新之前
|
|
|
+ updated() {}, // 生命周期 - 更新之后
|
|
|
+ beforeDestroy() {}, // 生命周期 - 销毁之前
|
|
|
+ destroyed() {}, // 生命周期 - 销毁完成
|
|
|
+ activated() {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+}
|
|
|
</script>
|
|
|
-<style lang='less' scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
/deep/ .el-tabs__nav-scroll {
|
|
|
overflow: hidden;
|
|
|
@@ -549,4 +526,4 @@ export default {
|
|
|
position: relative;
|
|
|
margin: 0px 0 15px !important;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|