提交 43dea5a5 编写于 作者: Q qiang

fix: 优化 label 组件鼠标显示效果

上级 1824c748
<template>
<uni-label
:class="{'uni-label-pointer':pointer}"
v-on="$listeners"
@click="_onClick">
<slot />
......@@ -18,6 +19,11 @@ export default {
default: ''
}
},
computed: {
pointer () {
return this.for || (this.$slots.default && this.$slots.default.length)
}
},
methods: {
_onClick ($event) {
let stopPropagation = /^uni-(checkbox|radio|switch)-/.test($event.target.className)
......@@ -38,5 +44,7 @@ export default {
}
</script>
<style>
</style>
.uni-label-pointer {
cursor: pointer;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册