Commit 70bb0dbe authored by yaya's avatar yaya

feat:UI优化

parent 334e469b
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="op-container" style="margin-bottom: 20px"> <div ref="top" :class="{fixed: isFixed}" class="op-container" style="margin-bottom: 20px">
<el-button round @click="handleCancel">取消</el-button> <el-button round @click="handleCancel">取消</el-button>
<el-button type="primary" style="margin-right: 20px" round @click="handlePublish">发布</el-button> <el-button type="primary" style="margin-right: 20px" round @click="handlePublish">发布</el-button>
<el-button-group> <el-button-group>
...@@ -254,7 +254,8 @@ export default { ...@@ -254,7 +254,8 @@ export default {
goodIdList: [], goodIdList: [],
currentIndex: 0, currentIndex: 0,
showLargeDialog: false, showLargeDialog: false,
imageUrl: '' imageUrl: '',
isFixed: false
} }
}, },
...@@ -288,10 +289,18 @@ export default { ...@@ -288,10 +289,18 @@ export default {
this.initContent() this.initContent()
}, },
mounted() { mounted() {
// this.pictureCut = this.$refs['pictureCut'] window.addEventListener('scroll', this.handleScroll)
// this.utils = createUtils(this.pictureCut)
}, },
methods: { methods: {
handleScroll() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
const testEle = this.$refs.top
if (scrollTop > testEle.offsetTop) {
this.isFixed = true
} else {
this.isFixed = false
}
},
// 初始化内容 // 初始化内容
initContent() { initContent() {
if (this.$route.query.id == null) { if (this.$route.query.id == null) {
...@@ -586,6 +595,16 @@ export default { ...@@ -586,6 +595,16 @@ export default {
.op-container { .op-container {
text-align: right; text-align: right;
background: white;
}
.fixed {
position: fixed;
background: white;
top: 20px;
left: 0;
right: 20px;
z-index: 99;
} }
.box-card { .box-card {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment