深色模式、首页设置页面和功能优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { router } from '@kit.ArkUI';
|
||||
import { preferences } from '@kit.ArkData';
|
||||
import { common } from '@kit.AbilityKit';
|
||||
//todo 重要 后续 刷新按钮要求固定显示
|
||||
@Entry
|
||||
@Component
|
||||
@@ -45,7 +46,7 @@ struct WidgetSettings {
|
||||
async saveSettings() {
|
||||
try {
|
||||
if (!this.preference) {
|
||||
const context = getContext(this);
|
||||
const context = getContext(this) as common.UIAbilityContext;
|
||||
this.preference = await preferences.getPreferences(context, 'widget_settings');
|
||||
}
|
||||
console.info('[WidgetSettings] Saving settings - showTime: ' + this.showTime + ', showWeather: ' + this.showWeather);
|
||||
|
||||
Reference in New Issue
Block a user