1.0.148 • Published 1 year ago

@geyj/components v1.0.148

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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

1 year ago

1.0.148

1 year ago

1.0.143

1 year ago

1.0.142

1 year ago

1.0.145

1 year ago

1.0.144

1 year ago

1.0.141

1 year ago

1.0.140

1 year ago

1.0.146

1 year ago

1.0.139

1 year ago

1.0.136

1 year ago

1.0.138

1 year ago

1.0.137

1 year ago

1.0.134

1 year ago

1.0.133

1 year ago

1.0.135

1 year ago

1.0.132

1 year ago

1.0.131

1 year ago

1.0.130

1 year ago

1.0.129

1 year ago

1.0.128

1 year ago

1.0.127

1 year ago

1.0.125

1 year ago

1.0.126

1 year ago

1.0.124

1 year ago

1.0.121

1 year ago

1.0.120

1 year ago

1.0.122

1 year ago

1.0.119

1 year ago

1.0.118

1 year ago

1.0.117

1 year 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

1 year ago

1.0.100

1 year ago

1.0.107

1 year ago

1.0.106

1 year ago

1.0.109

1 year ago

1.0.108

1 year ago

1.0.103

1 year ago

1.0.102

1 year ago

1.0.105

1 year ago

1.0.104

1 year ago

1.0.80

1 year ago

1.0.84

1 year ago

1.0.83

1 year ago

1.0.82

1 year ago

1.0.81

1 year ago

1.0.88

1 year ago

1.0.87

1 year ago

1.0.86

1 year ago

1.0.85

1 year ago

1.0.89

1 year ago

1.0.110

1 year ago

1.0.112

1 year ago

1.0.111

1 year ago

1.0.114

1 year ago

1.0.113

1 year ago

1.0.116

1 year ago

1.0.115

1 year ago

1.0.91

1 year ago

1.0.90

1 year ago

1.0.95

1 year ago

1.0.94

1 year ago

1.0.93

1 year ago

1.0.92

1 year ago

1.0.99

1 year ago

1.0.98

1 year ago

1.0.97

1 year ago

1.0.96

1 year 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

2 years ago

1.0.66

2 years ago

1.0.67

2 years ago

1.0.65

2 years ago

1.0.64

2 years ago

1.0.63

2 years ago

1.0.62

2 years ago

1.0.61

2 years ago

1.0.60

2 years ago

1.0.59

2 years ago

1.0.58

2 years ago

1.0.57

2 years ago

1.0.55

2 years ago

1.0.56

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.49

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.39

2 years ago

1.0.40

2 years ago

1.0.41

2 years ago

1.0.38

2 years ago

1.0.37

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.19

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago