This commit is contained in:
@ -111,7 +111,7 @@ onMounted(() => {
|
||||
:help="`现在 confirmName 的值是:${attributes?.confirmName}`"
|
||||
some-attr="some-attr-value"
|
||||
>
|
||||
<template #label="{ classes, attrs, label, node: nameNode }">
|
||||
<template #label="{ classes, attrs, label, node: nameNode, value }">
|
||||
<!-- <pre
|
||||
class="font-mono text-sm p-4 bg-slate-100 mb-4">{{ JSON.stringify({ classes, attrs, label }, null, 2) }}</pre> -->
|
||||
<label
|
||||
@ -121,8 +121,11 @@ onMounted(() => {
|
||||
>{{ label }}<button
|
||||
class="ml-2 px-2 py-1 bg-blue-500 text-white rounded"
|
||||
type="button"
|
||||
@click="nameNode?.input('测试')"
|
||||
>点击赋值</button>
|
||||
@click="
|
||||
!value?.includes('测试')
|
||||
? nameNode?.input('测试')
|
||||
: nameNode?.input('')"
|
||||
>点击{{ value?.includes('测试') ? '清空' : '填充' }}</button>
|
||||
</label>
|
||||
</template>
|
||||
</FormKit>
|
||||
@ -132,7 +135,7 @@ onMounted(() => {
|
||||
:preserve="false"
|
||||
name="confirmName"
|
||||
type="checkbox"
|
||||
:value="false"
|
||||
:value="true"
|
||||
:label="`如果清空 name 输入框,这个确认框及其值将被移除。`"
|
||||
/>
|
||||
|
||||
|
Reference in New Issue
Block a user