FIT2CLOUD UIは、エンタープライズソフトウェア開発で一般的に使用されるコンポーネント、フィルター、命令などを提供する要素UIの二次開発に基づくVUEコンポーネントライブラリです。
npm install fit2cloud-ui要素UIは、それを使用するときにインストールする必要があります
npm install element-uiSCSを使用する必要があるため、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/
Copyright(c)2014-2024 Feizhiyun Fit2cloud、All Rights Reserved。
GNU General Publicライセンスバージョン3(GPLV3)(「ライセンス」)に基づいてライセンスされています。ライセンスに準拠している場合を除き、このファイルを使用することはできません。ライセンスのコピーを取得できます
https://www.gnu.org/licenses/gpl-3.0.html
適用法で要求されていないか、書面で合意されていない限り、ライセンスに基づいて配布されたソフトウェアは、明示または黙示のいずれかの保証または条件なしに、「現状のまま」に基づいて配布されます。ライセンスに基づく権限と制限を管理する特定の言語のライセンスを参照してください。