@jt-home/mfe-components 1.0.60-beta.1 → 1.0.61

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.
@@ -1,7 +1,7 @@
1
- import type { JtAttachmentPreviewHandler, JtAttachmentPreviewOptions, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewResolveFileHandler } from './types';
2
- export type { JtAttachmentPreviewMode, JtAttachmentPreviewOptions, JtAttachmentPreviewDownloadContext, JtAttachmentPreviewDownloadHandler, JtAttachmentPreviewDownloadResult, JtAttachmentPreviewFileOptions, JtAttachmentPreviewHandler, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewResolveFileHandler, JtAttachmentPreviewResolvedType, JtAttachmentPreviewService, } from './types';
1
+ import './style.scss';
2
+ import type { JtAttachmentPreviewHandler, JtAttachmentPreviewOptions, JtAttachmentPreviewRequestConfig } from './types';
3
+ export type { JtAttachmentPreviewMode, JtAttachmentPreviewOptions, JtAttachmentPreviewDownloadContext, JtAttachmentPreviewDownloadHandler, JtAttachmentPreviewDownloadResult, JtAttachmentPreviewFileOptions, JtAttachmentPreviewHandler, JtAttachmentPreviewRequestConfig, JtAttachmentPreviewResolvedType, JtAttachmentPreviewService, } from './types';
3
4
  declare function openAttachmentPreview(options: string | JtAttachmentPreviewOptions): JtAttachmentPreviewHandler;
4
- export declare function setupJtAttachmentPreview<Params = unknown>(resolveFile: JtAttachmentPreviewResolveFileHandler<Params>): void;
5
5
  export declare function setupJtAttachmentPreview<Params = unknown, Response = unknown, DownloadResponse = unknown>(config: JtAttachmentPreviewRequestConfig<Params, Response, DownloadResponse>): void;
6
6
  export declare function JtAttachmentPreviewByParams<Params = unknown>(params: Params): JtAttachmentPreviewHandler;
