2.0.7 • Published 2 years ago
limbo-vue-components v2.0.7
limbo-vue-components
通用组件库
安装方法
npm i limbo-vue-components
使用说明
全局引入:
import Packages from 'limbo-vue-components'
Vue.use(Packages)
局部引入:
import { xxx } from 'limbo-vue-components'
Vue.use(xxx)
组件
KeTable
<KeTable
:data="tableData"
/>
tableData: {
props: {
// 附加在el-table上的属性,一般可省略
},
params: {
on: {
'cell-click': (row) => console.log('row', row),
},
ref: 'myTable'
},
data: [
{ a: 1, b: ['CL', 'AB'], c: '珂爸爸1', d: { game: 'Limbo' } },
{ a: 2, b: ['GL', 'AB'], c: '珂爸爸2', d: { game: 'Dark Souls' } }
],
cols: [
{
label: '顶级表头',
children: [
{
label: 'C2-1',
prop: 'a',
header: (h, ctx) => (
<el-input
{...{ on: { change: () => console.log('input') } }}
/>
),
children: [
{
type: 'selection'
},
{
label: 'C3-1',
prop: 'a'
},
{
label: 'C3-2',
prop: 'c',
children: [
{
label: 'C4-0',
prop: 'c',
render: (h, ctx) => (
<div>
<p style="color: red">{ctx.row.a}</p>
<p>{ctx.row.d.game}</p>
</div>
)
},
]
}
]
},
{
label: 'C',
prop: 'c',
header: (h, ctx) => h(
'div',
{
on: {
click: () => console.log(ctx)
}
},
Title
),
render: (h, _ctx) => (
<div>
<p style="color: red">{_ctx.row.c}</p>
<p>{_ctx.row.d.game}</p>
</div>
)
}
]
},
{
label: 'Game',
render: (h, ctx) => h(
'div',
{},
[
h('span', {}, ctx.row.b[0] + ','),
h('i', {}, ctx.row.a)
]
)
},
{
label: 'Name',
render: (h, ctx) => (
<div>
<p style="color: red">{ctx.row.c}</p>
<p>{ctx.row.d.game}</p>
</div>
)
}
]
}
2.0.7
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.5
2 years ago
2.0.4
2 years ago
2.0.6
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.1.13
2 years ago
1.1.12
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.11
3 years ago
1.1.10
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago