You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
2 years ago
|
"use strict";
|
||
|
Component({
|
||
|
properties: {
|
||
|
maxlength: {
|
||
|
type: Number,
|
||
|
value: 250,
|
||
|
},
|
||
|
placeholder: {
|
||
|
type: String,
|
||
|
value: "请输入内容",
|
||
|
},
|
||
|
content: {
|
||
|
type: String,
|
||
|
value: "",
|
||
|
},
|
||
|
fm: {
|
||
|
type: String,
|
||
|
value: "fmData",
|
||
|
},
|
||
|
name: {
|
||
|
type: String,
|
||
|
value: "",
|
||
|
},
|
||
|
showLength: {
|
||
|
type: Boolean,
|
||
|
value: true,
|
||
|
},
|
||
|
},
|
||
|
data: {
|
||
|
isFolded: false,
|
||
|
noNeedFold: false,
|
||
|
},
|
||
|
lifetimes: {
|
||
|
ready: function () {
|
||
|
this.init();
|
||
|
},
|
||
|
},
|
||
|
methods: {
|
||
|
init: function () {
|
||
|
console.log("e-textarea组件初始化完毕");
|
||
|
},
|
||
|
input: function (event) {
|
||
|
var value = event.detail.value;
|
||
|
var _a = this.data, fm = _a.fm, name = _a.name, maxlength = _a.maxlength;
|
||
|
this.setData({ content: value });
|
||
|
this.triggerEvent("input", { fm: fm, name: name, value: value, maxlength: maxlength });
|
||
|
},
|
||
|
},
|
||
|
});
|