refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范

这个提交包含在:
wikiboss
2026-09-20 17:05:22 +08:00
父节点 de3cf8b870
当前提交 9fa1d1fbd0
共有 1679 个文件被更改,包括 204798 次插入 和 16817 次删除

查看文件

@@ -0,0 +1,9 @@
<template>
<list-view>
<list-item>start</list-item>
<slot name="default"></slot>
<list-item>middle</list-item>
<slot name="second"></slot>
<list-item>end</list-item>
</list-view>
</template>

查看文件

@@ -0,0 +1,55 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
describe('list-view-children-if-show', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/list-view/list-view-children-if-show')
await page.waitFor('list-view')
await page.waitFor(300)
})
it('basic', async () => {
const listViews = await page.$$('list-view')
expect(listViews.length).toBe(1)
let toggleChildrenShowBtn = await page.$$('#toggle-children-show-btn')
expect(toggleChildrenShowBtn.length).toBe(3)
let listItemChildren = await page.$$('#list-item-child')
expect(listItemChildren.length).toBe(3)
await toggleChildrenShowBtn[0].tap()
listItemChildren = await page.$$('#list-item-child')
expect(listItemChildren.length).toBe(0)
await page.waitFor(300)
await toggleChildrenShowBtn[0].tap()
await page.waitFor(300)
listItemChildren = await page.$$('#list-item-child')
expect(listItemChildren.length).toBe(3)
const clearBtn = await page.$('#clear-btn')
await clearBtn.tap()
toggleChildrenShowBtn = await page.$$('#toggle-children-show-btn')
expect(toggleChildrenShowBtn.length).toBe(0)
listItemChildren = await page.$$('#list-item-child')
expect(listItemChildren.length).toBe(0)
const initBtn = await page.$('#init-btn')
await initBtn.tap()
await page.waitFor(300)
toggleChildrenShowBtn = await page.$$('#toggle-children-show-btn')
expect(toggleChildrenShowBtn.length).toBe(3)
listItemChildren = await page.$$('#list-item-child')
expect(listItemChildren.length).toBe(3)
})
})

查看文件

@@ -0,0 +1,84 @@
<template>
<view class="p-10">
<button id="init-btn" class="uni-btn" @click="init">init</button>
<button id="clear-btn" class="uni-btn" @click="clear">clear</button>
<view
class="uni-common-mt list-view-container"
:class="{ ' p-10': list.length > 0 }"
>
<list-view>
<template v-for="(item, index) in list" :key="item.id">
<list-item
id="toggle-children-show-btn"
:class="{ 'uni-common-mt': index > 0 }"
@click="toggleChildrenShow(item.id)"
>
<text>toggle children isShow</text>
</list-item>
<template v-if="expandIds.includes(item.id)">
<template v-for="child in item.children" :key="child.id">
<list-item id="list-item-child" class="mt-5">
<text>{{ child.id }}</text>
</list-item>
</template>
</template>
</template>
</list-view>
</view>
</view>
</template>
<script setup lang="uts">
type Child = {
id: string
}
type List = {
id: string
children: Child[]
}
const list = ref<List[]>([])
const expandIds = ref<string[]>([])
function init(){
list.value = [
{id:'1', children: [{ id: '1-1'},{ id: '1-2'},{ id: '1-3'}]},
{id:'2', children: [{ id: '2-1'},{ id: '2-2'},{ id: '2-3'}]},
{id:'3', children: [{ id: '3-1'},{ id: '3-2'},{ id: '3-3'}]},
] as List[]
expandIds.value = [list.value[0].id]
}
function clear(){
list.value = [] as List[]
expandIds.value = [] as string[]
}
function toggleChildrenShow(id: string){
const index = expandIds.value.findIndex((item) => item == id)
if(index == -1) {
expandIds.value.push(id)
} else {
expandIds.value.splice(index, 1)
}
}
onLoad(() => {
init()
})
</script>
<style>
.p-10 {
padding: 10px;
}
.list-view-container {
background-color: #fff;
}
.mt-5 {
margin-top: 5px;
}
</style>

查看文件

@@ -0,0 +1,68 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isHarmony = platformInfo.startsWith('harmony')
const isDom2 = process.env.UNI_APP_X_DOM2 === "true"
describe('list-view-children-in-slot', () => {
if (isMP) {
it('skip', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/list-view/list-view-children-in-slot')
await page.waitFor('list-view')
await page.waitFor(1000)
})
it('screenshot', async () => {
const image = await program.screenshot({fullPage: true})
expect(image).toSaveImageSnapshot();
});
// 蒸汽模式下非可回收模式下list-view下的list-item不会作为list-item渲染,而是作为view渲染,此页面list-item计数测试暂不支持在蒸汽模式下进行
if (isDom2) {
return
}
it('basic', async () => {
let listItems = await page.$$('list-item')
expect(listItems.length).toBe(9)
let texts = await page.$$('.text-in-list-item')
for (let i = 0; i < texts.length; i++) {
expect(await texts[i].text()).toBe(`${i > (texts.length / 2 - 1)? i - texts.length / 2 : i}`)
}
const addBtn = await page.$('#add-btn')
await addBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item')
expect(listItems.length).toBe(11)
texts = await page.$$('.text-in-list-item')
for (let i = 0; i < texts.length; i++) {
expect(await texts[i].text()).toBe(`${i > (texts.length / 2 - 1)? i - texts.length / 2 : i}`)
}
const emptyBtn = await page.$('#empty-btn')
await emptyBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item')
expect(listItems.length).toBe(3)
await addBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item')
expect(listItems.length).toBe(5)
texts = await page.$$('.text-in-list-item')
for (let i = 0; i < texts.length; i++) {
expect(await texts[i].text()).toBe(`0`)
}
})
})

查看文件

