This commit is contained in:
oneao committed 2026-10-13 22:32:50 +08:00
1 parent f3936cec61
commit 15e0ae5b67
115 files changed
+11399 -2741

No files matched your search

@@ -7,6 +7,9 @@ import type { G3TableColumn, TableRow } from '@g3soft/ui'
// - seq 默认开启,会在最前列注入序号列
// - bordered 默认开启,边框由底座(stk-table-vue)绘制
// - 没写 width 的列会自动摊掉剩余宽度
// - 本例额外开了 `stripe`(斑马纹,默认关):注意**序号列也带条纹** ——
// 冻结列的底色必须不透明(否则横滚时被压住的内容会透字),
// 组件在冻结列上补了一层同色内阴影把条纹接上,业务不用管。
const columns: G3TableColumn<TableRow>[] = [
{ dataIndex: 'name', title: '名称', width: 180 },
{ dataIndex: 'amount', title: '金额', width: 120, align: 'right' },
@@ -22,6 +25,6 @@ const data = ref<TableRow[]>([
<template>
<div style="height: 260px">
<G3Table :columns="columns" :data-source="data" />
<G3Table :columns="columns" :data-source="data" stripe />
</div>
</template>
@@ -39,7 +39,9 @@ const columns: G3TableColumn<TableRow>[] = [
dataIndex: 'remark',
title: '备注(textarea)',
width: 180,
editor: { type: 'textarea' },
// 按行禁用:这一行「改不了」时铺灰底(无需先点开)。这里演示常见的
// 「停用之后不许再改备注」——第 2 行 status=0,所以它的备注格是灰的。
editor: { type: 'textarea', disabled: (row) => row.status === 0 },
},
{
dataIndex: 'owner',