mode-ui
v0.0.20
Published
`mode-ui` adalah plugin UI untuk Vue yang menyediakan berbagai komponen siap pakai untuk membantu membangun antarmuka yang cepat dan konsisten.
Maintainers
Readme
mode-ui
mode-ui adalah plugin UI untuk Vue yang menyediakan berbagai komponen siap pakai
untuk membantu membangun antarmuka yang cepat dan konsisten.
Instalasi
Instal package menggunakan npm:
npm install mode-uiPenggunaan
Daftarkan plugin pada file entry aplikasi, misalnya src/main.ts:
import { createApp } from 'vue'
import App from './App.vue'
import ModeUI from 'mode-ui'
import 'mode-ui/dist/style.css'
createApp(App)
.use(ModeUI)
.mount('#app')Setelah plugin didaftarkan, komponen UI dapat digunakan di file Vue:
<template>
<ModeButton type="primary">Simpan</ModeButton>
</template>Komponen juga dapat diimpor secara langsung dari mode-ui jika diperlukan.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
Customize configuration
See Vite Configuration Reference.
Project Setup
npm installCompile and Hot-Reload for Development
npm run devType-Check, Compile and Minify for Production
npm run buildLint with ESLint
npm run lint