Commit 6c06084a50f68e4f83444c23e187d84bb731ae8c

Authored by 徐烜
1 parent 946be975

电子站牌项目

1、发现一个bug,点击我的作品列表里预览按钮,弹框修改标题,描述保存时报错,传到后台的workid是undefined
   修改preivew.vue文件,修改handlOk方法,添加一个_work_copy解决这个bug
2、修改card-item.js,修改我的作品列表中标题显示,只显示title,不显示id
front-end/h5/src/components/common/work/card-item.js
... ... @@ -77,7 +77,7 @@ export default {
77 77 <a-card-meta
78 78 >
79 79 <div slot="title" class="ant-card-meta-title" style="font-size: 14px;">
80   - {this.work.title}({this.work.id})
  80 + {this.work.title}
81 81 </div>
82 82 <div slot="description" style="font-size: 12px;">
83 83 {/** 描述 时间 */}
... ...
front-end/h5/src/components/core/editor/modals/preview.vue
... ... @@ -43,6 +43,18 @@ export default {
43 43 'updateWork'
44 44 ]),
45 45 handleOk (e) {
  46 + /**
  47 + * 修改描述,内部stat的work和this.work是不同步的
  48 + * 需要复制一个_work_copy赋值给state中的work
  49 + * 这个可能是个bug
  50 + */
  51 + // ----------------- 以下 ------------------ //
  52 + let _work_copy = this.work
  53 + _work_copy.title = this.$store.state.editor.work.title
  54 + _work_copy.description = this.$store.state.editor.work.description
  55 + this.$store.state.editor.work = _work_copy
  56 + // ----------------- 以上 ------------------ //
  57 +
46 58 this.confirmLoading = true
47 59 this.saveWork().then(res => {
48 60 this.handleClose()
... ...