admin-vben5/packages/effects/layouts/src/widgets/preferences/blocks/layout/copyright.vue

49 lines
1.6 KiB
Vue
Raw Normal View History

<script setup lang="ts">
2024-07-07 23:52:19 +08:00
import { computed } from 'vue';
import { $t } from '@vben/locales';
import InputItem from '../input-item.vue';
import SwitchItem from '../switch-item.vue';
defineOptions({
name: 'PreferenceCopyrightConfig',
});
2024-07-07 23:52:19 +08:00
const props = defineProps<{ disabled: boolean }>();
const copyrightEnable = defineModel<boolean>('copyrightEnable');
const copyrightDate = defineModel<string>('copyrightDate');
const copyrightIcp = defineModel<string>('copyrightIcp');
const copyrightIcpLink = defineModel<string>('copyrightIcpLink');
const copyrightCompanyName = defineModel<string>('copyrightCompanyName');
const copyrightCompanySiteLink = defineModel<string>(
'copyrightCompanySiteLink',
);
2024-07-07 23:52:19 +08:00
const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
</script>
<template>
2024-07-07 23:52:19 +08:00
<SwitchItem v-model="copyrightEnable" :disabled="disabled">
{{ $t('preferences.copyright.enable') }}
</SwitchItem>
2024-07-07 23:52:19 +08:00
<InputItem v-model="copyrightCompanyName" :disabled="itemDisabled">
{{ $t('preferences.copyright.companyName') }}
</InputItem>
2024-07-07 23:52:19 +08:00
<InputItem v-model="copyrightCompanySiteLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.companySiteLink') }}
</InputItem>
2024-07-07 23:52:19 +08:00
<InputItem v-model="copyrightDate" :disabled="itemDisabled">
{{ $t('preferences.copyright.date') }}
</InputItem>
2024-07-07 23:52:19 +08:00
<InputItem v-model="copyrightIcp" :disabled="itemDisabled">
{{ $t('preferences.copyright.icp') }}
</InputItem>
2024-07-07 23:52:19 +08:00
<InputItem v-model="copyrightIcpLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.icpLink') }}
</InputItem>
</template>