From a6b40a1b80b586f7dbd874f3939f5e06fcc752d2 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期三, 04 一月 2023 19:24:14 +0800 Subject: [PATCH] '页面尺寸自适应初期调整' --- src/views/padSunmaryProcedure/padWord.vue | 103 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 69 insertions(+), 34 deletions(-) diff --git a/src/views/padSunmaryProcedure/padWord.vue b/src/views/padSunmaryProcedure/padWord.vue index 885b1e3..e76e486 100644 --- a/src/views/padSunmaryProcedure/padWord.vue +++ b/src/views/padSunmaryProcedure/padWord.vue @@ -1,43 +1,57 @@ <template> - <basic-container> + <basic-container :style="{height: screenHeight+'px!important'}"> <!--澶撮儴瀵艰埅--> - <div id="nav"> - <el-button icon="el-icon-arrow-left" @click="goHome">杩斿洖</el-button> + <div class="nav"> + <el-button icon="el-icon-arrow-left" + @click="goHome">杩斿洖</el-button> <p>{{ name }}</p> <div> - <el-button v-show="btn ==1" icon="el-icon-caret-top" @click="ShowHide(0)"></el-button> - <el-button v-show="btn ==0" icon="el-icon-caret-bottom" @click="ShowHide(0)"></el-button> - <el-button icon="el-icon-upload" @click="submit">鎻愪氦</el-button> + <el-button v-show="btn ==1" + icon="el-icon-caret-top" + @click="ShowHide(0)"></el-button> + <el-button v-show="btn ==0" + icon="el-icon-caret-bottom" + @click="ShowHide(0)"></el-button> + <el-button icon="el-icon-upload" + @click="submit">鎻愪氦</el-button> </div> </div> <!--搴曢儴閫夐」鍗�--> - <el-tabs type="border-card" v-model="activeName" :stretch="true" - @tab-click="handleClick"> - <el-tab-pane label="璋冩煡璇㈤棶绗斿綍" name="first"> - <BiLu v-if="activeName == 'first'"></BiLu> - </el-tab-pane> - <el-tab-pane label="璐d护闄愭湡鏀规閫氱煡涔�" name="second"> - <GaiZheng v-if="activeName == 'second'">璐d护闄愭湡鏀规閫氱煡涔�</GaiZheng> - </el-tab-pane> - <el-tab-pane label="澶勭綒鍐冲畾涔�" name="third"> - <JueDingShu v-if="activeName == 'third'">澶勭綒鍐冲畾涔�</JueDingShu> - </el-tab-pane> - </el-tabs> + <div class="tagsContainer"> + <el-tabs type="border-card" + v-model="activeName" + :stretch="true" + @tab-click="handleClick"> + <el-tab-pane label="璋冩煡璇㈤棶绗斿綍" + name="first"> + <BiLu v-if="activeName == 'first'"></BiLu> + </el-tab-pane> + <el-tab-pane label="璐d护闄愭湡鏀规閫氱煡涔�" + name="second"> + <GaiZheng v-if="activeName == 'second'">璐d护闄愭湡鏀规閫氱煡涔�</GaiZheng> + </el-tab-pane> + <el-tab-pane label="澶勭綒鍐冲畾涔�" + name="third"> + <JueDingShu v-if="activeName == 'third'">澶勭綒鍐冲畾涔�</JueDingShu> + </el-tab-pane> + </el-tabs> + </div> + </basic-container> </template> <script> -import {submitcase} from "../../api/News/pad"; -import BiLu from "./word_mange/mangeBL" +import { submitcase } from '../../api/News/pad' +import BiLu from './word_mange/mangeBL' import GaiZheng from './word_mange/mangeGZ' import JueDingShu from './word_mange/mangeJD' export default { - name: "padWord1", + name: 'padWord1', components: { BiLu, GaiZheng, - JueDingShu + JueDingShu, }, created() { this.id = this.$store.state.user.id @@ -50,11 +64,20 @@ }, data() { return { - name: "妗堜欢鍚嶇О",//灞曠ず鐨勬浠跺悕绉� - btn: 1,//灞曞紑鍜屾敹璧� - tabPosition: 'left',//榛樿宸︿晶閫夐」鍗� - activeName: "first"//閫夐」鍗¢粯璁ゆ墦寮�绗竴涓� + name: '妗堜欢鍚嶇О', //灞曠ず鐨勬浠跺悕绉� + btn: 1, //灞曞紑鍜屾敹璧� + tabPosition: 'left', //榛樿宸︿晶閫夐」鍗� + activeName: 'first', //閫夐」鍗¢粯璁ゆ墦寮�绗竴涓� + screenHeight: null, } + }, + mounted() { + window.onresize = () => { + return () => { + this.screenHeight = document.body.clientHeight + } + } + this.screenHeight = document.body.clientHeight }, methods: { //杩斿洖妗堜欢鍒楄〃 @@ -65,31 +88,43 @@ }, //鏀剁缉椤堕儴 ShowHide(type) { - this.btn = type; + this.btn = type window.android.toShowHide() }, //鎻愪氦锛堝幓瀹℃牳锛� submit() { - submitcase({id: this.id}).then(res => { + submitcase({ id: this.id }).then((res) => { this.goHome() }) }, //鐐瑰嚮閫夐」鍗℃晥鏋� handleClick(tab, event) { this.activeName = tab.name - } - } + }, + }, } </script> <style lang="scss"> -.el-tabs__content { - height: calc(100vh - 110px); - overflow-y: auto; +.tagsContainer { + height: 95%; + overflow: scroll; + .el-tabs { + .el-tabs__header { + position: sticky; + top: 0; + z-index: 10000; + } + .el-tabs__content { + // height: calc(100vh - 110px); + overflow-y: auto; + } + } } </style> <style scoped> -#nav { +.nav { + height: 5%; display: flex; justify-content: space-between; align-items: center; -- Gitblit v1.9.1