| | |
| | | { comment: '是否显示语言切换', key: 'showLanguage' }, |
| | | { comment: '是否显示进度条', key: 'showNprogress' }, |
| | | { comment: '是否显示设置引导', key: 'showSettingGuide' }, |
| | | { comment: '是否显示节日文本', key: 'showFestivalText' }, |
| | | { comment: '是否显示水印', key: 'watermarkVisible' }, |
| | | { comment: '是否自动关闭', key: 'autoClose' }, |
| | | { comment: '是否唯一展开', key: 'uniqueOpened' }, |
| | | { comment: '是否色弱模式', key: 'colorWeak' }, |
| | | { comment: '是否刷新', key: 'refresh' }, |
| | | { comment: '是否加载节日烟花', key: 'holidayFireworksLoaded' }, |
| | | { comment: '边框模式', key: 'boxBorderMode' }, |
| | | { comment: '页面过渡效果', key: 'pageTransition' }, |
| | | { comment: '标签页样式', key: 'tabStyle' }, |
| | | { comment: '自定义圆角', key: 'customRadius' }, |
| | | { comment: '容器宽度', key: 'containerWidth', enumMap: ENUM_MAPS.containerWidth }, |
| | | { comment: '节日日期', key: 'festivalDate', forceValue: '' } |
| | | { comment: '容器宽度', key: 'containerWidth', enumMap: ENUM_MAPS.containerWidth } |
| | | ] |
| | | const valueToCode = (value, enumMap) => { |
| | | if (value === null) return 'null' |
| | |
| | | settingStore.setNprogress() |
| | | ) |
| | | settingStore.setWorkTab(config.showWorkTab) |
| | | settingStore.setShowFestivalText(config.showFestivalText) |
| | | settingStore.setWatermarkVisible(config.watermarkVisible) |
| | | toggleIfDifferent(settingStore.autoClose, config.autoClose, () => settingStore.setAutoClose()) |
| | | toggleIfDifferent(settingStore.uniqueOpened, config.uniqueOpened, () => |
| | |
| | | settingStore.setTabStyle(config.tabStyle) |
| | | settingStore.setCustomRadius(config.customRadius) |
| | | settingStore.setContainerWidth(config.containerWidth) |
| | | settingStore.setFestivalDate(config.festivalDate) |
| | | settingStore.setholidayFireworksLoaded(config.holidayFireworksLoaded) |
| | | location.reload() |
| | | } catch (error) { |
| | | console.error('重置配置失败:', error) |