primevue-mirror/pages/chips/index.vue

56 lines
1.4 KiB
Vue
Raw Normal View History

2022-09-09 20:41:18 +00:00
<template>
<div>
<div class="content-section introduction">
<div class="feature-intro">
<h1>Chips</h1>
<p>Chips is used to enter multiple values on an input field.</p>
</div>
<AppDemoActions />
</div>
<div class="content-section implementation p-fluid">
<div class="card">
<h5>Basic</h5>
<Chips v-model="value1" />
<h5>Comma Separator</h5>
<Chips v-model="value2" separator="," />
2022-12-08 12:26:57 +00:00
<h5>RegExp Separator</h5>
<Chips v-model="value3" :separator="separatorExp" />
2022-09-09 20:41:18 +00:00
<h5>Template</h5>
2022-12-08 12:26:57 +00:00
<Chips v-model="value4">
2022-09-09 20:41:18 +00:00
<template #chip="slotProps">
<div>
<span>{{ slotProps.value }} - (active) </span>
<i class="pi pi-user-plus" style="font-size: 14px"></i>
</div>
</template>
</Chips>
</div>
</div>
<ChipsDoc />
</div>
</template>
<script>
import ChipsDoc from './ChipsDoc';
export default {
data() {
return {
value1: null,
value2: null,
2022-12-08 12:26:57 +00:00
value3: null,
value4: null,
separatorExp: /,| /
2022-09-09 20:41:18 +00:00
};
},
components: {
ChipsDoc: ChipsDoc
}
};
</script>