iOS 鍵盤會(huì)頂起導(dǎo)航欄,隱藏鍵盤底部布局不還原
經(jīng)過(guò)恨多次不同的嘗試,還是一樣的問(wèn)題,附上所有的頁(yè)面代碼,煩請(qǐng)幫忙看看,謝謝了
<template>
<!--<navpage style="display: flex;flex-direction: column"
dataRole="none"
:height="navBarHeight"
backgroundColor="#1296DB"
leftItemSrc="http://onnqn1z06.bkt.clouddn.com/image/close.png"
:title="title"
titleColor="white"
@naviBarLeftItemClick="naviBarLeftItemClick">-->
<list style="height: 999;flex:1;overflow: auto;-webkit-overflow-scrolling: touch">
<cell>
<div style="border-bottom-width: 2;border-bottom-color: #F5F5F5;padding-bottom: 30">
<div style="margin-top:20;margin-right:10;margin-left:10;flex-direction: row;justify-content: center;align-items: center;" @click="userIndex(comment.userId)">
<div style="flex: 1;flex-direction: row;align-items: center;" >
<image style="height: 80;width: 80;border-radius: 50;" :src="comment.avatar" :placeholder="placeholderImg"></image>
<text style="margin-left: 10;color: #333333;font-size: 30">{{comment.nickname}}</text>
</div>
<div style="flex: 2;align-items: flex-end;margin-right: 40">
<div v-if="subscribehide" @click="follow" item="ture" :style="{backgroundColor:subscribe==0?'#1296DB':'',borderWidth:(subscribe=='1'?'1':'0'),borderColor:subscribe==1?'#d5d5d5':''}" style="border-radius: 50;width: 100;height: 45;justify-content: center;align-items: center;">
<text :style="{color:subscribe==0?'white':'#c3c3c3'}" style="font-size:24">{{subscribe==0?'關(guān)注':'已關(guān)注'}}</text>
</div>
</div>
</div>
<div class="content" style="margin-left: 90;margin-right: 15;font-size: 25">
<text style="color: #454434;font-size: 28">{{comment.content}}</text>
<text style="color: rgb(20,20,20);font-size: 25;margin-top: 10">{{comment.createDateText}}</text>
</div>
</div>
</cell>
<cell>
<div>
<text style="color: #c8c8c8;font-size: 30;margin-left: 20;margin-top: 20">全部評(píng)論</text>
</div>
</cell>
<cell v-for="(commItem,index) in commentReplyList">
<div style="margin-left: 10;margin-right: 10;margin-top: 20">
<div style="flex-direction: row;justify-content: center;align-items: center;">
<div style="flex: 1; flex-direction: row;align-items: center" @click="userIndex(commItem.userId)">
<image style="height: 60;width: 60;border-radius: 50;" :src="commItem.avatar" :placeholder="placeholderImg"></image>
<text style="color: #406599;margin-left: 10;font-size: 26">{{commItem.nickname}}</text>
</div>
<div style="flex: 2;align-items: flex-end;margin-right: 30;">
<div style="flex-direction: row;align-items: center;" @click="zanEvaer" :item="commItem">
<image v-if="commItem.isLike==1" src="http://onnqn1z06.bkt.clouddn.com/image/yzan.png" style="width: 30;height: 30"></image>
<image v-if="commItem.isLike==0" src="http://onnqn1z06.bkt.clouddn.com/image/zan2.png" style="width: 30;height: 30"></image>
<text style="color: #aaaaaa;font-size: 25">{{commItem.likecount}}</text>
</div>
</div>
</div>
<div style="margin-left: 70;">
<text style="color: rgb(20,20,20);font-size: 24">{{commItem.content}}</text>
<div style="flex-direction: row;align-items: center;margin-top: 10;">
<text style="color: rgb(20,20,20);font-size: 20;">{{commItem.createDateText}}·</text>
<text v-if="commItem.commentcount>0" style="color: rgb(20,20,20);font-size: 20;border-radius: 30;padding-left: 10;height: 35;text-align: center;line-height: 35; padding-right: 10;background-color: #F7F5F6">{{commItem.commentcount}}回復(fù)</text>
<text v-else style="color: rgb(20,20,20);font-size: 20;text-align: center;">回復(fù)</text>
</div>
</div>
</div>
</cell>
</list>
<div style="bottom: 0;background-color: #FFFFFF;height: 88;align-items:center;flex-direction: row">
<div >
<input placeholder="請(qǐng)輸入" :value="sendcomment" return-key-type="send" @return = "onreturn" @input="onincommentInput" ref="commentInput" type="text" style="background-color:#FAFAFA;width:575;border-width:1;border-color:#EEEEEE;border-radius: 10; height: 60;font-size: 24;padding-left: 10"/>
</div>
</div>
<!--</navpage>-->
</template>
<script>
module.exports = {
data: {
domHeight:0,
},
created: function() {
this.domHeight = weex.config.env.deviceHeight / weex.config.env.deviceWidth*750 - (88*2+50);
}
}
</script>
@佘貞標(biāo)
您好!感謝你的解答,我嘗試使用flex布局,結(jié)果還是一樣。我附上了我的頁(yè)面結(jié)構(gòu),請(qǐng)指點(diǎn)一下謝謝了。
<template>
<div>
<!--長(zhǎng)列表 -->
<list>
...
</list>
<!--底部評(píng)論菜單 -->
<div style="flex: 1;bottom: 0;background-color: #FFFFFF;height: 88;align-items:center;flex-direction: row">
<div style="flex: 4;">
<input placeholder="請(qǐng)輸入" :value="sendcomment" return-key-type="send" @return = "onreturn" @input="onincommentInput" ref="commentInput" type="text" style="background-color:#FAFAFA;width:575;border-width:1;border-color:#EEEEEE;border-radius: 10; height: 60;font-size: 24;padding-left: 10"/>
</div>
<div style="flex: 1">
<div style="background-color: #0088fb;border-radius: 10; width: 110;height:60;justify-content: center">
<text style="color: white;text-align: center;font-size: 24" @click="send">發(fā)送</text>
</div>
</div>
</div>
</div>
</template>
是weex的SDK源碼的問(wèn)題,手動(dòng)改一下吧
./platforms/ios/Pods/WeexSDK/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
?
文件路徑根據(jù)自己的項(xiàng)目找一下,找到WXEditComponent.m里的blur方法,然后添加一行
[[NSNotificationCenter defaultCenter] postNotificationName:UIKeyboardWillHideNotification object:nil];
在失去焦點(diǎn)的時(shí)候重置一下位置就好了
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。