@@ -0,0 +1,50 @@
<template>
<!-- #ifdef APP -->
<scroll-view style="flex:1;padding-bottom: 20px;">
<!-- #endif -->
<view>
<page-head title="getApp"></page-head>
<view class="uni-padding-wrap">
<list-view-wrapper>
<template #default>
<list-item v-for="item in list" :key="item">
<text class="text-in-list-item">{{item}}</text>
</list-item>
</template>
<template #second>
<list-item v-for="item in list" :key="item">
<text class="text-in-list-item">{{item}}</text>
</list-item>
</template>
</list-view-wrapper>
<button id="add-btn" class="uni-common-mt" @click="addItem">add item</button>
<button id="empty-btn" class="uni-common-mt" @click="emptyList">empty list</button>
</view>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script setup lang="uts">
import ListViewWrapper from './ListViewWrapper.uvue'
// Data
const list = ref([0, 1, 2])
// Methods
function addItem() {
// #ifdef APP-ANDROID
let listNum = list.value.length as Int; // Android 端要求Int类型
// #endif
// #ifndef APP-ANDROID
let listNum = list.value.length;
// #endif
list.value.push(listNum)
}
function emptyList() {
list.value = []
}
</script>

查看文件

@@ -0,0 +1,79 @@
<template>
<view style="flex: 1;">
<list-view style="flex: 1;" @scrolltolower="loadmore" :refresher-enabled="true" @refresherrefresh="refresh">
<list-item v-for="(item, index) in items" :key="item.id" style="padding: 10px; border-bottom: 1px solid #eee;">
<view>
<text>{{ item.name }}</text>
</view>
<view style="margin-top: 10px;">
<checkbox-group @change="checkboxChange(index)">
<checkbox :checked="item.checkboxChecked" />
</checkbox-group>
</view>
<view style="margin-top: 10px;">
<switch :checked="item.switchChecked" @change="switchChange(index)" />
</view>
<view style="margin-top: 10px;">
<input v-model="item.inputValue" placeholder="Input something..." style="border: 1px solid #ccc;" />
</view>
</list-item>
</list-view>
</view>
</template>
<script setup>
type Item = {
id : number,
name : string,
checkboxChecked : boolean,
switchChecked : boolean,
inputValue : string
}
const items = ref<Item[]>([])
const page = ref(1)
const pageSize = 20
const total = 100
async function loadData (isRefresh: boolean = false) {
if (isRefresh) {
page.value = 1
items.value = []
}
const newItems : Item[] = []
for (let i = 0; i < pageSize; i++) {
const id = (page.value - 1) * pageSize + i + 1
newItems.push({
id,
name: `Item ${id}`,
checkboxChecked: false,
switchChecked: false,
inputValue: `Item ${id}`
})
}
items.value = [...items.value, ...newItems]
page.value++
}
async function loadmore() {
if (items.value.length < total) {
await loadData(false)
}
}
async function refresh() {
await loadData(true)
}
function checkboxChange(index : number) {
items.value[index].checkboxChecked = !items.value[index].checkboxChecked
}
function switchChange(index : number) {
items.value[index].switchChecked = !items.value[index].switchChecked
}
onMounted(() => {
loadData(false)
})
</script>
<style>
</style>

查看文件

@@ -0,0 +1,23 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isAppWebView = process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true'
const isIos = platformInfo.startsWith('ios')
describe('list-view-multiplex-input', () => {
if (isMP || isAppWebView) {
it('skip', () => {
expect(1).toBe(1)
})
return
}
it('screenshot', async () => {
const page = await program.reLaunch('/pages/component/list-view/list-view-multiplex-input')
await page.waitFor('list-view')
await page.waitFor(300)
await page.setData({ data: { isTesting: true } })
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot()
})
})

查看文件

@@ -0,0 +1,69 @@
<template>
<!-- #ifdef WEB -->
<view>
<!-- #endif -->
<list-view id="listview" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="index in data.item_count" :key="index" class="item" @click="itemClick(index)">
<text>item---<text @click.stop="childTextClick(index)">----{{index}}</text></text>
<input style="border-width: 1px; border-style: solid;" :placeholder="index + ''"
:value="index ==1 ? `第一个` :index " />
</list-item>
</list-view>
<!-- #ifdef WEB -->
</view>
<!-- #endif -->
</template>
<script setup lang="uts">
type DataType = {
item_count: number,
isTesting: boolean,
}
// 使用reactive包装数据,便于自动化测试获取
const data = reactive({
item_count: 20,
isTesting: false,
} as DataType)
const listViewElement = ref(null as UniListViewElement | null)
function onScrollTolower(event : ScrollToLowerEvent) {
setTimeout(() => {
if (data.isTesting && data.item_count > 20) {
return
}
data.item_count += 20
}, 300)
}
function itemClick(index : number) {
console.log("itemTextClick---" + index)
}
function childTextClick(index : number) {
console.log("childTextClick---" + index)
}
onReady(() => {
listViewElement.value = uni.getElementById<UniListViewElement>('listview')
})
defineExpose({
data
})
</script>
<style>
.item {
padding: 15px;
margin: 0 0 5px 0;
background-color: #fff;
border-radius: 5px;
}
.button_item {
width: 200px;
}
</style>

查看文件

@@ -0,0 +1,24 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isAppWebView = process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true'
const isWeb = platformInfo.startsWith('web')
const isIos = platformInfo.startsWith('ios')
describe('list-view-multiplex-video', () => {
if (isMP || isAppWebView || isWeb || isIos) {
it('skip', () => {
expect(1).toBe(1)
})
return
}
it('screenshot', async () => {
const page = await program.reLaunch('/pages/component/list-view/list-view-multiplex-video')
await page.waitFor('list-view')
await page.waitFor(4000)
await page.setData({ data: { isTesting: true } })
const image = await program.screenshot({ fullPage: true });
expect(image).toSaveImageSnapshot()
})
})

查看文件

