Grid components for web development based on the CSS Grid and Vue.
pnpm add @ayingott/a-grid
// main.ts
import { createApp } from "vue"
import AGrid from "@ayingott/a-grid"
import App from "./App.vue"
const app = createApp(App)
app.use(AGrid)
app.mount("#app")
If using Volar and full import, you can add the global component type definition to compilerOptions.types
in tsconfig.json
.
// tsconfig.json
{
"compilerOptions": {
// ...
"types": ["@ayingott/a-grid/global"]
}
}
@ayingott/a-grid
provides a resolver so that you can use unplugin-vue-components
to auto import components.
pnpm add -D unplugin-vue-components
// vite.config.ts
import { defineConfig } from "vite"
import Components from "unplugin-vue-components/vite"
import AGridResolver from "@ayingott/a-grid/resolver"
export default defineConfig({
// ...
plugins: [
// ...
Components({
resolvers: [AGridResolver()],
}),
],
})