HarmonyNext 系统SDK图标资源的使用

HarmonyNext 系统SDK图标资源的使用

资源文件的具体路径为你的sdk路径/default/openharmony/ets/build-tools/ets-loader/sysResource.js

图标名称列表

所有的图标列表如下:

yaml 复制代码
 media: {
     ohos_app_icon: 125829858,
     ohos_ic_back: 125829938,
     ohos_ic_public_ok: 125830038,
     ohos_ic_public_arrow_left: 125830087,
     ohos_ic_public_arrow_right: 125830088,
     ohos_ic_public_arrow_up: 125830089,
     ohos_ic_public_arrow_down: 125830090,
     ohos_ic_public_cut: 125830091,
     ohos_ic_public_copy: 125830092,
     ohos_ic_public_paste: 125830093,
     ohos_ic_public_select_all: 125830094,
     ohos_ic_public_share: 125830095,
     ohos_ic_public_translate_c2e: 125830096,
     ohos_ic_public_search_filled: 125830097,
     ohos_save_button_filled: 125830154,
     ohos_save_button_line: 125830155,
     ohos_ic_bottomsheet_close: 125830167,
     ohos_ic_public_clock: 125830169,
     ohos_ic_public_email: 125830170,
     ohos_ic_public_express: 125830171,
     ohos_ic_public_flight: 125830172,
     ohos_ic_public_location: 125830173,
     ohos_ic_public_phone: 125830174,
     ohos_ic_public_text: 125830175,
     ohos_ic_public_web: 125830176,
     ohos_ic_public_device_matebook: 125830208,
     ohos_ic_public_device_pad: 125830209,
     ohos_ic_public_device_smartscreen: 125830210,
     ohos_ic_public_device_watch: 125830211,
     ohos_ic_public_device_phone: 125830212,
     ohos_ic_eco_hop: 125830213,
     ohos_ic_public_more: 125830217,
     ohos_ic_public_add: 125830229,
     ohos_ic_public_minus: 125830230,
     ohos_ic_public_cast_stream: 125830232,
     ohos_ic_public_cast_mirror: 125830233,
     ohos_ic_public_camera: 125830242,
     ohos_ic_public_cancel: 125830347,
     ohos_ic_public_hang_up: 125830395,
     ohos_ic_public_pause: 125830396,
     ohos_ic_public_play_last: 125830397,
     ohos_ic_public_play_next: 125830398,
     ohos_ic_public_play: 125830399,
     ohos_ic_public_restore: 125830400,
     ohos_ic_public_sound_off: 125830401,
     ohos_ic_public_sound: 125830402,
     ohos_ic_public_video_off: 125830403,
     ohos_ic_public_video: 125830404,
     ohos_ic_public_voice_off: 125830405,
     ohos_ic_public_voice: 125830406,
     ohos_ic_public_albums: 125830650,
     ohos_ic_public_scan: 125830651,
     ohos_ic_public_add_norm_filled: 125830839,
     ohos_ic_public_remove_filled: 125830840,
     ohos_ic_public_edit: 125830841,
     ohos_ic_public_fail: 125830842,
     ohos_ic_public_close: 125830852,
     ohos_ic_compnent_titlebar_back: 125830859,
     ohos_ic_compnent_titlebar_back_filled: 125830860,
     ohos_ic_public_cancel_filled: 125830861,
     ohos_ic_public_drawer_close: 125830862,
     ohos_ic_public_drawer_close_filled: 125830863,
     ohos_ic_public_drawer_open: 125830864,
     ohos_ic_public_drawer_open_filled: 125830865,
     ohos_ic_public_input_cancel: 125830866,
     ohos_ic_normal_white_grid_zip: 125830867,
     ohos_ic_normal_white_grid_xml: 125830868,
     ohos_ic_normal_white_grid_xls: 125830869,
     ohos_ic_normal_white_grid_wma: 125830870,
     ohos_ic_normal_white_grid_wav: 125830871,
     ohos_ic_normal_white_grid_video: 125830872,
     ohos_ic_normal_white_grid_txt: 125830873,
     ohos_ic_normal_white_grid_pdf: 125830874,
     ohos_ic_normal_white_grid_mp3: 125830875,
     ohos_ic_normal_white_grid_image: 125830876,
     ohos_ic_normal_white_grid_html: 125830877,
     ohos_ic_normal_white_grid_folder: 125830878,
     ohos_ic_normal_white_grid_flac: 125830879,
     ohos_ic_normal_white_grid_doc: 125830880,
     ohos_ic_normal_white_grid_compress: 125830881,
     ohos_ic_normal_white_grid_calendar: 125830882,
     ohos_ic_normal_white_grid_audio: 125830883,
     ohos_icon_mask_svg: 125830886,
     ohos_ic_public_remove: 125831084,
     ohos_user_auth_icon_face: 125831150,
     ohos_user_auth_icon_fingerprint: 125831151,
     ohos_ic_public_device_bluetooth_filled: 125831209,
     ohos_ic_public_device_earphone_filled: 125831210,
     ohos_ic_public_device_earpiece_filled: 125831211,
     ohos_ic_public_device_speaker_filled: 125831212,
     ohos_ic_public_device_sound_filled: 125831213,
     ohos_ic_public_device_soundx_filled: 125831214,
     ohos_ic_public_device_smartscreen_filled: 125831215,
     ohos_ic_public_ok_filled: 125831216,
     save_button_picture: 125833494,
     clone_app_badge_1: 125833500,
     clone_app_badge_2: 125833501,
     clone_app_badge_3: 125833502,
     clone_app_badge_4: 125833503,
     clone_app_badge_5: 125833504,
     ic_public_worldclock_filled: 125833519,
     safe_volume_notification_icon: 125834229
 }

使用方法

通过资源路径$r('system.media.xxxxxx')的方式使用系统SDK中自带的icon图标。具体的使用例子如下:

scss 复制代码
 Image($r('sys.media.ohos_ic_public_arrow_up'))
     .width(20)
     .aspectRatio(1)
相关推荐
觉醒法师11 小时前
HarmonyOS开发 - 本地持久化之实现LocalStorage支持多实例
前端·javascript·华为·typescript·harmonyos
东林知识库14 小时前
2024年10月HarmonyOS应用开发者基础认证全新题库
学习·华为·harmonyos
ChinaDragonDreamer14 小时前
HarmonyOS:@Watch装饰器:状态变量更改通知
开发语言·harmonyos·鸿蒙
Lei活在当下19 小时前
【初探鸿蒙01】鸿蒙生态用开发白皮书V3.0解读
harmonyos
SameX20 小时前
实现多子类型输入法:如何在 HarmonyOS中加载不同的输入模式
harmonyos
SuperHeroWu71 天前
【HarmonyOS】判断应用是否已安装
华为·微信·harmonyos·qq·微博·应用是否安装·canopenlink
SoraLuna1 天前
「Mac畅玩鸿蒙与硬件7」鸿蒙开发环境配置篇7 - 使用命令行工具和本地模拟器管理项目
macos·华为·harmonyos
SuperHeroWu71 天前
【HarmonyOS】鸿蒙应用OAID广告标识ID设置设备唯一标识
华为·harmonyos·oaid·广告标识·跟踪权限
雪芽蓝域zzs1 天前
HarmonyOS 组件样式@Style 、 @Extend、自定义扩展(AttributeModifier、AttributeUpdater)
深度学习·harmonyos