|
[开发工具]
avm 的scroll-view 在小程序端异常
[复制链接]
scroll-view 的 scroll-y 属性设置为true 的时候 在小程序端 假如里面元素过多,滚动的不是scroll-view 而是整个页面
然后 当 scroll-x 的属性为 true 的时候,在小程序端,无法横向滚动
示例代码为 scroll-y ='true' 的时候, scroll-x ='true'的demo代码就暂时没有,大佬们自己测试一下
- <template>
- <view class="page">
- <safe-area></safe-area>
- <view class="test1">
- <text>123123123</text>
- <text>123123123</text>
- <text>123123123</text>
- <text>123123123</text>
- <text>123123123</text>
- </view>
- <view class="test">
- <scroll-view class="" scroll-y="true">
- <view v-for="(item,index) in list">
- <text>{item}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'test',
- install() {
- },
- apiready() {//like created
- },
- data() {
- return {
- list: [1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 55, 66, 77, 88, 1111, 2222,1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 55, 66]
- }
- },
- methods: {
- test(index) {
- this.data.active = index;
- }
- }
- }
- </script>
- <style>
- .test3 {
- width: 100%;
- height: 100%;
- }
- .test {
- flex: 1;
- }
- .test1 {
- width: 100%;
- height: 300px;
- background: #000;
- }
- .page {
- width: 100%;
- height: 100%;
- background: #fff;
- }
- </style>
复制代码
|
|