Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 3.14 KB

BaseTemplate.md

File metadata and controls

102 lines (72 loc) · 3.14 KB

Classes

BaseDirectiveBaseDirective

BaseTemplate 基础模版类

BaseTemplate

BaseDirective ⇐ BaseDirective

BaseTemplate 基础模版类

Kind: global class
Extends: BaseDirective

new 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';

/**

BaseTemplate

Kind: global class

new BaseTemplate(fields)

BaseTemplate constructor.

Param Type Description
fields Array 生成属性对应的set方法

baseTemplate.setBackGroundImage(url, widthPixels, heightPixels)

设置背景图片

Kind: instance method of BaseTemplate
Access: public

Param Type Description
url string 图片地址
widthPixels string 图片的像素宽
heightPixels string 图片的像素高

baseTemplate.createImageStructure(url, widthPixels, heightPixels) ⇒ Object

构造图片结构体

Kind: instance method of BaseTemplate
Returns: Object - 图片对象
Access: public

Param Type Description
url string 图片地址
widthPixels string 图片的像素宽
heightPixels string 图片的像素高

baseTemplate.createTextStructure(content, type) ⇒ Object

构造文本结构体

Kind: instance method of BaseTemplate
Returns: Object - 文本对象
Access: public

Param Type Description
content string 文本内容
type string 文本类型