1234567891011121314151617181920212223242526272829303132333435363738 |
- // components/postCell/postCell.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- data: {
- type: Object,
- value: {},
- },
- currentIndex: {
- type: Number,
- value: 0,
- },
- },
- /**
- * 组件的初始数据
- */
- data: {},
- /**
- * 组件的方法列表
- */
- methods: {
- tapDeleteAction() {
- const { currentIndex } = this.properties;
- this.triggerEvent("delete", { index: currentIndex });
- },
- handleCellAction() {
- const { id } = this.properties.data;
- // <!-- type = 1 文章 type = 2 视频 type = 3 帖子 -->
- wx.navigateTo({
- url: `/pages/newDetail/newDetail?newId=${id}`,
- });
- },
- },
- });
|