admin-vben5/packages/effects/layouts/src/widgets/preferences/blocks/layout/copyright.vue
GavinLucky 437cb02e11
feat: preferences settings panel to add display switches with copyright (#4603)
* feat: preferences settings panel to add display switches with copyright

* feat: 更新 snapshots 测试用例

---------

Co-authored-by: ZhangYantao <Gavin@163.com>
2024-10-10 21:59:43 +08:00

49 lines
1.6 KiB
Vue

<script setup lang="ts">
import { computed } from 'vue';
import { $t } from '@vben/locales';
import InputItem from '../input-item.vue';
import SwitchItem from '../switch-item.vue';
defineOptions({
name: 'PreferenceCopyrightConfig',
});
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',
);
const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
</script>
<template>
<SwitchItem v-model="copyrightEnable" :disabled="disabled">
{{ $t('preferences.copyright.enable') }}
</SwitchItem>
<InputItem v-model="copyrightCompanyName" :disabled="itemDisabled">
{{ $t('preferences.copyright.companyName') }}
</InputItem>
<InputItem v-model="copyrightCompanySiteLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.companySiteLink') }}
</InputItem>
<InputItem v-model="copyrightDate" :disabled="itemDisabled">
{{ $t('preferences.copyright.date') }}
</InputItem>
<InputItem v-model="copyrightIcp" :disabled="itemDisabled">
{{ $t('preferences.copyright.icp') }}
</InputItem>
<InputItem v-model="copyrightIcpLink" :disabled="itemDisabled">
{{ $t('preferences.copyright.icpLink') }}
</InputItem>
</template>