@@ -0,0 +1,90 @@
<template>
<!-- #ifdef WEB -->
<view>
<!-- #endif -->
<list-view class="list" @scrolltolower="onScrollTolower">
<list-item class="list-item" v-for="(_,index) in data.item_count" :key="index">
<text>第{{index + 1}}个视频</text>
<!-- #ifdef APP-HARMONY && VUE3-VAPOR -->
<video class="video" :src="data.src" :controls="true" @play="onPlay" @pause="onPause"
@recycle="e => _onRecycle(e, index)" @reuse="e => _onReuse(e, index)"/>
<!-- #endif -->
<!-- #ifndef APP-HARMONY && VUE3-VAPOR -->
<video class="video" :src="data.src" :controls="true" @play="onPlay" @pause="onPause"/>
<!-- #endif -->
</list-item>
</list-view>
<!-- #ifdef WEB -->
</view>
<!-- #endif -->
</template>
<script setup lang="uts">
type DataType = {
item_count: number,
src: string,
isTesting: boolean,
}
// 使用reactive包装数据,便于自动化测试获取
const data = reactive({
item_count: 10,
src: 'https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4',
isTesting: false,
} as DataType)
function onPlay(e: UniEvent) {
console.log(`onPlay`, JSON.stringify(e.timeStamp));
}
function onPause(e: UniEvent) {
console.log(`onPause`, JSON.stringify(e.timeStamp));
}
// #ifdef APP-HARMONY && VUE3-VAPOR
function _onRecycle(e: UniVideoRecycleEvent, index: number) {
console.log(`onRecycle ${index}`, JSON.stringify(e.detail));
}
function _onReuse(e: UniVideoReuseEvent, index: number) {
console.log(`onReuse ${index}`, JSON.stringify(e.detail));
const element = e.target as UniVideoElement | null;
if (element && (element instanceof UniVideoElement)) {
nextTick(() => {
element.seek(e.detail.currentTime)
})
}
}
// #endif
function onScrollTolower(event : ScrollToLowerEvent) {
setTimeout(() => {
if (data.isTesting && data.item_count >= 10) {
return
}
data.item_count += 10
}, 300)
}
defineExpose({
data
})
</script>
<style>
.list {
flex: 1;
}
.list-item {
background-color: white;
margin-bottom: 30px;
}
.video {
width: 100%;
height: 200px;
}
</style>

查看文件

@@ -0,0 +1,56 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isIos = platformInfo.startsWith('ios')
describe('component-native-list-view', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
//打开list-view-multiplex测试页
page = await program.reLaunch('/pages/component/list-view/list-view-multiplex')
await page.waitFor('list-view')
})
//滚动list-view到底部 加载更多 如果异常则直接闪退
it('check_list_item_multiplex', async () => {
await page.callMethod('listViewScrollByY', 5000)
await page.waitFor(400)
await page.callMethod('listViewScrollByY', 100)
})
//检测延迟显示listv-view后list-item是否正常显示
it('check_list_item_v_show', async () => {
await page.callMethod('delayShow')
await page.waitFor(async () => {
return await page.data('data.list_show') === true;
});
await page.waitFor(1000)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
})
//检测修改item子元素后,item是否正常调整高度
it('check_switch_item_content', async () => {
await page.callMethod('switchItemContent')
await page.waitFor(async () => {
return await page.data('data.displayArrow') === true;
});
await page.waitFor(600)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
})
//检测item复用后尺寸是否正常
it('check_reused_item_size', async () => {
await page.callMethod('jest_testReusedItemSize')
await page.waitFor(1000)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
})
})

查看文件

@@ -0,0 +1,143 @@
<template>
<view style="flex: 1;">
<scroll-view direction="horizontal" style="flex-direction: row;">
<button class="button_item" @click="delayShow">测试延时显示</button>
<button class="button_item" @click="switchItemContent">修改item子元素</button>
</scroll-view>
<list-view v-show="data.list_show" id="listview" :scroll-top="data.scrollTop" style="flex: 1;" show-scrollbar=false @scrolltolower="onScrollTolower">
<list-item v-for="(item,index) in list" :key="item.id" :id="'item_'+item.id" class="item" @click="itemClick(item.id)">
<view style="flex-direction: row;">
<text>item-------<text>{{item.id}}</text></text>
<scroll-view direction="horizontal" show-scrollbar="false" class="scroll_item">
<text>scroll-view{{item.id}}:</text>
<text class="tip_text" v-for="tab in 5">元素{{tab}}</text>
</scroll-view>
</view>
<text v-show="data.displayArrow">item-------<text>{{item.id}}</text></text>
<checkbox-group @change="checkedChange(index)">
<checkbox :checked="item.checked" />
</checkbox-group>
</list-item>
</list-view>
</view>
</template>
<script setup lang="uts">
type Item = {
id: number
checked: boolean
}
const list = ref<Item[]>([])
const listViewElement = ref(null as UniListViewElement | null)
type DataType = {
list_show: boolean,
displayArrow: boolean,
scrollTop: number
}
const data = reactive({
list_show: true,
displayArrow: false,
scrollTop: 0
} as DataType)
function generateItems(count: number) {
const startIndex = list.value.length
for (let i = 0; i < count; i++) {
list.value.push({
id: startIndex + i + 1,
checked: false,
} as Item)
}
}
function onScrollTolower(event : ScrollToLowerEvent) {
setTimeout(() => {
generateItems(20)
}, 300)
}
onMounted(() => {
generateItems(20)
})
//用于自动化测试
function listViewScrollByY(y : number) {
listViewElement.value?.scrollBy(0, y)
}
function itemClick(index : number) {
console.log("itemTextClick---" + index)
}
function checkedChange(index : number) {
list.value[index].checked = !list.value[index].checked
}
function delayShow() {
data.list_show = !data.list_show
//延时显示list-view 测试list-item延时显示bug
setTimeout(() => {
data.list_show = !data.list_show
}, 400)
}
function modifyItemPadding(index: number) {
var element = uni.getElementById("item_"+index)
element?.style.setProperty("padding", "0px")
}
function switchItemContent() {
data.displayArrow = !data.displayArrow
modifyItemPadding(1)
}
onReady(() => {
listViewElement.value = uni.getElementById<UniListViewElement>('listview')
})
function jest_testReusedItemSize() {
generateItems(100)
nextTick(() => {
data.scrollTop = 10000
})
}
defineExpose({
data,
listViewScrollByY,
delayShow,
switchItemContent,
jest_testReusedItemSize
})
</script>
<style>
.item {
padding: 15px;
margin: 0 0 5px 0;
border: 1px solid #000000;
background-color: #fdfdfd;
border-radius: 5px;
}
.button_item {
width: 200px;
}
.scroll_item {
flex: 1;
flex-direction: row;
overflow: hidden;
margin-left: 10px;
}
.tip_text {
border-style: solid;
border-radius: 3px;
border-width: 1px;
margin: 0px 10px;
}
</style>

