Lines Matching refs:Model
68 声明Person和Model类。
79 class Model {
89 \@State装饰的类型是Model
93 @State title: Model = new Model('Hello', new Person('World'));
100 this.title = new Model('Hi', new Person('ArkUI'));
117 声明Model类。
120 class Model {
128 \@State装饰的对象为Model类型数组时。
132 @State title: Model[] = [new Model(11), new Model(1)];
139 this.title = [new Model(2)];
146 this.title[0] = new Model(2);
160 this.title.push(new Model(12));
268 - 自定义组件MyComponent定义了被\@State装饰的状态变量count和title,其中title的类型为自定义类Model。如果count或title的值发生变化,则查询MyCompo…
275 class Model {
291 MyComponent({ title: new Model('Hello World 2'), count: 7 })
298 @State title: Model = new Model('Hello World');
334 // title没有外部传入,使用本地的值new Model('Hello World')进行初始化
337 MyComponent({ title: new Model('Hello World 2'), count: 7 })
345 // title和count均有外部传入,分别使用传入的new Model('Hello World 2')和7进行初始化
346 MyComponent({ title: new Model('Hello World 2'), count: 7 })
587 model: Model
590 this.model = new Model(() => {
601 export class Model {
640 model: Model = new Model(() => {
651 export class Model {
1102 class Model {
1120 let model: Model = new Model();