Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.
quasarframework/quasar quasar@2.19.3
Tags: legacy: 1.22.10, latest: 2.19.3
References: Docs
API Changes
This section documents version-specific API changes — prioritize recent major/minor releases.
- BREAKING:
v-model-> usesmodel-value+@update:model-valueinstead ofvalue+@inputin Vue 3 source
- BREAKING:
QDrawer/QDialog/QMenu/QTooltip-> useclassandstyleattributes instead ofcontent-class/content-styleprops source
- BREAKING:
QImg-> completely redesigned, removedtransitionandbasicprops; renamedno-default-spinnertono-spinnersource
- BREAKING:
QScrollArea-> methodsgetScrollPositionreturns{ top, left };setScrollPositionandsetScrollPercentagerequireaxisparameter source
- BREAKING:
QTable-> renameddataprop torowsto avoid TS naming conflicts source
- BREAKING:
Platform.is-> all boolean properties now explicitlyfalseinstead ofundefinedsince v2.17.0 source
- BREAKING:
colorsutils ->getBrandandsetBrandreplaced bygetCssVarandsetCssVarrespectively source
- BREAKING: Scroll utils -> renamed
getScrollPositiontogetVerticalScrollPosition,animScrollTotoanimVerticalScrollTo, andsetScrollPositiontosetVerticalScrollPositionsource
- BREAKING:
dateutils ->addToDateandsubtractFromDateproperty names normalized (e.g.,year->years,month->months) source
- BREAKING:
QPopupEdit-> must now use the default slot withv-slot="scope"for performance source
- BREAKING:
GoBackdirective -> removed; use router reference ($router.back()or$router.go(-1)) instead source
- NEW:
useQuasarcomposable -> primary method for accessing the$qobject within Composition API components
- NEW:
useMetacomposable -> new way to define meta tags, replacing the now deprecatedmetacomponent property source
- NEW:
QTableprops -> addedtable-row-style-fn,table-row-class-fn,grid-style-fn, andgrid-class-fnin v2.18.0 source
Also changed: useFormChild() new composable · QOptionsGroup props option-value, option-label, option-disable new v2.17.0 · QUploader prop thumbnail-fit new v2.17.0 · QSelect prop disable-tab-select new v2.17.0 · QMenu/QBtnDropdown no-esc-dismiss new v2.18.0 · evt.qAvoidFocus new flag v2.18.0 · QDate model-value no longer contains changed prop · QPagination prop gutter new · QImg props loading, crossorigin, fit new · Dialog plugin custom component props moved to componentProps · Loading plugin uses html: true for HTML content instead of sanitize · App.vue wrapper <div id="q-app"> removed · .sync modifier replaced by v-model:propName
Best Practices
- Use
#q-app/wrappersinstead ofquasar/wrappersfor defining configurations and boot files — provides superior type inference and alignment with modern Quasar CLI source
- Use Regle as the recommended validation library for
QInputandQField— provides a robust, externalized validation logic compared to inline rules source
- Prefer responsive CSS classes (e.g.,
gt-sm,lt-md) over theScreenplugin in JavaScript — minimizes re-renders and layout shifts by leveraging CSS media queries directly source
- Bootstrap custom dialog components with the
useDialogPluginComponentcomposable — handles the complex internal communication and lifecycle requirements of the Dialog plugin automatically source
- Enable the
no-transitionprop onQTreewhen rendering large datasets — significantly improves runtime performance by skipping expensive expansion/collapse animations source
- Use Quasar's
useIntervalanduseTimeoutcomposables over native browser timers — ensures automatic cancellation and memory cleanup when the component is unmounted source
- Place
QPullToRefreshas a direct child ofQPagewhen usingQLayout— ensures correct scroll event interception and native-like pull behavior within the layout container source
- Avoid setting
Darkmode toautoin SSR applications — prevents the "flicker" effect where the server renders light mode before the client synchronizes with system preferences source
- Do not use
v-modelwithQRouteTabcomponents — the active state is derived directly from the current route, and manual model updates will not trigger navigation source
- Prefer the Loading Bar Plugin over manual
QAjaxBarcomponent instances — provides a simpler, globally managed progress indicator for all Ajax calls without per-page wiring source
