提交 2d01ae69 编写于 作者: F fxy060608

chore(mp-weixin): 调整部分条件编译

上级 e12723de
......@@ -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: {
......
// 仅测试 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(() => {
......
......@@ -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": {
......
......@@ -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 验证失败'
......
......@@ -255,15 +255,16 @@
" @click="changePassword"></image>
</view>
</view>
<view>
<view class="uni-title">
<text class="uni-title-text">同时存在 v-model 和 value</text>
</view>
<view class="input-wrapper">
<input id="both-model-value" class="uni-input" v-model="demoValue" value="456" />
</view>
</view>
<!-- #ifndef MP -->
<view>
<view class="uni-title">
<text class="uni-title-text">同时存在 v-model 和 value</text>
</view>
<view class="input-wrapper">
<input id="both-model-value" class="uni-input" v-model="demoValue"/>
</view>
</view>
<!-- #endif -->
<view>
<view class="uni-title" style="flex-direction: row; align-items: center">
......
......@@ -63,8 +63,10 @@
<text class="uni-subtitle-text">decode</text>
<text class="uni-subtitle-text">依次为lt gt amp apos nbsp ensp emsp效果</text>
</view>
<view class="text-box">
<text :decode="true">&lt; &gt; &amp; &apos;</text>
<view class="text-box">
<!-- #ifndef MP-WEIXIN -->
<text :decode="true">&lt; &gt; &amp; &apos;</text>
<!-- #endif -->
<text :decode="true">uni-app&nbsp;x,终极跨平台方案</text>
<text :decode="true">uni-app&ensp;x,终极跨平台方案</text>
<text :decode="true">uni-app&emsp;x,终极跨平台方案</text>
......
......@@ -138,13 +138,14 @@
<view class="textarea-wrap">
<textarea class="textarea-instance" :hold-keyboard="hold_keyboard" />
</view>
<!-- #ifndef MP -->
<view class="title-wrap">
<view>同时存在 v-model 和 value</view>
</view>
<view class="textarea-wrap">
<textarea id="both-model-value" class="textarea-instance" v-model='defaultModel' value='456'></textarea>
</view>
<textarea id="both-model-value" class="textarea-instance" v-model='defaultModel'></textarea>
</view>
<!-- #endif -->
<view class="title-wrap">
<view>设置adjust-position</view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册