<template>
<div style="height: 100%;">
<mt-header title="新建问答">
<mt-button icon="back" slot="left" v-tap="{methods: switchView, view: 'Post'}"></mt-button>
<mt-button icon="add" slot="right"><a @click="addQuestion()"><span class="fa fa-send" > 发送</span></a></mt-button>
</mt-header>
<div class="new-post-input">
<mt-field placeholder="请输入标题" v-model="title" style="border-bottom: 1px solid #acacac;"></mt-field>
<mt-field placeholder="请输入内容" type="textarea" v-model="content" rows="14"></mt-field>
</div>
<div>
提到的人:
<mt-badge class="new-at-who" size="small" :type="item.type" v-for="item in atCheckList" :key="item.id">{{item.name}}</mt-badge>
</div>
<div>
主题:
<mt-badge class="new-at-who" size="small" :type="item.type" v-for="item in topicCheckList" :key="item.id">{{item.name}}</mt-badge>
</div>
<div class="new-post-select">
<div class="select-items">
<a class="select-item"><span class="fa fa-image new-post-btn"><input type="file" @change="selectFile()" class="new-post-file" /></span></a>
<a v-tap="{methods: switchView, view: 'AtWho'}" class="select-item"><span class="fa fa-at"></span></a>
<a v-tap="{methods: switchView, view: 'Topic'}" class="select-item"><span class="fa fa-flag"></span></a>
</div>
</div>
</div>
</template>
css:
.new-post-select {
float: right;
height: 40px;
width: 100%;
background-color: #f6f7f9;
position: fixed;
bottom: 0px;
}
.select-items{
float: right;
margin-top: 10px;
}
.select-item{
font-size: 16px;
margin-left: 17px;
margin-right: 15px;
}
.new-post-btn{
position: relative;
display: inline-block;
overflow: hidden;
}
.new-post-btn input{
position: absolute;
left: 0px;
top: 0px;
opacity: 0;
-ms-filter: 'alpha(opacity=0)';
}
我在页面上将某个div定位在底部但是出现在上一个div下面,然后再定位到底部
是渲染时候顺序问题吗?
我该怎么解决?
页面切换我使用history.pushState()
你这个代码不全,其他人很难给你解答啊