Skip to content

Commit

Permalink
Merge pull request #261 from VisActor/260-refactor-rename-dimensionke…
Browse files Browse the repository at this point in the history
…y-and-indicatorkey-to-field

260 refactor rename caption to title
  • Loading branch information
fangsmile committed Aug 30, 2023
2 parents 1b66758 + 27a4945 commit d9e25ed
Show file tree
Hide file tree
Showing 173 changed files with 8,477 additions and 1,305 deletions.
16 changes: 8 additions & 8 deletions packages/vtable/__tests__/pivotChart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const columnTree = [
const columns: (VTable.IDimension | string)[] = [
{
dimensionKey: '230417171050031',
dimensionTitle: '国家',
title: '国家',
headerStyle: {
color: 'red'
}
Expand All @@ -57,7 +57,7 @@ const columns: (VTable.IDimension | string)[] = [
const rows = [
{
dimensionKey: '230417170554012',
dimensionTitle: '邮寄方式',
title: '邮寄方式',
headerStyle: {
color: 'red'
}
Expand All @@ -66,7 +66,7 @@ const rows = [
const indicators: VTable.TYPES.IIndicator[] = [
{
indicatorKey: '230417171050011',
caption: '数量',
title: '数量',
width: 'auto',
columnType: 'chart',
chartModule: 'vchart',
Expand Down Expand Up @@ -112,7 +112,7 @@ const indicators: VTable.TYPES.IIndicator[] = [
},
{
indicatorKey: '230417171050025',
caption: '销售额 & 利润',
title: '销售额 & 利润',
columnType: 'chart',
chartModule: 'vchart',
chartSpec: {
Expand Down Expand Up @@ -179,7 +179,7 @@ const indicators: VTable.TYPES.IIndicator[] = [
},
{
indicatorKey: '230707112948009',
caption: '折扣',
title: '折扣',
width: 'auto',
columnType: 'chart',
chartModule: 'vchart',
Expand Down Expand Up @@ -9675,7 +9675,7 @@ describe('pivotTable init test', () => {
const indicators1: VTable.TYPES.IIndicator[] = [
{
indicatorKey: '230417171050011',
caption: '数量',
title: '数量',
width: 'auto',
columnType: 'chart',
chartModule: 'vchart',
Expand Down Expand Up @@ -9711,7 +9711,7 @@ describe('pivotTable init test', () => {
},
{
indicatorKey: '230417171050025',
caption: '销售额 & 利润',
title: '销售额 & 利润',
columnType: 'chart',
chartModule: 'vchart',
chartSpec: {
Expand Down Expand Up @@ -9778,7 +9778,7 @@ describe('pivotTable init test', () => {
},
{
indicatorKey: '230707112948009',
caption: '折扣',
title: '折扣',
width: 'auto',
columnType: 'chart',
chartModule: 'vchart',
Expand Down
10 changes: 5 additions & 5 deletions packages/vtable/__tests__/pivotTable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ describe('pivotTable init test', () => {
const rows = [
{
dimensionKey: '地区',
dimensionTitle: '地区',
title: '地区',
headerStyle: {
textStick: true,
color: 'red',
Expand All @@ -396,7 +396,7 @@ describe('pivotTable init test', () => {
},
{
dimensionKey: '省/自治区',
dimensionTitle: '省/自治区',
title: '省/自治区',
width: 'auto',
showSort: false,
headerStyle: {
Expand All @@ -416,7 +416,7 @@ describe('pivotTable init test', () => {
const columns = [
{
dimensionKey: '子类别',
dimensionTitle: '子类别',
title: '子类别',
headerStyle: {
textStick: true
},
Expand All @@ -426,7 +426,7 @@ describe('pivotTable init test', () => {
const indicators = [
{
indicatorKey: '利润',
caption: '利润',
title: '利润',
width: 'auto',
style: {
borderColor: 'red',
Expand All @@ -440,7 +440,7 @@ describe('pivotTable init test', () => {
},
{
indicatorKey: '销售额',
caption: '销售额',
title: '销售额',
width: 'auto'
}
];
Expand Down
12 changes: 6 additions & 6 deletions packages/vtable/examples/auto-size/adaptive-width.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export function createTable() {
fontSize: 12,
fontFamily: 'sans-serif'
},
caption: 'progress',
title: 'progress',
description: '这是一个标题的详细描述',
width: 'calc(20% - 20px)'
// width: 'auto'
},
{
caption: 'Name',
title: 'Name',
headerStyle: {
textAlign: 'center',
fontWeight: 'bold',
Expand All @@ -35,7 +35,7 @@ export function createTable() {
columns: [
{
field: 'fname',
caption: 'First Name',
title: 'First Name',
width: '20%',
minWidth: 150,
headerStyle: {
Expand All @@ -44,15 +44,15 @@ export function createTable() {
},
{
field: 'lname',
caption: 'Last Name',
title: 'Last Name',
width: '20%',
minWidth: 150
}
]
},
{
field: 'email',
caption: 'email',
title: 'email',
width: 200,
headerStyle: {
autoWrapText: true,
Expand Down Expand Up @@ -108,7 +108,7 @@ export function createTable() {
rec.birthday = isNaN(parseInt(date.toString(), 10)) ? val : date;
}
},
caption: 'Birthday',
title: 'Birthday',
width: 150
}
],
Expand Down
8 changes: 4 additions & 4 deletions packages/vtable/examples/auto-size/auto-height.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function createTable() {
}
return str + rec.progress;
},
caption: 'progress',
title: 'progress',
description: '这是一个标题的详细描述',
width: 150,
showSort: true, //显示VTable内置排序图标
Expand All @@ -38,7 +38,7 @@ export function createTable() {
},
{
field: 'id',
caption: 'ID',
title: 'ID',
sort: (v1, v2, order) => {
if (order === 'desc') {
return v1 === v2 ? 0 : v1 > v2 ? -1 : 1;
Expand All @@ -52,7 +52,7 @@ export function createTable() {
fieldFormat(rec) {
return `手动换行\n这是这是第${rec.id}号`;
},
caption: 'ID说明',
title: 'ID说明',
description: '这是一个ID详细描述',
sort: (v1, v2, order) => {
if (order === 'desc') {
Expand All @@ -63,7 +63,7 @@ export function createTable() {
width: 150
},
{
caption: 'Name',
title: 'Name',
headerStyle: {
textAlign: 'center',
fontWeight: 'bold',
Expand Down
12 changes: 6 additions & 6 deletions packages/vtable/examples/auto-size/auto-width.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export function createTable() {
fontSize: 12,
fontFamily: 'sans-serif'
},
caption: 'progress',
title: 'progress',
description: '这是一个标题的详细描述',
// width: 'calc(20% - 20px)',
width: 'auto'
},
{
caption: 'Name',
title: 'Name',
headerStyle: {
textAlign: 'center',
fontWeight: 'bold',
Expand All @@ -35,7 +35,7 @@ export function createTable() {
columns: [
{
field: 'fname',
caption: 'First Name',
title: 'First Name',
// width: '20%',
width: 'auto',
minWidth: 150,
Expand All @@ -45,7 +45,7 @@ export function createTable() {
},
{
field: 'lname',
caption: 'Last Name',
title: 'Last Name',
// width: '20%',
width: 'auto',
minWidth: 150
Expand All @@ -54,7 +54,7 @@ export function createTable() {
},
{
field: 'email',
caption: 'email',
title: 'email',
// width: 200,
width: 'auto',
headerStyle: {
Expand Down Expand Up @@ -111,7 +111,7 @@ export function createTable() {
rec.birthday = isNaN(parseInt(date.toString(), 10)) ? val : date;
}
},
caption: 'Birthday',
title: 'Birthday',
width: 150
}
],
Expand Down
20 changes: 10 additions & 10 deletions packages/vtable/examples/business/multiple-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,54 +49,54 @@ export function createTable(container) {
const columns: VTable.ColumnsDefine = [
{
field: 'id',
caption: 'ID',
title: 'ID',
width: 120,
sort: true
},
{
field: 'email1',
caption: 'email',
title: 'email',
width: 200,
sort: true
},
{
caption: 'full name',
title: 'full name',
columns: [
{
field: 'name',
caption: 'First Name',
title: 'First Name',
width: 200
},
{
field: 'name',
caption: 'Last Name',
title: 'Last Name',
width: 200
}
]
},
{
field: 'date1',
caption: 'birthday',
title: 'birthday',
width: 200
},
{
field: 'sex',
caption: 'sex',
title: 'sex',
width: 100
},
{
field: 'tel',
caption: 'telephone',
title: 'telephone',
width: 150
},
{
field: 'work',
caption: 'job',
title: 'job',
width: 200
},
{
field: 'city',
caption: 'city',
title: 'city',
width: 150
}
];
Expand Down
Loading

0 comments on commit d9e25ed

Please sign in to comment.