From a93eaf3897c8be33cd3d8b8ef18a643f2f80da6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwangxiyue=E2=80=9D?= Date: Wed, 21 Sep 2022 20:25:08 +0800 Subject: [PATCH] code format modified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “wangxiyue” --- .../database/database-distributedobject-guidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/database/database-distributedobject-guidelines.md b/zh-cn/application-dev/database/database-distributedobject-guidelines.md index b41137a692..ca01beaa0f 100644 --- a/zh-cn/application-dev/database/database-distributedobject-guidelines.md +++ b/zh-cn/application-dev/database/database-distributedobject-guidelines.md @@ -155,7 +155,7 @@ list: [{ mother: "jack mom" }, { father: "jack Dad" }] }); localObject.setSessionId(sessionId); - + // 被拉起方 let remoteObject = distributedObject.createDistributedObject({ name: undefined, @@ -186,7 +186,7 @@ // 发起方要在changeCallback里刷新界面,则需要将正确的this绑定给changeCallback localObject.on("change", this.changeCallback.bind(this)); ``` - + 6. 修改对象属性,对象属性支持基本类型(数字类型、布尔类型、字符串类型)以及复杂类型(数组、基本类型嵌套等)。 以下为修改分布式数据对象属性的代码示例: @@ -233,7 +233,7 @@ function statusCallback(sessionId, networkId, status) { this.response += "status changed " + sessionId + " " + status + " " + networkId; } - + localObject.on("status", this.statusCallback); ``` -- GitLab