fangguo-component 1.2.3 → 1.2.5

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.
Files changed (52) hide show
  1. package/dist/{ErrorImage-CFVt1ht_.js → ErrorImage-Ao9kEEUg.js} +2 -2
  2. package/dist/FgCascader.css +2 -14
  3. package/dist/{FgCascader.vue_vue_type_style_index_0_lang-CstlYwHs.js → FgCascader.vue_vue_type_style_index_0_lang-CtUPO8fk.js} +20 -26
  4. package/dist/{HSelect-DgFjd08Y.js → HSelect-0w2mSrtm.js} +1 -1
  5. package/dist/{HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.js → HSelectAll.vue_vue_type_script_setup_true_lang-xHFbYs59.js} +1 -1
  6. package/dist/{HSelectSJ-DOFUzTZV.js → HSelectSJ-Cm573j6B.js} +1 -1
  7. package/dist/{ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js → ImgViewerHost.vue_vue_type_script_setup_true_lang-DO9s-b9s.js} +42 -3
  8. package/dist/{LazyPopover-7ebuh-QG.js → LazyPopover-CcvilJ6U.js} +25 -3
  9. package/dist/LazyPopover.css +1 -1
  10. package/dist/{SelectTree-DUH92Iwr.js → SelectTree-BHvvkiQi.js} +1 -1
  11. package/dist/ViewImg-CLRjYOUN.js +556 -0
  12. package/dist/ViewImg.css +60 -35
  13. package/dist/ViewImgPopover-BtFnYval.js +463 -0
  14. package/dist/ViewImgPopover.css +28 -26
  15. package/dist/components/cascader/index.js +1 -1
  16. package/dist/components/errorImage/index.js +2 -2
  17. package/dist/components/hSelect/index.js +1 -1
  18. package/dist/components/hSelectAll/index.js +1 -1
  19. package/dist/components/hSelectSJ/index.js +1 -1
  20. package/dist/components/imgViewerHost/ImgViewerHost.vue.d.ts +7 -1
  21. package/dist/components/imgViewerHost/imgViewerAutoHost.d.ts +2 -0
  22. package/dist/components/imgViewerHost/imgViewerHostRegistry.d.ts +5 -0
  23. package/dist/components/imgViewerHost/index.js +2 -2
  24. package/dist/components/index.js +22 -18
  25. package/dist/components/lazyPopover/LazyPopover.vue.d.ts +2 -0
  26. package/dist/components/lazyPopover/index.js +1 -1
  27. package/dist/components/selectTree/index.js +1 -1
  28. package/dist/components/viewImg/ViewImg.vue.d.ts +44 -19
  29. package/dist/components/viewImg/ViewImgErrorFallback.vue.d.ts +17 -0
  30. package/dist/components/viewImg/defaults.d.ts +28 -0
  31. package/dist/components/viewImg/index.d.ts +3 -0
  32. package/dist/components/viewImg/index.js +6 -2
  33. package/dist/components/viewImgPopover/ViewImgPopover.vue.d.ts +207 -99
  34. package/dist/components/viewImgPopover/index.js +1 -1
  35. package/dist/components/viewImgPreview/ViewImgPreview.vue.d.ts +6 -6
  36. package/dist/imgViewerAutoHost-BQVVGop1.js +32 -0
  37. package/dist/{imgViewerStore-DK3zvGf4.js → imgViewerStore-Ajm-L7R5.js} +7 -0
  38. package/dist/{index-Qkq7I01c.js → index-DsfY1yqo.js} +6 -1
  39. package/dist/{index-Ce_edAQB.js → index-wDrpgKQT.js} +17 -13
  40. package/dist/index.d.ts +8 -3
  41. package/dist/index.js +58 -49
  42. package/dist/montageImgUrl-B9ZmJ7TF.js +464 -0
  43. package/dist/tools/ImageParserUtils/index.d.ts +1 -1
  44. package/dist/tools/imgUrl/imageUrl.d.ts +246 -0
  45. package/dist/tools/imgUrl/index.d.ts +2 -0
  46. package/dist/tools/imgUrl/index.js +13 -8
  47. package/dist/tools/imgUrl/montageImgUrl.d.ts +11 -5
  48. package/dist/tools/index.js +19 -14
  49. package/package.json +2 -2
  50. package/dist/ViewImg-DXhF20SL.js +0 -254
  51. package/dist/ViewImgPopover-QblZG0z5.js +0 -343
  52. package/dist/montageImgUrl-CwgYnB2h.js +0 -204
@@ -1,11 +1,11 @@
1
1
  import { _ } from "../ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js";
