primevue-mirror/pages/chips/index.vue

61 lines
1.6 KiB
Vue
Raw Normal View History

2022-09-09 20:41:18 +00:00
<template>
<div>
2022-12-19 11:57:07 +00:00
<Head>
<Title>Vue Chips Component</Title>
<Meta name="description" content="Chips is used to enter multiple values on an input field." />
</Head>
2022-09-09 20:41:18 +00:00
<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>