A component library written in Intact for Intact, Vue, React and Angular
npm install kpc





English | 简体中文
* Support multiple frameworks: [Intact][1] / [Vue][2] / [React][3] / [Angular][4].
* Complete custom theme system.
* 360° locate popup layer.
* Declarative form validation.
* Excellent documents and design
* 90% coverage unit tests.
|
IE / Edge |
Firefox |
Chrome |
Safari |
Opera |
| --------- | --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
``shell`
npm install kpc-vue --save
`js`
`shell`
npm install kpc-react --save
`jsx
import React from 'react';
import {Button} from 'kpc-react';
class App extends React.Component {
render() {
return
}
}
`
`shell`
npm install kpc --save
`js
import {Button} from 'kpc';
`
Read [more][5]
`shell`
npm install kpc-angular -S
You need use @angular-builders/custom-webapck to configure webpack, if your project initialized by Angular CLI.
`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:
,
style:
.k-button {
margin: 10px;
}
,`
encapsulation: ViewEncapsulation.None,
})
export class AppComponent {
onClick() {
MessageComponent.success('Welcome to kpc world!');
}
}
Welcome to join us by QQ. Group Number: 529739732

* KPC Document
* [Intact MVVM Framework][1]
* Vdt Template Engine
* Intact-Vue Compatibility Layer
* Intact-React Compatibility Layer
* Intact-Angular Compatibility Layer
> Require node@10 and npm@6.9 or above.
`shell
git clone https://github.com/ksc-fe/kpc.git
cd kpc
npm install
npm run dev:doc
MIT
[1]: http://javey.github.io/intact/
[2]: https://vuejs.org/
[3]: https://reactjs.org/
[4]: https://angular.io/
[5]: https://design.ksyun.com/docs/angular/