提交 61d08e17 编写于 作者: DCloud-yyl's avatar DCloud-yyl

将隐私政策弹框示例入口跳转到button和privacy页面

上级 ca7b4ad6
......@@ -15,6 +15,9 @@
<button class="privacy-button" type="primary" @tap="resetPrivacyAuthorization">
重置隐私协议授权状态
</button>
<button class="privacy-button" @tap="openPrivacyDialog">
显示隐私政策弹框
</button>
</view>
</view>
</template>
......@@ -63,6 +66,11 @@
},
resetPrivacyAuthorization(){
uni.resetPrivacyAuthorization()
},
openPrivacyDialog(){
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
}
}
}
......
......@@ -39,6 +39,11 @@
url: 'buttonstatus',
})
},
openPrivacyDialog() {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
},
//用于自动化测试
checkUniButtonElement() : boolean {
const button = uni.getElementById("testButton")
......@@ -71,7 +76,10 @@
<enum-data :items="type_enum" title="按钮的类型" @change="radio_change_type_enum"></enum-data>
<input-data :defaultValue="text" title="按钮的文案" type="text" @confirm="confirm_text_input"></input-data>
<view style="height: 10px;"></view>
<button @click="openPrivacyDialog">open-type实现隐私政策弹框</button>
<view style="height: 10px;"></view>
<button @click="navigateToChild">更多示例</button>
<view style="height: 10px;"></view>
</view>
</scroll-view>
</template>
......
......@@ -79,11 +79,7 @@
goPage(url : string) {
if (url == '/set-tab-bar') {
this.showPop()
}else if (url == '/show-privacy-dialog') {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
} else {
}else {
if (this.hasLeftWin) {
uni.reLaunch({ url })
} else {
......
......@@ -158,16 +158,5 @@ function addSetTabBarPage(menuItem : MenuItem) {
group: null,
items: []
} as MenuItem)
menuItem.items.push({
id: 'show-privacy-dialog',
name: '隐私政策',
index: 0,
path: 'show-privacy-dialog',
style: {
navigationBarTitleText: '隐私政策弹框'
},
group: null,
items: []
} as MenuItem)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册