查看文件

@@ -0,0 +1,54 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isWeb = platformInfo.startsWith('web')
const isMP = platformInfo.startsWith('mp')
describe('component-native-list-view-refresh', () => {
if (isWeb || isMP) {
it('not support', async () => {
expect(1).toBe(1)
})
return
}
if (process.env.UNI_TEST_DEVICES_DIRECTION == 'landscape') {
it('跳过横屏模式', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
//打开list-view测试页
page = await program.reLaunch('/pages/component/list-view/list-view-refresh')
await page.waitFor(600)
})
it('check_list_view_refresh', async () => {
await page.waitFor(async () => {
return await page.data('data.refresherTriggered') === false;
});
//等待下拉刷新结束
await page.waitFor(500)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
expect(await page.data('data.onRefresherpullingTest')).toBe('refresherpulling:Success')
expect(await page.data('data.refresherrefreshTest')).toBe('refresherrefresh:Success')
await page.waitFor(1000);
expect(await page.data('data.onRefresherrestoreTest')).toBe('refresherrestore:Success')
})
it('check_refresherabort', async () => {
//部分安卓设备需要延迟一段时间swipe才生效 此处暂时延迟1秒
await page.waitFor(1500);
// 仅App端支持手势下拉刷新
await program.swipe({
startPoint: {x: 100,y: 400},
endPoint: {x: 100,y: 430},
duration: 300
})
await page.waitFor(1500)
expect(await page.data('data.onRefresherabortTest')).toBe('refresherabort:Success')
});
})

查看文件

@@ -0,0 +1,131 @@
<template>
<list-view v-if="list_show" id="listview" style="flex: 1;" show-scrollbar=false :refresher-enabled="true"
:refresher-triggered="data.refresherTriggered" @refresherrefresh="onRefresherrefresh" @refresherabort="onRefresherabort"
@refresherrestore="onRefresherrestore" @refresherpulling="onRefresherpulling">
<list-item class="item">
<text>向下滑动触发下拉刷新</text>
</list-item>
<list-item v-for="index in item_count" :key="index" class="item">
<text>item-------{{index}}</text>
</list-item>
</list-view>
</template>
<script setup lang="uts">
type RefresherEventTest = {
type : string;
target : UniElement | null;
currentTarget : UniElement | null;
dy : number;
}
type DataType = {
refresherTriggered: boolean,
refresherrefreshTest: string,
onRefresherabortTest: string,
onRefresherrestoreTest: string,
onRefresherpullingTest: string,
}
// Data
const item_count = ref(20)
const list_show = ref(false)
const data = reactive({
refresherTriggered: true,
refresherrefreshTest: "",
onRefresherabortTest: "",
onRefresherrestoreTest: "",
onRefresherpullingTest: "",
} as DataType)
// Methods
function checkEventTest(e : RefresherEventTest, eventName : String) {
const isPass = e.type === eventName && e.target instanceof UniElement && e.currentTarget instanceof UniElement && e.dy > 0
const result = isPass ? `${eventName}:Success` : `${eventName}:Fail`
switch (eventName) {
case 'refresherrefresh':
data.refresherrefreshTest = result
break
case 'refresherpulling':
data.onRefresherpullingTest = result
break
case 'refresherrestore':
data.onRefresherrestoreTest = result
break
case 'refresherabort':
data.onRefresherabortTest = result
break
default:
break
}
}
function onRefresherrefresh(e : UniRefresherEvent) {
console.log('refresherrefresh-----下拉刷新被触发', e.detail.dy)
data.refresherTriggered = true
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
dy: e.detail.dy,
} as RefresherEventTest, 'refresherrefresh')
setTimeout(() => {
data.refresherTriggered = false
}, 1000)
}
function onRefresherabort(e : UniRefresherEvent) {
console.log("onRefresherabort------下拉刷新被中止", e.detail)
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
dy: e.detail.dy,
} as RefresherEventTest, 'refresherabort')
}
function onRefresherrestore(e : UniRefresherEvent) {
console.log("onRefresherrestore------下拉刷新被复位", e.detail.dy)
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
dy: e.detail.dy,
} as RefresherEventTest, 'refresherrestore')
}
function onRefresherpulling(e : UniRefresherEvent) {
console.log("onRefresherpulling------拉刷新控件被下拉-dy=" + e.detail.dy)
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
dy: e.detail.dy,
} as RefresherEventTest, 'refresherpulling')
}
// Lifecycle
onLoad(() => {
setTimeout(() => {
list_show.value = true
}, 500)
})
defineExpose({
data
})
</script>
<style>
.item {
padding: 15px;
margin: 0 0 5px 0;
background-color: #fff;
border-radius: 5px;
}
.button_item {
width: 200px;
}
</style>

查看文件