7
7
  export declare const JtAttachmentPreview: typeof openAttachmentPreview & {
@@ -1,4 +1,4 @@
1
- export type JtAttachmentPreviewMode = 'auto' | 'image' | 'pdf';
1
+ export type JtAttachmentPreviewMode = 'auto' | 'image' | 'pdf' | 'video' | 'audio' | 'iframe';
2
2
  export interface JtAttachmentPreviewDownloadContext<Params = unknown> {
3
3
  url: string;
4
4
  name: string;
@@ -40,6 +40,8 @@ export interface JtAttachmentPreviewOptions {
40
40
  download?: JtAttachmentPreviewDownloadHandler;
41
41
  /** 弹窗层级。 */
42
42
  zIndex?: number;
43
+ /** iframe sandbox 属性,不传则不限制 iframe。 */
44
+ sandbox?: string;
43
45
  /** 按 Esc 时是否关闭弹窗。 */
44
46
  closeOnPressEscape?: boolean;
45
47
  /** 加载成功回调。 */
@@ -50,7 +52,6 @@ export interface JtAttachmentPreviewOptions {
50
52
  onClose?: () => void;
51
53
  }
52
54
  export type JtAttachmentPreviewFileOptions = JtAttachmentPreviewOptions;
53
- export type JtAttachmentPreviewResolveFileHandler<Params = unknown> = (params: Params) => JtAttachmentPreviewFileOptions | Promise<JtAttachmentPreviewFileOptions>;
54
55
  export interface JtAttachmentPreviewRequestConfig<Params = unknown, Response = unknown, DownloadResponse = unknown> {
55
56
  /** 根据业务参数请求文件信息。可以直接调用 axios、fetch 或项目内 request。 */
56
57
  request: (params: Params) => Promise<Response>;
@@ -68,8 +69,5 @@ export interface JtAttachmentPreviewHandler {
68
69
  export interface JtAttachmentPreviewService {
69
70
  (options: string | JtAttachmentPreviewOptions): JtAttachmentPreviewHandler;
70
71
  openByParams: <Params = unknown>(params: Params) => JtAttachmentPreviewHandler;
71
- setup: {
72
- <Params = unknown>(resolveFile: JtAttachmentPreviewResolveFileHandler<Params>): void;
73
- <Params = unknown, Response = unknown, DownloadResponse = unknown>(config: JtAttachmentPreviewRequestConfig<Params, Response, DownloadResponse>): void;
74
- };
72
+ setup: <Params = unknown, Response = unknown, DownloadResponse = unknown>(config: JtAttachmentPreviewRequestConfig<Params, Response, DownloadResponse>) => void;
75
73
  }
@@ -21,7 +21,7 @@ interface JTFormItemBaseConfig {
21
21
  prop: string;
22
22
  /** 标签文本 */
23
23
  label: string;
24
- /** 占几列,1-4 */
24
+ /** 占几列,上限跟随 JtFormItems.gridColumns */
25
25
  span?: number;
26
26
  /** 是否显示当前表单项,false 时不渲染 */
27
27
  show?: boolean;
@@ -66,6 +66,9 @@ export interface JTFormItemsProps {
66
66
  configs: JTFormItemConfig[];
67
67
  /** 表单数据对象 */
68
68
  formData: JTFormItemsForm;
69
+ /** 表单 grid 总列数,默认 4,支持 1-24 */
70
+ gridColumns?: number;
71
+ /** 统一设置表单项占用列数,上限跟随 gridColumns */
69
72
  span?: number;
70
73
  }
71
74
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { GlobalInfoNode, GlobalInfoSection } from './types';
2
2
  type SlotRegistry = Record<string, unknown>;
3
3
  export declare function getNodeSlotIdentity(node: Pick<GlobalInfoNode, 'code'>): string;
4
- export declare function getSectionSlotIdentity(node: Partial<Pick<GlobalInfoNode, 'code' | 'infSetId' | 'setId'>>, section?: Pick<GlobalInfoSection, 'code'> | null): string;
4
+ export declare function getSectionSlotIdentity(node: Pick<GlobalInfoNode, 'code'>, section?: Pick<GlobalInfoSection, 'code'> | null): string;
5
5
  export declare function findGlobalInfoSlotName(slotMap: SlotRegistry, prefix: string, identity: string): string;
6
6
  export {};
@@ -1,5 +1,4 @@
1
1
  import './assets/styles/base.css';
2
- import './components/JtAttachmentPreview/style.scss';
3
2
  import type { App } from 'vue';
4
3
  import type { LocaleOptions } from './locale';
5
4
  export declare function install(app: App, options?: LocaleOptions): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jt-home/mfe-components",
3
- "version": "1.0.60-beta.1",
3
+ "version": "1.0.61",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -21,7 +21,8 @@
21
21
  "import": "./dist/JtAttachmentPreview/index.mjs",
22
22
  "require": "./dist/JtAttachmentPreview/index.cjs"
23
23
  },
24
- "./style.css": "./dist/style.css"
24
+ "./style.css": "./dist/style.css",
25
+ "./JtAttachmentPreview/style.css": "./dist/JtAttachmentPreview/style.css"
25
26
  },
26
27
  "files": [
27
28
  "dist"
@@ -52,10 +53,10 @@
52
53
  "test:cascader-props": "tsc --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2020 --outDir tmp/unit-tests src/components/form/item/JtCascader/cascaderProps.ts src/components/form/item/JtCascader/cascaderProps.test.ts && node tmp/unit-tests/cascaderProps.test.js"
53
54
  },
54
55
  "dependencies": {
56
+ "@element-plus/icons-vue": "^2.3.2",
55
57
  "@jt-home/jt-language-tools": "^1.0.2",
56
58
  "@jt-home/sdk-tools": "1.2.1-beta.4",
57
- "@vue-office/pdf": "^2.0.2",
58
- "vue-demi": "0.14.6"
59
+ "pdfjs-dist": "^5.7.284"
59
60
  },
60
61
  "devDependencies": {
61
62
  "@babel/eslint-parser": "^7.24.5",
@@ -68,7 +69,6 @@
68
69
  "@typescript-eslint/parser": "^7.9.0",
69
70
  "@vitejs/plugin-vue": "^5.2.4",
70
71
  "@vue/tsconfig": "^0.8.1",
71
- "@element-plus/icons-vue": "^2.3.2",
72
72
  "element-plus": "^2.14.0",
73
73
  "eslint": "^8.57.0",
74
74
  "eslint-config-prettier": "^9.1.0",
@@ -94,7 +94,6 @@
94
94
  "vue-tsc": "^3.1.5"
95
95
  },
96
96
  "peerDependencies": {
97
- "@element-plus/icons-vue": "^2.3.2",
98
97
  "element-plus": "^2.14.0",
99
98
  "vue": "^3.5.10"
100
99
  }