@flyto/farco 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ed8bf4fb.js → chunk-104d11d8.js} +3907 -3777
- package/dist/chunk-580cef57.js +95 -0
- package/dist/{chunk-abb01801.js → chunk-7f5dc3d4.js} +1 -1
- package/dist/{chunk-5f89350b.js → chunk-dab5c341.js} +2 -2
- package/dist/fform-item.cjs.js +1 -1
- package/dist/fform-item.es.js +3 -3
- package/dist/fform.cjs.js +1 -1
- package/dist/fform.es.js +3 -3
- package/dist/fpop-choice.cjs.js +1 -1
- package/dist/fpop-choice.es.js +3 -3
- package/dist/fquery-list.cjs.js +1 -1
- package/dist/fquery-list.es.js +3 -3
- package/dist/fsearch.cjs.js +1 -1
- package/dist/fsearch.es.js +3 -3
- package/dist/ftable.cjs.js +1 -1
- package/dist/ftable.es.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +5 -5
- package/dist/index.umd.js +58 -58
- package/dist/style.css +1 -1
- package/dist/types/components/ftable/ftable.vue.d.ts +3 -1
- package/dist/types/components/ftable/use-col-resize.d.ts +24 -0
- package/dist/types/components/ftable/utils/col-width.d.ts +27 -0
- package/package.json +1 -1
- package/dist/chunk-0b1102a0.js +0 -95
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.arco-typography[data-v-cc19d558]{display:flex}.f-text__content[data-v-cc19d558]{position:relative;width:100%}.f-text__content .content-more[data-v-cc19d558]{position:absolute;right:0;bottom:0;background:-webkit-linear-gradient(left,transparent,#fff,#fff);padding-left:50px;cursor:pointer;color:rgb(var(--primary-6));font-size:12px}.f-button+.f-button{margin-left:10px}.arco-btn-group .f-button+.f-button{margin-left:unset}.f-skeleton .arco-skeleton{background-color:#fff;padding:20px}.f-form.f-form--text .f-form-item{--form-item-padding-right: 5px;--form-item-margin-bottom: 5px}.f-form.f-form--text .arco-form-item-label-col{padding-right:8px}.f-form.f-form--text .arco-form-item-content,.f-form.f-form--text .arco-form-item-wrapper-col{min-height:28px}.f-form .f-form-item{--form-item-padding-right: 20px;--form-item-margin-bottom: 15px;padding-right:var(--form-item-padding-right);margin-bottom:var(--form-item-margin-bottom);display:flex;align-items:center}.f-form .f-form-item__prepend{padding-right:8px}.f-form .f-form-item__append{padding-left:8px}.f-form .f-form-item .arco-form-item-label-col{line-height:unset}.f-form .f-form-item .arco-form-item-label-col .arco-form-item-label{color:inherit;white-space:normal}.f-ml-input__modal-tip{color:red;padding-left:3px}.f-range__wrap{display:flex;align-items:center;padding:0 10px}.f-range__wrap input::placeholder{color:var(--color-text-3)}.f-range__wrap .f-range-start,.f-range__wrap .f-range-end{border:none;width:39%;text-align:center}.f-range__wrap .f-range-start :focus,.f-range__wrap .f-range-end :focus{border:none}.f-range__wrap .f-range-separator{flex:1;text-align:center;padding:0 5px}.f-range__wrap .f-range-clear{cursor:pointer}.f-range__wrap .f-range-clear:hover{color:var(--el-text-color-secondary)}.f-range__wrap .f-range-clear--hover{opacity:0;visibility:hidden}.f-table{margin:10px}.f-table .arco-table .arco-table-element{min-width:unset}.f-table .arco-table .arco-table-td{max-width:0}.f-table .arco-card-body{padding-top:0}.f-table .arco-table-border-header-cell .arco-table-th{border-bottom:none}.f-table .arco-table-border-header-cell .arco-table-th:last-child{border-right:none}.f-table .arco-table-header .arco-table-th-title{overflow:unset;white-space:unset;text-overflow:unset}.f-table .arco-table-body .arco-table-element{padding-bottom:15px}.f-table .arco-table-body .arco-table-element .arco-table-tr-empty .arco-table-td{border-bottom:none}.f-table .hide-scroll-y .arco-scrollbar-track-direction-vertical{display:none}.f-table-toolbar{padding:9px 0;margin:0 -3px;line-height:22px;display:flex;align-items:center;background-color:var(--color-bg-2)}.f-table-toolbar .toolbar-title{--title-size: 14px;padding-right:10px;font-size:var(--title-size)}.f-table-toolbar .toolbar-title.toolbar-title--mini{--title-size: 13px}.f-table-toolbar .toolbar-title.toolbar-title--large{--title-size: 16px}.f-table-toolbar .toolbar-btns{text-align:left;flex:1;padding:0}.f-table-toolbar .toolbar-quick button{--color-secondary: var(--color-neutral-3)}.f-table-toolbar .toolbar-quick button:hover{background-color:rgb(var(--primary-2))}.f-table--split{width:calc(100% - 1px)}.f-table--split .arco-split-trigger-vertical{height:auto}.f-table--split .arco-split-pane-first{overflow-y:hidden;padding-right:5px}.f-table--split .arco-split-pane-second{overflow-x:visible;position:relative}.f-table--split-selected__header{padding:0 5px 5px;position:sticky;top:0;background-color:#fff;z-index:10}.f-table--split-selected__header span:last-child{font-size:12px;color:var(--color-text-3)}.f-table--split-selected__content{padding:10px 5px}.f-table--split-selected-tag .arco-typography{margin-bottom:0}.f-table-content .arco-scrollbar.arco-scrollbar-type-embed .arco-scrollbar-thumb{opacity:1}.f-table-cols-set .f-table-cols-set__tip{margin-bottom:15px;padding-left:8px;font-size:13px;color:rgb(var(--warning-6))}.f-table-cols-set .f-table-cols-set__content{display:flex;flex-wrap:wrap;width:100%}.f-table-cols-set .f-table-cols-set__content .set-item{padding:5px 10px;margin:5px;border:1px solid var(--color-fill-3);border-radius:5px;position:relative;transition:padding .4s,margin .4s}.f-table-cols-set .f-table-cols-set__content .set-item.is-checked{border-color:rgb(var(--primary-6));--color-text-1: rgb(var(--primary-6))}.f-table-cols-set .f-table-cols-set__content .set-item.set-item--hover{padding-right:18px;margin-right:-4px}.f-table-cols-set .f-table-cols-set__content .set-item.set-item--hover .set-item__icon{right:3px}.f-table-cols-set .f-table-cols-set__content .set-item .set-item_label{position:relative;z-index:9;background:#ffffff}.f-table-cols-set .f-table-cols-set__content .set-item .set-item__icon{font-size:15px;background:#fff;position:absolute;top:8px;right:10px;transition:right .4s;cursor:move;z-index:0}.f-query-list.arco-card-size-medium .arco-card-header-title{font-size:18px}.f-query-list .arco-card-header{border-bottom:none}.f-query-list .f-query-list__top-divider-right-orientation{z-index:1}.f-query-list .f-query-list__top-divider-right-orientation .arco-divider-text-right{cursor:pointer;right:100px}.f-query-list .f-query-list__filter{display:flex}.f-query-list .f-query-list__filter--simple{display:grid;grid-template-columns:auto 50px;margin-bottom:10px}.f-query-list .f-query-list__filter--simple .f-query-list__filter-form{margin-bottom:0}.f-query-list .f-query-list__filter--simple .f-query-list__filter-form .f-form-item{--form-item-padding-right: 10px;--form-item-margin-bottom: 0px}.f-query-list .f-query-list__filter-form{margin-bottom:-20px}.f-query-list .f-query-list__filter-divider{position:relative;margin-top:-5px;margin-bottom:-5px;transition:all .2s ease-in}.f-query-list .f-query-list__filter-divider .icon{position:absolute;top:30px;left:0;right:0;text-align:center;padding:4px 0;background-color:#fff}.f-query-list .f-query-list__filter-divider .icon svg{transition:all .2s ease-in}.f-query-list .f-query-list__filter-divider .divider{margin-right:15px;height:100%}.f-query-list .f-query-list__filter-handle{width:100px;text-align:center}.f-query-list .f-query-list__filter-handle .f-button+.f-button{margin-left:0;margin-top:10px}.f-query-list__divider{margin:0}.f-query-list__table .arco-card{border:none;margin:0}.f-query-list__table .arco-card .arco-card-body{padding:0}.f-choice{height:500px}.f-choice-query .f-table .arco-table-header-sticky{top:0!important}.f-choice-result{box-shadow:none;width:300px;min-width:300px;max-width:500px}.f-date{width:100%}.f-text{display:flex;align-items:center}.f-text .f-text__pre-icon{margin-right:5px}.f-select{width:100%;display:flex;align-items:center}.f-select .f-select__append:not(:empty){padding-left:10px}.f-select .f-select__preend:not(:empty){padding-right:10px}.f-select .arco-select-dropdown .arco-select-option-checkbox{pointer-events:none}.f-select-tool{position:sticky;top:0;z-index:9}.f-select-tool .f-select-multiple-tool{padding:3px 10px;margin-bottom:2px;background-color:var(--color-bg-1);box-shadow:var(--box-shadow-light)}.f-search{cursor:pointer;width:100%}.f-search .arco-input-wrapper{cursor:pointer}.arco-typography b{font-weight:700}
|
|
1
|
+
.arco-typography[data-v-cc19d558]{display:flex}.f-text__content[data-v-cc19d558]{position:relative;width:100%}.f-text__content .content-more[data-v-cc19d558]{position:absolute;right:0;bottom:0;background:-webkit-linear-gradient(left,transparent,#fff,#fff);padding-left:50px;cursor:pointer;color:rgb(var(--primary-6));font-size:12px}.f-table .arco-table-header th.arco-table-th:not(.arco-table-col-fixed-left):not(.arco-table-col-fixed-right){position:relative}.f-table-col-resize-handle{position:absolute;top:0;right:-3px;z-index:1;width:6px;height:100%;cursor:col-resize;touch-action:none}.f-table-col-resize-handle:hover{background-color:rgb(var(--primary-4))}.f-button+.f-button{margin-left:10px}.arco-btn-group .f-button+.f-button{margin-left:unset}.f-skeleton .arco-skeleton{background-color:#fff;padding:20px}.f-form.f-form--text .f-form-item{--form-item-padding-right: 5px;--form-item-margin-bottom: 5px}.f-form.f-form--text .arco-form-item-label-col{padding-right:8px}.f-form.f-form--text .arco-form-item-content,.f-form.f-form--text .arco-form-item-wrapper-col{min-height:28px}.f-form .f-form-item{--form-item-padding-right: 20px;--form-item-margin-bottom: 15px;padding-right:var(--form-item-padding-right);margin-bottom:var(--form-item-margin-bottom);display:flex;align-items:center}.f-form .f-form-item__prepend{padding-right:8px}.f-form .f-form-item__append{padding-left:8px}.f-form .f-form-item .arco-form-item-label-col{line-height:unset}.f-form .f-form-item .arco-form-item-label-col .arco-form-item-label{color:inherit;white-space:normal}.f-ml-input__modal-tip{color:red;padding-left:3px}.f-range__wrap{display:flex;align-items:center;padding:0 10px}.f-range__wrap input::placeholder{color:var(--color-text-3)}.f-range__wrap .f-range-start,.f-range__wrap .f-range-end{border:none;width:39%;text-align:center}.f-range__wrap .f-range-start :focus,.f-range__wrap .f-range-end :focus{border:none}.f-range__wrap .f-range-separator{flex:1;text-align:center;padding:0 5px}.f-range__wrap .f-range-clear{cursor:pointer}.f-range__wrap .f-range-clear:hover{color:var(--el-text-color-secondary)}.f-range__wrap .f-range-clear--hover{opacity:0;visibility:hidden}.f-table{margin:10px}.f-table .arco-table .arco-table-element{min-width:unset}.f-table .arco-table .arco-table-td{max-width:0}.f-table .arco-card-body{padding-top:0}.f-table .arco-table-border-header-cell .arco-table-th{border-bottom:none}.f-table .arco-table-border-header-cell .arco-table-th:last-child{border-right:none}.f-table .arco-table-header .arco-table-th-title{overflow:unset;white-space:unset;text-overflow:unset}.f-table .arco-table-body .arco-table-element{padding-bottom:15px}.f-table .arco-table-body .arco-table-element .arco-table-tr-empty .arco-table-td{border-bottom:none}.f-table .hide-scroll-y .arco-scrollbar-track-direction-vertical{display:none}.f-table-toolbar{padding:9px 0;margin:0 -3px;line-height:22px;display:flex;align-items:center;background-color:var(--color-bg-2)}.f-table-toolbar .toolbar-title{--title-size: 14px;padding-right:10px;font-size:var(--title-size)}.f-table-toolbar .toolbar-title.toolbar-title--mini{--title-size: 13px}.f-table-toolbar .toolbar-title.toolbar-title--large{--title-size: 16px}.f-table-toolbar .toolbar-btns{text-align:left;flex:1;padding:0}.f-table-toolbar .toolbar-quick button{--color-secondary: var(--color-neutral-3)}.f-table-toolbar .toolbar-quick button:hover{background-color:rgb(var(--primary-2))}.f-table--split{width:calc(100% - 1px)}.f-table--split .arco-split-trigger-vertical{height:auto}.f-table--split .arco-split-pane-first{overflow-y:hidden;padding-right:5px}.f-table--split .arco-split-pane-second{overflow-x:visible;position:relative}.f-table--split-selected__header{padding:0 5px 5px;position:sticky;top:0;background-color:#fff;z-index:10}.f-table--split-selected__header span:last-child{font-size:12px;color:var(--color-text-3)}.f-table--split-selected__content{padding:10px 5px}.f-table--split-selected-tag .arco-typography{margin-bottom:0}.f-table-content .arco-scrollbar.arco-scrollbar-type-embed .arco-scrollbar-thumb{opacity:1}.f-table-cols-set .f-table-cols-set__tip{margin-bottom:15px;padding-left:8px;font-size:13px;color:rgb(var(--warning-6))}.f-table-cols-set .f-table-cols-set__content{display:flex;flex-wrap:wrap;width:100%}.f-table-cols-set .f-table-cols-set__content .set-item{padding:5px 10px;margin:5px;border:1px solid var(--color-fill-3);border-radius:5px;position:relative;transition:padding .4s,margin .4s}.f-table-cols-set .f-table-cols-set__content .set-item.is-checked{border-color:rgb(var(--primary-6));--color-text-1: rgb(var(--primary-6))}.f-table-cols-set .f-table-cols-set__content .set-item.set-item--hover{padding-right:18px;margin-right:-4px}.f-table-cols-set .f-table-cols-set__content .set-item.set-item--hover .set-item__icon{right:3px}.f-table-cols-set .f-table-cols-set__content .set-item .set-item_label{position:relative;z-index:9;background:#ffffff}.f-table-cols-set .f-table-cols-set__content .set-item .set-item__icon{font-size:15px;background:#fff;position:absolute;top:8px;right:10px;transition:right .4s;cursor:move;z-index:0}.f-query-list.arco-card-size-medium .arco-card-header-title{font-size:18px}.f-query-list .arco-card-header{border-bottom:none}.f-query-list .f-query-list__top-divider-right-orientation{z-index:1}.f-query-list .f-query-list__top-divider-right-orientation .arco-divider-text-right{cursor:pointer;right:100px}.f-query-list .f-query-list__filter{display:flex}.f-query-list .f-query-list__filter--simple{display:grid;grid-template-columns:auto 50px;margin-bottom:10px}.f-query-list .f-query-list__filter--simple .f-query-list__filter-form{margin-bottom:0}.f-query-list .f-query-list__filter--simple .f-query-list__filter-form .f-form-item{--form-item-padding-right: 10px;--form-item-margin-bottom: 0px}.f-query-list .f-query-list__filter-form{margin-bottom:-20px}.f-query-list .f-query-list__filter-divider{position:relative;margin-top:-5px;margin-bottom:-5px;transition:all .2s ease-in}.f-query-list .f-query-list__filter-divider .icon{position:absolute;top:30px;left:0;right:0;text-align:center;padding:4px 0;background-color:#fff}.f-query-list .f-query-list__filter-divider .icon svg{transition:all .2s ease-in}.f-query-list .f-query-list__filter-divider .divider{margin-right:15px;height:100%}.f-query-list .f-query-list__filter-handle{width:100px;text-align:center}.f-query-list .f-query-list__filter-handle .f-button+.f-button{margin-left:0;margin-top:10px}.f-query-list__divider{margin:0}.f-query-list__table .arco-card{border:none;margin:0}.f-query-list__table .arco-card .arco-card-body{padding:0}.f-choice{height:500px}.f-choice-query .f-table .arco-table-header-sticky{top:0!important}.f-choice-result{box-shadow:none;width:300px;min-width:300px;max-width:500px}.f-date{width:100%}.f-text{display:flex;align-items:center}.f-text .f-text__pre-icon{margin-right:5px}.f-select{width:100%;display:flex;align-items:center}.f-select .f-select__append:not(:empty){padding-left:10px}.f-select .f-select__preend:not(:empty){padding-right:10px}.f-select .arco-select-dropdown .arco-select-option-checkbox{pointer-events:none}.f-select-tool{position:sticky;top:0;z-index:9}.f-select-tool .f-select-multiple-tool{padding:3px 10px;margin-bottom:2px;background-color:var(--color-bg-1);box-shadow:var(--box-shadow-light)}.f-search{cursor:pointer;width:100%}.f-search .arco-input-wrapper{cursor:pointer}.arco-typography b{font-weight:700}
|
|
@@ -55,6 +55,8 @@ declare const _default: <Data extends AnyObject = AnyObject, Cols extends AnyObj
|
|
|
55
55
|
readonly onSelectionChange?: ((...args: any[]) => any) | undefined;
|
|
56
56
|
readonly onSelectionAll?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
readonly onCellClick?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
readonly "onColumn-resizing"?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
readonly "onColumn-resize"?: ((...args: any[]) => any) | undefined;
|
|
58
60
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "data" | "size" | "scroll" | "emptyText" | "id" | "noImmediatelyMethodData" | "noImmediatelyMethodDataEmptyText" | "cols" | "merge" | "toolbar" | "page" | "pageProps" | "rowKey" | "rowClass" | "selection" | "selectionConfig" | "defaultSelectedRowKeys" | "defaultSelectedRows" | "stickyHeader" | "bordered" | "wrapClass" | "wrapStyle">) & {
|
|
59
61
|
selectedKeys?: (string | number)[];
|
|
60
62
|
}, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
@@ -134,7 +136,7 @@ declare const _default: <Data extends AnyObject = AnyObject, Cols extends AnyObj
|
|
|
134
136
|
'toolbar-quick-extra': () => any;
|
|
135
137
|
'selected-tag': () => any;
|
|
136
138
|
}>;
|
|
137
|
-
emit: (event: "pageChange" | "pageSizeChange" | "rowDblclick" | "selectionChange" | "selectionAll" | "cellClick", ...args: any[]) => void;
|
|
139
|
+
emit: (event: "pageChange" | "pageSizeChange" | "rowDblclick" | "selectionChange" | "selectionAll" | "cellClick" | "column-resizing" | "column-resize", ...args: any[]) => void;
|
|
138
140
|
}>) => import('vue').VNode & {
|
|
139
141
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
140
142
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FTableCol, FTableScroll } from './ftable';
|
|
2
|
+
|
|
3
|
+
/** 拖拽手柄 class(样式在 ftable.vue 非 scoped 样式块中) */
|
|
4
|
+
export declare const RESIZE_HANDLE_CLASS = "f-table-col-resize-handle";
|
|
5
|
+
type AnyCol = FTableCol & {
|
|
6
|
+
dataIndex: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function useColResize(options: {
|
|
9
|
+
getTableEl: () => HTMLElement | undefined;
|
|
10
|
+
getVisibleCols: () => AnyCol[];
|
|
11
|
+
scroll: {
|
|
12
|
+
value: FTableScroll;
|
|
13
|
+
};
|
|
14
|
+
onResizing: (dataIndex: string, width: number) => void;
|
|
15
|
+
onResize: (dataIndex: string, width: number) => void;
|
|
16
|
+
}): {
|
|
17
|
+
colWidths: Record<string, number>;
|
|
18
|
+
initColWidths: (cols: AnyCol[]) => void;
|
|
19
|
+
syncColWidthsFromProps: (cols: AnyCol[]) => void;
|
|
20
|
+
injectHandles: () => Promise<void>;
|
|
21
|
+
updateScrollX: () => void;
|
|
22
|
+
setup: () => Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FTableCol } from '../ftable';
|
|
2
|
+
|
|
3
|
+
/** 列宽下限兜底值:列未设置 minWidth 时,拖拽不允许小于此宽度 */
|
|
4
|
+
export declare const DEFAULT_MIN_COL_WIDTH = 80;
|
|
5
|
+
export type ColWidthSource = Pick<FTableCol, 'dataIndex' | 'width' | 'minWidth'> & {
|
|
6
|
+
dataIndex: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 生成初始列宽表(key = dataIndex)
|
|
10
|
+
* 优先级:props.width > props.minWidth;两者皆无的列不进入表(由浏览器自动分配)
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveInitialColWidths(cols: ColWidthSource[]): Record<string, number>;
|
|
13
|
+
/** 拖拽宽度钳制:不小于 minWidth(缺省 DEFAULT_MIN_COL_WIDTH) */
|
|
14
|
+
export declare function clampColWidth(width: number, minWidth?: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* 计算 scroll.x 像素值
|
|
17
|
+
* 仅以列总宽为基准,允许小于容器宽(表格可收缩)或大于容器宽(出现横向滚动条)
|
|
18
|
+
*/
|
|
19
|
+
export declare function calcScrollXPx(totalColWidth: number, _containerWidth: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* 初始化时,若列总宽小于容器宽,将剩余宽度平分给仅设置 minWidth(无显式 width)的列
|
|
22
|
+
* @param colWidths 已解析的列宽表(key = dataIndex)
|
|
23
|
+
* @param cols 原始列定义(用以区分 width 与 minWidth)
|
|
24
|
+
* @param containerWidth 表格容器可见宽
|
|
25
|
+
* @returns 分配后的新列宽表
|
|
26
|
+
*/
|
|
27
|
+
export declare function distributeRemainingWidth(colWidths: Record<string, number>, cols: ColWidthSource[], containerWidth: number): Record<string, number>;
|