[Solved] Empty dialog
-
First off, how to i format my code in this forum? It will make this post so much better.
Anyway. I am trying to create a dialog, however it opens up half empty. Here is a screenshot:
And here is the code (its from this example: http://v0-13.quasar-framework.org/components/dialog.html):
methods: {
change_user() {
Dialog.create({
title: ‘Prompt’,
form: {
name: {
type: ‘textbox’,
label: ‘Textbox’,
model: ‘’,
},
pass: {
type: ‘password’,
label: ‘Password’,
model: ‘’,
},
age: {
type: ‘numeric’,
label: ‘Numeric’,
model: 10,
min: 1,
max: 100,
},
tags: {
type: ‘chips’,
label: ‘Chips’,
model: [‘Joe’, ‘John’],
},
comments: {
type: ‘textarea’,
label: ‘Textarea’,
model: ‘’,
},
},
buttons: [
‘Cancel’,
{
label: ‘Ok’,
handler(data) {
Notify.create(Returned ${JSON.stringify(data)}
);
// data.name is ‘Quasar’
// data.pass is ‘rulz!’
// data.age is 1
// data.tags is [‘Joe’, ‘John’],
// data.comments is ‘Some comments…’
},
},
],
});
},And from my quasar.conf.js:
framework: {
components: [
‘QLayout’,
‘QLayoutHeader’,
‘QLayoutDrawer’,
‘QPageContainer’,
‘QPage’,
‘QToolbar’,
‘QToolbarTitle’,
‘QBtn’,
‘QIcon’,
‘QList’,
‘QListHeader’,
‘QItem’,
‘QItemMain’,
‘QItemSide’,
‘QInput’,
‘QCard’,
‘QCardTitle’,
‘QCardMain’,
‘QCardMedia’,
‘QCardSeparator’,
‘QCardActions’
],
directives: [
‘Ripple’
],
// Quasar plugins
plugins: [
‘Notify’,
‘Dialog’
]What am I missing?
-
It looks to me like the form is the only thing that won’t load. Do I need to import it in my framework? if so, where and how?
-
Found it. I was looking at old documentation. I should use prompts now instead of form.