2
- import { _ as _2 } from "../FgCascader.vue_vue_type_style_index_0_lang-CstlYwHs.js";
2
+ import { _ as _2 } from "../FgCascader.vue_vue_type_style_index_0_lang-CtUPO8fk.js";
3
3
  import { _ as _3 } from "../CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js";
4
4
  import { _ as _4 } from "../DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js";
5
- import { _ as _5 } from "../HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.js";
5
+ import { _ as _5 } from "../HSelectAll.vue_vue_type_script_setup_true_lang-xHFbYs59.js";
6
6
  import { _ as _6 } from "../IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js";
7
7
  import { _ as _7 } from "../ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js";
8
- import { _ as _8 } from "../ImgViewerHost.vue_vue_type_script_setup_true_lang-DBs42WOq.js";
8
+ import { _ as _8 } from "../ImgViewerHost.vue_vue_type_script_setup_true_lang-DO9s-b9s.js";
9
9
  import { _ as _9 } from "../LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js";
10
10
  import { _ as _10 } from "../NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js";
11
11
  import { _ as _11 } from "../SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js";
@@ -20,21 +20,21 @@ import { C } from "../ContentTitle-By0Zk1u7.js";
20
20
  import { C as C2 } from "../CustomInputV2-BqhBSO53.js";
21
21
  import { C as C3 } from "../CustomMultipleInput-DRMTUtkE.js";
22
22
  import { D as D2 } from "../DragSort-5WetnkmW.js";
23
- import { F } from "../ErrorImage-CFVt1ht_.js";
24
- import { H } from "../HSelect-DgFjd08Y.js";
25
- import { H as H2 } from "../HSelectSJ-DOFUzTZV.js";
26
- import { L } from "../LazyPopover-7ebuh-QG.js";
23
+ import { E } from "../ErrorImage-Ao9kEEUg.js";
24
+ import { H } from "../HSelect-0w2mSrtm.js";
25
+ import { H as H2 } from "../HSelectSJ-Cm573j6B.js";
26
+ import { L } from "../LazyPopover-CcvilJ6U.js";
27
27
  import { L as L2 } from "../LoadingBtn-DWm2cY9k.js";
28
28
  import { M } from "../MInput-s_P63myh.js";
29
29
  import { M as M2 } from "../MyTable-CHvxPYgk.js";
30
30
  import { S } from "../SelectAddress-CCepDxu8.js";
31
- import { S as S2 } from "../SelectTree-DUH92Iwr.js";
31
+ import { S as S2 } from "../SelectTree-BHvvkiQi.js";
32
32
  import { S as S3 } from "../SvgIcon-DIg0upEk.js";
33
33
  import { T } from "../TextCopy-lpbeqOUI.js";
