No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    how to use quasar components in Vue.extend()

    Help
    2
    2
    960
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jeimz173 last edited by jeimz173

      Hello guys,i need your help on how to use quasar components in Vue.extend… i tried to import some quasar component but it fails me…

      i have this sample.js where as you can see here, i imported the QDatetime component

      import Vue from 'vue/dist/vue.js'
      
      import { QDatetime } from 'quasar'  
      export default Vue.extend({
        name: 'DatePicker',
        template: `
        <div>
          <q-datetime v-model="date" />
        </div>
        `,
        components: {
          'q-datetime': QDatetime
        },
        data () {
          return {
            date: ''
          }
        },
        methods: {
          setDate (context) {
            this.date = context
          },
          getValue () {
            return this.date
          }
        }
      })
      
      

      but in my Console it returns this warning: where i have no control to the QDatetime to fix this… please help me thank you…

      Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"
      
      1 Reply Last reply Reply Quote 0
      • zmilan
        zmilan last edited by

        Is this part of quasar project? In quasar project you can use Vue.extend({}) and use quasar components by just adding them in quasar.config.js framework.components array. But I have never used string template inside project, but that should not be different if I’m right…
        Can you provide more information about your project and where is this file inside of that project?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post