12345678910111213141516171819202122232425262728293031323334353637383940 |
- import behavior from '~/mixins/video'
- Component({
- behaviors: [behavior],
- properties: {
- worksList: {
- type: Array,
- value: [],
- observer(newVal) {
- console.log(newVal);
- this.setData({
- worksListCopy: newVal
- })
- }
- },
- videoType: {
- type: String,
- // value 为public时是默认公共样式,为my时为“我的”样式,展示下载删除是否公开,pk为pk的样式文案
- value: 'public'
- },
- },
- data: {
- worksListCopy: {}
- },
- methods: {
- setListFans({
- detail
- }) {
- let worksListCopy = JSON.parse(JSON.stringify(this.data.worksListCopy))
- worksListCopy.forEach(item => {
- if (item.user.uid == detail) {
- item.isFans = true
- }
- })
- this.setData({
- worksListCopy
- })
- }
- },
- })
|