提交 01b30952 编写于 作者: Z zuojiangjiang

fix error

Signed-off-by: Nzuojiangjiang <zuojiangjiang@huawei.com>
上级 5135c2a7
...@@ -2447,22 +2447,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void ...@@ -2447,22 +2447,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("dataChange: " + data); console.log("dataChange: " + data);
} }
subscribeDataChange() { subscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call); kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call);
} }
} }
unsubscribeDataChange() { unsubscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('dataChange', this.call); kvStore.off('dataChange', this.call);
} }
} }
} }
...@@ -2486,22 +2483,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]& ...@@ -2486,22 +2483,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("syncComplete: " + data); console.log("syncComplete: " + data);
} }
subscribeSyncComplete() { subscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('syncComplete', this.call); kvStore.on('syncComplete', this.call);
} }
} }
unsubscribeSyncComplete() { unsubscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('syncComplete', this.call); kvStore.off('syncComplete', this.call);
} }
} }
} }
...@@ -4118,22 +4112,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]& ...@@ -4118,22 +4112,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("syncComplete: " + data); console.log("syncComplete: " + data);
} }
subscribeSyncComplete() { subscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('syncComplete', this.call); kvStore.on('syncComplete', this.call);
} }
} }
unsubscribeSyncComplete() { unsubscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('syncComplete', this.call); kvStore.off('syncComplete', this.call);
} }
} }
} }
...@@ -4183,22 +4174,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void ...@@ -4183,22 +4174,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("dataChange: " + data); console.log("dataChange: " + data);
} }
subscribeDataChange() { subscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call); kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call);
} }
} }
unsubscribeDataChange() { unsubscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('dataChange', this.call); kvStore.off('dataChange', this.call);
} }
} }
} }
...@@ -5634,22 +5622,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]& ...@@ -5634,22 +5622,19 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("syncComplete: " + data); console.log("syncComplete: " + data);
} }
subscribeSyncComplete() { subscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('syncComplete', this.call); kvStore.on('syncComplete', this.call);
} }
} }
unsubscribeSyncComplete() { unsubscribeSyncComplete() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('syncComplete', this.call); kvStore.off('syncComplete', this.call);
} }
} }
} }
...@@ -5699,22 +5684,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void ...@@ -5699,22 +5684,19 @@ off(event:'dataChange', listener?: Callback&lt;ChangeNotification&gt;): void
**示例:** **示例:**
```js ```js
export class KvstoreModel { let kvStore;
kvmanager; class KvstoreModel {
kvStore;
constructor() {}
call(data) { call(data) {
console.log("dataChange: " + data); console.log("dataChange: " + data);
} }
subscribeDataChange() { subscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call); kvStore.on('dataChange', distributedData.SubscribeType.SUBSCRIBE_TYPE_REMOTE, this.call);
} }
} }
unsubscribeDataChange() { unsubscribeDataChange() {
if (this.kvStore != null) { if (kvStore != null) {
this.kvStore.off('dataChange', this.call); kvStore.off('dataChange', this.call);
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册