From 0cbca7090b7b18d86c3f363f5670e6899330c4b9 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 25 十一月 2024 19:12:56 +0800
Subject: [PATCH] 路由参数
---
src/components/VisibilityToolbar/index.vue | 35 ++++++++++++++++++++++++-----------
1 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/src/components/VisibilityToolbar/index.vue b/src/components/VisibilityToolbar/index.vue
index 4f8ff18..2773bb6 100644
--- a/src/components/VisibilityToolbar/index.vue
+++ b/src/components/VisibilityToolbar/index.vue
@@ -1,5 +1,5 @@
<template>
- <div class="top-right-btn" :style="style">
+ <div class="top-right-btn">
<el-row>
<el-tooltip v-if="search" class="item" effect="dark" :content="showSearch ? '闅愯棌鎼滅储' : '鏄剧ず鎼滅储'" placement="top">
<el-button size="small" circle icon="el-icon-search" @click="toggleSearch"></el-button>
@@ -12,12 +12,18 @@
</el-tooltip>
</el-row>
- <el-drawer :visible.sync="table" title="淇℃伅鏄鹃殣绛涢��" size="30%" append-to-body>
+ <el-drawer
+ :visible.sync="table"
+ title="淇℃伅鏄鹃殣绛涢��"
+ size="30%"
+ append-to-body
+ :wrapperCLosable="false"
+ :with-header="true">
<div slot="header">
<span>淇℃伅鏄鹃殣绛涢��</span>
</div>
- <div slot="default">
- <el-table :data="pagedColumns" style="width: 100%; height: 80%">
+ <div slot="default" style="margin-left: 20px;margin-top: 20px">
+ <el-table :data="pagedColumns" style="width: 95%; height: 80%;;margin-bottom: 40px;">
<el-table-column prop="index" label="搴忓彿" width="80"></el-table-column>
<el-table-column prop="label" label="鏁版嵁鍚嶇О"></el-table-column>
<el-table-column prop="visible" label="鏄惁鏄剧ず">
@@ -25,7 +31,8 @@
<el-switch
v-model="scope.row.visible"
class="ml-2"
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
@change="switchChange(scope.row)"
></el-switch>
</template>
@@ -36,7 +43,6 @@
</template>
</el-table-column>
</el-table>
-
<el-pagination
v-if="total > pageSize"
:page-size="pageSize"
@@ -46,7 +52,7 @@
@current-change="handlePageChange"
></el-pagination>
</div>
- <div slot="footer">
+ <div style="position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; text-align: right;">
<el-button @click="table = false">鍙� 娑�</el-button>
<el-button type="primary" @click="resetSort">閲� 缃�</el-button>
</div>
@@ -126,10 +132,7 @@
mounted() {
this.columns.forEach((item, index) => {
if (item.visible) {
- // 娉ㄦ剰锛氳繖閲屽亣璁綾olumnRef搴旇鏄竴涓猚heckbox缁勪欢鐨勫紩鐢紝
- // 浣嗗湪Vue 2涓紝鎴戜滑鍙兘闇�瑕佸彟涓�绉嶆柟寮忔潵绠$悊checked鐘舵�侊紝
- // 鍥犱负Vue 2娌℃湁ref鐨勮嚜鍔ㄥ疄渚嬬粦瀹氾紝涓旇繖閲岀殑columnRef閫昏緫浼间箮涓嶅畬鏁存垨閿欒銆�
- // 鍙兘闇�瑕佺Щ闄ゆ垨閲嶅啓杩欓儴鍒嗛�昏緫銆�
+
}
});
},
@@ -157,4 +160,14 @@
.show-btn {
margin-left: 12px;
}
+.drawer-footer {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 20px;
+ background: #fff;
+ border-top: 1px solid #e8e8e8;
+ text-align: right;
+}
</style>
--
Gitblit v1.8.0