u
This commit is contained in:
1 parent
e7c84a82a2
commit
025d3232c4
65 files changed
+9838
-9111
No files matched your search
@@ -4,12 +4,9 @@ import { G3Table } from '@g3soft/ui'
|
||||
import type { G3TableColumn, TableRow } from '@g3soft/ui'
|
||||
|
||||
// 最小用法:给 columns 与 dataSource 两份数据即可。
|
||||
// - seq 默认开启,会在最前列注入序号列
|
||||
// - bordered 默认开启:圆角外框由组件自绘;横竖格线仍走底座的背景渐变
|
||||
// - seq 默认开启,会在最前列注入序号列(固定左侧)
|
||||
// - bordered 默认开启:圆角外框由组件自绘 + 行分隔线
|
||||
// - 没写 width 的列会自动摊掉剩余宽度
|
||||
// - 本例额外开了 `stripe`(斑马纹,默认关):注意**序号列也带条纹** ——
|
||||
// 冻结列的底色必须不透明(否则横滚时被压住的内容会透字),
|
||||
// 组件在冻结列上补了一层同色内阴影把条纹接上,业务不用管。
|
||||
const columns: G3TableColumn<TableRow>[] = [
|
||||
{ dataIndex: 'name', title: '名称', width: 180 },
|
||||
{ dataIndex: 'amount', title: '金额', width: 120, align: 'right' },
|
||||
@@ -25,6 +22,6 @@ const data = ref<TableRow[]>([
|
||||
|
||||
<template>
|
||||
<div style="height: 260px">
|
||||
<G3Table :columns="columns" :data-source="data" stripe />
|
||||
<G3Table :columns="columns" :data-source="data" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user