mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
refactor(front): simplify MarkdownInputField by directly using v-model with Tiptap for cleaner code
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<Field :name="name" v-slot="{ field }" :rules="rules">
|
||||
<Tiptap :modelValue="field.value" @update:modelValue="field.onChange" v-bind="$attrs" />
|
||||
</Field>
|
||||
<Tiptap v-model="value" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -11,4 +9,5 @@ const props = defineProps<{
|
||||
name: string
|
||||
rules?: string
|
||||
}>()
|
||||
const { value, } = useField<string>(props.name, props.rules)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user