提交 348a9617 编写于 作者: 雪洛's avatar 雪洛

feat: 废弃scroll-y、scroll-x

上级 344418eb
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="page"> <view class="page">
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<canvas class="canvas-element" canvas-id="canvas" id="canvas"></canvas> <canvas class="canvas-element" canvas-id="canvas" id="canvas"></canvas>
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view">
<view class="grid-view"> <view class="grid-view">
<view class="grid-item" v-for="(name, index) in names" :key="index"> <view class="grid-item" v-for="(name, index) in names" :key="index">
<button class="canvas-drawing-button" @click="handleCanvasButton(name)">{{name}}</button> <button class="canvas-drawing-button" @click="handleCanvasButton(name)">{{name}}</button>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<button type="primary" @click="sendRequest">发起请求</button> <button type="primary" @click="sendRequest">发起请求</button>
</view> </view>
</view> </view>
<scroll-view style="flex: 1;" show-scrollbar="true" :scroll-y="true"> <scroll-view style="flex: 1;" show-scrollbar="true">
<view style="padding: 20rpx;"> <view style="padding: 20rpx;">
<text>设置请求方式</text> <text>设置请求方式</text>
<view class="uni-common-pb"></view> <view class="uni-common-pb"></view>
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<text>position: relative</text> <text>position: relative</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
...@@ -43,7 +42,6 @@ ...@@ -43,7 +42,6 @@
<text>position: absolute</text> <text>position: absolute</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
...@@ -79,7 +77,6 @@ ...@@ -79,7 +77,6 @@
<text>position: fixed</text> <text>position: fixed</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
......
<template> <template>
<scroll-view class="page" scroll-y="true"> <scroll-view class="page">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
......
<template> <template>
<scroll-view class="page" scroll-y="true"> <scroll-view class="page">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
<text class="reserve-text">scaleX(0.6)</text> <text class="reserve-text">scaleX(0.6)</text>
......
<template> <template>
<scroll-view class="page" scroll-y="true"> <scroll-view class="page">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
<text class="reserve-text">translateX(80%)</text> <text class="reserve-text">translateX(80%)</text>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
{{ text }} {{ text }}
</button> </button>
</view> </view>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="content"> <view class="content">
<boolean-data :defaultValue="false" title="按钮是否镂空,背景色透明" @change="change_plain_boolean"></boolean-data> <boolean-data :defaultValue="false" title="按钮是否镂空,背景色透明" @change="change_plain_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="是否禁用" @change="change_disabled_boolean"></boolean-data> <boolean-data :defaultValue="false" title="是否禁用" @change="change_disabled_boolean"></boolean-data>
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
> >
</view> </view>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="content"> <view class="content">
<page-head title="组件属性"></page-head> <page-head title="组件属性"></page-head>
<boolean-data <boolean-data
......
<template> <template>
<!-- #ifdef APP --> <!-- #ifdef APP -->
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view">
<!-- #endif --> <!-- #endif -->
<view class="page"> <view class="page">
<form @submit="onFormSubmit" @reset="onFormReset"> <form @submit="onFormSubmit" @reset="onFormReset">
......
<template> <template>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<page-head title="拖拽图标测试相关事件"></page-head> <page-head title="拖拽图标测试相关事件"></page-head>
<view class="container"> <view class="container">
<view class="view-box"> <view class="view-box">
......
<template> <template>
<scroll-view scroll-x="true" style="flex-direction: row;"> <scroll-view direction="horizontal" style="flex-direction: row;">
<button class="button_item" @click="delayShow">测试延时显示</button> <button class="button_item" @click="delayShow">测试延时显示</button>
</scroll-view> </scroll-view>
<list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower"> <list-view v-show="list_show" id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view v-else="mixinDatacomResData.length>0"> <view v-else="mixinDatacomResData.length>0">
<!-- 需要自行处理数据及相关UI展现 --> <!-- 需要自行处理数据及相关UI展现 -->
<!-- {{mixinDatacomResData}} --> <!-- {{mixinDatacomResData}} -->
<list-view class="list-view" :scroll-y="true"> <list-view class="list-view">
<list-item class="list-item" v-for="(item, _) in mixinDatacomResData"> <list-item class="list-item" v-for="(item, _) in mixinDatacomResData">
<text>{{item}}</text> <text>{{item}}</text>
</list-item> </list-item>
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
</progress> </progress>
</view> </view>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="content"> <view class="content">
<page-head title="组件属性"></page-head> <page-head title="组件属性"></page-head>
<boolean-data <boolean-data
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
</radio> </radio>
</view> </view>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="content"> <view class="content">
<page-head title="组件属性"></page-head> <page-head title="组件属性"></page-head>
<boolean-data <boolean-data
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
@changing="slider_changing" style="width: 90%"><text>uni-app-x</text></slider> @changing="slider_changing" style="width: 90%"><text>uni-app-x</text></slider>
</view> </view>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="content"> <view class="content">
<page-head title="组件属性"></page-head> <page-head title="组件属性"></page-head>
<boolean-data :defaultValue="false" title="是否显示当前 value" @change="change_show_value_boolean"></boolean-data> <boolean-data :defaultValue="false" title="是否显示当前 value" @change="change_show_value_boolean"></boolean-data>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<text class="text">向上滑动页面,体验sticky-header吸顶效果。</text> <text class="text">向上滑动页面,体验sticky-header吸顶效果。</text>
</list-item> </list-item>
<sticky-header> <sticky-header>
<scroll-view style="background-color: #f5f5f5; flex-direction: row;" :scroll-x="true" :scroll-y="false" :show-scrollbar="false"> <scroll-view style="background-color: #f5f5f5; flex-direction: row;" direction="horizontal" :show-scrollbar="false">
<view class="flex-row" style="align-self: flex-start; flex-direction: row;"> <view class="flex-row" style="align-self: flex-start; flex-direction: row;">
<text ref="swipertab" class="sift-item" <text ref="swipertab" class="sift-item"
v-for="(name,index) in sift_item" @click="clickTH(index)"> v-for="(name,index) in sift_item" @click="clickTH(index)">
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
</script> </script>
<template> <template>
<scroll-view style="flex: 1" :scroll-y="true"> <scroll-view style="flex: 1">
<view class="main"> <view class="main">
<textarea <textarea
:value="default_value" :value="default_value"
......
<template> <template>
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view">
<unicloud-db ref="udb" v-slot:default="{data, loading, error}" :collection="collection" :where="where" <unicloud-db ref="udb" v-slot:default="{data, loading, error}" :collection="collection" :where="where"
page-data="replace"> page-data="replace">
<view v-if="error!=null" class="error">{{error.errMsg}}</view> <view v-if="error!=null" class="error">{{error.errMsg}}</view>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@ended="onEnded" @timeupdate="onTimeUpdate" @waiting="onWaiting" @error="onError" @progress="onProgress" @ended="onEnded" @timeupdate="onTimeUpdate" @waiting="onWaiting" @error="onError" @progress="onProgress"
@fullscreenclick="onFullScreenClick" @controlstoggle="onControlsToggle" @fullscreenchange="onFullScreenChange"> @fullscreenclick="onFullScreenClick" @controlstoggle="onControlsToggle" @fullscreenchange="onFullScreenChange">
</video> </video>
<scroll-view class="uni-padding-wrap uni-common-mt uni-flex-item" :scroll-y="true"> <scroll-view class="uni-padding-wrap uni-common-mt uni-flex-item">
<view class="uni-btn-v"> <view class="uni-btn-v">
<navigator url="/pages/component/video/video-format"> <navigator url="/pages/component/video/video-format">
<button type="primary">视频格式示例</button> <button type="primary">视频格式示例</button>
......
<template> <template>
<scroll-view ref="pageScrollView" class="page" :scroll-y="true" :rebound="false" <scroll-view ref="pageScrollView" class="page" :rebound="false"
@startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll"> @startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll">
<view ref="header" class="search-bar"> <view ref="header" class="search-bar">
<input placeholder="搜索..." /> <input placeholder="搜索..." />
</view> </view>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false">
<view class="flex-row" style="align-self: flex-start;"> <view class="flex-row" style="align-self: flex-start;">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
......
<template> <template>
<scroll-view ref="pageScrollView" class="page" :scroll-y="true" :rebound="false" <scroll-view ref="pageScrollView" class="page" :rebound="false"
@startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll" @startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll"
:nested-scroll-child="nestedScrollChildId" :nested-scroll-child="nestedScrollChildId"
> >
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false">
<view class="flex-row" style="align-self: flex-start;"> <view class="flex-row" style="align-self: flex-start;">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view @click="back" class="nav-back"> <view @click="back" class="nav-back">
<image class="back-img" src="/static/template/pull-zoom-image/back.png" mode="widthFix"></image> <image class="back-img" src="/static/template/pull-zoom-image/back.png" mode="widthFix"></image>
</view> </view>
<scroll-view :scroll-y="true" style="flex:1;" :refresher-enabled="true" <scroll-view style="flex:1;" :refresher-enabled="true"
refresher-default-style="none" @refresherpulling="onRefresherpulling" refresher-default-style="none" @refresherpulling="onRefresherpulling"
:refresher-threshold="300" :refresher-max-drag-distance="299" :refresher-threshold="300" :refresher-max-drag-distance="299"
@scroll="onScroll" :rebound="false" @scroll="onScroll" :rebound="false"
......
<template> <template>
<scroll-view :scroll-y="true" @scroll="onScroll" class="scroll-view" rebound="false"> <scroll-view @scroll="onScroll" class="scroll-view" rebound="false">
<view class="height-seat" style="height: 125px;"> <view class="height-seat" style="height: 125px;">
<!-- 垫高专用 --> <!-- 垫高专用 -->
</view> </view>
......
<template> <template>
<scroll-view :scroll-y="true" @scroll="onScroll" class="page" rebound="false"> <scroll-view @scroll="onScroll" class="page" rebound="false">
<view class="content-item"> <view class="content-item">
<text class="text">向上滑动页面,体验元素吸顶效果。</text> <text class="text">向上滑动页面,体验元素吸顶效果。</text>
</view> </view>
......
<template> <template>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false">
<view class="flex-row"> <view class="flex-row">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
......
<template> <template>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false">
<view class="flex-row" style="align-self: flex-start;"> <view class="flex-row" style="align-self: flex-start;">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册