1.0.148 • Published 9 months ago

@geyj/components v1.0.148

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

美公业务组件库

标题menu-title

<mg-menu-title title="标题名称" ></mg-menu-title>

参数

参数说明类型
title标题名称string

筛选栏tools

<mg-tools>
   <template #left></template>
   <template #right></template>
</mg-tools>

核心指标stat

 <mg-stat :defaultCompare="['同比', '环比']" :cols="statColumns" :summary="summary" @openColumnManager="openColumnManager(0)"></mg-stat>

参数

参数说明类型
defaultCompare同比环比集合string[]
cols指标列ComplexTableColumn[]
summary汇总数据TableRow
note提示文字string

事件

事件说明回调参数
openColumnManager打开指标设置

页签tabs

<mg-tabs :tabs="tabs" @changeTab="changeTab" :active-tab="activeTab"></mg-tabs>

参数说明

参数说明类型
tabs页签集合string[]
activeTab激活页签string

事件

事件说明回调参数
changeTab修改页签(tab: string)

指标设置column-manager

<mg-column-manager :visible="visible" :template="template" :category="category" :fields="fields"
   :checkedFieldIds="checkedFieldIds" :defaultFieldIds="defaultFieldIds" :closeColumnManager="closeColumnManager"
   @deleteTemplate="deleteTemplate" @saveTemplate="saveTemplate" @updateTemplate="updateTemplate"
   @applyCols="applyCols"></mg-column-manager>

参数

参数说明类型
visible指标设置开关状态boolean
template模板数据TableRow
category分类集合TableRow[]
fields字段集合TableRow[]
closeColumnManager关闭指标设置() => void

事件

事件说明回调参数
deleteTemplate删除模板(id: number)
saveTemplate保存个人模板(name: string, field_collections: string, default_field_collections: string)
updateTemplate更新个人模板(id: number, name: string, field_collections: string, default_field_collections: string)
applyCols应用指标(field_collections: string, default_field_collections: string)

数据列表日期选择器list-date-picker

<mg-list-date-picker :default-date="date" default-date-label="7日" @change="changeDateHandler"></mg-list-date-picker>

参数

参数说明类型
defaultDate默认日期集合string[]
defaultDateLabel默认日期显示'昨日' | '7日' | '15日' | '30日' | '日' | '周' | '月' | '年'

事件

事件说明回调参数
change日期值变更(date: string[], dateLabel: string)

趋势日期选择器chart-range-date-picker

<mg-list-date-picker :default-date="date" default-date-label="7日" @change="changeDateHandler"></mg-list-date-picker>

参数

参数说明类型
defaultDate默认日期集合string[]
defaultDateLabel默认日期显示'日' | '周' | '月'
defaultDateType默认日期类型'date' | 'week' | 'month'

事件

事件说明回调参数
change日期值变更(date: string[], dateType: 'date' | 'week' | 'month')

趋势年对比日期选择器chart-year-date-picker

<mg-chart-year-date-picker :years="years" @change="changeDateHandler"></mg-chart-year-date-picker>

参数

参数说明类型
years年份集合string[]

事件

事件说明回调参数
change日期类型变更(dateType: 'date' | 'week' | 'month')

普通表格table

<mg-table :tableColumns="tableColumns" :tableData="tableData"
  :pagination="pagination" :loading="loading" :skeletonRows="6">
  <template #custom_name="{ column, scope }">
     <el-button link type="primary">{{ scope.row.name }}</el-button>
  </template>
  <template #custom_operations="{ column, scope }">

  </template>
</mg-table>

参数说明

参数说明类型
tableColumns表列结构
type TableColumn = {
    prop: string
    label: string
    fullLabel?: string
    width?: number
    fixed?: 'left' | 'right' | boolean
    align?: 'left' | 'center' | 'right'
}

| | tableData | 表格数据 |

type TableRow = {
    [key: string]: any
}

| | pagination | 分页信息,不传则屏蔽分页组件及其功能 |

type Pagination = {
    page: number
    size: number
    total: number
    changePageSize: Function
    changeCurrentPage: Function
}

| | loading | 加载状态 | boolean | | skeletonRows | 骨架屏行数,默认6行 | number | | isSelect | 是否开启选择模式 | boolean |

事件

事件说明回调参数
select选择某一行(selection: TableRow[], row: TableRow)
select-all全选(selection: TableRow[])
selection-change选项变更(selection: TableRow[])

复杂后端分页表格complex-table

<mg-complex-table :tableColumns="tableColumns" :tableData="tableData" :loading="loading" :pagination="pagination"
   @changeSort="changeSort" @changeProgress="changeProgress" @changeChart="changeChart" @openFilter="openFilter"
   @resetFilter="resetFilter" @confirmFilter="confirmFilter" @keyupFilter="confirmFilter" @closeFilter="closeFilter"
   @openColumnManager="openColumnManager(2)">
</mg-complex-table>

参数说明

参数说明类型
tableColumns表列结构
type ComplexTableColumn = {
   prop: string
   label: string
   fullLabel?: string
   width?: number
   fixed?: 'left' | 'right' | boolean
   align?: 'left' | 'center' | 'right'
   icons?: ('sort' | 'filter' | 'progress' | 'chart')[]
   sort: 'ASC' | 'DESC' | ''
   isProgress?: boolean
   isChart?: boolean
   filterPopoverVisible?: boolean
   filterType: 'text' | 'number' | 'percent'
   inputValues: string[]
   inputRenderValues: string[]
   dataType: 'text' | 'number' | 'percent'
   float: number
   max: number
}

| | tableData | 表格数据 |

type TableRow = {
    [key: string]: any
}

| | pagination | 分页信息,不传则屏蔽分页组件及其功能 |

