mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(FloatingBubble): use component attrs (#12171)
* feat(FloatingBubble): use component attrs * feat(FloatingBubble): use component attrs
This commit is contained in:
parent
44d767e64f
commit
e2f041fe0a
@ -63,11 +63,13 @@ const [name, bem] = createNamespace('floating-bubble');
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name,
|
name,
|
||||||
|
|
||||||
|
inheritAttrs: false,
|
||||||
|
|
||||||
props: floatingBubbleProps,
|
props: floatingBubbleProps,
|
||||||
|
|
||||||
emits: ['click', 'update:offset', 'offsetChange'],
|
emits: ['click', 'update:offset', 'offsetChange'],
|
||||||
|
|
||||||
setup(props, { slots, emit }) {
|
setup(props, { slots, emit, attrs }) {
|
||||||
const rootRef = ref<HTMLDivElement>();
|
const rootRef = ref<HTMLDivElement>();
|
||||||
|
|
||||||
const state = ref({
|
const state = ref({
|
||||||
@ -224,6 +226,7 @@ export default defineComponent({
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
style={rootStyle.value}
|
style={rootStyle.value}
|
||||||
v-show={show.value}
|
v-show={show.value}
|
||||||
|
{...attrs}
|
||||||
>
|
>
|
||||||
{slots.default ? (
|
{slots.default ? (
|
||||||
slots.default()
|
slots.default()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user