提交 0e198534 编写于 作者: DCloud-yyl's avatar DCloud-yyl

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

上级 6fc61bf8
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<button class="privacy-button" type="primary" @tap="resetPrivacyAuthorization"> <button class="privacy-button" type="primary" @tap="resetPrivacyAuthorization">
重置隐私协议授权状态 重置隐私协议授权状态
</button> </button>
<button class="privacy-button" @tap="openPrivacyDialog">
显示隐私政策弹框
</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -63,6 +66,11 @@ ...@@ -63,6 +66,11 @@
}, },
resetPrivacyAuthorization(){ resetPrivacyAuthorization(){
uni.resetPrivacyAuthorization() uni.resetPrivacyAuthorization()
},
openPrivacyDialog(){
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
} }
} }
} }
......
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
uni.navigateTo({ uni.navigateTo({
url: 'buttonstatus', url: 'buttonstatus',
}) })
},
openPrivacyDialog() {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
}, },
//用于自动化测试 //用于自动化测试
checkUniButtonElement() : boolean { checkUniButtonElement() : boolean {
...@@ -71,7 +76,10 @@ ...@@ -71,7 +76,10 @@
<enum-data :items="type_enum" title="按钮的类型" @change="radio_change_type_enum"></enum-data> <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> <input-data :defaultValue="text" title="按钮的文案" type="text" @confirm="confirm_text_input"></input-data>
<view style="height: 10px;"></view> <view style="height: 10px;"></view>
<button @click="navigateToChild">更多示例</button> <button @click="openPrivacyDialog">open-type实现隐私政策弹框</button>
<view style="height: 10px;"></view>
<button @click="navigateToChild">更多示例</button>
<view style="height: 10px;"></view>
</view> </view>
</scroll-view> </scroll-view>
</template> </template>
......
...@@ -79,11 +79,7 @@ ...@@ -79,11 +79,7 @@
goPage(url : string) { goPage(url : string) {
if (url == '/set-tab-bar') { if (url == '/set-tab-bar') {
this.showPop() this.showPop()
}else if (url == '/show-privacy-dialog') { }else {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
} else {
if (this.hasLeftWin) { if (this.hasLeftWin) {
uni.reLaunch({ url }) uni.reLaunch({ url })
} else { } else {
...@@ -137,4 +133,4 @@ ...@@ -137,4 +133,4 @@
display: none; display: none;
background-color: rgba(16, 16, 16, 0.5); background-color: rgba(16, 16, 16, 0.5);
} }
</style> </style>
...@@ -158,16 +158,5 @@ function addSetTabBarPage(menuItem : MenuItem) { ...@@ -158,16 +158,5 @@ function addSetTabBarPage(menuItem : MenuItem) {
group: null, group: null,
items: [] items: []
} as MenuItem) } 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.
先完成此消息的编辑!
想要评论请 注册