Showing
1 changed file
with
11 additions
and
2 deletions
| ... | ... | @@ -13,6 +13,7 @@ import { useMessage } from '@/hooks/web/useMessage' |
| 13 | 13 | import type { NodeDataActJsonType, NodeDataEventJsonType } from '@/api/node/model' |
| 14 | 14 | import { PackageCategoryEnum } from '@/core/Library/enum' |
| 15 | 15 | import { useContentDataStoreWithOut } from '@/store/modules/contentData' |
| 16 | +import { BasicHelp } from '@/components/Basic' | |
| 16 | 17 | |
| 17 | 18 | const props = defineProps<ConfigComponentProps>() |
| 18 | 19 | |
| ... | ... | @@ -83,6 +84,11 @@ const validatePassword = () => { |
| 83 | 84 | return operationPassword.value ? Promise.resolve(operationPassword) : Promise.reject(new Error('请输入操作密码')) |
| 84 | 85 | } |
| 85 | 86 | |
| 87 | +const getSetPasswordStatus = computed(() => { | |
| 88 | + const data = unref(getNodeData)?.eventJson?.SINGLE | |
| 89 | + return !data | |
| 90 | +}) | |
| 91 | + | |
| 86 | 92 | const { savePageContent } = useSavePageContent() |
| 87 | 93 | const handleSave = async () => { |
| 88 | 94 | loading.value = true |
| ... | ... | @@ -161,8 +167,11 @@ createPublicFormContext(nodeDataActinType) |
| 161 | 167 | </Divider> |
| 162 | 168 | <DataEvents ref="dataEventsElRef" :before-click="handleBeforeOpenEventOrActModal" :form-setting="getFormSetting" /> |
| 163 | 169 | <div v-if="getCellInfo.category === PackageCategoryEnum.CONTROL" class="flex flex-col justify-center passwordInput" :class="getFormSetting?.actSetting === false && 'mb-4'"> |
| 164 | - <Checkbox v-model:checked="operationPassword.checked"> | |
| 165 | - {{ operationPassword.label }} | |
| 170 | + <Checkbox v-model:checked="operationPassword.checked" :disabled="getSetPasswordStatus"> | |
| 171 | + <div class="flex"> | |
| 172 | + {{ operationPassword.label }} | |
| 173 | + <BasicHelp class="ml-1" text="操作密码: 需完成单击事件交互。" /> | |
| 174 | + </div> | |
| 166 | 175 | </Checkbox> |
| 167 | 176 | <Form> |
| 168 | 177 | <FormItem :validate-status="getValidateStatus(operationPassword.value)"> | ... | ... |