type Pagination = {
    page: number
    size: number
    total: number
    changePageSize: Function
    changeCurrentPage: Function
}

| | loading | 加载状态 | boolean | | skeletonRows | 骨架屏行数,默认6行 | number |

事件

事件说明回调参数
changeSort排序(prop: string)
changeProgress进度(prop: string)
changeChart图表(prop: string)
openFilter打开筛选(prop: string)
resetFilter重置筛选(prop: string)
confirmFilter确认筛选(prop: string)
keyupFilter回车确认筛选(prop: string)
closeFilter关闭筛选(prop: string)
openColumnManager打开指标设置

复杂前端分页表格all-data-table

<mg-all-data-table :tableColumns="tableColumns" :tableData="tableData" :loading="loading" :pagination="pagination"
   @changeSort="changeSort" @changeProgress="changeProgress" @changeChart="changeChart" @openFilter="openFilter"
   @resetFilter="resetFilter" @confirmFilter="confirmFilter" @keyupFilter="confirmFilter" @closeFilter="closeFilter"
   @openColumnManager="openColumnManager(2)"></mg-all-data-table>

参数说明

参数说明类型
tableColumns表列结构
type ComplexTableColumn = {
    prop: string
    label: string
    fullLabel?: string
    width?: number
    fixed?: 'left' | 'right' | boolean
    align?: 'left' | 'center' | 'right'
    icons?: ('sort' | 'filter' | 'progress' | 'chart')[]
    sort: 'ASC' | 'DESC' | ''
    isProgress?: boolean
    isChart?: boolean
    filterPopoverVisible?: boolean
    filterType: 'text' | 'number' | 'percent'
    inputValues: string[]
    inputRenderValues: string[]
    dataType: 'text' | 'number' | 'percent'
    float: number
    max: number
}

| | tableData | 表格数据 |

type TableRow = {
    [key: string]: any
}

| | pagination | 分页信息,不传则屏蔽分页组件及其功能 |

type Pagination = {
    page: number
    size: number
    total: number
    changePageSize: Function
    changeCurrentPage: Function
}

| | loading | 加载状态 | boolean | | skeletonRows | 骨架屏行数,默认6行 | number |

事件

事件说明回调参数
changeSort排序(prop: string)
changeProgress进度(prop: string)
changeChart图表(prop: string)
openFilter打开筛选(prop: string)
resetFilter重置筛选(prop: string)
confirmFilter确认筛选(prop: string)
keyupFilter回车确认筛选(prop: string)
closeFilter关闭筛选(prop: string)
openColumnManager打开指标设置
1.0.147

9 months ago

1.0.148

9 months ago

1.0.143

9 months ago

1.0.142

9 months ago

1.0.145

9 months ago

1.0.144

9 months ago

1.0.141

9 months ago

1.0.140

9 months ago

1.0.146

9 months ago

1.0.139

9 months ago

1.0.136

9 months ago

1.0.138

9 months ago

1.0.137

9 months ago

1.0.134

9 months ago

1.0.133

9 months ago

1.0.135

9 months ago

1.0.132

9 months ago

1.0.131

9 months ago

1.0.130

9 months ago

1.0.129

9 months ago

1.0.128

9 months ago

1.0.127

9 months ago

1.0.125

9 months ago

1.0.126

9 months ago

1.0.124

10 months ago

1.0.121

10 months ago

1.0.120

10 months ago

1.0.122

10 months ago

1.0.119

10 months ago

1.0.118

10 months ago

1.0.117

10 months ago

1.0.77

1 year ago

1.0.76

1 year ago

1.0.75

1 year ago

1.0.74

1 year ago

1.0.79

1 year ago

1.0.78

1 year ago

1.0.101

11 months ago

1.0.100

11 months ago

1.0.107

10 months ago

1.0.106

10 months ago

1.0.109

10 months ago

1.0.108

10 months ago

1.0.103

11 months ago

1.0.102

11 months ago

1.0.105

10 months ago

1.0.104

10 months ago

1.0.80

1 year ago

1.0.84

12 months ago

1.0.83

12 months ago

1.0.82

12 months ago

1.0.81

12 months ago

1.0.88

12 months ago

1.0.87

12 months ago

1.0.86

12 months ago

1.0.85

12 months ago

1.0.89

11 months ago

1.0.110

10 months ago

1.0.112

10 months ago

1.0.111

10 months ago

1.0.114

10 months ago

1.0.113

10 months ago

1.0.116

10 months ago

1.0.115

10 months ago

1.0.91

11 months ago

1.0.90

11 months ago

1.0.95

11 months ago

1.0.94

11 months ago

1.0.93

11 months ago

1.0.92

11 months ago

1.0.99

11 months ago

1.0.98

11 months ago

1.0.97

11 months ago

1.0.96

11 months ago

1.0.73

1 year ago

1.0.72

1 year ago

1.0.71

1 year ago

1.0.70

1 year ago

1.0.69

1 year ago

1.0.68

1 year ago

1.0.66

1 year ago

1.0.67

1 year ago

1.0.65

1 year ago

1.0.64

1 year ago

1.0.63

1 year ago

1.0.62

1 year ago

1.0.61

1 year ago

1.0.60

1 year ago

1.0.59

1 year ago

1.0.58

1 year ago

1.0.57

1 year ago

1.0.55

1 year ago

1.0.56

1 year ago

1.0.54

1 year ago

1.0.53

1 year ago

1.0.52

1 year ago

1.0.51

1 year ago

1.0.50

1 year ago

1.0.49

1 year ago

1.0.48

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.44

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.39

1 year ago

1.0.40

1 year ago

1.0.41

1 year ago

1.0.38

1 year ago

1.0.37

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.19

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.2

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago