yuminge-app/yun-min-program-plugin-master/packageC/mycomponent/temp/richtext/richtext.js

60 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// var app = getApp();
// var WxParse = require('../../../wxParse/wxParse.js');
Component({
properties: {
params: {
type: null
},
content: {
type: null
}
},
data: {
}, // 私有数据,可用于模板渲染
lifetimes: {
// 生命周期函数可以为函数或一个在methods段中定义的方法名
attached() {
},
moved() {},
detached() {},
},
// 生命周期函数可以为函数或一个在methods段中定义的方法名
attached() {
}, // 此处attached的声明会被lifetimes字段中的声明覆盖
ready() {
if (this.data.content) {
// let article = this.data.content;
/**
* WxParse.wxParse(bindName , type, data, target,imagePadding)
* 1.bindName绑定的数据名(必填)
* 2.type可以为html或者md(必填)
* 3.data为传入的具体数据(必填)
* 4.target为Page对象,一般为this(必填)
* 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
*/
// try {
// WxParse.wxParse('article', 'html', article, this);
// } catch (e) {
// //TODO handle the exception
// }
}
},
pageLifetimes: {
// 组件所在页面的生命周期函数
show() {},
hide() {},
resize() {},
},
methods: {
}
});