惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V2EX - 技术
V2EX - 技术
Security Archives - TechRepublic
Security Archives - TechRepublic
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
宝玉的分享
宝玉的分享
小众软件
小众软件
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Spread Privacy
Spread Privacy
I
InfoQ
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
M
MIT News - Artificial intelligence
爱范儿
爱范儿
The Cloudflare Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Tenable Blog
S
Securelist
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
Webroot Blog
Webroot Blog
The Hacker News
The Hacker News
O
OpenAI News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
PCI Perspectives
PCI Perspectives
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threat Research - Cisco Blogs
L
LINUX DO - 热门话题
I
Intezer
Scott Helme
Scott Helme
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
Google Online Security Blog
Google Online Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security Affairs
AI
AI
AWS News Blog
AWS News Blog
Security Latest
Security Latest

博客园 - 为敢技术

iConsole隐私政策 iConsole用户协议 iCapture隐私政策 iCapture用户协议 上传文件中的.DS_Store问题 iROM用户协议 iROM隐私政策 iConsole请求麦克风权限 博文阅读密码验证 - 博客园 创建图像分类器模型 DevEco Studio:在Windows电脑上启动模拟器,提示未开启Hyper-V iMac / MacBook设置U盘启动 RK3588开发板入门教程 DevEco Testing教程 鸿蒙知识点 Mac系统安装Node.js及配置环境变量 HarmonyOS:如何使用系统自带图标 HarmonyOS:使用本地真机运行应用/服务 HarmonyOS:应用隐私保护 HarmonyOS:应用数据安全
DevEco Studio实用技巧
为敢技术 · 2024-12-07 · via 博客园 - 为敢技术

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
➤博客园地址:为敢技术(https://www.cnblogs.com/strengthen/ 
➤GitHub地址:https://github.com/strengthen
➤原文地址:https://www.cnblogs.com/strengthen/p/18591792
➤如果链接不是为敢技术的博客园地址,则可能是爬取作者的文章。
➤原文已修改更新!强烈建议点击原文地址阅读!支持作者!支持原创!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

1、【Edit Configurations】-勾选【Keep Application Data】-【Apply】-【OK】,此时会记录应用数据,比如权限弹框只会弹出一次。

2、使用非换行空格格式化JSON输出:通常会使用JSON.stringify方法来转换对象为字符串,但如果直接使用默认参数,则输出的结果不易阅读。通过使用非换行空格(\u00A0),可以实现缩进效果。

@Entry
@Component
struct Page04 {
  build() {
    Column() {
      Button('测试').onClick(()=>{
        const obj:object = Object({
          key1: 'value1',
          key2: Object({
            nestedKey1: 'nestedValue1',
            nestedKey2: 'nestedValue2'
          }),
          key3: [1, 2, 3]
        })
 
        // 使用非换行空格
        const jsonStringWithUnicode = JSON.stringify(obj, null, '\u00A0\u00A0');
        console.log(jsonStringWithUnicode);
      })
    }
    .height('100%')
    .width('100%')
  }
}

打印结果:

{
  "key1": "value1",
  "key2": {
    "nestedKey1": "nestedValue1",
    "nestedKey2": "nestedValue2"
  },
  "key3": [
    1,
    2,
    3
  ]
}

3、局部选中:以使用 Alt + 鼠标左键 的组合来实现局部选中,方便复制特定部分的数据。 

4、自动生成页面白名单:在创建新的页面时,通过 【File > New > Page > Empty Page】 的方式可以快速生成页面,并且在 src/main/resources/base/profile/main_pages.json 文件中自动生成页面白名单条目。

5、启动图设计尺寸:准备一张最小尺寸大于768像素的图标。系统会自动裁剪以适应不同尺寸的需求,确保在任何设备上都有良好的视觉效果。

6、截屏或录制视频并导出。

连接设备,并使用开发工具中的 Log 功能旁边的拍照或视频录制按钮,可以直接截图或录制设备端界面的图片和视频,然后选择保存到本地计算机的路径。 

7、电脑端文件传输到已连接的设备:【View】-【Tool Windows】-【Device File Browser】

 8、如果需要将文件保存到相册,可以使用设备上的保存功能。