34
- import { F as F2 } from "../ViewImg-DXhF20SL.js";
35
- import { V } from "../ViewImgPopover-QblZG0z5.js";
36
- import { I, P, g as g2, u, a as a2 } from "../imgViewerStore-DK3zvGf4.js";
37
- import { V as V2 } from "../VirtualTable-Cm_L7q9W.js";
34
+ import { F, V, c as c2, r as r2, u } from "../ViewImg-CLRjYOUN.js";
35
+ import { V as V2 } from "../ViewImgPopover-BtFnYval.js";
36
+ import { I, P, g as g2, u as u2, a as a2 } from "../imgViewerStore-Ajm-L7R5.js";
37
+ import { V as V3 } from "../VirtualTable-Cm_L7q9W.js";
38
38
  export {
39
39
  D as DEFAULT_ORIGINAL_TOOLBAR,
40
40
  a as DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE,
@@ -58,7 +58,7 @@ export {
58
58
  C3 as FgCustomMultipleInput,
59
59
  _4 as FgDragResizable,
60
60
  D2 as FgDragSort,
61
- F as FgErrorImage,
61
+ E as FgErrorImage,
62
62
  H as FgHSelect,
63
63
  _5 as FgHSelectAll,
64
64
  H2 as FgHSelectSJ,
@@ -80,16 +80,20 @@ export {
80
80
  S3 as FgSvgIcon,
81
81
  T as FgTextCopy,
82
82
  _15 as FgTextEllipsisTooltip,
83
- F2 as FgViewImg,
84
- V as FgViewImgPopover,
83
+ F as FgViewImg,
84
+ V as FgViewImgErrorFallback,
85
+ V2 as FgViewImgPopover,
85
86
  _16 as FgViewImgPreview,
86
87
  I as ImgViewerStore,
87
88
  N as NAV_TOOLBAR_KEYS,
88
89
  P as PREVIEW_BASE_Z_INDEX,
89
- V2 as VirtualTable,
90
+ V3 as VirtualTable,
91
+ c2 as configureViewImgDefaults,
90
92
  g2 as getDialogZindex,
93
+ r2 as resetViewImgDefaults,
91
94
  r as resolvePreviewSideNav,
92
95
  s as shouldShowPreviewSideNav,
93
- u as useImgViewerState,
94
- a2 as useImgViewerStore
96
+ u2 as useImgViewerState,
97
+ a2 as useImgViewerStore,
98
+ u as useViewImgDefaults
95
99
  };
@@ -1,6 +1,7 @@
1
1
  type PopoverUserProps = Record<string, unknown>;
2
2
  type __VLS_Props = {
3
3
  props?: PopoverUserProps;
4
+ disabled?: boolean;
4
5
  };
5
6
  declare function __VLS_template(): {
6
7
  attrs: Partial<{}>;
@@ -16,6 +17,7 @@ declare function __VLS_template(): {
16
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
18
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
19
  props: PopoverUserProps;
20
+ disabled: boolean;
19
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
20
22
  triggerRef: HTMLSpanElement;
21
23
  }, any>;
@@ -1,4 +1,4 @@
1
- import { L } from "../../LazyPopover-7ebuh-QG.js";
1
+ import { L } from "../../LazyPopover-CcvilJ6U.js";
2
2
  export {
3
3
  L as FgLazyPopover
4
4
  };
@@ -1,4 +1,4 @@
1
- import { S } from "../../SelectTree-DUH92Iwr.js";
1
+ import { S } from "../../SelectTree-BHvvkiQi.js";
2
2
  export {
3
3
  S as FgSelectTree
4
4
  };
@@ -5,7 +5,16 @@ type ObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | "";
5
5
  type __VLS_Props = {
6
6
  src?: string;
7
7
  fit?: ObjectFit;
8
+ /**
9
+ * 是否懒加载:为 true 时进入视口(或 scrollContainer)后再请求图片
10
+ * (IntersectionObserver;非仅原生 loading="lazy")
11
+ */
8
12
  lazy?: boolean;
13
+ /**
14
+ * 懒加载滚动根;未传时相对浏览器视口。
15
+ * 自定义 overflow 容器需传入选择器或 HTMLElement,否则可能判定为“已在视口内”而立刻加载。
16
+ */
17
+ scrollContainer?: string | HTMLElement | null;
9
18
  /** 外部 loading 状态,为 true 时展示 placeholder */
10
19
  loading?: boolean;
11
20
  /** 是否开启点击预览大图 */
@@ -50,11 +59,9 @@ type __VLS_Props = {
50
59
  renderExtraTools?: VNode | null;
51
60
  /** 内置工具栏按钮配置 */
52
61
  originalToolbar?: OriginalToolbarItem[];
53
- /** 默认失败占位图颜色,透传 FgErrorImage color */
54
- errorColor?: string;
55
- /** 默认失败占位图 offset,透传 FgErrorImage offset */
56
- errorOffset?: number;
57
- /** 加载失败时的自定义文案;与默认占位图同屏展示,也可用 #error 插槽完全自定义 */
62
+ /** 内置占位图标 / 文案色;作用于加载中 / 无图 / 加载失败;未传用设计默认色 */
63
+ fallbackColor?: string;
64
+ /** 加载失败文案;未传默认「加载失败」。空 / 仅空白 src 固定显示「无图」 */
58
65
  errorText?: string;
59
66
  /** 是否对 src 做 OSS / TEMU 缩略图处理,需先在应用入口 configureImgUrl 注入 ossLinks */
60
67
  ossProcess?: boolean;
@@ -70,14 +77,30 @@ type __VLS_Props = {
70
77
  /**
71
78
  * 打开预览大图
72
79
  */
73
- declare function openPreview(): void;
80
+ declare function openPreview(previewList?: string[]): void;
74
81
  declare function __VLS_template(): {
75
82
  attrs: Partial<{}>;
76
83
  slots: {
77
- placeholder?(_: {}): any;
78
- error?(_: {}): any;
84
+ placeholder?(_: {
85
+ src: string;
86
+ displaySrc: string;
87
+ loading: boolean;
88
+ loadError: boolean;
89
+ errorText: string;
90
+ fallbackColor: string;
91
+ }): any;
92
+ error?(_: {
93
+ src: string;
94
+ displaySrc: string;
95
+ loading: boolean;
96
+ loadError: boolean;
97
+ errorText: string;
98
+ fallbackColor: string;
99
+ }): any;
100
+ };
101
+ refs: {
102
+ rootRef: HTMLSpanElement;
79
103
  };
80
- refs: {};
81
104
  rootEl: any;
82
105
  };
83
106
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -120,26 +143,28 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
120
143
  previewSrcList: string[];
121
144
  previewTeleported: boolean;
122
145
  fit: ObjectFit;
123
- defImgPreviewIndex: number;
146
+ errorText: string;
147
+ fallbackColor: string;
148
+ initialIndex: number;
124
149
  toolbarBgColor: string;
125
150
  toolbarIconColor: string;
126
- simpleExtraTools: SimpleCustomTool[];
127
- renderExtraTools: VNode | null;
128
- originalToolbar: OriginalToolbarItem[];
129
- previewSideNav: PreviewSideNav;
130
151
  zoomRate: number;
131
152
  minScale: number;
132
153
  maxScale: number;
133
154
  showProgress: boolean;
134
- initialIndex: number;
135
- errorColor: string;
136
- errorOffset: number;
137
- errorText: string;
155
+ simpleExtraTools: SimpleCustomTool[];
156
+ renderExtraTools: VNode | null;
157
+ originalToolbar: OriginalToolbarItem[];
158
+ previewSideNav: PreviewSideNav;
159
+ defImgPreviewIndex: number;
160
+ scrollContainer: string | HTMLElement | null;
138
161
  ossProcess: boolean;
139
162
  ossLinks: string[];
140
163
  imgSize: ImgSizeOptions;
141
164
  previewStripQuery: boolean;
142
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
165
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
166
+ rootRef: HTMLSpanElement;
167
+ }, any>;
143
168
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
144
169
  export default _default;
145
170
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ /** 为 true 时展示「加载中」(优先于无图 / 失败) */
3
+ loading?: boolean;
4
+ /** 原始图片地址;空或仅空白走「无图」态 */
5
+ src?: string;
6
+ /** 加载失败文案;未传时默认「加载失败」 */
7
+ errorText?: string;
8
+ /** 内置占位主色;未传用设计默认色;传入后按主色派生浅淡色 */
9
+ fallbackColor?: string;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ loading: boolean;
13
+ src: string;
14
+ errorText: string;
15
+ fallbackColor: string;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
17
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { VNodeChild } from 'vue';
2
+ export interface ViewImgDefaultSlotPayload {
3
+ src: string;
4
+ displaySrc: string;
5
+ loading: boolean;
6
+ loadError: boolean;
7
+ errorText: string;
8
+ /** 内置占位图标 / 文案色 */
9
+ fallbackColor: string;
10
+ }
11
+ export interface ViewImgGlobalDefaults {
12
+ /** FgViewImg 默认加载占位内容;低于组件自身 #placeholder 插槽优先级 */
13
+ placeholder?: (payload: ViewImgDefaultSlotPayload) => VNodeChild;
14
+ /** FgViewImg 默认失败占位内容;低于组件自身 #error 插槽优先级 */
15
+ error?: (payload: ViewImgDefaultSlotPayload) => VNodeChild;
16
+ /** FgViewImgPopover 默认水印标题;低于组件自身 waterMarkTitle prop 优先级 */
17
+ waterMarkTitle?: string;
18
+ /** FgViewImgPopover 默认加载占位 SVG 颜色;低于组件自身 loadingIconColor prop 优先级 */
19
+ loadingIconColor?: string;
20
+ }
21
+ export declare function configureViewImgDefaults(defaults: ViewImgGlobalDefaults): void;
22
+ export declare function resetViewImgDefaults(): void;
23
+ export declare function useViewImgDefaults(): {
24
+ placeholder?: (payload: ViewImgDefaultSlotPayload) => VNodeChild;
25
+ error?: (payload: ViewImgDefaultSlotPayload) => VNodeChild;
26
+ waterMarkTitle?: string;
27
+ loadingIconColor?: string;
28
+ };
@@ -1 +1,4 @@
1
1
  export { default as FgViewImg } from './ViewImg.vue';
2
+ export { default as FgViewImgErrorFallback } from './ViewImgErrorFallback.vue';
3
+ export { configureViewImgDefaults, resetViewImgDefaults, useViewImgDefaults } from './defaults';
4
+ export type { ViewImgDefaultSlotPayload, ViewImgGlobalDefaults } from './defaults';
@@ -1,4 +1,8 @@
1
- import { F } from "../../ViewImg-DXhF20SL.js";
1
+ import { F, V, c, r, u } from "../../ViewImg-CLRjYOUN.js";
2
2
  export {
3
- F as FgViewImg
3
+ F as FgViewImg,
4
+ V as FgViewImgErrorFallback,
5
+ c as configureViewImgDefaults,
6
+ r as resetViewImgDefaults,
7
+ u as useViewImgDefaults
4
8
  };