From c9005dfb3b3b56e7264ac85ff43491769219f665 Mon Sep 17 00:00:00 2001 From: khtiana Date: Tue, 12 Oct 2021 09:39:26 +0800 Subject: [PATCH 1/4] add create element document --- api/@internal/js/globaljs.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/@internal/js/globaljs.d.ts b/api/@internal/js/globaljs.d.ts index f98e82b37c..da52113499 100644 --- a/api/@internal/js/globaljs.d.ts +++ b/api/@internal/js/globaljs.d.ts @@ -550,3 +550,11 @@ type CombinedOptions = object & export declare function extendViewModel( options: CombinedOptions ): ViewModel & Data; +export class element { + setAttr(attr: object): void; + setStyle(style: object): void; +} +export class document { + createElement(tagName: string): element; + appendChild(parent: element, child: element): void; +} \ No newline at end of file -- Gitee From 695e4cfa69b753fd582d532691a4bfc6fd34cc74 Mon Sep 17 00:00:00 2001 From: khtiana Date: Fri, 22 Oct 2021 15:47:27 +0800 Subject: [PATCH 2/4] support line-height normal --- api/config/css/cssConfig.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/api/config/css/cssConfig.json b/api/config/css/cssConfig.json index 07f7ae600a..855ec3aaa0 100755 --- a/api/config/css/cssConfig.json +++ b/api/config/css/cssConfig.json @@ -4507,17 +4507,22 @@ }, { "name": "line-height", - "syntax": [ - { - "name": "" - } - ], "supportedDevices": [ "tv", "phone", "tablet", "wearable" ], + "syntax": [ + { + "name": "[ normal | | ]" + } + ], + "values": [ + { + "name": "normal" + } + ], "version": [ { "name": "v3.0" @@ -4525,13 +4530,15 @@ ], "description": [ { - "name": "Text line height. When this parameter is set to 0px, the text line height is not limited and the font size is adaptive" + "name": "Mask image size. The string values are as follows: − contain: Expands the image to the maximum size so that the height and width of the image are applicable to the content area. − cover: Extends the mask image to a large enough size so that the mask image completely covers the mask area. Some parts of the image may not be displayed in the background localization area. − auto: The original image width-height ratio is retained. The two values are as follows: Height and width of the mask image. The first value indicates the width, and the second value indicates the height. If you only set one value, the second value is set to auto by default. 2. The two values are as follows: Width and height of the mask image in percentage of the parent element. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to auto by default" } ], "restrictions": [ { "name": [ - "length" + "enum", + "length", + "percentage" ] } ] -- Gitee From 6640e4eb1a609d3482c3ae3d1843a6a35ed83e2d Mon Sep 17 00:00:00 2001 From: khtiana Date: Fri, 22 Oct 2021 15:47:27 +0800 Subject: [PATCH 3/4] support line-height normal and word-spacing --- api/config/css/cssConfig.json | 53 ++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/api/config/css/cssConfig.json b/api/config/css/cssConfig.json index 07f7ae600a..efde97af6b 100755 --- a/api/config/css/cssConfig.json +++ b/api/config/css/cssConfig.json @@ -4507,17 +4507,22 @@ }, { "name": "line-height", - "syntax": [ - { - "name": "" - } - ], "supportedDevices": [ "tv", "phone", "tablet", "wearable" ], + "syntax": [ + { + "name": "[ normal | | ]" + } + ], + "values": [ + { + "name": "normal" + } + ], "version": [ { "name": "v3.0" @@ -4525,13 +4530,15 @@ ], "description": [ { - "name": "Text line height. When this parameter is set to 0px, the text line height is not limited and the font size is adaptive" + "name": "Mask image size. The string values are as follows: − contain: Expands the image to the maximum size so that the height and width of the image are applicable to the content area. − cover: Extends the mask image to a large enough size so that the mask image completely covers the mask area. Some parts of the image may not be displayed in the background localization area. − auto: The original image width-height ratio is retained. The two values are as follows: Height and width of the mask image. The first value indicates the width, and the second value indicates the height. If you only set one value, the second value is set to auto by default. 2. The two values are as follows: Width and height of the mask image in percentage of the parent element. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to auto by default" } ], "restrictions": [ { "name": [ - "length" + "enum", + "length", + "percentage" ] } ] @@ -5804,6 +5811,38 @@ ] } ] + }, + { + "name": "word-spacing", + "syntax": [ + { + "name": "[normal | | ]" + } + ], + "values":[ + { + "name":"normal" + } + ], + "version": [ + { + "name": "v3.0" + } + ], + "description": [ + { + "name": "Text spacing(px)" + } + ], + "restrictions": [ + { + "name": [ + "enum", + "length", + "percentage" + ] + } + ] } ], "atDirectives": [ -- Gitee From 0f3602dd6e84c19ba43d861ada9e50dc3471fa62 Mon Sep 17 00:00:00 2001 From: khtiana Date: Wed, 27 Oct 2021 16:53:36 +0800 Subject: [PATCH 4/4] undo create element document --- api/@internal/js/globaljs.d.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/api/@internal/js/globaljs.d.ts b/api/@internal/js/globaljs.d.ts index da52113499..ca9f915238 100644 --- a/api/@internal/js/globaljs.d.ts +++ b/api/@internal/js/globaljs.d.ts @@ -549,12 +549,4 @@ type CombinedOptions = object & ThisType; export declare function extendViewModel( options: CombinedOptions -): ViewModel & Data; -export class element { - setAttr(attr: object): void; - setStyle(style: object): void; -} -export class document { - createElement(tagName: string): element; - appendChild(parent: element, child: element): void; -} \ No newline at end of file +): ViewModel & Data; \ No newline at end of file -- Gitee