idsp-web-seed2-paging
v1.0.13
Published
分页组件
Downloads
3
Readme
idsp-web-seed2-paging
分页组件
安装方法
1. 下载程序包
npm i idsp-web-seed2-paging --save
2. 配置文件依赖
找到 index.html
文件的systemjs配置,加入 idsp-web-seed2-paging
配置
SystemJS.config({
transpiler: 'ts',
typescriptOptions: {
// ...
},
packages: {
//...
lesscss: {main: './dist/less.min.js'},
css: {main: 'css.js'},
less: {main: 'less.js'},
// 组件设置
'idsp-web-seed2-paging': {main: 'paging.ts'},
"src": {
//...
}
},
meta: {
'*.less': {loader: 'less'},
'*.css': {loader: 'css'},
// ...
},
map: {
css: 'node_modules/systemjs-plugin-css',
less: 'node_modules/systemjs-plugin-less',
lesscss: 'node_modules/less',
// ...
'idsp-web-seed2-paging': 'node_modules/idsp-web-seed2-paging',
}
});
3. 在项目src/common/directives/directives.ts
中依赖组件
//...
import paging from "idsp-web-seed2-paging";
export const mod = module('directives', [...others, paging]);
4. 接下来就可以使用分页了
<paging option="testOption"></paging>
@Route({
...
controllerAs : 'Ctrl'
})
@Controller
exports class PageCtrl{
public pagingOption:PagingOption = {
params : {}
};
constructor(TestServer){
this.pagingOption.resource = TestServer;
}
}