From 9057e04efad1b7d61c77a72e5c37a504d0aee935 Mon Sep 17 00:00:00 2001 From: doum <doum> Date: 星期五, 26 九月 2025 09:24:03 +0800 Subject: [PATCH] H5静态化 --- admin/src/components/common/GlobalWindow.vue | 85 +++++++++++++++++++----------------------- 1 files changed, 38 insertions(+), 47 deletions(-) diff --git a/admin/src/components/common/GlobalWindow.vue b/admin/src/components/common/GlobalWindow.vue index d8c67a2..a670937 100644 --- a/admin/src/components/common/GlobalWindow.vue +++ b/admin/src/components/common/GlobalWindow.vue @@ -8,23 +8,18 @@ :close-on-press-escape="false" :wrapper-closable="false" :append-to-body="true" - :destroy-on-close="true" - :modal="true" @close="close" > <div slot="title" class="window__header"> <span class="header__btn-back" @click="close"><i class="el-icon-arrow-left"></i></span>{{title}} - <!-- {{title}} --> </div> <div class="window__body"> <slot></slot> </div> <div v-if="withFooter" class="window__footer"> <slot name="footer"> - <el-button v-if="showConfirm" @click="confirm" :loading="confirmWorking" type="primary">{{text}}</el-button> - <slot name="btns" /> - <el-button type="primary" v-if="isDownload" @click="downloadFile">涓嬭浇鍌即閫氱煡鍗�</el-button> - <el-button @click="close">{{ backText }}</el-button> + <el-button @click="confirm" :loading="confirmWorking" type="primary">{{confirmText}}</el-button> + <el-button @click="close">{{cancelText}}</el-button> </slot> </div> </el-drawer> @@ -36,30 +31,25 @@ props: { width: { type: String, - default: '100%' + default: '36%' }, // 鏄惁鍖呭惈搴曢儴鎿嶄綔 withFooter: { type: Boolean, default: true }, - // 鎻愪氦鎸夐挳鏂囧瓧 - text: { - type: String, - default: '纭畾' - }, - backText: { - type: String, - default: '杩斿洖' - }, // 纭鎸夐挳loading鐘舵�� confirmWorking: { type: Boolean, default: false }, - showConfirm: { - type: Boolean, - default: true + // 纭鎸夐挳鏂囨 + confirmText: { + default: '纭畾' + }, + // 鍙栨秷鎸夐挳鏂囨 + cancelText: { + default: '鍙栨秷' }, // 鏍囬 title: { @@ -70,23 +60,20 @@ visible: { type: Boolean, required: true - }, - // 鏄惁鏄剧ず涓嬭浇鎸夐挳 - isDownload: { - type: Boolean, - required: false } }, methods: { + /** + * 纭 + */ confirm () { this.$emit('confirm') }, + /** + * 鍏抽棴 + */ close () { - this.$emit('close') this.$emit('update:visible', false) - }, - downloadFile() { - this.$emit('downloadFile') } } } @@ -97,16 +84,11 @@ // 杈撳叆妗嗛珮搴� $input-height: 32px; .global-window { - top: 0; - left: 250px !important; // 澶撮儴鏍囬 - ::v-deep .el-drawer__header { + /deep/ .el-drawer__header { padding: 0 10px 0 0; line-height: 40px; border-bottom: 1px solid #eee; - // text-align: center; - font-weight: 500; - color: #222; // 杩斿洖鎸夐挳 .header__btn-back { display: inline-block; @@ -122,7 +104,7 @@ } } // 涓讳綋 - ::v-deep .el-drawer__body { + /deep/ .el-drawer__body { display: flex; flex-direction: column; position: absolute; @@ -130,23 +112,32 @@ bottom: 0; width: 100%; overflow: hidden; - // background-color: #f7f7f7; // 鍐呭 .window__body { - // width: 1100px; - // margin: 0 auto; - background-color: #fff; - width: 100%; height: 100%; overflow-y: auto; - padding: 0 16px 12px 16px; + padding: 12px 16px; // 鏍囩 - // .el-form-item__label { - // float: none; - // } + .el-form-item__label { + float: none; + } // 鍏冪礌瀹藉害涓�100% - .el-form-item__content > *{ - width: 100%; + .el-form-item__content{ + & > * { + width: 100%; + } + } + // 寮�鍏宠〃鍗曢」 + .form-item-switch { + .el-form-item__content > * { + width: auto !important; + } + .switch-text { + color: #999; + margin-left: 6px; + font-size: 13px; + vertical-align: middle; + } } } // 灏鹃儴 -- Gitblit v1.9.3