diff --git a/src/packages/components/Tables/Tables/TablesBasic/config.ts b/src/packages/components/Tables/Tables/TablesBasic/config.ts index eeca61bd..f1151226 100644 --- a/src/packages/components/Tables/Tables/TablesBasic/config.ts +++ b/src/packages/components/Tables/Tables/TablesBasic/config.ts @@ -5,26 +5,26 @@ import { chartInitConfig } from '@/settings/designSetting' import { TablesBasicConfig } from './index' import dataJson from './data.json' -const {dimensions,source} = dataJson +const { dimensions, source } = dataJson export const option = { - dataset:{dimensions,source}, - pagination:{ + dataset: { dimensions, source }, + pagination: { page: 1, - pageSize:5 + pageSize: 5 }, - align:'center', - style:{ - border:'on', - singleColumn:'off', - singleLine:'off', - bottomBordered:'on', - striped:'on', - fontSize:16, - borderWidth:0, - borderColor:'black', - borderStyle:'solid' + align: 'center', + style: { + border: 'on', + singleColumn: 'off', + singleLine: 'off', + bottomBordered: 'on', + striped: 'on', + fontSize: 16, + borderWidth: 0, + borderColor: 'black', + borderStyle: 'solid' }, - inputShow:"none" + inputShow: 'none' } export default class Config extends PublicConfigClass implements CreateComponentType { diff --git a/src/packages/components/Tables/Tables/TablesBasic/config.vue b/src/packages/components/Tables/Tables/TablesBasic/config.vue index 10b06699..9701196c 100644 --- a/src/packages/components/Tables/Tables/TablesBasic/config.vue +++ b/src/packages/components/Tables/Tables/TablesBasic/config.vue @@ -1,117 +1,123 @@ diff --git a/src/packages/components/Tables/Tables/TablesBasic/data.json b/src/packages/components/Tables/Tables/TablesBasic/data.json index 6d671fb6..29ba4085 100644 --- a/src/packages/components/Tables/Tables/TablesBasic/data.json +++ b/src/packages/components/Tables/Tables/TablesBasic/data.json @@ -1,60 +1,60 @@ { - "dimensions":[ - { - "title": "产品名称", - "key": "productName" - }, - { - "title": "产品销量(万)", - "key": "totalSum" - }, - { - "title": "销售额(万)", - "key": "totalAmount" - } - ], - "source":[ - { - "key": 0, - "productName": "产品A1", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 1, - "productName": "产品B1", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 2, - "productName": "产品C1", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 3, - "productName": "产品D1", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 4, - "productName": "产品A2", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 5, - "productName": "产品D2", - "totalSum": 10, - "totalAmount": 10 - }, - { - "key": 6, - "productName": "产品A3", - "totalSum": 10, - "totalAmount": 10 - } - ] -} \ No newline at end of file + "dimensions": [ + { + "title": "产品名称", + "key": "productName" + }, + { + "title": "产品销量(万)", + "key": "totalSum" + }, + { + "title": "销售额(万)", + "key": "totalAmount" + } + ], + "source": [ + { + "key": 0, + "productName": "产品A1", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 1, + "productName": "产品B1", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 2, + "productName": "产品C1", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 3, + "productName": "产品D1", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 4, + "productName": "产品A2", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 5, + "productName": "产品D2", + "totalSum": 10, + "totalAmount": 10 + }, + { + "key": 6, + "productName": "产品A3", + "totalSum": 10, + "totalAmount": 10 + } + ] +} diff --git a/src/packages/components/Tables/Tables/TablesBasic/index.vue b/src/packages/components/Tables/Tables/TablesBasic/index.vue index 5dcd2901..f3580744 100644 --- a/src/packages/components/Tables/Tables/TablesBasic/index.vue +++ b/src/packages/components/Tables/Tables/TablesBasic/index.vue @@ -1,33 +1,41 @@