Use q-table with :data=“userData” and define userData as a computed property:
computed: {
userData: function () {
return Object.entries(this.user).map(([k,v]) => { return {key: k, value: v} })
}
}
Use q-table with :data=“userData” and define userData as a computed property:
computed: {
userData: function () {
return Object.entries(this.user).map(([k,v]) => { return {key: k, value: v} })
}
}
gb-flag
not gb-flags
gb-flags
componentgb-flag
tag worked for me the corresponding image did not resolve.boot: [
...
'~@growthbunker/vueflags'
]
Am interested in this as will be hitting same challenge down the line.
Some thoughts:
You may like to consider SSR + PWA handoff.
https://quasar.dev/quasar-cli/developing-ssr/ssr-with-pwa
SSR shopfront knows subdomain through ssrContext
https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr#Boot-Files
PWA shopfront knows subdomain through window.location
Code knows whether it is running client or server via process.env.CLIENT
and process.env.SERVER
Not a great comment mecjos. I am just a regular user of Quasar. Have found the support in this forum to be excellent. Much like the Quasar framework itself.
pagebus.js
).this.$on
is detected as error so am using $$on
instead.// file boot/pagebus.js
import { boot } from 'quasar/wrappers'
import mitt from 'mitt'
export default boot(({ app }) => {
app.use({
install: function (Vue, options) {
const pagebus = mitt()
app.config.globalProperties.$$on = pagebus.on
app.config.globalProperties.$$emit = pagebus.emit
}
})
})
If you wish to debug:
...
app.config.globalProperties.$$on = function (ev, ...args) {
console.log(ev, args)
return pagebus.on(ev, ...args)
}
...
Any support for twitter cards?
I am new to Twitter Cards. Afaik you add meta statements in your html. Beyond that I’m a blank canvas.
Ideally there is a solution where you get a screenshot posted based on the uri (i.e. different images for different pages).
Thanks
pagebus.js
).this.$on
is detected as error so am using $$on
instead.// file boot/pagebus.js
import { boot } from 'quasar/wrappers'
import mitt from 'mitt'
export default boot(({ app }) => {
app.use({
install: function (Vue, options) {
const pagebus = mitt()
app.config.globalProperties.$$on = pagebus.on
app.config.globalProperties.$$emit = pagebus.emit
}
})
})
If you wish to debug:
...
app.config.globalProperties.$$on = function (ev, ...args) {
console.log(ev, args)
return pagebus.on(ev, ...args)
}
...
Navigation drawers often contain a mix of internal and external links.
The following is working well for me:
// generate nav links as a list of q-items
<q-list>
<q-item
v-for="(item,id) in items" :key="id"
exact
tag="a"
:to="item.to"
:href="item.href"
:target="item.target||'_'">
<q-item-section>
<q-item-label>
{{ item.label }}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
You then provide data where items have either a to
or an href
:
// the data
data () {
return {
items: [
{ label: 'One', to: '/one' },
{ label: 'Two', to: '/two' },
{ label: 'Bing', href: 'http://bing.com' }
]
}}
Please shout if this breaks something I should be aware or if there is an alternative recommended way.
Hope it helps.
You can add site-wide styles in css/app file.
Perhaps this helps you.
Not a great comment mecjos. I am just a regular user of Quasar. Have found the support in this forum to be excellent. Much like the Quasar framework itself.
The emit solution does not reload the page
Yes this is what I expected. My comment was not clear.
I assume the getData
methods act on the new data (or the context is somehow different as otherwise would not need to be called again).
If it is working for you then the solution seems ok to me.
Perhaps you already know Vue persists data across page refreshes. It’s not clear you need it here.
I would store the data fetched within startEverything
into a data variable (say myData
) and call an updateMyData
method when the new data is entered.
Depending on your UI the updateMyData
could be triggered by a button (see @click
)
You do not need to refresh / reload page to re-trigger the data fetch from the server.
@amoss PageSticky
can be used to create a bottom fixed element. I don’t know how you would align elements in that with q-table
columns. Perhaps if you take explicit css control of column widths you could make it work.
@amoss Suggestion is to add an extra item to the end of your data
array to represent the count
and total
values. That item will appear in the correct columns as part of standard q-table
rendering. If not a solution then please post your relevant code.
@amoss Calculate count
and total
in data before passing to q-table
.