|
|
@ -31,7 +31,6 @@ const setting = defineComponent({ |
|
|
|
name: 'ui-setting', |
|
|
|
name: 'ui-setting', |
|
|
|
setup() { |
|
|
|
setup() { |
|
|
|
const uiSettingStore = useUISettingStore() |
|
|
|
const uiSettingStore = useUISettingStore() |
|
|
|
const defaultLogTimer = uiSettingStore.getLogTimer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logTimerMap = { |
|
|
|
const logTimerMap = { |
|
|
|
0: 'Off', |
|
|
|
0: 'Off', |
|
|
@ -68,7 +67,7 @@ const setting = defineComponent({ |
|
|
|
value: 1800 |
|
|
|
value: 1800 |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
return { defaultLogTimer, logTimerMap, logTimerOptions } |
|
|
|
return { uiSettingStore, logTimerMap, logTimerOptions } |
|
|
|
}, |
|
|
|
}, |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
@ -80,7 +79,7 @@ const setting = defineComponent({ |
|
|
|
<span>{t('ui_setting.refresh_time')}</span> |
|
|
|
<span>{t('ui_setting.refresh_time')}</span> |
|
|
|
<NSelect |
|
|
|
<NSelect |
|
|
|
style={{ width: '200px' }} |
|
|
|
style={{ width: '200px' }} |
|
|
|
default-value={this.logTimerMap[this.defaultLogTimer]} |
|
|
|
default-value={this.logTimerMap[this.uiSettingStore.getLogTimer]} |
|
|
|
options={this.logTimerOptions} |
|
|
|
options={this.logTimerOptions} |
|
|
|
onUpdateValue={handleUpdateValue} |
|
|
|
onUpdateValue={handleUpdateValue} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -88,7 +87,7 @@ const setting = defineComponent({ |
|
|
|
<h4>{t('ui_setting.experimental_feature')}</h4> |
|
|
|
<h4>{t('ui_setting.experimental_feature')}</h4> |
|
|
|
<NSpace align='center' justify='space-between'> |
|
|
|
<NSpace align='center' justify='space-between'> |
|
|
|
<span>{t('ui_setting.dynamic_task_component')}</span> |
|
|
|
<span>{t('ui_setting.dynamic_task_component')}</span> |
|
|
|
<NSwitch round={false}></NSwitch> |
|
|
|
<NSwitch round={false} defaultValue={this.uiSettingStore.getDynamicTask} onUpdateValue={() => this.uiSettingStore.setDynamicTask()}></NSwitch> |
|
|
|
</NSpace> |
|
|
|
</NSpace> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|
) |
|
|
|
) |
|
|
|