提交 64442b00 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor: 公共属性和事件调整为全局属性和事件

上级 ad2b6884
{
"leftWindow": {
"path": "windows/left-window.uvue",
"style": {
"width": "350px"
}
},
"topWindow": {
"path": "windows/top-window.uvue",
"style": {
"height": "60px"
}
},
"leftWindow": {
"path": "windows/left-window.uvue",
"style": {
"width": "350px"
}
},
"topWindow": {
"path": "windows/top-window.uvue",
"style": {
"height": "60px"
}
},
"pages": [
{
"path": "pages/tabBar/component",
......@@ -343,28 +343,28 @@
}
},
{
"path": "pages/component/public-properties/public-properties",
"path": "pages/component/global-properties/global-properties",
"group": "0,0",
"style": {
"navigationBarTitleText": "公共属性"
"navigationBarTitleText": "全局属性"
}
},
{
"path": "pages/component/public-events/public-events",
"path": "pages/component/global-events/global-events",
"group": "0,0",
"style": {
"navigationBarTitleText": "公共事件"
"navigationBarTitleText": "全局事件"
}
},
{
"path": "pages/component/public-events/transition-events",
"path": "pages/component/global-events/transition-events",
"group": "0,0",
"style": {
"navigationBarTitleText": "Transition Events"
}
},
{
"path": "pages/component/public-events/touch-events",
"path": "pages/component/global-events/touch-events",
"group": "0,0",
"style": {
"navigationBarTitleText": "Touch Events"
......@@ -488,6 +488,16 @@
"navigationBarTitleText": "ball"
}
},
// #ifndef WEB
{
"path": "pages/component/animation-view/animation-view",
"group": "0,5,3",
"style": {
"navigationBarTitleText": "animation-view | Lottie动画",
"enablePullDownRefresh": false
}
},
// #endif
{
"path": "pages/tabBar/API",
"style": {
......@@ -982,16 +992,16 @@
"enablePullDownRefresh": false
}
},
// #ifdef APP-IOS
{
"path": "pages/API/virtual-payment/virtual-payment",
"group": "1,14",
"style": {
"navigationBarTitleText": "virtualPayment | 苹果内购",
"enablePullDownRefresh": false
}
},
// #endif
// #ifdef APP-IOS
{
"path": "pages/API/virtual-payment/virtual-payment",
"group": "1,14,1",
"style": {
"navigationBarTitleText": "virtualPayment | 苹果内购",
"enablePullDownRefresh": false
}
},
// #endif
{
"path": "pages/API/request-payment/request-payment/order-detail",
"style": {
......@@ -1694,16 +1704,6 @@
}
},
// #endif
// #ifndef WEB
{
"path": "pages/component/animation-view/animation-view",
"group": "0,5,3",
"style": {
"navigationBarTitleText": "lottie动画-需要自定义基座",
"enablePullDownRefresh": false
}
},
// #endif
// #ifdef APP || WEB
{
"path": "uni_modules/uni-pay-x/pages/success/success",
......@@ -1801,8 +1801,8 @@
"name": "组件",
"children": [
{
"id": "component.public-properties-events",
"name": "公共属性和事件"
"id": "component.global-properties-events",
"name": "全局属性和事件"
},
{
"id": "component.view-container",
......@@ -1972,10 +1972,10 @@
"id": "component.media.video",
"name": "video"
},
{
"id": "component.media.animation-view",
"name": "animation-view"
}
{
"id": "component.media.animation-view",
"name": "animation-view"
}
]
},
{
......@@ -2320,6 +2320,10 @@
{
"id": "api.payment.requestPayment",
"name": "requestPayment"
},
{
"id": "api.payment.virtualPayment",
"name": "virtualPayment"
}
]
},
......@@ -2677,4 +2681,4 @@
]
}
]
}
}
\ No newline at end of file
const PAGE_PATH = '/pages/component/public-events/public-events'
const PAGE_PATH = '/pages/component/global-events/global-events'
describe('event trigger', () => {
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
......
......@@ -433,7 +433,7 @@
export default {
data() {
return {
title: 'public-events',
title: 'global-events',
touchStartEvent: null as TouchEvent | null,
touchCancelEvent: null as TouchEvent | null,
touchMoveEvent: null as TouchEvent | null,
......@@ -502,4 +502,4 @@
margin-top: 5px;
font-size: 16px;
}
</style>
</style>
......@@ -3,7 +3,7 @@
describe('transition event', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/component/public-events/transition-events')
page = await program.reLaunch('/pages/component/global-events/transition-events')
await page.waitFor(3000);
});
......
const PAGE_PATH = '/pages/component/public-properties/public-properties'
const PAGE_PATH = '/pages/component/global-properties/global-properties'
describe('general attribute', () => {
let page
......
......@@ -55,7 +55,7 @@
export default {
data() {
return {
title: 'public-properties',
title: 'global-properties',
generalId: 'general-id',
generalClass: 'general-class',
generalName: 'general-name',
......
......@@ -82,10 +82,10 @@ const pages = [
// '/pages/component/unicloud-db/unicloud-db/contacts/detail',
'/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom',
// 单独测试例截图
// '/pages/component/public-properties/public-properties',
'/pages/component/public-events/public-events',
'/pages/component/public-events/transition-events',
'/pages/component/public-events/touch-events',
// '/pages/component/global-properties/global-properties',
'/pages/component/global-events/global-events',
'/pages/component/global-events/transition-events',
'/pages/component/global-events/touch-events',
// 单独测试例截图
// '/pages/component/nested-scroll-header/nested-scroll-header',
// 单独测试例截图
......@@ -344,7 +344,7 @@ function getWaitForTagName(pagePath) {
return 'video'
}
if (
pagePath === '/pages/component/public-events/transition-events' ||
pagePath === '/pages/component/global-events/transition-events' ||
pagePath === '/pages/component/list-view/list-view-refresh' ||
pagePath === '/pages/API/env/env'
) {
......
export type SafeArea = {
top : number,
right : number,
bottom : number,
left : number,
width : number,
height : number,
}
export type SafeArea = {
top : number,
right : number,
bottom : number,
left : number,
width : number,
height : number,
}
type State = {
lifeCycleNum : number,
// 状态栏高度
......@@ -15,22 +15,22 @@ type State = {
// 设备像素比
devicePixelRatio : number
// 事件判断回调
eventCallbackNum: number
// 是否匹配左侧窗口
noMatchLeftWindow:boolean
// 当前激活的tab页
active: string
eventCallbackNum: number
// 是否匹配左侧窗口
noMatchLeftWindow:boolean
// 当前激活的tab页
active: string
leftWinActive:string
}
export const state = reactive({
lifeCycleNum: 0,
statusBarHeight: 0,
devicePixelRatio: 1,
eventCallbackNum: 0,
noMatchLeftWindow: true,
active: 'componentPage',
leftWinActive: '/pages/component/public-properties/public-properties',
devicePixelRatio: 1,
eventCallbackNum: 0,
noMatchLeftWindow: true,
active: 'componentPage',
leftWinActive: '/pages/component/global-properties/global-properties',
safeArea: {
top: 0,
right: 0,
......@@ -43,33 +43,33 @@ export const state = reactive({
export const setLifeCycleNum = (num : number) => {
state.lifeCycleNum = num
}
}
export const setEventCallbackNum = (num : number) => {
state.eventCallbackNum = num
}
export const setStatusBarHeight = (height : number) => {
state.statusBarHeight = height
}
}
export const setSafeArea = (value : SafeArea) => {
state.safeArea = value
}
export const setDevicePixelRatio = (devicePixelRatio : number) => {
state.devicePixelRatio = devicePixelRatio
}
}
export const setMatchLeftWindow = (matchLeftWindow:boolean) => {
state.noMatchLeftWindow = !matchLeftWindow
}
}
export const setActive = (tabPage:string) => {
state.active = tabPage
}
}
export const setLeftWinActive = (leftWinActive:string) => {
state.leftWinActive = leftWinActive
}
}
......@@ -56,7 +56,7 @@
const pageName = this.$route.path.split('/')[4]
if(pageUrl === '/'){
uni.reLaunch({
url: "/pages/component/public-properties/public-properties"
url: "/pages/component/global-properties/global-properties"
})
}else{
uni.reLaunch({
......@@ -103,7 +103,7 @@
if (this.isPC) {
if (newRoute.path === '/') {
uni.redirectTo({
url: '/pages/component/public-properties/public-properties'
url: '/pages/component/global-properties/global-properties'
})
} else if (!newRoute.matched.length) {
uni.redirectTo({
......
<template>
<view class="top-window-header">
<view class="left-header">
<navigator class="left-header" open-type="reLaunch" url="/pages/component/public-properties/public-properties">
<navigator class="left-header" open-type="reLaunch" url="/pages/component/global-properties/global-properties">
<image src="/static/logo.png" class="logo" mode="heightFix"></image>
<text>hello uni-app</text>
</navigator>
......@@ -28,7 +28,7 @@
current: 0,
indexPage: [{
tabBar: '/pages/tabBar/component',
index: '/pages/component/public-properties/public-properties'
index: '/pages/component/global-properties/global-properties'
}, {
tabBar: '/pages/tabBar/API',
index: '/pages/API/get-app/get-app'
......@@ -51,7 +51,7 @@
let comp
if (path === '/') {
comp = 'component'
path = '/pages/component/public-properties/public-properties'
path = '/pages/component/global-properties/global-properties'
} else {
comp = path.split('/')[2]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册