mirror of
https://github.com/keven1024/015.git
synced 2026-06-04 19:39:36 +00:00
feat(frontend): enhance SelectField and Tiptap components with improved class handling and word count display
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectLabel,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/components/ui/select'
|
||||
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from '@/components/ui/select'
|
||||
import type { RuleExpression } from 'vee-validate'
|
||||
type SelectValue = string | number
|
||||
const props = defineProps<{
|
||||
@@ -19,13 +11,14 @@ const props = defineProps<{
|
||||
label?: string
|
||||
value: SelectValue
|
||||
}[]
|
||||
class?: string
|
||||
}>()
|
||||
const { value } = useField<SelectValue>(props.name, props?.rules)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Select v-model="value">
|
||||
<SelectTrigger>
|
||||
<SelectTrigger :class="class">
|
||||
<SelectValue :placeholder="placeholder" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -37,4 +30,4 @@ const { value } = useField<SelectValue>(props.name, props?.rules)
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user