临时提交

This commit is contained in:
sakuya 2021-07-19 22:40:17 +08:00
parent 13f716be0b
commit 77b37920af
2 changed files with 16 additions and 6 deletions

View File

@ -44,7 +44,7 @@
//
this.$nextTick(() => {
const tags = this.$refs.tags
if(tags.scrollWidth > tags.clientWidth){
if(tags && tags.scrollWidth > tags.clientWidth){
//
let targetTag = tags.querySelector(".active")
targetTag.scrollIntoView()

View File

@ -9,8 +9,12 @@
<template>
<div class="sc-page-header">
<div class="sc-page-header__icon">
<span><i class="el-icon-burger"></i></span>
</div>
<div class="sc-page-header__title">
<h2>新开标签页面</h2>
<h2 v-if="id">编辑页面 ID:{{id}}</h2>
<h2 v-else>新增页面</h2>
<p>可用于非常复杂的表单提交如一些较为简单的表单提交应使用dialog或者drawer更合适</p>
</div>
</div>
@ -39,7 +43,7 @@
<el-input v-model="form.name" placeholder="请输入名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="medium"> </el-button>
<el-button type="primary" size="medium" @click="save"> </el-button>
</el-form-item>
</el-form>
</el-card>
@ -73,13 +77,19 @@
}
},
methods: {
save(){
console.log(this.$store);
}
}
}
</script>
<style>
.sc-page-header {background: #fff;border-bottom: 1px solid #e6e6e6;padding:25px 25px;}
.sc-page-header__title h2 {font-size: 17px;color: #3c4a54;font-weight: bold;}
.sc-page-header {background: #fff;border-bottom: 1px solid #e6e6e6;padding:20px 25px;display: flex;}
.sc-page-header__icon {width: 50px;}
.sc-page-header__icon span {display: inline-block;width: 30px;height: 30px;background: #409EFF;border-radius: 40%;display: flex;align-items: center;justify-content: center;}
.sc-page-header__icon span i {color: #fff;font-size: 14px;}
.sc-page-header__title {flex: 1;}
.sc-page-header__title h2 {font-size: 17px;color: #3c4a54;font-weight: bold;margin-top: 3px;}
.sc-page-header__title p {font-size: 13px;color: #999;margin-top: 15px;}
</style>