This commit is contained in:
xiaoma
2022-11-24 09:19:19 +08:00
parent a646de72e2
commit 25d6134923
11 changed files with 2389 additions and 2623 deletions

View File

@@ -1,17 +1,19 @@
<template>
<div class="card content-box">
<n-card>
<n-input placeholder="请输入内容" v-model:value="data" style="width: 500px"> </n-input>
<n-card :bordered="false" title="复制指令">
<n-space>
<n-input placeholder="输入内容试试" v-model:value="data" style="width: 350px" />
<n-button v-copy="data" type="primary" @click="a"> </n-button>
</n-space>
</n-card>
<n-card>
<n-button v-copy="data" type="primary" @click="a">复制</n-button>
<n-card :bordered="false" title="防抖指令" class="mt-3">
<n-button type="primary" v-debounce="b">防抖测试</n-button>
</n-card>
<n-card>
<n-button type="primary" v-debounce="b">防抖按钮</n-button>
</n-card>
<n-card>
<n-button type="primary" v-throttle="c">节流按钮</n-button>
<n-card :bordered="false" title="节流指令" class="mt-3">
<n-button type="primary" v-throttle="c">节流测试</n-button>
</n-card>
<n-card :bordered="false" title="拖拽指令" class="mt-3"> 鼠标放到矩形上面拖拽试试 </n-card>
<div class="box" v-draggable> </div>
</div>
</template>
@@ -46,9 +48,11 @@
.box {
width: 100px;
height: 100px;
background-color: red;
background-color: #2d8cf0;
position: absolute;
z-index: 10000000;
border-radius: 10px;
margin: 20px 5px;
}
}
</style>