Merge pull request #7 from UphkcRNqmafQWcSSSSSS/master

fix: 🐛 修复Cell 单格组件 is-link 不触发 click
This commit is contained in:
weisheng 2023-08-25 17:15:24 +08:00 committed by GitHub
commit 6c419c7a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,12 +103,13 @@ const emit = defineEmits(['click'])
*/
function onClick() {
const url = props.to
if (props.clickable || props.isLink) {
emit('click')
}
if (url && props.isLink) {
;(uni as any)[props.replace ? 'redirectTo' : 'navigateTo']({ url })
}
if (props.clickable) {
emit('click')
}
}
</script>