@flyto/farco 1.5.2 → 1.6.0
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-0ec0668f.js → chunk-263be364.js} +10 -3
- package/dist/chunk-50f8bcc1.js +96 -0
- package/dist/chunk-69da04a0.js +878 -0
- package/dist/chunk-9fe29f28.js +1 -0
- package/dist/{chunk-a1e9227b.js → chunk-caea256f.js} +1 -1
- package/dist/chunk-ce07121a.js +2 -0
- package/dist/chunk-cf90d627.js +13327 -0
- package/dist/chunk-f3768b0d.js +164 -0
- package/dist/fform-item.cjs.js +1 -1
- package/dist/fform-item.es.js +5 -5
- package/dist/fform.cjs.js +1 -1
- package/dist/fform.es.js +5 -5
- package/dist/fpop-choice.cjs.js +1 -1
- package/dist/fpop-choice.es.js +5 -5
- package/dist/fquery-list.cjs.js +1 -1
- package/dist/fquery-list.es.js +5 -5
- package/dist/fsearch.cjs.js +1 -1
- package/dist/fsearch.es.js +5 -5
- package/dist/ftable.cjs.js +1 -1
- package/dist/ftable.es.js +3 -3
- package/dist/ftext.cjs.js +1 -1
- package/dist/ftext.es.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +8 -8
- package/dist/index.umd.js +55 -54
- package/dist/style.css +1 -1
- package/dist/types/components/ftable/constants/index.d.ts +3 -2
- package/dist/types/components/ftable/ftable.d.ts +11 -1
- package/dist/types/components/ftable/use-cols-set-drag.d.ts +18 -0
- package/dist/types/components/ftable/utils/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-104d11d8.js +0 -12737
- package/dist/chunk-3e3782aa.js +0 -1
- package/dist/chunk-580cef57.js +0 -95
- package/dist/chunk-7779a34c.js +0 -169
- package/dist/chunk-7f5dc3d4.js +0 -955
- package/dist/chunk-dab5c341.js +0 -2
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-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-
|
|
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}[data-v-6cad8957] .waring-text{color:rgb(var(--warning-6));font-weight:500}.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 .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__fixed{display:flex;gap:10px;margin-bottom:10px}.f-table-cols-set .f-table-cols-set__fixed .fixed-panel{flex:1;width:50%;padding:5px;border:1px dashed var(--color-fill-3);border-radius:5px;position:relative}.f-table-cols-set .f-table-cols-set__fixed .fixed-panel__title{margin-bottom:6px;font-size:12px;color:var(--color-text-3);position:absolute;top:-11px;left:10px;background-color:#fff;padding:2px 5px}.f-table-cols-set .f-table-cols-set__fixed .fixed-panel__content{display:flex;flex-wrap:wrap;min-height:32px;padding-top:5px}.f-table-cols-set .f-table-cols-set__fixed .fixed-panel__empty{padding:10px 5px 5px;font-size:12px;color:var(--color-fill-3);width:100%;text-align:center}.f-table-cols-set .set-item{padding:5px 10px;margin:5px;border:1px solid var(--color-fill-3);border-radius:5px;position:relative;transition:padding .3s,margin .3s}.f-table-cols-set .set-item.is-checked{--color-text-1: rgb(var(--primary-6))}.f-table-cols-set .set-item.set-item--sort-mode,.f-table-cols-set .set-item.set-item--fixed-mode{padding-right:25px}.f-table-cols-set .set-item .set-item__label{padding:0 3px}.f-table-cols-set .set-item .set-item__icon{font-size:15px;position:absolute;top:8px;right:9px;cursor:pointer;z-index:0}.f-table-cols-set .set-item .set-item__icon--drag{cursor:move}.f-table-cols-set .set-item .set-item__icon--close{opacity:1;right:5px}@keyframes f-cols-set-icon-enter{0%{opacity:0;transform:translate(6px)}to{opacity:1;transform:translate(0)}}.f-table-cols-set .set-item--sort-mode .set-item__icon--drag,.f-table-cols-set .set-item--fixed-mode .set-item__icon--pin{animation:f-cols-set-icon-enter .3s ease-out forwards}.f-table-cols-set .f-table-cols-set__mode-bar{margin-bottom:10px}.f-table-cols-set .set-item__icon--help:hover{color:rgb(var(--primary-6))}.f-table-cols-set .f-table-cols-set__normal{display:flex;flex-wrap:wrap;align-content:flex-start;width:100%;max-height:50vh;overflow-y:auto}.f-table-cols-set-drag-move{transition:transform .2s ease}.f-table-cols-set .set-item.set-item--dragging{opacity:.4;border-style:dashed}.f-table-cols-set-drag-ghost{background:var(--color-bg-2);box-shadow:0 2px 8px #00000026;opacity:.9}.f-table-cols-set .set-item .set-item__icon--drag{cursor:grab;touch-action:none}.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}.set-item__icon--pin-wrap{padding:5px}.set-item__icon--pin-wrap .arco-popover-content{margin-top:0}.set-item__icon--pin-wrap .arco-popover-content .arco-tag+.arco-tag{margin-left:5px}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference path="./components.d.ts" />
|
|
2
|
-
import { InjectionKey } from 'vue';
|
|
3
|
-
import { FTableCol, FTableRowSelection } from '../ftable';
|
|
2
|
+
import { InjectionKey, Ref } from 'vue';
|
|
3
|
+
import { ColsSetting, FTableCol, FTableRowSelection } from '../ftable';
|
|
4
4
|
|
|
5
5
|
export declare const COLS_KEY: InjectionKey<FTableCol[]>;
|
|
6
6
|
export declare const TABLE_ID_KEY: InjectionKey<string>;
|
|
7
|
+
export declare const COLS_SETTING_KEY: InjectionKey<Ref<ColsSetting>>;
|
|
7
8
|
export declare const DEFAULT_PAGE_PARAMS: {
|
|
8
9
|
PageIndex: number;
|
|
9
10
|
PageSize: number;
|
|
@@ -3,7 +3,10 @@ import { TableData, TableInstance, TableColumnData, PaginationProps, TableRowSel
|
|
|
3
3
|
import { ExtractPublicPropTypes, PropType, StyleValue, VNodeChild } from 'vue';
|
|
4
4
|
import { FButtonProps } from '../fbutton';
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* 使用随机ID的标识
|
|
8
|
+
* 值无任何意义,只是需要有个值
|
|
9
|
+
*/
|
|
7
10
|
export declare const RANDOM_ID_FLAG = "random-959595";
|
|
8
11
|
export type ColConfig = {
|
|
9
12
|
key: string;
|
|
@@ -11,6 +14,13 @@ export type ColConfig = {
|
|
|
11
14
|
label?: string;
|
|
12
15
|
hide?: boolean;
|
|
13
16
|
sort?: number;
|
|
17
|
+
/**
|
|
18
|
+
* 列固定配置
|
|
19
|
+
* - 'left'/'right':固定到对应侧
|
|
20
|
+
* - null:用户主动取消固定(阻断对列定义 col.fixed 的继承;JSON 保留 null,丢弃 undefined,故用 null 做哨兵)
|
|
21
|
+
* - 字段缺失:继承列定义 col.fixed(旧 localStorage 数据兼容)
|
|
22
|
+
*/
|
|
23
|
+
fixed?: 'left' | 'right' | null;
|
|
14
24
|
};
|
|
15
25
|
export type ColsSetting = {
|
|
16
26
|
[k: string]: ColConfig;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ColConfig } from './ftable';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 列设置面板普通区拖拽排序(Pointer Events 自研方案,与 use-col-resize 同路线)
|
|
6
|
+
* - 浮动克隆体跟随光标(rAF 节流),原芯片虚线占位、保持在位
|
|
7
|
+
* - elementFromPoint 命中普通区芯片,按水平中点判定插前/插后,实时重排 list
|
|
8
|
+
* - list 为规范序扁平数组 [左固定…, 普通…, 右固定…],仅普通段参与(固定区芯片无 data-col-key)
|
|
9
|
+
*/
|
|
10
|
+
export declare function useColsSetDrag(options: {
|
|
11
|
+
/** 普通区容器元素(其内芯片带 data-col-key 属性) */
|
|
12
|
+
getContainerEl: () => HTMLElement | undefined;
|
|
13
|
+
/** 扁平 list(规范序),仅普通段会被重排 */
|
|
14
|
+
list: ColConfig[];
|
|
15
|
+
}): {
|
|
16
|
+
onDragPointerDown: (e: PointerEvent, item: ColConfig) => void;
|
|
17
|
+
draggingItem: Ref<ColConfig | null, ColConfig | null>;
|
|
18
|
+
};
|
|
@@ -11,6 +11,6 @@ export declare function getTableId(id: string): string;
|
|
|
11
11
|
* 获取一个初始化的表头配置项
|
|
12
12
|
* @param id 表格唯一标识
|
|
13
13
|
* @param cols 表格列
|
|
14
|
-
* @param
|
|
14
|
+
* @param useCache 是否保留本地缓存
|
|
15
15
|
*/
|
|
16
|
-
export declare function getInitColsSetting<T extends AnyObject, D extends AnyObject>(id: string, cols: FTableCol<T, D>[],
|
|
16
|
+
export declare function getInitColsSetting<T extends AnyObject, D extends AnyObject>(id: string, cols: FTableCol<T, D>[], useCache?: boolean): ColsSetting;
|