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>pull/48/MERGE
parent
ba539f6793
commit
437cb02e11
|
@ -37,6 +37,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
|
|||
"enable": true,
|
||||
"icp": "",
|
||||
"icpLink": "",
|
||||
"settingShow": true,
|
||||
},
|
||||
"footer": {
|
||||
"enable": false,
|
||||
|
|
|
@ -37,6 +37,7 @@ const defaultPreferences: Preferences = {
|
|||
enable: true,
|
||||
icp: '',
|
||||
icpLink: '',
|
||||
settingShow: true,
|
||||
},
|
||||
footer: {
|
||||
enable: false,
|
||||
|
|
|
@ -88,6 +88,8 @@ interface CopyrightPreferences {
|
|||
icp: string;
|
||||
/** 备案号链接 */
|
||||
icpLink: string;
|
||||
/** 设置面板是否显示*/
|
||||
settingShow?: boolean;
|
||||
}
|
||||
|
||||
interface FooterPreferences {
|
||||
|
|
|
@ -7,7 +7,7 @@ import InputItem from '../input-item.vue';
|
|||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'PreferenceBreadcrumbConfig',
|
||||
name: 'PreferenceCopyrightConfig',
|
||||
});
|
||||
|
||||
const props = defineProps<{ disabled: boolean }>();
|
||||
|
|
|
@ -4,7 +4,7 @@ import { $t } from '@vben/locales';
|
|||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'PreferenceBreadcrumbConfig',
|
||||
name: 'PreferenceFooterConfig',
|
||||
});
|
||||
|
||||
const footerEnable = defineModel<boolean>('footerEnable');
|
||||
|
|
|
@ -7,7 +7,7 @@ import SelectItem from '../select-item.vue';
|
|||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'PreferenceBreadcrumbConfig',
|
||||
name: 'PreferenceHeaderConfig',
|
||||
});
|
||||
|
||||
defineProps<{ disabled: boolean }>();
|
||||
|
|
|
@ -5,7 +5,7 @@ import NumberFieldItem from '../number-field-item.vue';
|
|||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'PreferenceBreadcrumbConfig',
|
||||
name: 'PreferenceSidebarConfig',
|
||||
});
|
||||
|
||||
defineProps<{ disabled: boolean }>();
|
||||
|
|
|
@ -116,6 +116,7 @@ const navigationAccordion = defineModel<boolean>('navigationAccordion');
|
|||
const footerEnable = defineModel<boolean>('footerEnable');
|
||||
const footerFixed = defineModel<boolean>('footerFixed');
|
||||
|
||||
const copyrightSettingShow = defineModel<boolean>('copyrightSettingShow');
|
||||
const copyrightEnable = defineModel<boolean>('copyrightEnable');
|
||||
const copyrightCompanyName = defineModel<string>('copyrightCompanyName');
|
||||
const copyrightCompanySiteLink = defineModel<string>(
|
||||
|
@ -369,7 +370,10 @@ async function handleReset() {
|
|||
v-model:footer-fixed="footerFixed"
|
||||
/>
|
||||
</Block>
|
||||
<Block :title="$t('preferences.copyright.title')">
|
||||
<Block
|
||||
v-if="copyrightSettingShow"
|
||||
:title="$t('preferences.copyright.title')"
|
||||
>
|
||||
<Copyright
|
||||
v-model:copyright-company-name="copyrightCompanyName"
|
||||
v-model:copyright-company-site-link="copyrightCompanySiteLink"
|
||||
|
|
Loading…
Reference in New Issue