-
Notifications
You must be signed in to change notification settings - Fork 19
/
docs.vue
47 lines (39 loc) · 1.04 KB
/
docs.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template lang="html">
<div class="container col-4 col-xl-6 col-md-8 col-sm-10 col-xs-12">
<h1 class="text-center">v-debounce</h1>
<p class="text-center">
Micro directive to delay input typing.
</p>
<p class="text-center">
<code><pre><input v-model.lazy="sample" v-debounce="delay" /></pre></code>
</p>
<p>
<input v-debounce="delay" v-model.lazy="sample" class="form-input input-lg" />
</p>
<p class="label label-primary">
{{sample}}
</p>
<p>
<label class="form-label">Delay</label>
<input type="number" v-model.number="delay" class="form-input input-sm" />
</p>
<p class="text-center">
<a class="btn" href="https://github.com/vuejs-tips/v-debounce">https://github.com/vuejs-tips/v-debounce</a>
</p>
</div>
</template>
<script>
import debounce from './index'
export default {
data () {
return {
sample: 'sample',
delay: 500
}
},
directives: {debounce}
}
</script>
<style>
@import url('https://cdnjs.cloudflare.com/ajax/libs/spectre.css/0.2.14/spectre.min.css');
</style>