分页 组件 按钮 组件 快速回到 顶部 方法

This commit is contained in:
Ls
2026-04-29 14:19:25 +08:00
parent ed38058f91
commit 52ad7e79ec
4 changed files with 71 additions and 72 deletions

View File

@@ -1,5 +1,5 @@
<template>
<button @click="">{{ text }}</button>
<button class="but" @click="handleClick">{{ text }}</button>
</template>
<script lang="ts" setup>
// 1. 定义接收父组件传来的参数 props
@@ -14,4 +14,16 @@ const handleClick = (): any => {
emit('click')
}
</script>
</script>
<style>
.but {
text-decoration: underline;
color: #1e5494;
font-size: 18px;
cursor: pointer;
background: none;
border: none;
}
</style>