Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
465 views
in Technique[技术] by (71.8m points)

slot,scroller,input一起使用时,android端键盘弹出来马上就消失了.

weex版本(0.10.0),在一个parent.vue文件中有slot标签,在另一个child.vue中使用parent作为components,当child.vue中有scroller嵌套input时,点击input时,在android端键盘弹出来后马上就消失了。

parent.vue

<template>
    <div>
        <div class="title"></div>
        <div class="wrapper">
            <slot></slot>
        </div>
    </div>
</template>

<style>
    .wrapper {
        position: fixed;
        top: 100px;
        left: 0px;
        right: 0px;
        bottom: 0px;
        width: 750px;
    }
    .title{
        height: 100px;
        width: 750px;
        background-color: #00d4b4;
    }
</style>

child.vue

<template>
    <parent>
        <scroller>
            <input
                    class="inputCode"
                    placeholder="请输入..."/>
            <div style="height: 3000px;background-color:#DFDF3C ">
            </div>
        </scroller>
    </parent>

</template>

<script>
    module.exports = {
        components: {
            parent: require('./parent.vue'),
        },
    }
</script>

<style>
    .wrapper {
        position: fixed;
        top: 0px;
        left: 0px;
        right: 0px;
        bottom: 0px;
        width: 750px;
    }

    .inputCode {
        background-color: white;
        height: 120px;
        line-height: 120px;
        padding-left: 30px;
        padding-right: 30px;
        font-size: 32px;
    }
</style>

希望有大佬指导一下。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...