diff --git a/resources/admin/components/catchTable/components/ellipsis/index.vue b/resources/admin/components/catchTable/components/ellipsis/index.vue new file mode 100644 index 0000000..bf358be --- /dev/null +++ b/resources/admin/components/catchTable/components/ellipsis/index.vue @@ -0,0 +1,34 @@ + + + diff --git a/resources/admin/components/catchTable/components/switchColumn/index.vue b/resources/admin/components/catchTable/components/switchColumn/index.vue new file mode 100644 index 0000000..3ba1aab --- /dev/null +++ b/resources/admin/components/catchTable/components/switchColumn/index.vue @@ -0,0 +1,62 @@ + + + diff --git a/resources/admin/components/catchTable/csearch.vue b/resources/admin/components/catchTable/csearch.vue new file mode 100644 index 0000000..49d2787 --- /dev/null +++ b/resources/admin/components/catchTable/csearch.vue @@ -0,0 +1,115 @@ + + + diff --git a/resources/admin/components/catchTable/ctable.ts b/resources/admin/components/catchTable/ctable.ts new file mode 100644 index 0000000..892acbd --- /dev/null +++ b/resources/admin/components/catchTable/ctable.ts @@ -0,0 +1,63 @@ +export type columnType = 'expand' | 'selection' | 'index' | 'operate' +export type fixed = 'fiexed' | 'right' | 'left' +export interface Column { + type?: columnType // 类型 expand select index + label?: string + prop?: string + 'min-width'?: string | number + width?: number | string + slot?: 'string' + header: 'string' // 表头插槽名称 + align?: string + fixed?: fixed + sortable?: boolean | string + 'sort-method'?: Function + 'sort-by'?: Function + resizable?: boolean + formatter?: Function // function(row, column, cellValue, index) + 'header-align'?: string + 'class-name'?: string + selectable?: Function // function(row, index) + show: boolean + index?: number | Function // 如果设置了 type=index,可以通过传递 index 属性来自定义索引 + children?: Array // 多级表头 + filter?:Function, + ellipsis?:boolean|number, // 当文字太多时,可以使用省略文字 + switch?: boolean, // swith 字段状态切换 + switchRefresh?: Function, // switch refresh 刷新 + // 图片预览 + image?: boolean, + preview: boolean, // 默认不预览 + // 标签 + tags?: boolean|Array, + // 链接🔗 + link?:boolean, + link_text?: string, + // 操作 + update?: boolean, // 编辑操作 + destroy?: boolean // 删除操作 +} + +// 分页 +export interface paginate { + layout:string, + limit: number, + page: number, + limits: Array, + total: number, + changePage: Function, + changeLimit: Function +} + +// option +export interface Option { + label: string, + value: string|number +} +// 搜索 item +export interface SItem { + type: string, + name: string, + default: any, + options: Array