Browse Source

Remove comment item from comment component

pull/1233/head
Hironsan 3 years ago
parent
commit
7748e3024d
1 changed files with 1 additions and 3 deletions
  1. 4
      frontend/components/comment/Comment.vue

4
frontend/components/comment/Comment.vue

@ -99,8 +99,6 @@
import Vue from 'vue' import Vue from 'vue'
import VueFilterDateFormat from '@vuejs-community/vue-filter-date-format' import VueFilterDateFormat from '@vuejs-community/vue-filter-date-format'
import VueFilterDateParse from '@vuejs-community/vue-filter-date-parse' import VueFilterDateParse from '@vuejs-community/vue-filter-date-parse'
import { CommentItem } from '@/models/comment'
import { UserItem } from '../../models/user';
Vue.use(VueFilterDateFormat) Vue.use(VueFilterDateFormat)
Vue.use(VueFilterDateParse) Vue.use(VueFilterDateParse)
@ -129,7 +127,7 @@ export default {
methods: { methods: {
updateComment(newText) { updateComment(newText) {
this.showEdit = false this.showEdit = false
const comment = CommentItem.valueOf({...this.comment, text:newText })
const comment = {...this.comment, text:newText }
this.$emit('update-comment', comment) this.$emit('update-comment', comment)
}, },
cancel() { cancel() {

Loading…
Cancel
Save