release包

这个提交包含在:
徐勤民 2024-10-12 18:45:02 +08:00
父节点 a13026f48a
当前提交 abcaf8d019
共有 3 个文件被更改,包括 37 次插入5 次删除

查看文件

@ -0,0 +1,7 @@
export class DeviceInfo{
ODID?:string
manufacture?:string
brand?:string
osFullName?:string
}

查看文件

@ -1,7 +1,7 @@
import preferences from '@ohos.data.preferences';
export class PreferencesHelper {
public static async put(key: string, value: preferences.ValueType | undefined) {
public static async put(key: string, value: preferences.ValueType | undefined | null) {
const pref = await preferences.getPreferences(getContext(), 'PreferencesHelper')
// 写入数据

查看文件

@ -1,6 +1,7 @@
import promptAction from '@ohos.promptAction';
import { BusinessError } from '@kit.BasicServicesKit';
import { HashMap } from '@kit.ArkTS';
import { BusinessError, deviceInfo } from '@kit.BasicServicesKit';
import { HashMap, util } from '@kit.ArkTS';
import { DeviceInfo } from '../bean/DeviceInfo';
export interface Btn {
text?: string | Resource;
@ -67,12 +68,23 @@ function customDialogBuilder<T>(option: ListOptions<T>, dialogId: number) {
.listDirection(Axis.Vertical) // 排列方向
.scrollBar(BarState.Off)
.friction(0.6)
.divider({ strokeWidth: 1, color: 0xEEEEEE, startMargin: 20, endMargin: 20 }) // 每行之间的分界线
.divider({
strokeWidth: 1,
color: 0xEEEEEE,
startMargin: 20,
endMargin: 20
}) // 每行之间的分界线
.edgeEffect(EdgeEffect.Spring) // 边缘效果设置为Spring
.width('100%')
.height(option.values.length < 8 ? `${option.values.length / 16 * 100}%` : '50%')
.margin({ top: 20 })
}.padding({ top: 20, bottom: 20, left: 20, right: 20 })
}
.padding({
top: 20,
bottom: 20,
left: 20,
right: 20
})
}
/**
@ -209,4 +221,17 @@ export class ToolsHelper {
}
return undefined
}
private static deviceInfo: DeviceInfo
static getDeviceInfo() {
if (!ToolsHelper.deviceInfo) {
ToolsHelper.deviceInfo = new DeviceInfo()
ToolsHelper.deviceInfo.ODID = deviceInfo.ODID
ToolsHelper.deviceInfo.manufacture = deviceInfo.manufacture
ToolsHelper.deviceInfo.brand = deviceInfo.brand
ToolsHelper.deviceInfo.osFullName = deviceInfo.osFullName
}
return ToolsHelper.deviceInfo
}
}