|
@@ -3,14 +3,18 @@
|
|
|
<div class="flex flex-center flex-justify-between border-bottom">
|
|
<div class="flex flex-center flex-justify-between border-bottom">
|
|
|
<div v-for="header in headers" :key="header.id" class="mt-20 full-width">
|
|
<div v-for="header in headers" :key="header.id" class="mt-20 full-width">
|
|
|
<div
|
|
<div
|
|
|
- v-if="header.label !== '操作'"
|
|
|
|
|
|
|
+ v-if="header.label === '操作' && showMenu"
|
|
|
class="padding-top padding-bottom"
|
|
class="padding-top padding-bottom"
|
|
|
- :style="`min-width:` + header.width + `px`"
|
|
|
|
|
|
|
+ style="width: 280px"
|
|
|
>
|
|
>
|
|
|
- {{ header.label }}
|
|
|
|
|
|
|
+ {{ header.label }}{{ showMenu }}
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-else class="menu flex flex-center">
|
|
|
|
|
- {{ header.label }}{{ header.width }}
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-else
|
|
|
|
|
+ class="menu flex flex-center"
|
|
|
|
|
+ :style="header.width ? `width:` + header.width + `px` : ''"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ header.label }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -27,12 +31,14 @@
|
|
|
class="flex-child-average flex"
|
|
class="flex-child-average flex"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
- v-if="prop.label === '操作'"
|
|
|
|
|
- class="nowrap menu flex flex-center"
|
|
|
|
|
|
|
+ v-if="prop.label === '操作' && showMenu"
|
|
|
|
|
+ class="nowrap menu flex flex-center light-blue-bg"
|
|
|
|
|
+ style="width: 280px"
|
|
|
>
|
|
>
|
|
|
<el-button type="primary" size="small" text>查看</el-button>
|
|
<el-button type="primary" size="small" text>查看</el-button>
|
|
|
<el-button type="primary" size="small" text>归档</el-button>
|
|
<el-button type="primary" size="small" text>归档</el-button>
|
|
|
<el-button type="primary" size="small" text>重命名</el-button>
|
|
<el-button type="primary" size="small" text>重命名</el-button>
|
|
|
|
|
+ <move />
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
v-else
|
|
v-else
|
|
@@ -61,9 +67,12 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import row1 from '@/views/resource/component/row1.vue'
|
|
import row1 from '@/views/resource/component/row1.vue'
|
|
|
|
|
+import move from '@/views/resource/component/move.vue'
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- row1
|
|
|
|
|
|
|
+ row1,
|
|
|
|
|
+ move
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
data: {
|
|
data: {
|
|
@@ -86,6 +95,8 @@ export default {
|
|
|
const menu = {
|
|
const menu = {
|
|
|
label: '操作'
|
|
label: '操作'
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.option.showMenu)
|
|
|
|
|
+ this.showMenu = this.option.showMenu
|
|
|
this.headers = val.column
|
|
this.headers = val.column
|
|
|
if (this.headers.findIndex(e => e.label === '操作') === -1) {
|
|
if (this.headers.findIndex(e => e.label === '操作') === -1) {
|
|
|
this.headers.push(menu)
|
|
this.headers.push(menu)
|
|
@@ -96,6 +107,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ showMenu: true,
|
|
|
headers: []
|
|
headers: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -122,7 +134,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.menu {
|
|
.menu {
|
|
|
- width: 280px;
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex: 1;
|
|
|
height: 45px;
|
|
height: 45px;
|
|
|
border-bottom: #f7f8fa solid 1px;
|
|
border-bottom: #f7f8fa solid 1px;
|
|
|
}
|
|
}
|