12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- // components/inner-device-card/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- item: Object,
- action: {
- type: String,
- // record
- value: ''
- },
- showStatus: {
- type: Boolean,
- value: true
- },
- showChecked: {
- type: Boolean,
- value: false
- },
- showDelete: {
- type: Boolean,
- value: false
- },
- index: {
- type: String,
- value: ''
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- navigate: function(e) {
- var url = e.currentTarget.dataset.url
- wx.navigateTo({
- url: url,
- })
- },
- switchChecked: function(e) {
- var index = e.currentTarget.dataset.index
- this.triggerEvent('checked', {
- index
- }, {})
- },
- delete: function(e) {
- var index = e.currentTarget.dataset.index
- this.triggerEvent('delete', {
- index
- }, {})
- }
- }
- })
|