2025-01-04 11:01:02 +00:00
|
|
|
<script setup>
|
|
|
|
import { computed, ref } from 'vue'
|
|
|
|
|
|
|
|
import Pills from '~/components/ui/Pills.vue';
|
|
|
|
import Layout from '~/components/ui/Layout.vue';
|
2025-01-04 13:34:49 +00:00
|
|
|
import Input from '~/components/ui/Input.vue';
|
|
|
|
|
|
|
|
const nullModel = ref({
|
|
|
|
current: [],
|
|
|
|
others: []
|
|
|
|
});
|
2025-01-04 11:01:02 +00:00
|
|
|
|
|
|
|
const staticModel = ref({
|
2025-01-04 13:34:49 +00:00
|
|
|
current: ["#Noise", "#FieldRecording", "#Experiment"]
|
2025-01-04 11:01:02 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const interactiveModel = ref({
|
2025-01-04 13:34:49 +00:00
|
|
|
current: ["#Noise", "#FieldRecording", "#Experiment"],
|
|
|
|
others: ["#Melody", "#Rhythm"]
|
2025-01-04 11:01:02 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2025-01-10 00:13:17 +00:00
|
|
|
```ts
|
|
|
|
import Pills from "~/components/ui/Pills.vue"
|
|
|
|
```
|
|
|
|
|
2025-01-04 11:01:02 +00:00
|
|
|
# Pills
|
|
|
|
|
2025-01-15 09:35:43 +00:00
|
|
|
```vue-html
|
2025-01-16 08:31:31 +00:00
|
|
|
<Pills v-model="staticModel" label="Tags" />
|
2025-01-15 09:35:43 +00:00
|
|
|
```
|
|
|
|
|
2025-01-04 11:01:02 +00:00
|
|
|
<Layout class="preview" style="padding:16px">
|
|
|
|
<Pills v-model="staticModel" label="Tags" />
|
|
|
|
</Layout>
|
|
|
|
|
|
|
|
Select a set of pills from presets, and add and remove custom ones
|
|
|
|
|
2025-01-15 09:35:43 +00:00
|
|
|
```vue-html
|
2025-01-16 08:31:31 +00:00
|
|
|
<Pills v-model="interactiveModel" label="Tags" />
|
|
|
|
<Input label="Label" placeholder="Placeholder"></Input>
|
2025-01-15 09:35:43 +00:00
|
|
|
```
|
|
|
|
|
2025-01-04 11:01:02 +00:00
|
|
|
<Layout class="preview" style="padding:16px">
|
|
|
|
<Pills v-model="interactiveModel" label="Tags" />
|
2025-01-04 13:34:49 +00:00
|
|
|
<Input label="Label" placeholder="Placeholder"></Input>
|
|
|
|
</Layout>
|
|
|
|
|
|
|
|
## No pills
|
|
|
|
|
2025-01-15 09:35:43 +00:00
|
|
|
```vue-html
|
2025-01-16 08:31:31 +00:00
|
|
|
<Pills v-model="nullModel" />
|
2025-01-15 09:35:43 +00:00
|
|
|
```
|
|
|
|
|
2025-01-04 13:34:49 +00:00
|
|
|
<Layout class="preview" style="padding:16px">
|
2025-01-16 08:31:31 +00:00
|
|
|
<Pills v-model="nullModel" />
|
2025-01-04 11:01:02 +00:00
|
|
|
</Layout>
|