docs: update docs

This commit is contained in:
vben
2024-07-07 23:52:19 +08:00
parent e68e1b40ce
commit 6147d13a29
13 changed files with 113 additions and 33 deletions

View File

@@ -1,4 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue';
import { $t } from '@vben-core/locales';
import InputItem from '../input-item.vue';
@@ -8,6 +10,8 @@ defineOptions({
name: 'PreferenceBreadcrumbConfig',
});
const props = defineProps<{ disabled: boolean }>();
const copyrightEnable = defineModel<boolean>('copyrightEnable');
const copyrightDate = defineModel<string>('copyrightDate');
const copyrightIcp = defineModel<string>('copyrightIcp');
@@ -16,27 +20,29 @@ const copyrightCompanyName = defineModel<string>('copyrightCompanyName');
const copyrightCompanySiteLink = defineModel<string>(
'copyrightCompanySiteLink',
);
const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
</script>
<template>
<SwitchItem v-model="copyrightEnable">
<SwitchItem v-model="copyrightEnable" :disabled="disabled">
{{ $t('preferences.copyright.enable') }}
</SwitchItem>
<InputItem v-model="copyrightCompanyName" :disabled="!copyrightEnable">
<InputItem v-model="copyrightCompanyName" :disabled="itemDisabled">
{{ $t('preferences.copyright.company-name') }}
</InputItem>
<InputItem v-model="copyrightCompanySiteLink" :disabled="!copyrightEnable">
<InputItem v-model="copyrightCompanySiteLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.company-site-link') }}
</InputItem>
<InputItem v-model="copyrightDate" :disabled="!copyrightEnable">
<InputItem v-model="copyrightDate" :disabled="itemDisabled">
{{ $t('preferences.copyright.date') }}
</InputItem>
<InputItem v-model="copyrightIcp" :disabled="!copyrightEnable">
<InputItem v-model="copyrightIcp" :disabled="itemDisabled">
{{ $t('preferences.copyright.icp') }}
</InputItem>
<InputItem v-model="copyrightIcpLink" :disabled="!copyrightEnable">
<InputItem v-model="copyrightIcpLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.icp-link') }}
</InputItem>
</template>

View File

@@ -351,6 +351,7 @@ async function handleReset() {
v-model:copyright-enable="copyrightEnable"
v-model:copyright-icp="copyrightIcp"
v-model:copyright-icp-link="copyrightIcpLink"
:disabled="!footerEnable"
/>
</Block>
</template>