mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-07 17:48:34 +08:00
Merge pull request #7 from UphkcRNqmafQWcSSSSSS/master
fix: 🐛 修复Cell 单格组件 is-link 不触发 click
This commit is contained in:
commit
6c419c7a1b
@ -103,12 +103,13 @@ const emit = defineEmits(['click'])
|
|||||||
*/
|
*/
|
||||||
function onClick() {
|
function onClick() {
|
||||||
const url = props.to
|
const url = props.to
|
||||||
|
|
||||||
|
if (props.clickable || props.isLink) {
|
||||||
|
emit('click')
|
||||||
|
}
|
||||||
if (url && props.isLink) {
|
if (url && props.isLink) {
|
||||||
;(uni as any)[props.replace ? 'redirectTo' : 'navigateTo']({ url })
|
;(uni as any)[props.replace ? 'redirectTo' : 'navigateTo']({ url })
|
||||||
}
|
}
|
||||||
if (props.clickable) {
|
|
||||||
emit('click')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user