@@ -0,0 +1,48 @@
<template>
<list-view @scrolltolower="onScrollToLower" style="flex: 1;">
<list-item
v-for="item in list"
:key="item.id"
:type="item.type"
>
<view style="padding: 10px; border-bottom: 1px solid #eee;">
<text style="font-weight: bold;">name: {{ item.name }} type: {{ item.type }}</text>
<view v-if="item.type == 0" style="flex-direction: row;">
<text v-for="star in item.stars" :key="star">★</text>
</view>
<text v-else-if="item.type == 1">Stars: {{ item.stars }}</text>
</view>
</list-item>
</list-view>
</template>
<script setup>
type Item = {
id: number
name: string
type: number
stars: number
}
const list = ref<Item[]>([])
function generateList() {
const types = [1, 2, 3]
const startIndex = list.value.length + 1
for (let i = 0; i < 50; i++) {
const id = startIndex + i
list.value.push({
id,
name: `Item ${id}`,
stars: (id - 1) % 5 + 1,
type: id % 2,
})
}
}
generateList()
function onScrollToLower() {
generateList()
}
</script>
<style>
</style>

查看文件

@@ -0,0 +1,203 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const isWeb = platformInfo.startsWith('web')
const isIOS = platformInfo.startsWith('ios')
const isHarmony = platformInfo.startsWith('harmony')
const isDom2 = process.env.UNI_APP_X_DOM2 === "true"
describe('component-native-list-view', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
//打开list-view测试页
page = await program.reLaunch('/pages/component/list-view/list-view')
await page.waitFor(600)
})
//检测竖向scrolltop属性赋值
it('check_scroll_top', async () => {
await page.callMethod('confirm_scroll_top_input', 600)
await page.waitFor(600)
const listElement = await page.$('#listview')
const scrollTop = await listElement.attribute("scrollTop")
console.log("check_scroll_top---"+scrollTop)
expect(scrollTop-600).toBeGreaterThanOrEqual(0)
await page.callMethod('confirm_scroll_top_input', 0)
await page.waitFor(600)
})
//检测横向scrollLeft属性赋值 备注:iOS不支持list-view横向滚动、dom2不支持横向滚动
if (!isDom2) {
it('check_scroll_left', async () => {
if(await page.data('data.scroll_x_boolean') === false) {
await page.callMethod('change_scroll_x_boolean', true)
await page.callMethod('change_scroll_y_boolean', false)
await page.waitFor(600)
}
await page.callMethod('confirm_scroll_left_input', 600)
await page.waitFor(600)
const listElement = await page.$('#listview')
const scrollLeft = await listElement.attribute("scrollLeft")
console.log("check_scroll_left---"+scrollLeft)
expect(scrollLeft-600).toBeGreaterThanOrEqual(0)
await page.callMethod('confirm_scroll_left_input', 0)
await page.waitFor(600)
})
}
it('Event check_scroll', async () => {
await page.callMethod('change_scroll_y_boolean', true)
await page.callMethod('change_scroll_x_boolean', false)
await page.waitFor(600)
// 设置一次scrollTop 0。切换横竖方向后scrollTop属性是否保持并无规范。
await page.callMethod('confirm_scroll_top_input', 600)
await page.waitFor(500)
await page.callMethod('confirm_scroll_top_input', 300)
await page.waitFor(500)
const scrollDetail = await page.data('data.scrollDetailTest')
// console.log('scrollDetailTest:', scrollDetail)
expect(scrollDetail.scrollLeft).toBe(0)
// scrollTop和deltaY 在安卓端差异 299.8095
expect(scrollDetail.scrollTop).toBeGreaterThan(299.5)
//expect([300, 299.8095]).toContain(scrollDetail.scrollTop);
expect(scrollDetail.scrollHeight).toBeGreaterThan(0)
expect(scrollDetail.scrollWidth).toBeGreaterThan(0)
expect(scrollDetail.deltaX).toBe(0)
//此处可判断安卓issues:9121的问题
expect(scrollDetail.deltaY).toBeGreaterThan(299.5)
//expect([300.1905, 300, 299.8095]).toContain(scrollDetail.deltaY);
expect(await page.data('data.isScrollTest')).toBe('scroll:Success')
await page.callMethod('confirm_scroll_top_input', 0)
await page.waitFor(600)
})
it('Event scrolltolower-滚动到底部/右边',async()=>{
// 滚动到底部,是否触发scrolltolower事件
await page.callMethod('confirm_scroll_top_input', 2500)
await page.waitFor(600)
expect(await page.data('data.isScrolltolowerTest')).toBe('scrolltolower:Success-bottom')
await page.callMethod('confirm_scroll_top_input', 0)
await page.waitFor(600)
})
it('Event scrolltoupper-滚动到顶部/左边',async()=>{
// 滚动到顶部50,是否触发scrolltoupper事件
await page.callMethod('confirm_scroll_top_input', 40)
await page.waitFor(1000)
expect(await page.data('data.isScrolltoupperTest')).toBe('scrolltoupper:Success-top')
await page.callMethod('confirm_scroll_top_input', 0)
await page.waitFor(600)
})
if(isWeb || isIOS) {
return
}
it('Event scrollend-滚动结束时触发',async()=>{
// 仅App端支持,向上滑动页面
await program.swipe({
startPoint: { x: 100, y: 200 },
endPoint: { x: 100, y: 100 },
duration: 100
})
await page.waitFor(1600)
const endDetail = await page.data('data.scrollEndDetailTest')
console.log('scrollEndDetailTest:', endDetail)
expect(endDetail.deltaY).toBe(0)
expect(endDetail.deltaX).toBe(0)
expect(endDetail.scrollLeft).toBe(0)
expect(endDetail.scrollTop).toBeGreaterThan(0)
expect(endDetail.scrollHeight).toBeGreaterThan(0)
expect(endDetail.scrollWidth).toBeGreaterThan(0)
})
// 蒸汽模式不会对所有item排版并渲染,无法计算准确scrollHeight,屏蔽此测试
if(!isDom2) {
//检测竖向可滚动区域
it('check_scroll_height', async () => {
await page.callMethod('change_scroll_y_boolean', true)
await page.callMethod('change_scroll_x_boolean', false)
await page.waitFor(600)
const value = await page.callMethod('check_scroll_height')
expect(value).toBe(true)
})
}
//检测横向可滚动区域 备注:iOS不支持list-view横向滚动、鸿蒙非蒸汽模式暂不支持一次计算出scrollWidth、蒸汽模式不支持横向滚动。
if(!isHarmony && !isIOS && !isDom2) {
it('check_scroll_width', async () => {
if(await page.data('data.scroll_x_boolean') === false) {
await page.callMethod('change_scroll_x_boolean', true)
await page.callMethod('change_scroll_y_boolean', false)
await page.waitFor(600)
}
await page.callMethod('change_scroll_y_boolean', false)
await page.callMethod('change_scroll_x_boolean', true)
await page.waitFor(600)
const value = await page.callMethod('check_scroll_width')
expect(value).toBe(true)
})
}
//检测下拉刷新 备注:iOS本地测试结果正确,但是自动化测试结果错误
it('check_refresher', async () => {
if(await page.data('data.scroll_y_boolean') === false) {
await page.callMethod('change_scroll_y_boolean', true)
await page.callMethod('change_scroll_x_boolean', false)
await page.waitFor(600)
}
await page.setData({
data:{
refresher_enabled_boolean: true,
refresher_triggered_boolean: true
}
})
await page.waitFor(1000)
expect(await page.data('data.refresherrefresh')).toBe(true)
//延迟 等待下拉刷新执行结束 防止后续测试任务结果异常
await page.waitFor(2000)
})
if(!isDom2) {
// TODO attribute、property规范化
//检测竖向scroll_into_view属性赋值 备注:iOS本地测试结果正确,但是自动化测试结果错误
it('check_scroll_into_view_top', async () => {
if(await page.data('data.scroll_y_boolean') === false) {
await page.callMethod('change_scroll_y_boolean', true)
await page.callMethod('change_scroll_x_boolean', false)
await page.waitFor(600)
}
await page.callMethod('item_change_size_enum', 3)
await page.waitFor(600)
const listElement = await page.$('#listview')
const scrollTop = await listElement.attribute("scrollTop")
console.log("check_scroll_into_view_top--"+scrollTop)
await page.callMethod('item_change_size_enum', 0)
expect(scrollTop-690).toBeGreaterThanOrEqual(0)
})
//检测横向scroll_into_view属性赋值 备注:iOS不支持list-view横向滚动
it('check_scroll_into_view_left', async () => {
if(await page.data('data.scroll_x_boolean') === false) {
await page.callMethod('change_scroll_x_boolean', true)
await page.callMethod('change_scroll_y_boolean', false)
await page.waitFor(600)
}
await page.callMethod('setScrollIntoView', "item---3")
await page.waitFor(600)
const listElement = await page.$('#listview')
const scrollLeft = await listElement.attribute("scrollLeft")
console.log("check_scroll_into_view_left--"+scrollLeft)
await page.callMethod('setScrollIntoView', "item---0")
expect(scrollLeft-1080).toBeGreaterThanOrEqual(0)
})
}
})

