如何添加自定义的小组件(桌面卡片)?

家庭记账APP支持独特的个性化功能,您可以通过JSON创建一个都有的桌面小卡片样式。

由于文档过于奇葩,我们已经将文档传输给AI大模型。您可以长按首页记账按钮触发AI语音助手进行文档查询,AI模型解答的会比较细致。



建议通过JSON在线可视化功能进行编写,编写后粘贴至APP中保存渲染即可。
如您不想通过AI助手查询文档,若有ArkTS开发基础也可以参考下面代码进行编写。所有参数内容均与 HarmonyOS NEXT 开发文档一致


[{"type":"Stack","page":[{"type":"Row","page":[{"type":"Column","page":[{"type":"Image","value":"https://www.mytuzi.com/usr/uploads/2024/12/1122674501.png","style":{"width":"100%","borderRadius":12}}],"style":{"alignItems":"Start","justifyContent":"Center","height":"100%","width":"30%"}},{"type":"Column","page":[{"type":"Text","value":"你好呀!","style":{"fontColor":"blue","margin":{"top":2},"fontSize":10}},{"type":"Text","value":"你都没钱了~","style":{"fontColor":"blue","margin":{"top":2},"fontSize":10}},{"type":"Text","value":"看这个还有意义?","style":{"fontColor":"red","margin":{"top":2},"fontSize":10}}],"style":{"alignItems":"Start","margin":{"left":10}}}],"style":{"width":"100%","height":"100%","alignItems":"Top","justifyContent":"Start","padding":10}},{"type":"Column","page":[{"type":"Text","value":"RIGHT","style":{"fontSize":10}}],"style":{"width":"100%","height":"100%","alignItems":"End","padding":10}}],"style":{}}]



当然,若实在想看写的稀烂的原始AI训练表格。请见下面这个惨不忍睹的表格


QQ20250314-120343.png

无标签
评论区
头像