提交 c7c79a0a 编写于 作者: H hdx

fix(form示例):Web平台页面无法滚动导致内容显示不全的问题

上级 b4dff40c
<template> <template>
<scroll-view class="page"> <!-- #ifdef APP -->
<scroll-view class="scroll-view" :scroll-y="true">
<!-- #endif -->
<view class="page">
<form @submit="onFormSubmit" @reset="onFormReset"> <form @submit="onFormSubmit" @reset="onFormReset">
<view class="uni-form-item"> <view class="uni-form-item">
<view class="title">姓名</view> <view class="title">姓名</view>
...@@ -43,8 +46,11 @@ ...@@ -43,8 +46,11 @@
</view> </view>
</form> </form>
<view class="result">提交的表单数据</view> <view class="result">提交的表单数据</view>
<textarea class="textarea" :value="formDataText"></textarea> <textarea class="textarea" :value="formDataText" :maxlength="-1" :auto-height="true"></textarea>
</view>
<!-- #ifdef APP -->
</scroll-view> </scroll-view>
<!-- #endif -->
</template> </template>
<script> <script>
...@@ -76,8 +82,11 @@ ...@@ -76,8 +82,11 @@
</script> </script>
<style> <style>
.page { .scroll-view {
flex: 1; flex: 1;
}
.page {
padding: 15px; padding: 15px;
} }
...@@ -116,6 +125,7 @@ ...@@ -116,6 +125,7 @@
.textarea { .textarea {
margin-top: 5px; margin-top: 5px;
padding: 5px;
background-color: #fff; background-color: #fff;
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册