diff --git a/src/packages/components/Decorates/Decorates/Decorates01/index.ts b/src/packages/components/Decorates/Decorates/Decorates01/index.ts index 26e1ff73..85795892 100644 --- a/src/packages/components/Decorates/Decorates/Decorates01/index.ts +++ b/src/packages/components/Decorates/Decorates/Decorates01/index.ts @@ -7,8 +7,8 @@ export const Decorates01Config: ConfigType = { chartKey: 'VDecorates01', conKey: 'VCDecorates01', title: '装饰-01', - category: ChatCategoryEnum.DECORATES, - categoryName: ChatCategoryEnumName.DECORATES, + category: ChatCategoryEnum.DECORATE, + categoryName: ChatCategoryEnumName.DECORATE, package: PackagesCategoryEnum.DECORATES, image } diff --git a/src/packages/components/Decorates/Decorates/Decorates02/index.ts b/src/packages/components/Decorates/Decorates/Decorates02/index.ts index 4016dfac..6c4caaca 100644 --- a/src/packages/components/Decorates/Decorates/Decorates02/index.ts +++ b/src/packages/components/Decorates/Decorates/Decorates02/index.ts @@ -7,8 +7,8 @@ export const Decorates02Config: ConfigType = { chartKey: 'VDecorates02', conKey: 'VCDecorates02', title: '装饰-02', - category: ChatCategoryEnum.DECORATES, - categoryName: ChatCategoryEnumName.DECORATES, + category: ChatCategoryEnum.DECORATE, + categoryName: ChatCategoryEnumName.DECORATE, package: PackagesCategoryEnum.DECORATES, image } diff --git a/src/packages/components/Decorates/Decorates/Decorates03/index.ts b/src/packages/components/Decorates/Decorates/Decorates03/index.ts index c2fda8ae..f7dcf43f 100644 --- a/src/packages/components/Decorates/Decorates/Decorates03/index.ts +++ b/src/packages/components/Decorates/Decorates/Decorates03/index.ts @@ -7,8 +7,8 @@ export const Decorates03Config: ConfigType = { chartKey: 'VDecorates03', conKey: 'VCDecorates03', title: '装饰-03', - category: ChatCategoryEnum.DECORATES, - categoryName: ChatCategoryEnumName.DECORATES, + category: ChatCategoryEnum.DECORATE, + categoryName: ChatCategoryEnumName.DECORATE, package: PackagesCategoryEnum.DECORATES, image } diff --git a/src/packages/components/Decorates/Decorates/Decorates04/config.vue b/src/packages/components/Decorates/Decorates/Decorates04/config.vue index 9d8059cf..82b5efb1 100644 --- a/src/packages/components/Decorates/Decorates/Decorates04/config.vue +++ b/src/packages/components/Decorates/Decorates/Decorates04/config.vue @@ -3,7 +3,7 @@ - + 开启反向 diff --git a/src/packages/components/Decorates/Decorates/Decorates04/index.ts b/src/packages/components/Decorates/Decorates/Decorates04/index.ts index 38adf988..5c608583 100644 --- a/src/packages/components/Decorates/Decorates/Decorates04/index.ts +++ b/src/packages/components/Decorates/Decorates/Decorates04/index.ts @@ -7,8 +7,8 @@ export const Decorates04Config: ConfigType = { chartKey: 'VDecorates04', conKey: 'VCDecorates04', title: '装饰-04', - category: ChatCategoryEnum.DECORATES, - categoryName: ChatCategoryEnumName.DECORATES, + category: ChatCategoryEnum.DECORATE, + categoryName: ChatCategoryEnumName.DECORATE, package: PackagesCategoryEnum.DECORATES, image } diff --git a/src/packages/components/Decorates/Decorates/Decorates05/index.ts b/src/packages/components/Decorates/Decorates/Decorates05/index.ts index 9a61f90f..9b3396fc 100644 --- a/src/packages/components/Decorates/Decorates/Decorates05/index.ts +++ b/src/packages/components/Decorates/Decorates/Decorates05/index.ts @@ -7,8 +7,8 @@ export const Decorates05Config: ConfigType = { chartKey: 'VDecorates05', conKey: 'VCDecorates05', title: '装饰-05', - category: ChatCategoryEnum.DECORATES, - categoryName: ChatCategoryEnumName.DECORATES, + category: ChatCategoryEnum.DECORATE, + categoryName: ChatCategoryEnumName.DECORATE, package: PackagesCategoryEnum.DECORATES, image } diff --git a/src/packages/components/Decorates/index.d.ts b/src/packages/components/Decorates/index.d.ts index 02974981..67937226 100644 --- a/src/packages/components/Decorates/index.d.ts +++ b/src/packages/components/Decorates/index.d.ts @@ -1,11 +1,11 @@ export enum ChatCategoryEnum { BORDER = 'Borders', - DECORATES = 'Decorates', + DECORATE = 'Decorates', MORE = 'Mores' } export enum ChatCategoryEnumName { BORDER = '边框', - DECORATES = '装饰', + DECORATE = '装饰', MORE = '更多' } \ No newline at end of file diff --git a/src/packages/components/Informations/Mores/Image/index.ts b/src/packages/components/Informations/Mores/Image/index.ts index a6bd669d..dc8d7bde 100644 --- a/src/packages/components/Informations/Mores/Image/index.ts +++ b/src/packages/components/Informations/Mores/Image/index.ts @@ -9,6 +9,6 @@ export const ImageConfig: ConfigType = { title: '图片', category: ChatCategoryEnum.MORE, categoryName: ChatCategoryEnumName.MORE, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } diff --git a/src/packages/components/Informations/Mores/TextCloud/index.ts b/src/packages/components/Informations/Mores/TextCloud/index.ts index 6f912ff7..54fa2c3a 100644 --- a/src/packages/components/Informations/Mores/TextCloud/index.ts +++ b/src/packages/components/Informations/Mores/TextCloud/index.ts @@ -10,6 +10,6 @@ export const TextCloudConfig: ConfigType = { title: '词云', category: ChatCategoryEnum.MORE, categoryName: ChatCategoryEnumName.MORE, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } diff --git a/src/packages/components/Informations/Texts/TextCommon/index.ts b/src/packages/components/Informations/Texts/TextCommon/index.ts index 34f4eb2d..ffce3131 100644 --- a/src/packages/components/Informations/Texts/TextCommon/index.ts +++ b/src/packages/components/Informations/Texts/TextCommon/index.ts @@ -9,6 +9,6 @@ export const TextCommonConfig: ConfigType = { title: '文字', category: ChatCategoryEnum.TEXT, categoryName: ChatCategoryEnumName.TEXT, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } diff --git a/src/packages/components/Informations/Titles/TitleBevelAngle/index.ts b/src/packages/components/Informations/Titles/TitleBevelAngle/index.ts index 5b0305b8..6cd30455 100644 --- a/src/packages/components/Informations/Titles/TitleBevelAngle/index.ts +++ b/src/packages/components/Informations/Titles/TitleBevelAngle/index.ts @@ -9,6 +9,6 @@ export const TitleBevelAngleConfig: ConfigType = { title: '斜角标题', category: ChatCategoryEnum.TITLE, categoryName: ChatCategoryEnumName.TITLE, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } diff --git a/src/packages/components/Informations/Titles/TitleCommon/index.ts b/src/packages/components/Informations/Titles/TitleCommon/index.ts index 1a6b5ac7..f7c55830 100644 --- a/src/packages/components/Informations/Titles/TitleCommon/index.ts +++ b/src/packages/components/Informations/Titles/TitleCommon/index.ts @@ -9,6 +9,6 @@ export const TitleCommonConfig: ConfigType = { title: '普通标题', category: ChatCategoryEnum.TITLE, categoryName: ChatCategoryEnumName.TITLE, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } \ No newline at end of file diff --git a/src/packages/components/Informations/Titles/TitlePro/index.ts b/src/packages/components/Informations/Titles/TitlePro/index.ts index 84c1e4e6..ba422898 100644 --- a/src/packages/components/Informations/Titles/TitlePro/index.ts +++ b/src/packages/components/Informations/Titles/TitlePro/index.ts @@ -9,6 +9,6 @@ export const TitleProConfig: ConfigType = { title: '中心标题', category: ChatCategoryEnum.TITLE, categoryName: ChatCategoryEnumName.TITLE, - package: PackagesCategoryEnum.INFORMATION, + package: PackagesCategoryEnum.INFORMATIONS, image } diff --git a/src/packages/components/Tables/Tables/TableCategory/config.ts b/src/packages/components/Tables/Tables/TableCategory/config.ts new file mode 100644 index 00000000..4260e118 --- /dev/null +++ b/src/packages/components/Tables/Tables/TableCategory/config.ts @@ -0,0 +1,14 @@ +import { publicConfig } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { TableCategoryConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' + +export const option = { + colors: ['#3faacb', '#fff'], +} + +export default class Config extends publicConfig implements CreateComponentType { + public key = TableCategoryConfig.key + public chartConfig = cloneDeep(TableCategoryConfig) + public option = option +} diff --git a/src/packages/components/Tables/Tables/TableCategory/index.vue b/src/packages/components/Tables/Tables/TableCategory/index.vue index ebda1e9c..07db6abc 100644 --- a/src/packages/components/Tables/Tables/TableCategory/index.vue +++ b/src/packages/components/Tables/Tables/TableCategory/index.vue @@ -1,10 +1,10 @@ - diff --git a/src/packages/components/Tables/Tables/tableCommon/config.ts b/src/packages/components/Tables/Tables/tableCommon/config.ts new file mode 100644 index 00000000..23c2b6f5 --- /dev/null +++ b/src/packages/components/Tables/Tables/tableCommon/config.ts @@ -0,0 +1,38 @@ +import { publicConfig } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { TableCommonConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' +import dataJson from './data.json' + +export const option = { + data: dataJson, + // 表行数 + rowNum: 5, + // 轮播时间 + waitTime: 2, + // 数值单位 + unit: '', + // 自动排序 + sort: true, + color: '#1370fb', + textColor: '#ffffff', + borderColor: '#1370fb80', + carousel: 'single', + // 格式化 + valueFormatter({ value }) { + const reverseNumber = (value + '').split('').reverse() + let valueStr = '' + while (reverseNumber.length) { + const seg = reverseNumber.splice(0, 3).join('') + valueStr += seg + if (seg.length === 3) valueStr += ',' + } + return valueStr.split('').reverse().join('') + } +} + +export default class Config extends publicConfig implements CreateComponentType { + public key = TableCommonConfig.key + public chartConfig = cloneDeep(TableCommonConfig) + public option = option +} diff --git a/src/packages/components/Tables/Tables/tableCommon/config.vue b/src/packages/components/Tables/Tables/tableCommon/config.vue index 44a7bc22..6cee7d78 100644 --- a/src/packages/components/Tables/Tables/tableCommon/config.vue +++ b/src/packages/components/Tables/Tables/tableCommon/config.vue @@ -1,6 +1,76 @@ diff --git a/src/packages/components/Tables/Tables/tableCommon/data.json b/src/packages/components/Tables/Tables/tableCommon/data.json new file mode 100644 index 00000000..ed8bb523 --- /dev/null +++ b/src/packages/components/Tables/Tables/tableCommon/data.json @@ -0,0 +1,14 @@ +[ + { "name": "荣成", "value": 26700 }, + { "name": "河南", "value": 20700 }, + { "name": "河北", "value": 18700 }, + { "name": "徐州", "value": 17800 }, + { "name": "漯河", "value": 16756 }, + { "name": "三门峡", "value": 12343 }, + { "name": "郑州", "value": 9822 }, + { "name": "周口", "value": 8912 }, + { "name": "濮阳", "value": 6834 }, + { "name": "信阳", "value": 5875 }, + { "name": "新乡", "value": 3832 }, + { "name": "大同", "value": 1811 } +] diff --git a/src/packages/components/Tables/Tables/tableCommon/index.vue b/src/packages/components/Tables/Tables/tableCommon/index.vue index ebda1e9c..6516c4fb 100644 --- a/src/packages/components/Tables/Tables/tableCommon/index.vue +++ b/src/packages/components/Tables/Tables/tableCommon/index.vue @@ -1,13 +1,227 @@ \ No newline at end of file + .row-item { + transition: all 0.3s; + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + } + + .ranking-info { + display: flex; + width: 100%; + font-size: 13px; + + .rank { + width: 40px; + } + + .info-name { + flex: 1; + } + } + + .ranking-column { + border-bottom: 2px solid #1370fb80; + margin-top: 5px; + + .inside-column { + position: relative; + height: 6px; + margin-bottom: 2px; + border-radius: 1px; + overflow: hidden; + } + + .shine { + position: absolute; + left: 0%; + top: 2px; + height: 2px; + width: 50px; + transform: translateX(-100%); + background: radial-gradient(rgb(40, 248, 255) 5%, transparent 80%); + animation: shine 3s ease-in-out infinite alternate; + } + } +} + +@keyframes shine { + 80% { + left: 0; + transform: translateX(-100%); + } + + 100% { + left: 100%; + transform: translateX(0%); + } +} + diff --git a/src/packages/components/Tables/index.d.ts b/src/packages/components/Tables/index.d.ts index 315ba3f7..f4e0fea1 100644 --- a/src/packages/components/Tables/index.d.ts +++ b/src/packages/components/Tables/index.d.ts @@ -1,5 +1,5 @@ export enum ChatCategoryEnum { - TABLE = 'TABLE', + TABLE = 'Tables', } export enum ChatCategoryEnumName { diff --git a/src/packages/index.d.ts b/src/packages/index.d.ts index 543fde95..5c5b1e2e 100644 --- a/src/packages/index.d.ts +++ b/src/packages/index.d.ts @@ -46,15 +46,15 @@ export type PickCreateComponentType = Pick< export enum PackagesCategoryEnum { CHARTS = 'Charts', TABLES = 'Tables', - INFORMATION = 'Informations', + INFORMATIONS = 'Informations', DECORATES = 'Decorates' } // 包分类名称 export enum PackagesCategoryName { CHARTS = '图表', - TABLES = '表格', - INFORMATION = '信息', + TABLES = '列表', + INFORMATIONS = '信息', DECORATES = '小组件' } @@ -67,7 +67,7 @@ export enum FetchComFlagType { // 图表包类型 export type PackagesType = { [PackagesCategoryEnum.CHARTS]: ConfigType[] - [PackagesCategoryEnum.INFORMATION]: ConfigType[] + [PackagesCategoryEnum.INFORMATIONS]: ConfigType[] [PackagesCategoryEnum.TABLES]: ConfigType[] [PackagesCategoryEnum.DECORATES]: ConfigType[] } diff --git a/src/packages/index.ts b/src/packages/index.ts index 2d892beb..84c7e510 100644 --- a/src/packages/index.ts +++ b/src/packages/index.ts @@ -16,7 +16,7 @@ const indexModules = import.meta.globEager("./components/**/index.vue") // * 所有图表 export let packagesList: PackagesType = { [PackagesCategoryEnum.CHARTS]: ChartList, - [PackagesCategoryEnum.INFORMATION]: InformationList, + [PackagesCategoryEnum.INFORMATIONS]: InformationList, [PackagesCategoryEnum.TABLES]: TableList, [PackagesCategoryEnum.DECORATES]: DecorateList } diff --git a/src/views/chart/ContentCharts/hooks/useAside.hook.ts b/src/views/chart/ContentCharts/hooks/useAside.hook.ts index 77878aec..27d62e02 100644 --- a/src/views/chart/ContentCharts/hooks/useAside.hook.ts +++ b/src/views/chart/ContentCharts/hooks/useAside.hook.ts @@ -29,9 +29,9 @@ const packagesListObj = { icon: renderIcon(RoadmapIcon), label: renderLang(PackagesCategoryName.CHARTS), }, - [PackagesCategoryEnum.INFORMATION]: { + [PackagesCategoryEnum.INFORMATIONS]: { icon: renderIcon(SpellCheckIcon), - label: renderLang(PackagesCategoryName.INFORMATION), + label: renderLang(PackagesCategoryName.INFORMATIONS), }, [PackagesCategoryEnum.TABLES]: { icon: renderIcon(TableSplitIcon),