primevue-mirror/doc/knob/TemplateDoc.vue

52 lines
1.1 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Label is a string template that can be customized with the <i>valueTemplate</i> property having <i>60</i> as the placeholder .</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Knob v-model="value" valueTemplate="{value}%" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: 60,
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Knob v-model="value" valueTemplate="{value}%" />`,
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<Knob v-model="value" valueTemplate="{value}%" />
</div>
</template>
<script>
export default {
data() {
return {
value: 60
}
}
};
<\/script>`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<Knob v-model="value" valueTemplate="{value}%" />
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(60);
<\/script>`
}
};
}
};
</script>