Quasar Counter with Card Grid - Quasar-framework Typing CST Test
Loading…
Quasar Counter with Card Grid — Quasar-framework Code
Multiple counters in a Quasar grid layout.
<template>
<q-page class="q-pa-md">
<q-card v-for="n in 3" :key="n" class="q-ma-sm text-center">
<q-card-section>
<h3>Counter {{ n }}: {{ counts[n-1] }}</h3>
</q-card-section>
<q-card-actions align="center">
<q-btn color="primary" @click="increment(n-1)">+</q-btn>
<q-btn color="negative" @click="decrement(n-1)">-</q-btn>
<q-btn color="secondary" @click="reset(n-1)">Reset</q-btn>
</q-card-actions>
</q-card>
</q-page>
</template>
<script setup>
import { ref } from 'vue';
const counts = ref([0,0,0]);
const increment=(i)=>counts.value[i]++;
const decrement=(i)=>counts.value[i]--;
const reset=(i)=>counts.value[i]=0;
</script>Quasar-framework Language Guide
Quasar Framework is a Vue.js-based framework that allows developers to build high-performance, responsive web apps, mobile apps (via Cordova/Capacitor), and desktop apps (via Electron) using a single codebase.
Primary Use Cases
- ▸Vue.js web applications (SPA and SSR)
- ▸Progressive Web Apps (PWA)
- ▸Mobile apps via Cordova or Capacitor
- ▸Desktop apps via Electron
- ▸Cross-platform apps from a single codebase
Notable Features
- ▸Prebuilt Vue components
- ▸Responsive grid and layout system
- ▸Multi-platform support (Web, Mobile, Desktop)
- ▸Themeable design with light/dark modes
- ▸CLI tools for scaffolding and building apps
Origin & Creator
Created by Razvan Stoenescu in 2015 to enable multi-platform app development with Vue.js.
Industrial Note
Quasar is widely used for enterprise dashboards, mobile hybrid apps, PWAs, and Electron-based desktop applications built with Vue.js.