4 changed files with 33 additions and 2 deletions
@ -0,0 +1,10 @@ |
|||||
|
{ |
||||
|
"preview": { |
||||
|
"scope": "markdown", |
||||
|
"prefix": "v-preview", |
||||
|
"body": [ |
||||
|
"<preview path=\"./demo.vue\" title=\"\" description=\"\"></preview>" |
||||
|
], |
||||
|
"description": "vitepress中demo预览" |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<n-button @click="clickFn">点击</n-button> |
||||
|
<div> |
||||
|
<h4>输出结果</h4> |
||||
|
<div v-for="(item, index) in result" :key="index"> |
||||
|
{{ item }} |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { debounce } from "@xyx-utils/core/debounce"; |
||||
|
import { ref } from "vue"; |
||||
|
|
||||
|
const result = ref([]) |
||||
|
const clickFn = debounce(()=>{ |
||||
|
result.value.push("poll") |
||||
|
}, 1000) |
||||
|
</script> |
||||
|
<style lang="scss" scoped></style> |
Loading…
Reference in new issue