From 70bf76331fc39de77387f593507fcb07c0ffbc27 Mon Sep 17 00:00:00 2001 From: LiAn Date: Sun, 24 Apr 2022 08:23:11 +0000 Subject: [PATCH] fixed cf7a01e from https://gitee.com/HelloCrease/docs/pulls/3399 update zh-cn/application-dev/ui/ts-types.md. Signed-off-by: LiAn --- zh-cn/application-dev/ui/ts-types.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/ui/ts-types.md b/zh-cn/application-dev/ui/ts-types.md index af34e8176a..665108d5c1 100644 --- a/zh-cn/application-dev/ui/ts-types.md +++ b/zh-cn/application-dev/ui/ts-types.md @@ -60,21 +60,23 @@ 资源引用类型,用于设置组件属性的值。 -可以通过$r或者$rawfile创建Resource类型对象,详见[资源访问](ts-application-resource-access.md)。 +可以通过`$r`或者`$rawfile`创建Resource类型对象,详见[资源访问](ts-application-resource-access.md)。 + +- `$r('belonging.type.name')` -- $r('belonging.type.name') belonging:系统资源或者应用资源,相应的取值为'sys'和'app'; type:资源类型,支持'color'、'float'、'string'、'media'等; name:资源名称,在资源定义时确定。 -- $rawfile('filename') +- `$rawfile('filename')` + filename:工程中resources/rawfile目录下的文件名称。 | 名称 | 类型定义 | 描述 | | -------- | -------- | -------- | -| Resource | {
readonly id: [number];
readonly type: [number];
readonly params?: any[];
} | id:资源id值
type:资源类型(枚举值)
params:可选参数
通过$r或者$rawfile创建Resource类型对象并使用即可,不可以修改Resource中的各属性的值。 | +| Resource | {
readonly id: [number];
readonly type: [number];
readonly params?: any[];
} | - id:资源id值。
- type:资源类型(枚举值)。
- params:可选参数。
通过`$r`或者`$rawfile`创建Resource类型对象,不可以修改Resource中的各属性的值。 | ## ResourceStr类型8+ -- GitLab