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