1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // components/input/index.js
- Component({
- options: {
- lifetimes: true
- },
- /**
- * 组件的属性列表
- */
- properties: {
- value: "",
- placeholder: {
- type: String,
- value: "请输入"
- },
- type: {
- type: String,
- value: "text"
- },
- disabled: {
- type: Boolean,
- value: false
- },
- maxLength: {
- type: Number,
- value: 200
- },
- isAudit: {
- type: Boolean,
- value: false
- }
- },
- /**
- * 组件的初始数据
- */
- data: {},
- lifetimes: {
- attached: function() {},
- detached: function() {
- // 在组件实例被从页面节点树移除时执行
- }
- },
- /**
- * 组件的方法列表
- */
- methods: {
- getValue(e) {
- this.triggerEvent("change", e.detail.value);
- }
- }
- });
|