@karnjeet https://codepen.io/metalsadman/pen/ZgKexK
Oct. 2020 update: added complex example with updating of values.
@karnjeet https://codepen.io/metalsadman/pen/ZgKexK
Oct. 2020 update: added complex example with updating of values.
@rubs here, also fixed some quirks when q-page-container is adding padding left same as q-splitter’s left width https://codepen.io/metalsadman/pen/YzPgKML
@PeterQF Its just a placeholder … means insert your code or whatever there, in this case an array of string paths ie paths : ['somepath']
. https://github.com/robinvdvleuten/vuex-persistedstate/blob/master/README.md
@venkyvb
Try something like this.
<q-table
:data="tableData"
:columns="columns"
row-key="name"
:rows-per-page-options="[0]"
:pagination.sync="pagination"
hide-header
hide-bottom
/>
data () {
return {
pagination: {
page: 1,
rowsPerPage: 0 // 0 means all rows
}
}
@patryckx check my sandbox currency formatter, you can replace the characters for ., prolly tweak the regular expression too. Its at src/components/base… https://codesandbox.io/s/0ybb3 sry cant check atm in mobile. mosuforge also has one using https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat
you could’ve just un-commented the line.
export default function (/* { store, ssrContext } */) {
to
export default function ({ store }) {
also comment the line
import store from '../store'
since like doing it with quasar plugins, the store is also accessible in router/index.js.
@jacklin10 be sure that you passed the store
as an arg at your router/index.js’s export default function to access the store You don’t need to import your store.
Like I stated on my older reply in this thread https://forum.quasar-framework.org/topic/2825/store-is-no-longer-accessible-in-router/6… which is just above your post.
ie.
export default function({ store }) { // <<<<<<-- this is what you're looking for
const Router = new VueRouter({
scrollBehavior: () => ({ x: 0, y: 0 }),
routes,
mode: process.env.VUE_ROUTER_MODE,
base: process.env.VUE_ROUTER_BASE
})
Router.beforeEach((to, from, next) => {
...
console.log('LoggedIn: ', store.getters['auth/loggedIn'])
....
})
return Router
}
@bdaviddee you can expose your store instance at src/store/index.js
something like:
import Vue from 'vue'
import Vuex from 'vuex'
import example from './module-example'
Vue.use(Vuex)
/*
* If not building with SSR mode, you can
* directly export the Store instantiation
*/
let store = null
export default function (/* { ssrContext } */) {
const Store = new Vuex.Store({
modules: {
example
}
})
store = Store
return Store
}
export { store }
//some js file
import { store } from '.../store'
somefunction()..
store....
is that a mixin you’re trying to make? i see a created there. like i said if it’s a vue file, then you can just do what i suggested on my last comment.
@susansiow yeah, there should be a plugin out there in the cordova wild. I suppose you are looking for some kind of persistent login, then there also plugins that provide api where you can save your jwt in the app’s shared preference.
@susansiow just take note that IOS may clear the local storage on low memory without notice.
@susansiow it’s relatively safe to use local storage in mobile apps. furthermore you can use something like https://github.com/softvar/secure-ls to encrypt your localstorage data. IOS clears the local storage on low memory without notice tho, so take also that in consideration.
@pospi try using the object form ie.
...mapGetters({
searchForm: 'client/searchForm',
resultForm: 'client/resultForm'
})
...
@jj try evt.target.$el.name
in your click handler.
@szabiaura provide more info, a snippet or a codepen.
@kaizoku2508 hello, click the link of an example I made above…
@kaizoku2508 @s-molinari is correct, anyway here’s an expandable q-input in a toolbar example https://codepen.io/metalsadman/pen/dyOBEBg.
@jj log the event object, check on the target property, could also use a vue ref there, or pass a string params on your handler, if you’re just trying to use the name attribute as a flag or something.