FIT2Cloud UI는 Entoll UI의 보조 개발에 기반한 VUE 구성 요소 라이브러리이며, 구성 요소, 필터, 명령어 등을 제공합니다. 엔터프라이즈 소프트웨어 개발에 일반적으로 사용됩니다.
npm install fit2cloud-ui요소 UI를 사용할 때 설치해야합니다.
npm install element-uiSCSS를 사용해야하므로 SASS를 설치해야합니다.
npm install -D [email protected] [email protected] import Vue from 'vue' ;
import ElementUI from 'element-ui'
import Fit2CloudUI from 'fit2cloud-ui' ;
import "fit2cloud-ui/src/styles/index.scss" ; // 已经包含了element ui的scss
import App from './App.vue' ;
Vue . use ( ElementUI ) ;
Vue . use ( Fit2CloudUI ) ;
new Vue ( {
el : '#app' ,
render : h => h ( App )
} ) ;Babel-Plugin-Import를 사용하면 프로젝트 크기를 줄이기위한 목적을 달성하기 위해 필요한 구성 요소 만 소개 할 수 있습니다.
먼저 Babel-Plugin-Component를 설치하십시오.
npm install babel-plugin-import -D그런 다음 babel.config.js에 다음을 작성하십시오.
module . exports = {
presets : [
'@vue/cli-plugin-babel/preset'
] ,
plugins : [
[
"import" ,
{
"libraryName" : "fit2cloud-ui" ,
"customStyleName" : ( name ) => {
return `fit2cloud-ui/src/styles/components/ ${ name } .scss` ;
} ,
} ,
] ,
]
}다음으로 SearchBar 및 테이블과 같은 일부 구성 요소를 도입 할 수 있으므로 다음 컨텐츠를 Main.js로 작성해야합니다.
import Vue from 'vue' ;
import ElementUI from 'element-ui'
import 'fit2cloud-ui/src/styles/require.scss' ; // 已经包含了element ui的scss
import { SearchBar , Table } from 'fit2cloud-ui' ;
import App from './App.vue' ;
Vue . use ( ElementUI ) ;
Vue . use ( SearchBar ) ;
Vue . use ( Table ) ;
new Vue ( {
el : '#app' ,
render : h => h ( App )
} ) ;vue-i18n 사용
import Vue from 'vue' ;
import Fit2CloudUI from 'fit2cloud-ui' ;
import "fit2cloud-ui/src/styles/index.scss" ; // 已经包含了element ui的scss
import zhCN from "fit2cloud-ui/src/locale/lang/zh-CN" ;
import App from './App.vue' ;
const message = {
'zh-CN' : {
hello : '你好' ,
... zhCN
}
}
const i18n = new VueI18n ( {
locale : 'zh-CN' ,
messages ,
} ) ;
Vue . use ( Fit2CloudUI , {
i18n : ( key , value ) => i18n . t ( key , value )
} ) ;
new Vue ( {
el : '#app' ,
i18n ,
render : h => h ( App )
} ) ;문서 주소 : https://fit2cloud-ui.github.io/docs/
저작권 (C) 2014-2024 Feizhiyun Fit2Cloud, 모든 권리 보유.
GNU 일반 공개 라이센스 버전 3 (GPLV3) ( "라이센스")에 따라 라이센스가 부여되었습니다. 라이센스를 준수하는 것 외에는이 파일을 사용할 수 없습니다. 라이센스 사본을 얻을 수 있습니다
https://www.gnu.org/licenses/gpl-3.0.html
해당 법률에 의해 요구되거나 서면에 동의하지 않는 한, 라이센스에 따라 배포 된 소프트웨어는 명시 적 또는 묵시적 보증 또는 조건없이 "그대로"기준으로 배포됩니다. 라이센스에 따른 특정 언어 통치 권한 및 제한 사항에 대한 라이센스를 참조하십시오.