帖子
帖子
用户
博客
课程
显示全部楼层
85
帖子
6
勋章
5766
Y币

[多端开发] 关于 input 的问题,点击输入居然闪退?

[复制链接]
发表于 2021-7-27 20:44:33
<input class="ipnt" type="text" name="input" v-model="classnum" placeholder="输入数字" />


wifi同步和云编译后真机测试都闪退,这是啥情况?

380
帖子
4
勋章
6
Y币
我这里不闪退

你把这段代码放到其他app ,或者这个app 的其他页面还闪退吗
85
帖子
6
勋章
5766
Y币
技术支持-F 发表于 2021-7-28 13:50
我这里不闪退

你把这段代码放到其他app ,或者这个app 的其他页面还闪退吗 ...

放到其他页面没事,就这个页面闪退,但是这个页面没写啥啊,也看不出来哪里冲突了,我贴下代码:
<template>
        <view class="joinclass">
                <safe-area class="safe-area">
                        <view class="header">
                                <text class="title">加入班级</text>
                                <view class="backBox" @click="back()">
                                        <img class="back" src="../../../images/common/backuser.png" alt="">
                                </view>
                        </view>
                </safe-area>
                <view class="classnum">
                        <view class="publicbox">
                                <text class="publitext">班级号</text>
                                <input class="ipnt" type="text" name="input" v-model="classnum" placeholder="输入数字" />
                        </view>
                </view>
                <view class="btnbox">
                        <text class="btn">加入班级</text>
                </view>
        </view>
</template>
<script>
export default {
        name: 'joinclass',
        apiready() {

        },
        data() {
                return {
                        classnum: '',//班级号
                }
        },
        methods: {
                back() {
                        api.closeWin()
                }
        }
}
</script>
<style scoped>
.joinclass {
        width: 100%;
        height: 100%;
        background-color: #fafafa;
}
.safe-area {
        width: 100%;
        background-image: linear-gradient(to right, #ffb940, #fb834e);
}
.header {
        width: 100%;
        height: 50px;
        background-image: linear-gradient(to right, #ffb940, #fb834e);
}
.title {
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        line-height: 50px;
        color: #fff9f5;
}
.backBox {
        width: 50px;
        height: 50px;
        position: absolute;
        top: 0;
        left: 0;
}
.back {
        width: 11.5px;
        height: 20px;
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -10px 0 0 -5.75px;
}
.classnum {
        width: 90%;
        margin: 30px auto;
}
.publicbox {
        width: 100%;
        height: 60px;
        border-bottom: 1px solid #b1a9a8;
}
.publitext {
        font-size: 14px;
        font-weight: bold;
        line-height: 20px;
        color: #210600;
}
.ipnt {
        width: 98%;
        height: 30px;
        margin-top: 10px;
        font-size: 14px;
        border: none;
        color: #000;
        background-color: #fafafa;
}
input::placeholder {
        font-size: 12px;
        border: none;
        color: #b1a9a8;
}
.btnbox {
        width: 80%;
        height: 44px;
        margin: 0 auto;
        position: absolute;
        bottom: 20px;
        left: 10%;
}
.btn {
        width: 100%;
        height: 44px;
        background-image: linear-gradient(to right, #ffb940, #fb834e);
        box-shadow: 0px 3px 1px rgba(141, 24, 0, 0.24);
        border-radius: 18px;
        text-align: center;
        line-height: 44px;
        font-size: 18px;
        color: #fff;
}
</style>
380
帖子
4
勋章
6
Y币
你逐步注释代码片段排查一下
1
帖子
1
勋章
1149
Y币
Not Foundcl 发表于 2021-7-28 14:38
放到其他页面没事,就这个页面闪退,但是这个页面没写啥啊,也看不出来哪里冲突了,我贴下代码:

       

《教育培训》云应用前后端全部免费开源啦!【新源码】
https://community.apicloud.com/bbs/thread-170438-1-1.html

前后端源码开源,可以让你快速了解AVM开发。
4
帖子
1
勋章
426
Y币
sxgsw3 发表于 2021-8-4 17:29
《教育培训》云应用前后端全部免费开源啦!【新源码】
https://community.apicloud.com/bbs/thread-17043 ...

多谢分享,学习
您需要登录后才可以回帖 登录

本版积分规则