-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xkfe
committed
Aug 5, 2024
1 parent
82f8d8e
commit e8efd7a
Showing
19 changed files
with
216 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
export namespace Table { | ||
export interface Pageable { | ||
pageNum: number | ||
pageSize: number | ||
total: number | ||
import type { Pageable } from '../../types' | ||
|
||
export interface StateProps { | ||
tableData: any[] | ||
pageable: Pageable | ||
searchParam: { | ||
[key: string]: any | ||
} | ||
export interface StateProps { | ||
tableData: any[] | ||
pageable: Pageable | ||
searchParam: { | ||
[key: string]: any | ||
} | ||
searchInitParam: { | ||
[key: string]: any | ||
} | ||
totalParam: { | ||
[key: string]: any | ||
} | ||
icon?: { | ||
[key: string]: any | ||
} | ||
searchInitParam: { | ||
[key: string]: any | ||
} | ||
totalParam: { | ||
[key: string]: any | ||
} | ||
icon?: { | ||
[key: string]: any | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import type { App } from 'vue' | ||
import Table from './components/ProTable/index.vue' | ||
|
||
export const GeekerTable = Object.assign(Table, { | ||
export const GeekerTable = { | ||
install: (app: App) => { | ||
app.component('GeekerTable', Table) | ||
}, | ||
}) | ||
} | ||
|
||
export default GeekerTable |
12 changes: 6 additions & 6 deletions
12
packages/components/Grid/interface/index.ts → packages/types/grid.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export type BreakPoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | ||
|
||
export interface Responsive { | ||
span?: number | ||
offset?: number | ||
} | ||
export type BreakPoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | ||
|
||
export interface Responsive { | ||
span?: number | ||
offset?: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { ComponentPublicInstance } from 'vue' | ||
import type ProTable from '../components/ProTable/index.vue' | ||
import type { ProTableProps } from './table-props' | ||
import type { ColumnProps, EnumProps, FieldNamesProps, HeaderRenderScope, RenderScope, TypeProps } from './table-column' | ||
import type { SearchProps, SearchRenderScope, SearchType } from './search-props' | ||
import type { BreakPoint, Responsive } from './grid' | ||
import type { Pageable, PaginationProps } from './pagination' | ||
|
||
type ProTableInstance = Omit<InstanceType<typeof ProTable>, keyof ComponentPublicInstance | keyof ProTableProps> | ||
|
||
export type { | ||
// table-props | ||
ProTableProps, | ||
|
||
// table-column | ||
ColumnProps, | ||
EnumProps, | ||
FieldNamesProps, | ||
HeaderRenderScope, | ||
RenderScope, | ||
TypeProps, | ||
|
||
// search-props | ||
SearchProps, | ||
SearchRenderScope, | ||
SearchType, | ||
|
||
// grid | ||
BreakPoint, | ||
Responsive, | ||
|
||
// pagination | ||
PaginationProps, | ||
Pageable, | ||
|
||
ProTableInstance, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export interface Pageable { | ||
pageNum: number | ||
pageSize: number | ||
total: number | ||
} | ||
|
||
export interface PaginationProps { | ||
pageable: Pageable | ||
handleSizeChange: (size: number) => void | ||
handleCurrentChange: (currentPage: number) => void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { Ref, VNode } from 'vue' | ||
import type { EnumProps } from './table-column' | ||
import type { BreakPoint, Responsive } from './grid' | ||
|
||
export type SearchType = | ||
| 'input' | ||
| 'input-number' | ||
| 'select' | ||
| 'select-v2' | ||
| 'tree-select' | ||
| 'cascader' | ||
| 'date-picker' | ||
| 'time-picker' | ||
| 'time-select' | ||
| 'switch' | ||
| 'slider' | ||
|
||
export interface SearchRenderScope { | ||
searchParam: { [key: string]: any } | ||
placeholder: string | ||
clearable: boolean | ||
options: EnumProps[] | ||
data: EnumProps[] | ||
} | ||
|
||
export type SearchProps = { | ||
el?: SearchType // 当前项搜索框的类型 | ||
label?: string // 当前项搜索框的 label | ||
props?: any // 搜索项参数,根据 element plus 官方文档来传递,该属性所有值会透传到组件 | ||
key?: string // 当搜索项 key 不为 prop 属性时,可通过 key 指定 | ||
tooltip?: string // 搜索提示 | ||
order?: number // 搜索项排序(从大到小) | ||
span?: number // 搜索项所占用的列数,默认为 1 列 | ||
offset?: number // 搜索字段左侧偏移列数 | ||
defaultValue?: string | number | boolean | any[] | Ref<any> // 搜索项默认值 | ||
render?: (scope: SearchRenderScope) => VNode // 自定义搜索内容渲染(tsx语法) | ||
} & Partial<Record<BreakPoint, Responsive>> |
Oops, something went wrong.