提交 87ca7eb1 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(getLaunchOptionsSync): 优化示例

上级 e3c001fd
......@@ -14,7 +14,7 @@ export default {
data() {
return {
checked: false,
homePagePath: '/pages/tabBar/component',
homePagePath: 'pages/tabBar/component',
launchOptionsPath: '',
}
},
......@@ -22,7 +22,8 @@ export default {
getLaunchOptionsSync() {
const launchOptions = uni.getLaunchOptionsSync()
this.launchOptionsPath = launchOptions.path
if (launchOptions.path === this.homePagePath || `/${launchOptions.path}` === this.homePagePath) {
if (launchOptions.path == this.homePagePath) {
this.checked = true
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册