<script setup lang="ts">
const xxx = () => {
console.log("我是xxx");
};
const event = "click";
</script>
<template>
<div>
<button @[event]="xxx">尽情的点击我</button>
</div>
</template>
vue 动态设置点击事件 动态设置属性 []
猜你喜欢
转载自blog.csdn.net/mp624183768/article/details/128597792
今日推荐
周排行