分页 组件 按钮 组件 快速回到 顶部 方法
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user