0

enter image description here

enter image description here

So, the following modal is opened by this.$store.watch. Is there any way to pass payload object ( {payload: value.payload} ) to SharePage component directly from this.$modal.show('preview-share-modal', {payload: value.payload}) ?

<modal name="preview-share-modal" height="auto" :id="'share-modal'" :adaptive="true">
        <div class="modal-wrap share-modal-container" v-touch:swipe.bottom="closeShareModal">
          <div class="close-button">
            <button @click="closeShareModal"><i class="far fa-times"></i></button>
          </div>
          <SharePage></SharePage>
        </div>
      </modal>

this.$store.watch(
      (state) => {return { show: state.showShareModal, payload: state.props }},
      (value) =>  {
        if(value.show === true) {
          this.$modal.show('preview-share-modal', {payload: value.payload});
        }
        else
          this.$modal.hide('preview-share-modal')
      }
    )

0 Answers0