提交 f30cb62d 编写于 作者: xuty73419315's avatar xuty73419315

scrollview设置高度

上级 4f5fcb9b
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<!-- 实际开发中,长列表应该使用list-view --> <!-- 实际开发中,长列表应该使用list-view -->
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<text class="text" v-for="(num,index) in data" :key="index">list - {{num}}</text> <text class="text" v-for="(num,index) in data" :key="index">list - {{num}}</text>
......
<template> <template>
<scroll-view> <scroll-view style="flex:1">
<view> <view>
<text>不支持背景图片,仅支持linear-gradient方法</text> <text>不支持背景图片,仅支持linear-gradient方法</text>
<view v-for="(direction) in directionData"> <view v-for="(direction) in directionData">
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<!-- <view class="uni-title"> <!-- <view class="uni-title">
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
......
<template> <template>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<scroll-view> <scroll-view style="flex: 1;">
<!-- #endif --> <!-- #endif -->
<view> <view>
<page-head title="rich-text-complex"></page-head> <page-head title="rich-text-complex"></page-head>
......
<template> <template>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<scroll-view> <scroll-view style="flex: 1;">
<!-- #endif --> <!-- #endif -->
<page-head title="rich-text-tags"></page-head> <page-head title="rich-text-tags"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<style> <style>
.page { .page {
flex: 1;
padding: 15px; padding: 15px;
} }
......
<template> <template>
<scroll-view> <scroll-view style="flex: 1;">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
......
<template> <template>
<view> <view style="flex: 1;">
<scroll-view class="scroll-view" <scroll-view class="scroll-view"
:refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none" :refresher-enabled="true" :refresher-triggered="refresherTriggered" refresher-default-style="none"
@refresherpulling="onRefresherpulling" @refresherpulling="onRefresherpulling"
@refresherrefresh="onRefresherrefresh" @refresherrefresh="onRefresherrefresh"
...@@ -71,18 +71,18 @@ ...@@ -71,18 +71,18 @@
padding: 5px 15px; padding: 5px 15px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.content-item { .content-item {
padding: 15px; padding: 15px;
margin: 5px 0; margin: 5px 0;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
} }
.text { .text {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
line-height: 20px; line-height: 20px;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册