7272 <CommentForm v-if =" edit "
7373 v-model =" commentMsg "
7474 dir="auto"
75- @submit =" updateComment " />
75+ @submit =" updateComment ( $event ) " />
7676 </li >
7777</template >
7878
@@ -84,17 +84,28 @@ import md5 from 'blueimp-md5'
8484import relativeDate from ' ../../mixins/relativeDate.js'
8585import ReplyIcon from ' vue-material-design-icons/ReplyOutline.vue'
8686import moment from ' moment'
87+ import { h } from ' vue'
8788import { useCommentStore } from ' ../../stores/comment.js'
8889
90+ // Vue 2's `{ functional: true, render(createElement, context) }` signature no
91+ // longer exists in Vue 3, so this is a regular component instead.
8992const AtMention = {
9093 name: ' AtMention' ,
91- functional: true ,
92- render (createElement , context ) {
93- const { user , displayName } = context .props
94- return createElement (
94+ props: {
95+ user: {
96+ type: String ,
97+ required: true ,
98+ },
99+ displayName: {
100+ type: String ,
101+ default: ' ' ,
102+ },
103+ },
104+ render () {
105+ return h (
95106 ' span' ,
96- { attrs : { ' data-at-embedded' : true , contenteditable: false } },
97- [createElement (NcUserBubble, { props : { user, displayName }, attrs : { ' data-mention-id ' : user } })],
107+ { ' data-at-embedded' : true , ' data-mention-id ' : this . user , contenteditable: false },
108+ [h (NcUserBubble, { user : this . user , displayName: this . displayName })],
98109 )
99110 },
100111}
@@ -195,9 +206,9 @@ export default {
195206 this .commentMsg = ' '
196207 this .edit = false
197208 },
198- async updateComment () {
209+ async updateComment (message ) {
199210 const data = {
200- comment: { id: this .comment .id , message: this . commentMsg },
211+ comment: { id: this .comment .id , message },
201212 cardId: this .comment .objectId ,
202213 }
203214 await this .commentStore .updateComment (data)
0 commit comments