vue-tribute icon indicating copy to clipboard operation
vue-tribute copied to clipboard

using tribute as component in nuxt does not load collection

Open amdp opened this issue 5 years ago • 0 comments

Hi, first of all thanks for the previous help in #33 I now have:

//Note: comment object (and comment.id in the v-if) comes from an api that loads all comments data into a vuex store state
//the comment object is dynamic and gets generated by a v-for loop 
//(v-for="comment in up" :key="comment.id" --> where "up" is up comments from $store.state.comments)

       <b-row class="p-0 m-0" v-if="formswitch == comment.id">
          <b-col cols="12">
            <vue-tribute :options="options" id="commentTribute">
              <!-- !!!the mention function should carry the id of the comment !!!-->
              <b-container
                class="newcommentbox"
                contenteditable="true"
                @tribute-replaced="mention()"
                @click="check()"
                :id="'commentInput' + comment.id"
                v-on:keyup.enter="formcomment(comment, editreplyid)"
              ></b-container>
            </vue-tribute>
            <b-link @click="edit(comment)" class="hunderstanding">
              Cancel
            </b-link>
          </b-col>
        </b-row>

in which the v-if does not allow the tribute tag to load the collection and I get {"message":"[Tribute] No collection specified.","statusCode":500}. If I remove the v-if it gives me no error. I also read tribute docs and thought to use tribute.append or similar, but I don't know how to invoke the tribute object. Now I made a sandbox starting from yours in #33 here: https://codesandbox.io/s/wispy-sea-6x6o3?file=/pages/index.vue and the v-if works, even with a computed property, but now the upper box gives me " Tribute was already bound to INPUT " My problem now is related to at least recreate my bad code/the bug in codesandbox as my computed property does not get acquired.

amdp avatar Sep 17 '20 14:09 amdp