查看文件

@@ -0,0 +1,408 @@
<script setup lang="uts">
type ScrollEventTest = {
type : string;
target : UniElement | null;
currentTarget : UniElement | null;
direction ?: string
}
import { ItemType } from '@/components/enum-data/enum-data-types'
type DataType = {
refresher_triggered_boolean: boolean;
refresher_enabled_boolean: boolean;
scroll_with_animation_boolean: boolean;
show_scrollbar_boolean: boolean;
bounces_boolean: boolean;
scroll_y_boolean: boolean;
scroll_x_boolean: boolean;
scroll_direction: string;
upper_threshold_input: number;
lower_threshold_input: number;
scroll_top_input: number;
scroll_left_input: number;
refresher_background_input: string;
scrollData: Array<string>;
size_enum: ItemType[];
scrollIntoView: string;
refresherrefresh: boolean;
refresher_default_style_input: string;
text: string[];
state: number;
reset: boolean;
// 自动化测试
isScrollTest: string;
isScrolltolowerTest: string;
isScrolltoupperTest: string;
scrollDetailTest: UniScrollEventDetail | null;
scrollEndDetailTest: UniScrollEventDetail | null;
}
// 使用reactive解决ref数据在自动化测试中无法访问
const data = reactive({
refresher_triggered_boolean: false,
refresher_enabled_boolean: false,
scroll_with_animation_boolean: false,
show_scrollbar_boolean: false,
bounces_boolean: true,
scroll_y_boolean: true,
scroll_x_boolean: false,
scroll_direction: "vertical",
upper_threshold_input: 50,
lower_threshold_input: 50,
scroll_top_input: 0,
scroll_left_input: 0,
refresher_background_input: "#FFF",
scrollData: [],
size_enum: [{ "value": 0, "name": "item---0" }, { "value": 3, "name": "item---3" }],
scrollIntoView: "",
refresherrefresh: false,
refresher_default_style_input: "black",
text: ['继续下拉执行刷新', '释放立即刷新', '刷新中', ""],
state: 3,
reset: true,
// 自动化测试
isScrollTest: '',
isScrolltolowerTest: '',
isScrolltoupperTest: '',
scrollDetailTest: null,
scrollEndDetailTest: null,
} as DataType)
onLoad(() => {
let lists : Array<string> = []
for (let i = 0; i < 10; i++) {
lists.push("item---" + i)
}
data.scrollData = lists
})
const list_view_click = () => { console.log("组件被点击时触发") }
const list_view_touchstart = () => { console.log("手指触摸动作开始") }
const list_view_touchmove = () => { console.log("手指触摸后移动") }
const list_view_touchcancel = () => { console.log("手指触摸动作被打断,如来电提醒,弹窗") }
const list_view_touchend = () => { console.log("手指触摸动作结束") }
const list_view_tap = () => { console.log("手指触摸后马上离开") }
const list_view_longpress = () => { console.log("如果一个组件被绑定了 longpress 事件,那么当用户长按这个组件时,该事件将会被触发。") }
const list_view_refresherpulling = (e: RefresherEvent) => {
console.log("下拉刷新控件被下拉")
if (data.reset) {
if (e.detail.dy > 45) {
data.state = 1
} else {
data.state = 0
}
}
}
const list_view_refresherrefresh = () => {
console.log("下拉刷新被触发 ")
data.refresherrefresh = true
data.refresher_triggered_boolean = true
data.state = 2
data.reset = false;
setTimeout(() => {
data.refresher_triggered_boolean = false
}, 1500)
}
const list_view_refresherrestore = () => {
data.refresherrefresh = false
data.state = 3
data.reset = true
console.log("下拉刷新被复位")
}
const list_view_refresherabort = () => { console.log("下拉刷新被中止") }
// 自动化测试专用(由于事件event参数对象中存在循环引用,在ios端JSON.stringify报错,自动化测试无法page.data获取)
const checkEventTest = (e: ScrollEventTest, eventName: String) => {
const isPass = e.type === eventName && e.target instanceof UniElement && e.currentTarget instanceof UniElement;
const result = isPass ? `${eventName}:Success` : `${eventName}:Fail`;
switch (eventName) {
case 'scroll':
data.isScrollTest = result
break;
case 'scrolltolower':
data.isScrolltolowerTest = result + `-${e.direction}`
break;
case 'scrolltoupper':
data.isScrolltoupperTest = result + `-${e.direction}`
break;
default:
break;
}
}
const list_view_scrolltoupper = (e: UniScrollToUpperEvent) => {
console.log("滚动到顶部/左边,会触发 scrolltoupper 事件 direction=" + e.detail.direction)
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
direction: e.detail.direction,
} as ScrollEventTest, 'scrolltoupper')
}
const list_view_scrolltolower = (e: UniScrollToLowerEvent) => {
console.log("滚动到底部/右边,会触发 scrolltolower 事件 direction=" + e.detail.direction)
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget,
direction: e.detail.direction,
} as ScrollEventTest, 'scrolltolower')
}
const list_view_scroll = (e: UniScrollEvent) => {
console.log("滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}")
data.scrollDetailTest = e.detail
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget
} as ScrollEventTest, 'scroll')
}
const list_view_scrollend = (e: UniScrollEvent) => {
console.log("滚动结束时触发", e.detail)
data.scrollEndDetailTest = e.detail
checkEventTest({
type: e.type,
target: e.target,
currentTarget: e.currentTarget
} as ScrollEventTest, 'scrollend')
}
const list_item_click = () => { console.log("list-item组件被点击时触发") }
const list_item_touchstart = () => { console.log("手指触摸list-item组件动作开始") }
const list_item_touchmove = () => { console.log("手指触摸list-item组件后移动") }
const list_item_touchcancel = () => { console.log("手指触摸list-item组件动作被打断,如来电提醒,弹窗") }
const list_item_touchend = () => { console.log("手指触摸list-item组件动作结束") }
const list_item_tap = () => { console.log("手指触摸list-item组件后马上离开") }
const list_item_longpress = () => { console.log("list-item组件被绑定了 longpress 事件,那么当用户长按这个组件时,该事件将会被触发。") }
const change_refresher_triggered_boolean = (checked: boolean) => { data.refresher_triggered_boolean = checked }
const change_refresher_enabled_boolean = (checked: boolean) => { data.refresher_enabled_boolean = checked }
const change_scroll_with_animation_boolean = (checked: boolean) => { data.scroll_with_animation_boolean = checked }
const change_show_scrollbar_boolean = (checked: boolean) => { data.show_scrollbar_boolean = checked }
const change_bounces_boolean = (checked: boolean) => { data.bounces_boolean = checked }
const change_scroll_direction = () => {
if (data.scroll_y_boolean && data.scroll_x_boolean || data.scroll_y_boolean) {
data.scroll_direction = "vertical"
} else if (!data.scroll_y_boolean && !data.scroll_x_boolean) {
data.scroll_direction = "none"
} else if (!data.scroll_y_boolean && data.scroll_x_boolean) {
data.scroll_direction = "horizontal"
}
}
const change_scroll_y_boolean = (checked: boolean) => {
data.scroll_y_boolean = checked
change_scroll_direction()
}
const change_scroll_x_boolean = (checked: boolean) => {
data.scroll_x_boolean = checked
change_scroll_direction()
}
const confirm_upper_threshold_input = (value: number) => { data.upper_threshold_input = value }
const confirm_lower_threshold_input = (value: number) => { data.lower_threshold_input = value }
const confirm_scroll_top_input = (value: number) => { data.scroll_top_input = value }
const confirm_scroll_left_input = (value: number) => { data.scroll_left_input = value }
const confirm_refresher_background_input = (value: string) => { data.refresher_background_input = value }
const item_change_size_enum = (index: number) => { data.scrollIntoView = "item---" + index }
//自动化测试专用
const setScrollIntoView = (id: string) => { data.scrollIntoView = id }
//自动化测试例专用
const check_scroll_height = (): Boolean => {
var listElement = uni.getElementById("listview") as UniElement
console.log("check_scroll_height--" + listElement.scrollHeight)
if (listElement.scrollHeight > 2000) {
return true
}
return false
}
//自动化测试例专用
const check_scroll_width = (): Boolean => {
var listElement = uni.getElementById("listview") as UniElement
console.log("check_scroll_width" + listElement.scrollWidth)
if (listElement.scrollWidth > 2000) {
return true
}
return false
}
const change_refresher_style_boolean = (checked: boolean) => {
if (checked) {
data.refresher_default_style_input = "none"
} else {
data.refresher_default_style_input = "black"
}
}
defineExpose({
data,
confirm_scroll_top_input,
change_scroll_x_boolean,
change_scroll_y_boolean,
confirm_scroll_left_input,
check_scroll_height,
check_scroll_width,
item_change_size_enum,
setScrollIntoView
})
</script>
<template>
<view class="main">
<list-view :direction="data.scroll_direction" :bounces="data.bounces_boolean" :upper-threshold="data.upper_threshold_input"
:lower-threshold="data.lower_threshold_input" :scroll-top="data.scroll_top_input" :scroll-left="data.scroll_left_input"
:show-scrollbar="data.show_scrollbar_boolean" :scroll-into-view="data.scrollIntoView"
:scroll-with-animation="data.scroll_with_animation_boolean" :refresher-enabled="data.refresher_enabled_boolean"
:refresher-background="data.refresher_background_input" :refresher-triggered="data.refresher_triggered_boolean"
:refresher-default-style="data.refresher_default_style_input" @click="list_view_click"
@touchstart="list_view_touchstart" @touchmove="list_view_touchmove" @touchcancel="list_view_touchcancel"
@touchend="list_view_touchend" @tap="list_view_tap" @longpress="list_view_longpress"
@refresherpulling="list_view_refresherpulling" @refresherrefresh="list_view_refresherrefresh"
@refresherrestore="list_view_refresherrestore" @refresherabort="list_view_refresherabort"
@scrolltoupper="list_view_scrolltoupper" ref="listview" @scrolltolower="list_view_scrolltolower"
@scroll="list_view_scroll" @scrollend="list_view_scrollend" style="width:100%;" id="listview">
<list-item v-for="key in data.scrollData" :key="key" :id="key" @click="list_item_click"
@touchstart="list_item_touchstart" @touchmove="list_item_touchmove" @touchcancel="list_item_touchcancel"
@touchend="list_item_touchend" @tap="list_item_tap" @longpress="list_item_longpress" class="list-item">
<text>{{key}}</text>
</list-item>
<!-- #ifdef APP -->
<list-item slot="refresher" class="refresh-box">
<text class="tip-text">{{data.text[data.state]}}</text>
</list-item>
<!-- #endif -->
</list-view>
</view>
<scroll-view style="flex:1" direction="vertical">
<view class="content">
<!-- #ifdef APP -->
<boolean-data :defaultValue="false" title="设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发"
@change="change_refresher_triggered_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="开启下拉刷新" @change="change_refresher_enabled_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="开启自定义样式" @change="change_refresher_style_boolean"></boolean-data>
<!-- #endif -->
<boolean-data :defaultValue="false" title="是否在设置滚动条位置时使用滚动动画,设置false没有滚动动画"
@change="change_scroll_with_animation_boolean"></boolean-data>
<boolean-data :defaultValue="false" title="控制是否出现滚动条" @change="change_show_scrollbar_boolean"></boolean-data>
<!-- #ifdef APP -->
<boolean-data :defaultValue="true" title="控制是否回弹效果" @change="change_bounces_boolean"></boolean-data>
<!-- #endif -->
<boolean-data :defaultValue="true" title="允许纵向滚动" @change="change_scroll_y_boolean"></boolean-data>
<!-- #ifdef APP -->
<boolean-data :defaultValue="false" title="允许横向滚动" @change="change_scroll_x_boolean"></boolean-data>
<!-- #endif -->
<input-data defaultValue="50" title="距顶部/左边多远时(单位px),触发 scrolltoupper 事件" type="number"
@confirm="confirm_upper_threshold_input"></input-data>
<input-data defaultValue="50" title="距底部/右边多远时(单位px),触发 scrolltolower 事件" type="number"
@confirm="confirm_lower_threshold_input"></input-data>
<input-data defaultValue="0" title="设置竖向滚动条位置" type="number" @confirm="confirm_scroll_top_input"></input-data>
<!-- #ifdef APP -->
<input-data defaultValue="0" title="设置横向滚动条位置" type="number" @confirm="confirm_scroll_left_input"></input-data>
<input-data defaultValue="#FFF" title="设置下拉刷新区域背景颜色" type="text"
@confirm="confirm_refresher_background_input"></input-data>
<!-- 蒸汽模式下 list-view 暂不支持 scrollIntoView,因此隐藏通过 id 位置跳转示例 -->
<!-- #ifndef VUE3-VAPOR -->
<enum-data :items="data.size_enum" title="通过id位置跳转" @change="item_change_size_enum"></enum-data>
<!-- #endif -->
<navigator url="/pages/component/list-view/list-view-refresh">
<button type="primary" class="button">
list-view 下拉刷新
</button>
</navigator>
<!-- #endif -->
<navigator url="/pages/component/list-view/list-view-multiplex">
<button type="primary" class="button">
list-view 对list-item复用测试
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-multiplex-input">
<button type="primary" class="button">
list-view 复用测试(item中嵌入input)
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-multiplex-video">
<button type="primary" class="button">
list-view 复用测试(item中嵌入video)
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-children-in-slot">
<button type="primary" class="button">
list-view 测试插槽中子组件增删
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-children-if-show">
<button type="primary" class="button">
list-item v-if v-show 组合增删
</button>
</navigator>
<navigator url="/pages/template/im/im">
<button type="primary" class="button">
list-item 中设置长按事件测试
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-form-item">
<button type="primary" class="button">
list-item 中使用表单元素测试
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-with-type">
<button type="primary" class="button">
list-item 上使用 type 属性测试
</button>
</navigator>
</view>
</scroll-view>
</template>
<style>
.main {
max-height: 250px;
padding: 5px 0;
border-bottom: 1px solid rgba(0, 0, 0, .06);
flex-direction: row;
justify-content: center;
}
.list-item {
width: 100%;
height: 250px;
border: 1px solid #666;
background-color: #66ccff;
align-items: center;
justify-content: center;
}
.tip-text {
color: #888;
font-size: 12px;
}
.refresh-box {
justify-content: center;
align-items: center;
flex-direction: row;
height: 45px;
width: 100%;
}
.button {
margin-top: 15px;
}
.content{
padding-bottom: 20px;
}
</style>