!3504 橘子购物sample代码 arkTs规范整改

Merge pull request !3504 from xuwenbin/master
This commit is contained in:
openharmony_ci 2023-09-28 10:57:13 +00:00 committed by Gitee
commit c77247bec1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -14,13 +14,20 @@
*/
export class SwiperPicturesModel {
constructor(public src: Resource) {
public src: Resource;
constructor(src: Resource) {
this.src = src;
}
}
export class CommentModel {
constructor(public url: Resource, public user: string, public img: Resource, public text: string) {
public url: Resource;
public user: string;
public img: Resource;
public text: string;
constructor(url: Resource, user: string, img: Resource, text: string) {
this.url = url;
this.user = user;
this.img = img;
@ -29,7 +36,14 @@ export class CommentModel {
}
export class ProductDataModel {
constructor(public id: number, public uri: Resource, public title: Resource, public info: Resource, public labels: Resource, public price: Resource) {
public id: number;
public uri: Resource;
public title: Resource;
public info: Resource;
public labels: Resource;
public price: Resource;
constructor(id: number, uri: Resource, title: Resource, info: Resource, labels: Resource, price: Resource) {
this.id = id;
this.uri = uri;
this.info = info;