diff --git a/App.uvue b/App.uvue
index 6c45fad85d9a6aaa2ccd4c6c686491b5230142de..8de34e7e1cac8f916da6dbc67046305ff3c31fad 100644
--- a/App.uvue
+++ b/App.uvue
@@ -67,10 +67,10 @@
uni.exit()
}
},
- // #endif
onExit() {
console.log('App Exit')
},
+ // #endif
methods: {
increasetLifeCycleNum() {
setLifeCycleNum(state.lifeCycleNum + 100)
diff --git a/pages.json b/pages.json
index 6dc16e82f5414c3f4ca2d3f13def679361dd90d9..3d3004afbbb47e51543a7ea40536ebec9c6d92ef 100644
--- a/pages.json
+++ b/pages.json
@@ -458,6 +458,13 @@
"navigationBarTitleText": "文件管理"
}
},
+ {
+ "path" : "pages/API/env/env",
+ "style" :
+ {
+ "navigationBarTitleText" : "env"
+ }
+ },
// #endif
{
"path": "pages/API/action-sheet/action-sheet",
@@ -1273,6 +1280,41 @@
"navigationBarTitleText" : "editor"
}
},
+ {
+ "path" : "pages/API/map/map",
+ "style" :
+ {
+ "navigationBarTitleText" : "map"
+ }
+ },
+ {
+ "path" : "pages/API/make-phone-call/make-phone-call",
+ "style" :
+ {
+ "navigationBarTitleText" : "make-phone-call"
+ }
+ },
+ {
+ "path" : "pages/API/inner-audio/inner-audio",
+ "style" :
+ {
+ "navigationBarTitleText" : "inner-audio"
+ }
+ },
+ {
+ "path" : "pages/API/inner-audio/inner-audio-format",
+ "style" :
+ {
+ "navigationBarTitleText" : "inner-audio-format"
+ }
+ },
+ {
+ "path" : "pages/API/inner-audio/inner-audio-path",
+ "style" :
+ {
+ "navigationBarTitleText" : "inner-audio-path"
+ }
+ },
// #endif
// #ifdef APP
{
@@ -1281,13 +1323,20 @@
"navigationBarTitleText": "日历"
}
},
+ {
+ "path": "pages/API/theme-change/theme-change",
+ "style": {
+ "navigationBarTitleText": "主题切换",
+ "enablePullDownRefresh": false
+ }
+ },
+ // #endif
{
"path": "pages/template/schema/schema",
"style": {
"navigationBarTitleText": "打开schema示例"
}
},
- // #endif
// #ifdef APP-ANDROID
{
"path": "pages/template/share/share",
@@ -1352,13 +1401,6 @@
"enablePullDownRefresh": false
}
},
- {
- "path": "pages/API/theme-change/theme-change",
- "style": {
- "navigationBarTitleText": "主题切换",
- "enablePullDownRefresh": false
- }
- },
{
"path": "uni_modules/uni-pay-x/pages/success/success",
"style": {
@@ -1406,7 +1448,6 @@
"backgroundColorContent": "#fffae8"
}
},
- // #ifdef APP-ANDROID || WEB
{
"path" : "pages/API/resize-observer/resize-observer",
"style" :
@@ -1414,7 +1455,6 @@
"navigationBarTitleText" : "resize observer"
}
},
- // #endif
{
"path" : "pages/CSS/overflow/overflow-visible-event",
"style" :
@@ -1429,9 +1469,7 @@
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#007AFF",
"backgroundColorContent": "#efeff4",
- "backgroundColor": "#efeff4",
- "backgroundColorTop": "#F4F5F6",
- "backgroundColorBottom": "#F4F5F6"
+ "backgroundColor": "#efeff4"
},
"tabBar": {
"color": "#7A7E83",
diff --git a/pages/API/env/env.uvue b/pages/API/env/env.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..adce29875ced55fc07f18074c1537561466d39a6
--- /dev/null
+++ b/pages/API/env/env.uvue
@@ -0,0 +1,49 @@
+
+
+ 操作日志
+ {{ log }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/API/get-battery-info/get-battery-info.uvue b/pages/API/get-battery-info/get-battery-info.uvue
index 84c733122cd8c9ecef08ac92427092724fb49184..e55d296d8d38c0218e77ce15956040fcc8956f1d 100644
--- a/pages/API/get-battery-info/get-battery-info.uvue
+++ b/pages/API/get-battery-info/get-battery-info.uvue
@@ -1,28 +1,33 @@
-
- 当前电量:{{level}}%
- 是否充电中:{{isCharging}}
-
+
+ 当前电量:{{level}}%
+ 是否充电中:{{isCharging}}
+
-
\ No newline at end of file
diff --git a/pages/API/inner-audio/inner-audio-format.uvue b/pages/API/inner-audio/inner-audio-format.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..7b9fb1756de1bd5f9dff67bc9043372fa862fcba
--- /dev/null
+++ b/pages/API/inner-audio/inner-audio-format.uvue
@@ -0,0 +1,120 @@
+
+
+
+
+ 支持的音频格式示例
+
+
+ {{item.format}}
+
+
+
+
+
+
+
+
diff --git a/pages/API/inner-audio/inner-audio-path.uvue b/pages/API/inner-audio/inner-audio-path.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..003320d640b9275da2366f991367730e9953b1b0
--- /dev/null
+++ b/pages/API/inner-audio/inner-audio-path.uvue
@@ -0,0 +1,91 @@
+
+
+
+
+ 支持的音频路径示例
+
+
+ {{item.description}}
+
+
+
+
+
+
+
+
diff --git a/pages/API/inner-audio/inner-audio.uvue b/pages/API/inner-audio/inner-audio.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..093c831ec7a7768072ab8b18ff044f3b42bec0c9
--- /dev/null
+++ b/pages/API/inner-audio/inner-audio.uvue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 格式/路径示例
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/API/make-phone-call/make-phone-call.uvue b/pages/API/make-phone-call/make-phone-call.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..33b784a984192ffdb861d05e4a73c3887b12482b
--- /dev/null
+++ b/pages/API/make-phone-call/make-phone-call.uvue
@@ -0,0 +1,51 @@
+
+
+
+
+ 请在下方输入电话号码
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/API/map/map.test.js b/pages/API/map/map.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..4f19a170c32579d98c03ac237c0fc7b9a7d3dcf6
--- /dev/null
+++ b/pages/API/map/map.test.js
@@ -0,0 +1,51 @@
+let page;
+describe('web-map', () => {
+ console.log("uniTestPlatformInfo",process.env.uniTestPlatformInfo)
+ if (!process.env.uniTestPlatformInfo.startsWith('web')) {
+ it('app', () => {
+ expect(1).toBe(1)
+ })
+ return
+ }
+ beforeAll(async () => {
+ page = await program.reLaunch('/pages/API/map/map')
+ await page.waitFor('view');
+ // 等待地图加载完成
+ await page.waitFor(4000);
+ await page.setData({autoTest:true})
+ });
+
+ it('Check MapMethods', async () => {
+ const mapMethods = ['changeScale', 'addMarkers', 'addPolyline', 'addPolygons', 'addCircles',
+ 'includePoint', 'handleTranslateMarker'
+ ]
+ for (var i = 0; i < mapMethods.length; i++) {
+ await page.callMethod(mapMethods[i])
+ if (mapMethods[i] == 'handleTranslateMarker') {
+ await page.waitFor(2000);
+ } else {
+ await page.waitFor(500);
+ }
+ expect(await program.screenshot()).toSaveImageSnapshot();
+ await page.waitFor(500);
+ }
+ });
+ it('handleGetCenterLocation', async () => {
+ await page.callMethod('handleGetCenterLocation')
+ await page.waitFor(500);
+ const centerLocationRes = await page.data('getCenterLocationTest')
+ expect(centerLocationRes.latitude).not.toBeNull();
+ expect(centerLocationRes.longitude).not.toBeNull();
+ });
+ it('handleGetRegion', async () => {
+ await page.callMethod('handleGetRegion')
+ await page.waitFor(500);
+ const regionRes = await page.data('getRegionTest')
+ const getRegionExpected = {
+ southwest: { latitude: 39.88334279187766, longitude: 116.31050146728515 },
+ northeast: { latitude: 40.0149408585477, longitude: 116.56799353271484 },
+ errMsg: 'getRegion:ok'
+ }
+ expect(regionRes).toEqual(expect.objectContaining(getRegionExpected));
+ });
+});
diff --git a/pages/API/map/map.uvue b/pages/API/map/map.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..e2d03bba1493882c09a60eadbfa7a2d9238f9a40
--- /dev/null
+++ b/pages/API/map/map.uvue
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/API/resize-observer/resize-observer.test.js b/pages/API/resize-observer/resize-observer.test.js
index 22160835196358c0332b10f71d7863294c9283e4..ad6de613af2bfc44912faf0f1d4dbf39d48b88f1 100644
--- a/pages/API/resize-observer/resize-observer.test.js
+++ b/pages/API/resize-observer/resize-observer.test.js
@@ -1,13 +1,5 @@
describe('api-resize-observer', () => {
- if (
- !process.env.uniTestPlatformInfo.startsWith('android') &&
- !process.env.uniTestPlatformInfo.startsWith('web')
- ) {
- it('dummyTest', async () => {
- expect(1).toBe(1)
- })
- return
- }
+
let page
beforeAll(async () => {
diff --git a/pages/API/resize-observer/resize-observer.uvue b/pages/API/resize-observer/resize-observer.uvue
index d2377add5f940a4bcfabd86e00dacaefc8f84f28..b8a60099211c4e2a87ec626ff4b3f07638486cf6 100644
--- a/pages/API/resize-observer/resize-observer.uvue
+++ b/pages/API/resize-observer/resize-observer.uvue
@@ -4,13 +4,15 @@
+ id="outBox" @click="outBoxClick">
-
+
+
+
蓝色方块元素:
@@ -34,7 +36,7 @@
boxDisplay: false,
outBoxElement: null as UniElement | null,
innerBoxElement: null as UniElement | null,
- resizeObserver: null as UniResizeObserver | null,
+ resizeObserver: null as UniResizeObserver | null,
outBoxElementOnResize: false
}
},
@@ -47,9 +49,10 @@
onReady() {
if (this.resizeObserver == null) {
this.resizeObserver = new UniResizeObserver((entries : Array) => {
+
entries.forEach(entry => {
if (entry.target == this.outBoxElement) {
- this.outBoxSizeInfo = this.analysisResizeObserverEntry(entry)
+ this.outBoxSizeInfo = this.analysisResizeObserverEntry(entry)
this.outBoxElementOnResize = true
} else if (entry.target == this.innerBoxElement) {
this.innerBoxSizeInfo = this.analysisResizeObserverEntry(entry)
@@ -63,7 +66,7 @@
this.innerBoxElement = uni.getElementById("innerBox")
if (this.innerBoxElement != null) {
this.resizeObserver!.observe(this.innerBoxElement!)
- }
+ }
this.boxDisplay = true
}
},
@@ -89,13 +92,13 @@
this.innerBoxElement!.style.setProperty("width", "80px")
this.innerBoxElement!.style.setProperty("height", "80px")
}
- },
- //自动化测试专用
- setOutBoxMarginLeft(value: string) {
- if (this.outBoxElement != null) {
- this.outBoxElementOnResize = false
- this.outBoxElement!.style.setProperty("margin-left", value)
- }
+ },
+ //自动化测试专用
+ setOutBoxMarginLeft(value : string) {
+ if (this.outBoxElement != null) {
+ this.outBoxElementOnResize = false
+ this.outBoxElement!.style.setProperty("margin-left", value)
+ }
},
toggleDisplay() {
this.boxDisplay = !this.boxDisplay
@@ -108,6 +111,15 @@
"contentBoxSize: \n{blockSize:" + contentBoxSize.blockSize + ", inlineSize:" + contentBoxSize.inlineSize + "}\n" +
"devicePixelContentBoxSize: \n{blockSize:" + devicePixelContentBoxSize.blockSize + ", inlineSize:" + devicePixelContentBoxSize.inlineSize + "}\n" +
"contentRect: \n{x:" + entry.contentRect.x + ", y:" + entry.contentRect.y + ", width:" + entry.contentRect.width + ", height:" + entry.contentRect.height + "}"
+ },
+ cancelListen(){
+ // this.resizeObserver?.unobserve()
+ this.resizeObserver!.unobserve(this.outBoxElement!)
+ this.resizeObserver!.unobserve(this.innerBoxElement!)
+ },
+ goOnListen(){
+ this.resizeObserver!.observe(this.outBoxElement!)
+ this.resizeObserver!.observe(this.innerBoxElement!)
}
}
}
diff --git a/pages/API/theme-change/theme-change.test.js b/pages/API/theme-change/theme-change.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0dcdb3a3dc236ac010c9c98c6e7c0c1a1e6c647d
--- /dev/null
+++ b/pages/API/theme-change/theme-change.test.js
@@ -0,0 +1,27 @@
+// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
+
+describe('API-theme-change', () => {
+
+ let page;
+ const isApp = process.env.UNI_OS_NAME === "android" || process.env.UNI_OS_NAME === "ios";
+
+ if (!isApp) {
+ it('dummyTest', () => {
+ expect(1).toBe(1)
+ })
+ return
+ }
+
+ beforeAll(async () => {
+ page = await program.reLaunch('/pages/API/theme-change/theme-change')
+ await page.waitFor(600);
+ });
+
+
+
+ it("check-set-app-theme", async () => {
+ await page.callMethod('setAppTheme', "dark")
+ await page.waitFor(300)
+ expect(await page.data('appTheme')).toBe("dark")
+ })
+});
diff --git a/pages/API/theme-change/theme-change.uvue b/pages/API/theme-change/theme-change.uvue
index 9c3b662aebad42b194792efba1834638b950496b..ad243c721ea5a75bf0292b852c2b81808e25d857 100644
--- a/pages/API/theme-change/theme-change.uvue
+++ b/pages/API/theme-change/theme-change.uvue
@@ -1,85 +1,107 @@
-
-
-
- theme:
- {{ dataInfo.theme }}
+
+
+
+ osTheme:
+ {{ osTheme }}
-
- fn1 trigger num:
- {{ dataInfo.fn1TriggerNum }}
+
+ appTheme:
+ {{ appTheme }}
-
- fn2 trigger num:
- {{ dataInfo.fn2TriggerNum }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/component/checkbox/checkbox.test.js b/pages/component/checkbox/checkbox.test.js
index dcc31fe22218a8d0ef1175799e0e48079bac0921..68231ce551339382e22b630ce33f2db355100c34 100644
--- a/pages/component/checkbox/checkbox.test.js
+++ b/pages/component/checkbox/checkbox.test.js
@@ -6,9 +6,16 @@ function getData(key = '') {
}
let page
+let originEventCallbackNum
+
beforeAll(async () => {
page = await program.reLaunch('/pages/component/checkbox/checkbox')
- await page.waitFor(2000);
+ await page.waitFor(2000)
+ originEventCallbackNum = await page.callMethod('getEventCallbackNum')
+})
+
+beforeEach(async () => {
+ await page.callMethod('setEventCallbackNum', 0)
})
describe('Checkbox.uvue', () => {
@@ -68,4 +75,10 @@ describe('Checkbox.uvue', () => {
})
expect(await cb.attribute('disabled')).toBe(false + '')
})
+ it('trigger UniCheckboxGroupChangeEvent', async () => {
+ const element = await page.$('.checkbox-item-0')
+ await element.tap()
+ const eventCallbackNum = await page.callMethod('getEventCallbackNum')
+ expect(eventCallbackNum - originEventCallbackNum).toBe(3)
+ })
})
diff --git a/pages/component/checkbox/checkbox.uvue b/pages/component/checkbox/checkbox.uvue
index 367abe37c9347e4c9e5cda4a94693e4b8c5ce03b..c409c87f76786978a5d92b144d17379de29b4b1d 100644
--- a/pages/component/checkbox/checkbox.uvue
+++ b/pages/component/checkbox/checkbox.uvue
@@ -1,4 +1,5 @@
-
-
diff --git a/pages/component/label/label.test.js b/pages/component/label/label.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..a102454f7dec711c634347152f98adbd6d2141d1
--- /dev/null
+++ b/pages/component/label/label.test.js
@@ -0,0 +1,44 @@
+let page;
+describe('label.uvue', () => {
+ console.log(process.env.uniTestPlatformInfo,process.env.uniTestPlatformInfo.startsWith('web'))
+ if (!process.env.uniTestPlatformInfo.startsWith('web')) {
+ it('app', () => {
+ expect(1).toBe(1)
+ })
+ return
+ }
+ beforeAll(async () => {
+ page = await program.reLaunch('/pages/component/label/label')
+ await page.waitFor('view');
+ });
+ afterEach(async() => {
+ await page.setData({
+ checkboxValue: [],
+ radioValue:''
+ })
+ });
+ function getData(key = '') {
+ return new Promise(async (resolve, reject) => {
+ const data = await page.data()
+ resolve(key ? data[key] : data)
+ })
+ }
+ it('表单组件在label内', async () => {
+ expect(await getData('checkboxValue')).toEqual([])
+ const checkboxItems = await page.$$('.checkboxItemsTest')
+ await checkboxItems[0].tap()
+ expect(await getData('checkboxValue')).toEqual(['USA', 'CHN'])
+ })
+ it('label用for标识表单组件', async () => {
+ const radioItems = await page.$$('.label-2-text')
+ await radioItems[0].tap()
+ expect(await getData('radioValue')).toEqual('USA')
+ await radioItems[1].tap()
+ expect(await getData('radioValue')).toEqual('CHN')
+ })
+ it('label内有多个时选中第一个', async () => {
+ const labelText = await page.$('.uni-center')
+ await labelText.tap()
+ expect(await getData('checkboxValue')).toEqual([''])
+ })
+})
diff --git a/pages/component/label/label.uvue b/pages/component/label/label.uvue
index 89cb49f851253a165e67e17c60bf1025f309bacb..d236ba0a6a19c2bf0de5e6efe494ccc9ddd8f620 100644
--- a/pages/component/label/label.uvue
+++ b/pages/component/label/label.uvue
@@ -5,7 +5,7 @@
表单组件在label内
-
-
-
-
+ radio_change_confirm_type(checked : number) { this.confirm_type_current = checked }
+ }
+}
+
+
+
@@ -86,17 +87,17 @@ export default {
@focus="textarea_focus"
style="padding: 10px; border: 1px solid #666;height: 200px"
/>
-
-
-
-
+
+
+
-
+ >
+
-
-
+
+
+ 同时存在 v-model 和 value
+
+
+
+
-
-
-
-
+}
+
+.main .list-item {
+ width: 100%;
+ height: 100px;
+ border: 1px solid #666;
+}
+
diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue
index 1d74ded7dd5cbfb7a61776ecab17c7e5e837d098..ab20cc972070caeaff7b7f7f86aa0024c28bc9c2 100644
--- a/pages/tabBar/API.uvue
+++ b/pages/tabBar/API.uvue
@@ -85,11 +85,17 @@
name: '获取启动参数',
url: 'get-launch-options-sync',
},
+ // #ifndef WEB
+ {
+ name: 'env环境变量',
+ url: 'env'
+ },
+ // #endif
// #ifdef APP-ANDROID
{
name: '退出应用',
url: 'exit',
- },
+ }
// #endif
] as Page[],
},
@@ -166,12 +172,10 @@
api: ["Element.takeSnapshot"]
},
// #endif
- // #ifdef APP-ANDROID || WEB
{
name: 'element大小变化监听',
url: 'resize-observer'
},
- // #endif
{
name: 'node节点',
url: 'nodes-info',
@@ -277,10 +281,13 @@
url: 'install-apk'
},
// #endif
- /* {
+ // #ifdef WEB
+ {
name: "打电话",
url: "make-phone-call",
},
+ // #endif
+ /*
{
name: "震动",
url: "vibrate",
@@ -384,10 +391,13 @@
url: 'compress-video'
},
// #endif
- /* {
+ // #ifdef WEB
+ {
name: "音频",
url: "inner-audio",
},
+ // #endif
+ /*
{
name: "背景音频",
url: "background-audio",
@@ -411,6 +421,12 @@
name: '获取当前位置',
url: 'get-location',
},
+ // #ifdef WEB
+ {
+ name: "地图控制",
+ url: "map",
+ },
+ // #endif
/* {
name: "使用地图查看位置",
url: "open-location",
@@ -419,10 +435,6 @@
name: "使用地图选择位置",
url: "choose-location",
},
- {
- name: "地图控制",
- url: "map",
- },
{
name: "地图搜索",
url: "map-search",
@@ -448,7 +460,7 @@
{
name: 'fileSystemManager文件管理',
url: 'get-file-system-manager'
- },
+ }
] as Page[],
},
// #endif
@@ -488,6 +500,16 @@
url: 'facial-recognition-verify',
}
] as Page[],
+ },
+ {
+ id: 'theme-change',
+ name: '主题切换',
+ pages: [
+ {
+ name: '主题切换',
+ url: 'theme-change',
+ }
+ ] as Page[]
},
// #endif
{
@@ -534,16 +556,6 @@
}
] as Page[]
},
- {
- id: 'theme-change',
- name: '主题切换',
- pages: [
- {
- name: '主题切换',
- url: 'theme-change',
- }
- ] as Page[]
- },
// #endif
/*
{
diff --git a/pages/tabBar/template.uvue b/pages/tabBar/template.uvue
index 7c66fb5718ed1d2366584a4470d946b641f11b0c..017ceb37b989971086f65d7b1e79f7726c1bc0b4 100644
--- a/pages/tabBar/template.uvue
+++ b/pages/tabBar/template.uvue
@@ -184,16 +184,16 @@
open: false,
pages: [] as Page[],
},
+ // #endif
{
id: 'schema',
url: 'schema',
name: '打开外部链接',
open: false,
pages: [] as Page[],
- }
- // #endif
+ },
// #ifdef APP-ANDROID
- ,{
+ {
id: 'share',
url: 'share',
name: '分享示例',
diff --git a/pages/template/navbar-lite/navbar-lite.uvue b/pages/template/navbar-lite/navbar-lite.uvue
index 1b06e34aa8b04f88e70905ca5de773b4af281869..10bb859c5bd3e2a446dfaad79b6295e9657f2eec 100644
--- a/pages/template/navbar-lite/navbar-lite.uvue
+++ b/pages/template/navbar-lite/navbar-lite.uvue
@@ -37,7 +37,7 @@
-
+
diff --git a/pages/template/schema/schema.uvue b/pages/template/schema/schema.uvue
index 9ff5aaea52cbcb141c732afc177ee600275e9be5..9e0b05fe796ab23a98ac4abf05c2a1f8c92603b4 100644
--- a/pages/template/schema/schema.uvue
+++ b/pages/template/schema/schema.uvue
@@ -1,6 +1,8 @@
+
+
@@ -23,4 +32,12 @@ import { openSchema } from '@/uni_modules/uts-openSchema'
.button {
margin: 15px;
}
+ .tip {
+ padding: 8px;
+ }
+ .link {
+ color: #7A7E83;
+ font-size: 14px;
+ line-height: 20px;
+ }
diff --git a/static/fonts/icon-star.ttf b/static/fonts/icon-star.ttf
index a71175d47be0f4eb0421b4be5d00226bf654f06a..8e199387b3e4f0c2b42c1e3b8845ae093cbf806a 100644
Binary files a/static/fonts/icon-star.ttf and b/static/fonts/icon-star.ttf differ
diff --git a/static/test-audio/ForElise.mp3 b/static/test-audio/ForElise.mp3
new file mode 100644
index 0000000000000000000000000000000000000000..fd1e9b0cbc55775e73f54a6c728d806c10a383b4
Binary files /dev/null and b/static/test-audio/ForElise.mp3 differ
diff --git a/store/index.uts b/store/index.uts
index df8e5b1abc8146235497420ab7b417005dc88b62..b6dda9cf9fbbfad1ec81c076a64c7433288be81e 100644
--- a/store/index.uts
+++ b/store/index.uts
@@ -14,12 +14,15 @@ type State = {
safeArea : SafeArea
// 设备像素比
devicePixelRatio : number
+ // 事件判断回调
+ eventCallbackNum: number
}
export const state = reactive({
lifeCycleNum: 0,
statusBarHeight: 0,
- devicePixelRatio: 1,
+ devicePixelRatio: 1,
+ eventCallbackNum: 0,
safeArea: {
top: 0,
right: 0,
@@ -32,6 +35,10 @@ 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) => {
@@ -45,3 +52,4 @@ export const setSafeArea = (value : SafeArea) => {
export const setDevicePixelRatio = (devicePixelRatio : number) => {
state.devicePixelRatio = devicePixelRatio
}
+
diff --git a/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts b/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts
index 9f0b83c4e53a1a27957eb4b291cf3b1fc032f7d8..367327bc4b5742930361d84b66eecceb9fa48033 100644
--- a/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts
+++ b/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts
@@ -31,12 +31,13 @@ declare interface Uni {
/**
* 获取设备电量
*
- * 文档: [https://uniapp.dcloud.net.cn/api/system/batteryInfo.html](https://uniapp.dcloud.net.cn/api/system/batteryInfo.html)
+ * @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html
*/
getBatteryInfo(option?: UniNamespace.GetBatteryInfoOption): void;
/**
* 同步获取电池电量信息
+ * @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html
*/
getBatteryInfoSync(): UniNamespace.GetBatteryInfoSuccessCallbackResult;
}
diff --git a/uni_modules/uts-openSchema/utssdk/web/index.uts b/uni_modules/uts-openSchema/utssdk/web/index.uts
new file mode 100644
index 0000000000000000000000000000000000000000..e74c53cee9b797bc5020e6cd5ba0b67c5c796acd
--- /dev/null
+++ b/uni_modules/uts-openSchema/utssdk/web/index.uts
@@ -0,0 +1,5 @@
+import { OpenSchema } from '../interface.uts'
+
+export const openSchema: OpenSchema = function(url: string): void {
+ location.href = url;
+}