- BaseDirective ⇐
BaseDirective
BaseTemplate 基础模版类
- BaseTemplate
BaseDirective ⇐ BaseDirective
BaseTemplate 基础模版类
Kind: global class
Extends: BaseDirective
Copyright (c) 2017 Baidu, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
'use strict';
/**
Kind: global class
BaseTemplate constructor.
Param | Type | Description |
---|---|---|
fields | Array |
生成属性对应的set方法 |
设置背景图片
Kind: instance method of BaseTemplate
Access: public
Param | Type | Description |
---|---|---|
url | string |
图片地址 |
widthPixels | string |
图片的像素宽 |
heightPixels | string |
图片的像素高 |
构造图片结构体
Kind: instance method of BaseTemplate
Returns: Object
- 图片对象
Access: public
Param | Type | Description |
---|---|---|
url | string |
图片地址 |
widthPixels | string |
图片的像素宽 |
heightPixels | string |
图片的像素高 |
构造文本结构体
Kind: instance method of BaseTemplate
Returns: Object
- 文本对象
Access: public
Param | Type | Description |
---|---|---|
content | string |
文本内容 |
type | string |
文本类型 |