Is there an option to let $q.dialog return a promise like it did in 0.17+ ? It is awkward to convert callbacks to promises and fit in the promise or async/await codes every time we use dialog.
beeplin
@beeplin
Posts made by beeplin
-
[v1] $q.dialog() now returns a chainable object (with onOK/onCancel callbacks), not a promise. How to use promise with it?
-
RE: Can we "separate config files" like vue cli 3
These are features of babel/eslint/etc., not quasar. We can always put some configs in package.json like this:
"babel": { "presets": [ [ "@babel/preset-env", { "targets": { "node": "8.11" } } ] ] }, "prettier": { "printWidth": 120, "trailingComma": "all", "singleQuote": true, "semi": false }, "eslintIgnore": [], "eslintConfig": { "root": true, "parserOptions": { "parser": "babel-eslint" }, "env": { "es6": true, "commonjs": true, "node": true, "browser": false }, } ...
-
RE: How to chang the default source code path from `/src` to something else?
I found in quasar-cli/lib/build/app-path.js:
const appDir = getAppDir(), cliDir = resolve(__dirname, '../..'), srcDir = resolve(appDir, 'src'), pwaDir = resolve(appDir, 'src-pwa'), cordovaDir = resolve(appDir, 'src-cordova'), electronDir = resolve(appDir, 'src-electron')
Does this mean the
src
path cannot be changed? -
How to chang the default source code path from `/src` to something else?
for both dev server and build?
-
[0.15.x] discussion: v-model vs :prop.sync
Many components in 0.15 use
v-model
to control show/hide status. By usingv-model
the data can be changed either from inside the component itself, or from outside. This is a much better way compared with the old way like$ref.xxx.closeLeft()
in 0.14. However,v-model
has two drawbacks:-
one component could has only one
v-model
, so if the component needs two or more double-directional synced props, it does not work (for example, for now QLayoutDrawer usesv-model
since it needs only one prop to control show/hide status – but who knows when in the future it would need more… ); -
v-model
has no declarative name for the prop, so it is hard to understand what thev-model
is for at the first glance, without referring to the documents.
In fact ,
:prop.sync
can do the same thing. A component can have multiple.sync
props, and.sync
also give the prop a name to explicitly show what this prop is for. We see QTree and QTable are already using.sync
props. Maybe it is worth discussing if we should make more use of.sync
rather thanv-model
, say, just turn this:<q-layout-drawer v-model="isLeftDrawerShowing">
to this:
<q-layout-drawer :show.sync="isLeftDrawerShowing">
-
-
[0.15.x] suggestion: turn remaining done()/fail() callbacks to promises
Glad to see in 0.15 many async callback functions have been made to promises, which extremely facilitate the usage of the new async/await syntax.
However I noticed that there are still a few components using done()/fail() callbacks (such as QUpload, QPullToRefresh, QAutocomplete). It would be super nice to make them all promises.
-
[0.15.x] Is vue router history mode still incompatible with cordova?
In 0.14 when using history mode of vue router, quasar alerts that the history mode is not working with cordova. Is this still the case in 0.15+ (since I don’t see the same alert in 0.15)?
-
RE: ~~Do not upgrade to Vue 2.4.x (yet)~~ Edit: Safe to upgrade
use
import
instead ofrequire
, or userequire('xxx.vue').default
-
RE: ~~Do not upgrade to Vue 2.4.x (yet)~~ Edit: Safe to upgrade
2.5.0 doesn’t fix this bug yet.