• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { memo } from "@ohos.arkui.stateManagement" // should be insert by ui-plugins
17import { Text, UITextAttribute, Column, Component} from "@ohos.arkui.component"
18import hilog from '@ohos.hilog'
19
20@memo function cardStyle(this: UITextAttribute, num: number, str: string): this {
21	this.fontSize(num);
22	this.backgroundColor(num);
23	return this;
24}
25
26@memo function style22(this: UITextAttribute): this {
27	this.fontWeight(700);
28	return this;
29}
30
31@Component
32struct MM {
33	build() {
34		Column() {
35			Text('hello world')
36				.height(200)
37				.fontColor('#000000')
38				.cardStyle(600, '#eeeeee')
39				.fontSize(60)
40				.fontWeight(400)
41				.style22()
42				.width(900)
43			Text('hello world')
44				.cardStyle(600, '#eeeeee')
45		}
46	}
47}