@vue-ui-kit/ant 2.5.10 → 2.5.11

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/index.d.ts CHANGED
@@ -268,6 +268,10 @@ declare type BodyOptions = {
268
268
  data: any[];
269
269
  };
270
270
 
271
+ export declare type BorderConfigValue = boolean | BorderStyle;
272
+
273
+ export declare type BorderStyle = 'default' | 'outer' | 'inner' | 'none';
274
+
271
275
  export declare interface CanvasColumnProps<T extends Recordable = Recordable> extends Omit<Column, 'children' | 'formatter' | 'key'> {
272
276
  key?: string;
273
277
  field?: string;
@@ -419,6 +423,7 @@ declare class Cell extends BaseCell {
419
423
  userSelect: string;
420
424
  };
421
425
  drawContainer(): void;
426
+ drawHorizontalBorder(): void;
422
427
  private drawAutofillPiont;
423
428
  draw(): void;
424
429
  /**
@@ -703,7 +708,7 @@ declare class Config {
703
708
  /** 单元格字体 */
704
709
  BODY_FONT: string;
705
710
  /** 边框 */
706
- BORDER: boolean;
711
+ BORDER: BorderConfigValue;
707
712
  /** 斑马纹 */
708
713
  STRIPE: boolean;
709
714
  /** 斑马纹颜色 */
@@ -790,6 +795,10 @@ declare class Config {
790
795
  ENABLE_ZOOM_WHEEL: boolean;
791
796
  /** 滚动条轨道尺寸 */
792
797
  SCROLLER_TRACK_SIZE: number;
798
+ /** 滚动条模式,outer 为外部预留区域,inner 为覆盖在内容上 */
799
+ scrollbarMode: ScrollbarMode_2;
800
+ /** 内部滚动条悬停后显示延迟 */
801
+ SCROLLBAR_SHOW_DELAY: number;
793
802
  /** 滚动条滑块尺寸 */
794
803
  SCROLLER_SIZE: number;
795
804
  /** 滚动条滑块颜色 */
@@ -1609,6 +1618,7 @@ declare class EVirtTable {
1609
1618
  constructor(target: HTMLDivElement, options: EVirtTableOptions);
1610
1619
  private createContainer;
1611
1620
  private doDraw;
1621
+ private updateStageBorder;
1612
1622
  draw(ignoreOverlayer?: boolean): void;
1613
1623
  loadConfig(_config: ConfigType): void;
1614
1624
  loadColumns(columns: Column[]): void;
@@ -2857,6 +2867,27 @@ export declare interface PCanvasGridProps<D extends Recordable = Recordable, F e
2857
2867
  pageConfig?: PageConfig;
2858
2868
  proxyConfig?: ProxyConfig<D, F>;
2859
2869
  config?: ConfigType;
2870
+ /**
2871
+ * 表格边框样式,映射 e-virt-table `BORDER`。
2872
+ * - `true` / `'default'`:完整单元格边框
2873
+ * - `'outer'`:仅外边框
2874
+ * - `'inner'` / `false`:仅内部横线
2875
+ * - `'none'`:无边框
2876
+ * 显式传入时优先于 `config.BORDER`。
2877
+ */
2878
+ border?: BorderConfigValue;
2879
+ /**
2880
+ * 滚动条模式,映射 e-virt-table `scrollbarMode`。
2881
+ * - `'outer'`:外部预留滚动条轨道(默认)
2882
+ * - `'inner'`:覆盖在内容上,悬停表格内部后显示
2883
+ * 显式传入时优先于 `config.scrollbarMode`。
2884
+ */
2885
+ scrollbarMode?: ScrollbarMode;
2886
+ /**
2887
+ * 内部滚动条(`scrollbarMode: 'inner'`)悬停后显示延迟(ms),映射 `SCROLLBAR_SHOW_DELAY`。
2888
+ * 显式传入时优先于 `config.SCROLLBAR_SHOW_DELAY`。
2889
+ */
2890
+ scrollbarShowDelay?: number;
2860
2891
  lazyReset?: boolean;
2861
2892
  /**
2862
2893
  * 适应展示区到页面顶部的高度,通常和容器最上的y值有关(正比)
@@ -5114,6 +5145,8 @@ declare class Row {
5114
5145
  drawFixed(): void;
5115
5146
  drawContainer(): void;
5116
5147
  drawFixedContainer(): void;
5148
+ drawHorizontalBorder(): void;
5149
+ drawFixedHorizontalBorder(): void;
5117
5150
  }
5118
5151
 
5119
5152
  declare type RowMaxHeightData = {
@@ -5152,6 +5185,11 @@ declare type Rules = Rule[];
5152
5185
 
5153
5186
  declare type RuleValidator = (rule: Rule, value: any, callback: (message?: string) => void) => void;
5154
5187
 
5188
+ /** 与 e-virt-table `scrollbarMode` 对齐:`outer` 外部预留,`inner` 内部悬停显示 */
5189
+ export declare type ScrollbarMode = 'outer' | 'inner';
5190
+
5191
+ declare type ScrollbarMode_2 = 'outer' | 'inner';
5192
+
5155
5193
  declare type ScrollBehavior_2 = 'auto' | 'smooth';
5156
5194
 
5157
5195
  declare type ScrollLogicalPosition_2 = 'start' | 'center' | 'end' | 'nearest';
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@vue-ui-kit/ant",
3
- "version": "2.5.10",
4
- "description": "Vue3 UI Kit based on Ant Design",
5
- "type": "module",
6
- "main": "./dist/cjs/index.js",
7
- "module": "./dist/es/index.js",
8
- "types": "./dist/index.d.ts",
9
- "style": "./dist/style.css",
10
- "sass": "./src/packages/styles/index.scss",
11
- "exports": {
12
- ".": {
13
- "require": "./dist/cjs/index.js",
14
- "import": "./dist/es/index.js",
15
- "types": "./dist/index.d.ts"
16
- },
17
- "./style.css": "./dist/style.css",
18
- "./style.scss": "./src/packages/styles/index.scss",
19
- "./dist/style.scss": "./src/packages/styles/index.scss",
20
- "./dist/style.css": "./dist/style.css"
21
- },
22
- "files": [
23
- "dist",
24
- "src",
25
- "README.md",
26
- "README.zh.md",
27
- "tsconfig.json"
28
- ],
29
- "scripts": {
30
- "dev": "ts-patch uninstall && vue-tsc --noEmit --skipLibCheck & vite",
31
- "typecheck": "ts-patch uninstall && vue-tsc --noEmit --skipLibCheck",
32
- "build": "ts-patch install && vite build && sass src/packages/styles/index.scss dist/style.css --no-source-map",
33
- "prepack": "rimraf dist && pnpm build",
34
- "prepare": "husky",
35
- "lint:lint-staged": "lint-staged",
36
- "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
37
- },
38
- "keywords": [
39
- "vue3",
40
- "ui kit",
41
- "ant design",
42
- "ant",
43
- "antdv"
44
- ],
45
- "author": {
46
- "name": "adoin",
47
- "email": "adoin@qq.com"
48
- },
49
- "dependencies": {
50
- "e-virt-table": "1.4.2",
51
- "uuid": "^11.1.1",
52
- "xe-utils": "^3.7.6"
53
- },
54
- "peerDependencies": {
55
- "@ant-design/icons-vue": ">=7.0.0",
56
- "ant-design-vue": ">=4.0.0",
57
- "vue": ">=3.2.0"
58
- },
59
- "license": "GPL",
60
- "engines": {
61
- "node": "^20.19.0 || >=22.12.0"
62
- },
63
- "devDependencies": {
64
- "@ant-design/icons-vue": ">=7.0.0",
65
- "@commitlint/cli": "^21.0.0",
66
- "@commitlint/config-conventional": "^21.0.0",
67
- "@vitejs/plugin-vue": "^6.0.5",
68
- "@vitejs/plugin-vue-jsx": "^5.1.5",
69
- "ant-design-vue": "^4.2.3",
70
- "esbuild": "^0.28.0",
71
- "husky": "^9.1.5",
72
- "lint-staged": "^15.2.9",
73
- "prettier": "^3.3.3",
74
- "rimraf": "^6.0.1",
75
- "sass": "^1.77.8",
76
- "scroll-into-view-if-needed": "^2.2.31",
77
- "ts-patch": "^3.2.1",
78
- "typescript-transform-paths": "^3.5.0",
79
- "vite": "^8.0.8",
80
- "vite-plugin-dts": "^4.5.4",
81
- "vue": "^3.5.33",
82
- "vue-tsc": "3.3.5",
83
- "vue-types": "^3.0.2"
84
- }
85
- }
1
+ {
2
+ "name": "@vue-ui-kit/ant",
3
+ "version": "2.5.11",
4
+ "description": "Vue3 UI Kit based on Ant Design",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/es/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "style": "./dist/style.css",
10
+ "sass": "./src/packages/styles/index.scss",
11
+ "exports": {
12
+ ".": {
13
+ "require": "./dist/cjs/index.js",
14
+ "import": "./dist/es/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ },
17
+ "./style.css": "./dist/style.css",
18
+ "./style.scss": "./src/packages/styles/index.scss",
19
+ "./dist/style.scss": "./src/packages/styles/index.scss",
20
+ "./dist/style.css": "./dist/style.css"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "src",
25
+ "README.md",
26
+ "README.zh.md",
27
+ "tsconfig.json"
28
+ ],
29
+ "scripts": {
30
+ "dev": "ts-patch uninstall && vue-tsc --noEmit --skipLibCheck & vite",
31
+ "typecheck": "ts-patch uninstall && vue-tsc --noEmit --skipLibCheck",
32
+ "build": "ts-patch install && vite build && sass src/packages/styles/index.scss dist/style.css --no-source-map",
33
+ "prepack": "rimraf dist && pnpm build",
34
+ "prepare": "husky",
35
+ "lint:lint-staged": "lint-staged",
36
+ "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
37
+ },
38
+ "keywords": [
39
+ "vue3",
40
+ "ui kit",
41
+ "ant design",
42
+ "ant",
43
+ "antdv"
44
+ ],
45
+ "author": {
46
+ "name": "adoin",
47
+ "email": "adoin@qq.com"
48
+ },
49
+ "dependencies": {
50
+ "e-virt-table": "1.4.3",
51
+ "uuid": "^11.1.1",
52
+ "xe-utils": "^3.7.6"
53
+ },
54
+ "peerDependencies": {
55
+ "@ant-design/icons-vue": ">=7.0.0",
56
+ "ant-design-vue": ">=4.0.0",
57
+ "vue": ">=3.2.0"
58
+ },
59
+ "license": "GPL",
60
+ "engines": {
61
+ "node": "^20.19.0 || >=22.12.0"
62
+ },
63
+ "devDependencies": {
64
+ "@ant-design/icons-vue": ">=7.0.0",
65
+ "@commitlint/cli": "^21.0.0",
66
+ "@commitlint/config-conventional": "^21.0.0",
67
+ "@vitejs/plugin-vue": "^6.0.5",
68
+ "@vitejs/plugin-vue-jsx": "^5.1.5",
69
+ "ant-design-vue": "^4.2.3",
70
+ "esbuild": "^0.28.0",
71
+ "husky": "^9.1.5",
72
+ "lint-staged": "^15.2.9",
73
+ "prettier": "^3.3.3",
74
+ "rimraf": "^6.0.1",
75
+ "sass": "^1.77.8",
76
+ "scroll-into-view-if-needed": "^2.2.31",
77
+ "ts-patch": "^3.2.1",
78
+ "typescript-transform-paths": "^3.5.0",
79
+ "vite": "^8.0.8",
80
+ "vite-plugin-dts": "^4.5.4",
81
+ "vue": "^3.5.33",
82
+ "vue-tsc": "3.3.5",
83
+ "vue-types": "^3.0.2"
84
+ }
85
+ }
@@ -3,9 +3,13 @@ import { ButtonProps } from 'ant-design-vue/lib/button';
3
3
  import { ColProps } from 'ant-design-vue/lib/grid/Col';
4
4
  import { FormProps } from 'ant-design-vue/lib/form/Form';
5
5
  import { TableColumnType, TableProps, TooltipProps } from 'ant-design-vue';
6
- import type { ConfigType, Column as EVirtColumn } from 'e-virt-table';
6
+ import type { BorderConfigValue, ConfigType, Column as EVirtColumn } from 'e-virt-table';
7
7
  import EVirtTable from 'e-virt-table';
8
8
 
9
+ export type { BorderConfigValue, BorderStyle } from 'e-virt-table';
10
+ /** 与 e-virt-table `scrollbarMode` 对齐:`outer` 外部预留,`inner` 内部悬停显示 */
11
+ export type ScrollbarMode = 'outer' | 'inner';
12
+
9
13
  export interface CellFuncArg<D extends Recordable = Recordable> {
10
14
  row: D;
11
15
  column?: ColumnProps<D>;
@@ -421,6 +425,27 @@ export interface PCanvasGridProps<
421
425
  pageConfig?: PageConfig;
422
426
  proxyConfig?: ProxyConfig<D, F>;
423
427
  config?: ConfigType;
428
+ /**
429
+ * 表格边框样式,映射 e-virt-table `BORDER`。
430
+ * - `true` / `'default'`:完整单元格边框
431
+ * - `'outer'`:仅外边框
432
+ * - `'inner'` / `false`:仅内部横线
433
+ * - `'none'`:无边框
434
+ * 显式传入时优先于 `config.BORDER`。
435
+ */
436
+ border?: BorderConfigValue;
437
+ /**
438
+ * 滚动条模式,映射 e-virt-table `scrollbarMode`。
439
+ * - `'outer'`:外部预留滚动条轨道(默认)
440
+ * - `'inner'`:覆盖在内容上,悬停表格内部后显示
441
+ * 显式传入时优先于 `config.scrollbarMode`。
442
+ */
443
+ scrollbarMode?: ScrollbarMode;
444
+ /**
445
+ * 内部滚动条(`scrollbarMode: 'inner'`)悬停后显示延迟(ms),映射 `SCROLLBAR_SHOW_DELAY`。
446
+ * 显式传入时优先于 `config.SCROLLBAR_SHOW_DELAY`。
447
+ */
448
+ scrollbarShowDelay?: number;
424
449
  // 重置后不自动提交
425
450
  lazyReset?: boolean;
426
451
  /**
@@ -82,11 +82,17 @@
82
82
  const queryFormData = ref<Partial<F>>({}) as Ref<Partial<F>>;
83
83
 
84
84
  // 只处理 config 的合并,其他属性通过 withDefaults 处理
85
+ // border / scrollbarMode / scrollbarShowDelay 为提升到组件的配置,显式传入时覆盖 config 同名字段
85
86
  const propsWithDefaults = computed(() => ({
86
87
  ...props,
87
88
  config: {
88
89
  ...canvasTableDefaults,
89
90
  ...props.config,
91
+ ...(props.border !== undefined ? { BORDER: props.border } : {}),
92
+ ...(props.scrollbarMode !== undefined ? { scrollbarMode: props.scrollbarMode } : {}),
93
+ ...(props.scrollbarShowDelay !== undefined
94
+ ? { SCROLLBAR_SHOW_DELAY: props.scrollbarShowDelay }
95
+ : {}),
90
96
  },
91
97
  }));
92
98
  const mode = computed<'list' | 'pagination' | 'bad'>(() =>