简体   繁体   English

在 Vue 表达式中引用 Quasar CSS 断点

[英]Reference Quasar CSS breakpoints in Vue expressions

I am utilising the QDialog component of Quasar Framework at present, and would like the maximized property value to be set based upon the current screen size ie.我目前正在使用 Quasar Framework 的 QDialog 组件,并希望根据当前屏幕尺寸设置maximized属性值,即。 maximized for small screens only.仅针对小屏幕最大化。 Is there some variable I can reference in my component code or expressions for this purpose?为此,我可以在组件代码或表达式中引用一些变量吗? Something along the lines of:类似的东西:

    <q-dialog v-model="showdialog" :maximized="myBreakpointVar === 'sm'"> ... </q-dialog>

屏幕插件应该做你想做的:

<q-dialog v-model="showdialog" :maximized="$q.screen.sm"> ... </q-dialog>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM