@gatship/gs-components v0.1.23
gs-components
Vue 2 component library v1
This plugin library comes with a set of components and mixins for vue 2.
Requirements
latest vuetify 2 version. latest vue 2 version (2.7.14 or higher)
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.
Adding the plugin exsisting project
npm i @gatship/gs-components
import the plugin in main.js/main.ts
call the install function with the Vue instance as an argument.
main.js / main.ts
import Vue from 'vue';
import App from './App.vue';
import vuetify from './plugins/vuetify';
// The gsComponents import
import gsComponents from './gat-components/index';
// Installing the gsComponents plugin.
gsComponents.install(Vue);
new Vue({
vuetify,
render: (h) => h(App),
}).$mount('#app');Adding intellisense if using typescript
- Create a components.d.ts file in your src directory.
- copy/paste the content below into the components.d.ts
components.d.ts
declare module 'vue' {
export interface GlobalComponents {
GatButton: typeof import('@gatship/gs-components')['GatButton'];
GatButtonGroup: typeof import('@gatship/gs-components')['GatButtonGroup'];
GatDialog: typeof import('@gatship/gs-components')['GatDialog'];
GatGrid: typeof import('@gatship/gs-components')['GatGrid'];
GatEdit: typeof import('@gatship/gs-components')['GatEdit'];
GatSelect: typeof import('@gatship/gs-components')['GatSelect'];
GatMultiSelect: typeof import('@gatship/gs-components')['GatMultiSelect'];
GatBottomPanel: typeof import('@gatship/gs-components')['GatBottomPanel'];
GatCompactField: typeof import('@gatship/gs-components')['GatCompactField'];
GatFieldSpacer: typeof import('@gatship/gs-components')['GatFieldSpacer'];
GatFlex: typeof import('@gatship/gs-components')['GatFlex'];
GatForm: typeof import('@gatship/gs-components')['GatForm'];
GatGroup: typeof import('@gatship/gs-components')['GatGroup'];
GatSubGroup: typeof import('@gatship/gs-components')['GatSubGroup'];
RecordPresenter: typeof import('@gatship/gs-components')['RecordPresenter'];
GatLookupEdit: typeof import('@gatship/gs-components')['GatLookupEdit'];
GatTab: typeof import('@gatship/gs-components')['GatTab'];
GatReloadBtn: typeof import('@gatship/gs-components')['GatReloadBtn'];
}
}
export {};Project setup
npm installCompiles and hot-reloads for development
npm run serveCompiles and minifies for production
npm run buildRun your unit tests
npm run test:unitRun your end-to-end tests
npm run test:e2eLints and fixes files
npm run lintPublish to npm
npm run pubCustomize configuration
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago