From 2d01ae69519ec0af6fadfef458630cff4c74615b Mon Sep 17 00:00:00 2001
From: fxy060608 <153647646@qq.com>
Date: Tue, 15 Oct 2024 17:33:37 +0800
Subject: [PATCH] =?UTF-8?q?chore(mp-weixin):=20=E8=B0=83=E6=95=B4=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.uvue | 12 ++++++++++--
main.uts | 6 +++++-
pages.json | 8 ++++++--
.../global-properties/global-properties.uvue | 2 +-
pages/component/input/input.uvue | 19 ++++++++++---------
pages/component/text/text-props.uvue | 6 ++++--
pages/component/textarea/textarea.uvue | 7 ++++---
7 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/App.uvue b/App.uvue
index ba623235..d75df182 100644
--- a/App.uvue
+++ b/App.uvue
@@ -48,6 +48,7 @@
// } as PerformanceObserverOptions)
// 统计上报 - 应用启动
+ // #ifdef APP-ANDROID || APP-IOS || WEB
uni.report({
name: 'uni-app-launch',
options: res,
@@ -57,6 +58,7 @@
console.log(err);
}
})
+ // #endif
// #ifdef APP
if (process.env.NODE_ENV !== 'development') { //真机运行可以注释此条件
uni.getPrivacySetting({
@@ -86,6 +88,7 @@
setLifeCycleNum(state.lifeCycleNum + 100)
console.log('App Show')
+ // #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用显示
uni.report({
name: 'uni-app-show',
@@ -94,13 +97,15 @@
}, fail(err) {
console.log(err);
}
- })
+ })
+ // #endif
},
onHide: function () {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 100)
console.log('App Hide')
+ // #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用进入后台
uni.report({
name: 'uni-app-hide',
@@ -109,7 +114,8 @@
}, fail(err) {
console.log(err);
}
- })
+ })
+ // #endif
},
// #ifdef APP-ANDROID
onLastPageBackPress: function () {
@@ -134,6 +140,7 @@
console.log('App Exit')
},
onError(err : any) {
+ // #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用发生错误
uni.report({
name: 'uni-app-error',
@@ -144,6 +151,7 @@
console.log(err);
}
})
+ // #endif
},
// #endif
methods: {
diff --git a/main.uts b/main.uts
index efe000a0..dcf10628 100644
--- a/main.uts
+++ b/main.uts
@@ -1,6 +1,8 @@
// 仅测试 console.log 时机问题
import './test-main-console.uts'
+// #ifdef APP-ANDROID || APP-IOS || WEB
import { uniStat } from '@/uni_modules/uni-stat/plugin.uts'
+// #endif
import App from './App.uvue'
import { createSSRApp } from 'vue'
@@ -17,7 +19,9 @@ const statOptions = {
export function createApp() {
const app = createSSRApp(App)
- app.use(uniStat, statOptions)
+ // #ifdef APP-ANDROID || APP-IOS || WEB
+ app.use(uniStat, statOptions)
+ // #endif
// app.mixin({
// onReady() {
// setTimeout(() => {
diff --git a/pages.json b/pages.json
index 0e71a990..04dd61be 100644
--- a/pages.json
+++ b/pages.json
@@ -489,7 +489,7 @@
"navigationBarTitleText": "涂鸦"
}
},
- // #ifndef WEB
+ // #ifdef APP-ANDROID || APP-IOS
{
"path": "pages/component/native-view/native-view",
"group": "0,2,4",
@@ -1151,7 +1151,7 @@
"navigationBarTitleText": "createSelectorQuery | 创建 SelectorQuery 实例"
}
},
- // #ifndef WEB
+ // #ifdef APP-ANDROID || APP-IOS
{
"path": "pages/API/get-native-view/element-getnativeview",
"group": "1,30",
@@ -1799,12 +1799,14 @@
}
},
// #endif
+ // #ifdef APP-ANDROID || APP-IOS || WEB
{
"path": "pages/template/schema/schema",
"style": {
"navigationBarTitleText": "打开schema示例"
}
},
+ // #endif
// #ifdef APP-ANDROID
{
"path": "pages/template/share/share",
@@ -1839,6 +1841,7 @@
}
},
// #endif
+ // #ifdef APP-ANDROID || APP-IOS || WEB
{
"path": "pages/template/custom-long-list/custom-long-list",
"style": {
@@ -1846,6 +1849,7 @@
"enablePullDownRefresh": false
}
},
+ // #endif
{
"path": "pages/template/test-background-color-content/test-background-color-content",
"style": {
diff --git a/pages/component/global-properties/global-properties.uvue b/pages/component/global-properties/global-properties.uvue
index ea438918..136458ed 100644
--- a/pages/component/global-properties/global-properties.uvue
+++ b/pages/component/global-properties/global-properties.uvue
@@ -64,7 +64,7 @@
// #ifdef APP
if (!generalTarget.classList.includes('general-class')) {
// #endif
- // #ifdef WEB
+ // #ifndef APP
if (!Array.from(generalTarget.classList).includes('general-class')) {
// #endif
this.validateGeneralAttrText = '基础属性 class 验证失败'
diff --git a/pages/component/input/input.uvue b/pages/component/input/input.uvue
index 9b3dbcaa..43cdba6d 100644
--- a/pages/component/input/input.uvue
+++ b/pages/component/input/input.uvue
@@ -255,15 +255,16 @@
" @click="changePassword">
-
-
-
- 同时存在 v-model 和 value
-
-
-
-
-
+
+
+
+ 同时存在 v-model 和 value
+
+
+
+
+
+
diff --git a/pages/component/text/text-props.uvue b/pages/component/text/text-props.uvue
index 9ff36baf..248c72dd 100644
--- a/pages/component/text/text-props.uvue
+++ b/pages/component/text/text-props.uvue
@@ -63,8 +63,10 @@
decode
依次为lt gt amp apos nbsp ensp emsp效果
-
- < > & '
+
+
+ < > & '
+
uni-app x,终极跨平台方案
uni-app x,终极跨平台方案
uni-app x,终极跨平台方案
diff --git a/pages/component/textarea/textarea.uvue b/pages/component/textarea/textarea.uvue
index 140b9507..21ccac86 100644
--- a/pages/component/textarea/textarea.uvue
+++ b/pages/component/textarea/textarea.uvue
@@ -138,13 +138,14 @@
-
+
同时存在 v-model 和 value
-
-
+
+
+
设置adjust-position
--
GitLab