# kpc **Repository Path**: codingstudio/kpc ## Basic Information - **Project Name**: kpc - **Description**: 同时支持Intact/Vue/React/Angular框架的前端组件库 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: https://design.ksyun.com/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 14 - **Created**: 2021-03-08 - **Last Updated**: 2021-11-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
[](https://github.com/ksc-fe/kpc/actions?query=workflow%3A%22Node.js+CI%22)
[](https://codecov.io/gh/ksc-fe/kpc/branch/master)
[](https://cdn.jsdelivr.net/npm/kpc/dist/)
[](https://cdn.jsdelivr.net/npm/kpc/dist/)
[](https://www.npmjs.com/package/kpc)
[](https://www.npmjs.com/package/kpc)
](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari | [
](http://godban.github.io/browsers-support-badges/)Opera |
| --------- | --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
## Vue
### 安装
```shell
npm install kpc-vue --save
```
### 使用
```js
```
## React
### 安装
```shell
npm install kpc-react --save
```
### 使用
```jsx
import React from 'react';
import {Button} from 'kpc-react';
class App extends React.Component {
render() {
return
}
}
```
## Intact
### 安装
```shell
npm install kpc --save
```
### 使用
```js
import {Button} from 'kpc';
```
## Angular [详情][5]
### 安装
```shell
npm install kpc-angular -S
```
### 配置`webpack.config.js`
Angular CLI 初始化的项目必须使用`@angular-builders/custom-webapck`来配置webpack
```js
const path = require('path');
module.exports = function(config) {
config.module.rules.find(rule => {
if (rule.test.toString() === '/\\.css$/') {
rule.exclude.push(path.resolve(__dirname, 'node_modules/kpc-angular'));
return true;
}
});
return config;
};
```
### 使用
`src/app/app.module.ts`
```ts
import { KpcBrowserModule, KpcModule } from 'kpc-angular';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
KpcBrowserModule,
AppRoutingModule,
KpcModule,
],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }
```
```ts
import { Component, ViewEncapsulation } from '@angular/core';
import { MessageComponent } from 'kpc-angular';
@Component({
selector: 'app-root',
template: `