Help required to Integrate Vue Instant



  • https://santiblanko.github.io/vue-instant/#/

    I need help to integrate this properly into quasar, If i add it to any component , the Component does not render i get the error

    [Vue warn]: Failed to mount component: template or render function not defined.
    (found in component <vue-instant>)


  • Admin

    Any repo or .zip that I can take a look? Sounds like an error generated by vue-instant



  • https://github.com/santiblanko/vue-instant/blob/master/examples/webpack-example/src/App.vue

    This is exactly how I am importing and using in my App, but seems like there is an error



  • <template>
    <vue-instant v-model=“selectedContact” @input=“changed” :show-autocomplete=“true” :suggestions=“contactList” placeholder=“Select Contact” type=“custom”></vue-instant>
    </template>

    <script>
    import VueInstant from ‘vue-instant/src/components/VueInstant’

    export default {
    data () {
    return {
    selectedContact: {},
    contactList: []
    }
    },
    methods: {
    changed: function () {
    this.contactList = []
    HttpService.get(‘https://api.themoviedb.org/3/search/movie?api_key=342d3061b70d2747a1e159ae9a7e9a36&query=’ + this.selectedContact)
    .then((response) => {
    response.data.results.forEach(function (a) {
    this.contactList.push(a)
    })
    })//Testing
    }
    },
    components: {
    VueInstant
    }
    }
    </script>

    This is how i tried wiring it up



  • I’ve recently had a somewhat similar problem, trying to integrate vue-json-tree-view in a quasar based play thingy.

    My solution was this bit of code in my main.js:

    import TreeView from 'vue-json-tree-view/src/TreeView'
    import TreeViewItem from 'vue-json-tree-view/src/TreeViewItem.vue'
    
    let TreeComponent = {
      install (_Vue) {
        _Vue.component('tree-view-item', TreeViewItem)
        _Vue.component('tree-view', TreeView)
      }
    }
    
    Vue.use(TreeComponent)
    

    I’m not that familiar with the subtleties of the npm/JS module systems, so I can’t really tell what the problem is (although I suspect is a matter of how that module is bundled), but that is what I did to fix my problem. Perhaps you find this helpful.



  • @afd Tried this too , Guess some problem with the component itself , Need to check … Thank you for taking time :)


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.