fangguo-component 1.1.4 → 1.2.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.
Files changed (64) hide show
  1. package/README.md +57 -0
  2. package/dist/{ErrorImage-Ao9kEEUg.js → ErrorImage-CFVt1ht_.js} +2 -2
  3. package/dist/FgCascader.css +24 -0
  4. package/dist/{FgCascader.vue_vue_type_style_index_0_lang-CM8FxFLJ.js → FgCascader.vue_vue_type_style_index_0_lang-Bm4HR37D.js} +45 -4
  5. package/dist/{HSelect-BFkWiCFi.js → HSelect-DgFjd08Y.js} +3 -3
  6. package/dist/{HSelectAll.vue_vue_type_script_setup_true_lang-BZX7ch2I.js → HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.js} +1 -1
  7. package/dist/{HSelectSJ-DZmtdyjF.js → HSelectSJ-DOFUzTZV.js} +3 -3
  8. package/dist/ImgViewerHost.vue_vue_type_script_setup_true_lang-CMoh7eWo.js +52 -0
  9. package/dist/LazyPopover-7ebuh-QG.js +188 -0
  10. package/dist/LazyPopover.css +5 -0
  11. package/dist/{SelectTree-DHbWogEU.js → SelectTree-DUH92Iwr.js} +2 -2
  12. package/dist/{TextCopy-th0FAxwl.js → TextCopy-lpbeqOUI.js} +1 -1
  13. package/dist/ViewImg-Bg1AQ0T6.js +247 -0
  14. package/dist/ViewImg.css +56 -0
  15. package/dist/ViewImgPopover-b9PDEYbP.js +275 -0
  16. package/dist/ViewImgPopover.css +33 -0
  17. package/dist/ViewImgPreview.css +100 -0
  18. package/dist/ViewImgPreview.vue_vue_type_style_index_0_lang-CYuLovBR.js +306 -0
  19. package/dist/{common-B1nSpTGn.js → common-D0EYVGB2.js} +1 -1
  20. package/dist/components/cascader/index.js +1 -1
  21. package/dist/components/errorImage/index.js +2 -2
  22. package/dist/components/hSelect/index.js +1 -1
  23. package/dist/components/hSelectAll/index.js +1 -1
  24. package/dist/components/hSelectSJ/index.js +1 -1
  25. package/dist/components/imgViewerHost/ImgViewerHost.vue.d.ts +2 -0
  26. package/dist/components/imgViewerHost/imgViewerStore.d.ts +195 -0
  27. package/dist/components/imgViewerHost/index.d.ts +4 -0
  28. package/dist/components/imgViewerHost/index.js +10 -0
  29. package/dist/components/imgViewerHost/utils.d.ts +4 -0
  30. package/dist/components/index.d.ts +4 -0
  31. package/dist/components/index.js +45 -18
  32. package/dist/components/lazyPopover/LazyPopover.vue.d.ts +12 -15
  33. package/dist/components/lazyPopover/index.js +2 -2
  34. package/dist/components/selectTree/index.js +1 -1
  35. package/dist/components/textCopy/index.js +1 -1
  36. package/dist/components/viewImg/ViewImg.vue.d.ts +141 -0
  37. package/dist/components/viewImg/index.d.ts +1 -0
  38. package/dist/components/viewImg/index.js +4 -0
  39. package/dist/components/viewImgPopover/ViewImgPopover.vue.d.ts +705 -0
  40. package/dist/components/viewImgPopover/index.d.ts +1 -0
  41. package/dist/components/viewImgPopover/index.js +4 -0
  42. package/dist/components/viewImgPreview/ViewImgPreview.vue.d.ts +50 -0
  43. package/dist/components/viewImgPreview/index.d.ts +3 -0
  44. package/dist/components/viewImgPreview/index.js +17 -0
  45. package/dist/components/viewImgPreview/types.d.ts +78 -0
  46. package/dist/imgViewerStore-C5n16uYa.js +241 -0
  47. package/dist/{index-DzdLpetc.js → index-BtQgIf7F.js} +1414 -1402
  48. package/dist/{index-uQXqC9BF.js → index-CckJZ8N-.js} +40 -13
  49. package/dist/{index-BPnixsfc.js → index-Qkq7I01c.js} +15 -1
  50. package/dist/index.d.ts +17 -3
  51. package/dist/index.js +103 -60
  52. package/dist/montageImgUrl-CwgYnB2h.js +204 -0
  53. package/dist/tools/ImageParserUtils/index.js +346 -346
  54. package/dist/tools/common/index.js +1 -1
  55. package/dist/tools/imgUrl/config.d.ts +10 -0
  56. package/dist/tools/imgUrl/index.d.ts +4 -0
  57. package/dist/tools/imgUrl/index.js +16 -0
  58. package/dist/tools/imgUrl/montageImgUrl.d.ts +15 -0
  59. package/dist/tools/imgUrl/networkAdaptive.d.ts +7 -0
  60. package/dist/tools/index.d.ts +1 -0
  61. package/dist/tools/index.js +29 -15
  62. package/dist/types-BNFeGRer.js +32 -0
  63. package/package.json +92 -92
  64. package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js +0 -34
@@ -21,6 +21,10 @@ export * from './lazyComponent';
21
21
  export * from './selectTimePicker';
22
22
  export * from './imageLoupe';
23
23
  export * from './errorImage';
24
+ export * from './viewImg';
25
+ export * from './viewImgPopover';
26
+ export * from './viewImgPreview';
27
+ export * from './imgViewerHost';
24
28
  export * from './selectAll2';
25
29
  export * from './selectCustomAll';
26
30
  export * from './svgIcon';
@@ -1,35 +1,53 @@
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-CM8FxFLJ.js";
2
+ import { _ as _2 } from "../FgCascader.vue_vue_type_style_index_0_lang-Bm4HR37D.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-BZX7ch2I.js";
5
+ import { _ as _5 } from "../HSelectAll.vue_vue_type_script_setup_true_lang-C6qzdQT-.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 "../LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js";
9
- import { _ as _9 } from "../LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js";
8
+ import { _ as _8 } from "../ImgViewerHost.vue_vue_type_script_setup_true_lang-CMoh7eWo.js";
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";
12
12
  import { _ as _12 } from "../SelectAll2.vue_vue_type_script_setup_true_lang-CrsaohxU.js";
13
13
  import { _ as _13 } from "../SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js";
14
14
  import { _ as _14 } from "../SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js";
15
15
  import { _ as _15 } from "../TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js";
16
+ import { _ as _16 } from "../ViewImgPreview.vue_vue_type_style_index_0_lang-CYuLovBR.js";
17
+ import { D, a, b, c, d, e, f, g, h, i, j, k } from "../types-BNFeGRer.js";
16
18
  import { B } from "../ButtonGroup-DqViorHX.js";
17
19
  import { C } from "../ContentTitle-By0Zk1u7.js";
18
20
  import { C as C2 } from "../CustomInputV2-BqhBSO53.js";
19
21
  import { C as C3 } from "../CustomMultipleInput-DRMTUtkE.js";
20
- import { D } from "../DragSort-5WetnkmW.js";
21
- import { E } from "../ErrorImage-Ao9kEEUg.js";
22
- import { H } from "../HSelect-BFkWiCFi.js";
23
- import { H as H2 } from "../HSelectSJ-DZmtdyjF.js";
24
- import { L } from "../LoadingBtn-DWm2cY9k.js";
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";
27
+ import { L as L2 } from "../LoadingBtn-DWm2cY9k.js";
25
28
  import { M } from "../MInput-s_P63myh.js";
26
29
  import { M as M2 } from "../MyTable-CHvxPYgk.js";
27
30
  import { S } from "../SelectAddress-CCepDxu8.js";
28
- import { S as S2 } from "../SelectTree-DHbWogEU.js";
31
+ import { S as S2 } from "../SelectTree-DUH92Iwr.js";
29
32
  import { S as S3 } from "../SvgIcon-DIg0upEk.js";
30
- import { T } from "../TextCopy-th0FAxwl.js";
31
- import { V } from "../VirtualTable-Cm_L7q9W.js";
33
+ import { T } from "../TextCopy-lpbeqOUI.js";
34
+ import { F as F2 } from "../ViewImg-Bg1AQ0T6.js";
35
+ import { V } from "../ViewImgPopover-b9PDEYbP.js";
36
+ import { I, P, g as g2, u, a as a2 } from "../imgViewerStore-C5n16uYa.js";
37
+ import { V as V2 } from "../VirtualTable-Cm_L7q9W.js";
32
38
  export {
39
+ D as DEFAULT_ORIGINAL_TOOLBAR,
40
+ a as DEFAULT_PREVIEW_CLOSE_ON_PRESS_ESCAPE,
41
+ b as DEFAULT_PREVIEW_HIDE_ON_CLICK_MODAL,
42
+ c as DEFAULT_PREVIEW_INFINITE,
43
+ d as DEFAULT_PREVIEW_MAX_SCALE,
44
+ e as DEFAULT_PREVIEW_MIN_SCALE,
45
+ f as DEFAULT_PREVIEW_SCALE,
46
+ g as DEFAULT_PREVIEW_SHOW_PROGRESS,
47
+ h as DEFAULT_PREVIEW_TELEPORTED,
48
+ i as DEFAULT_PREVIEW_ZOOM_RATE,
49
+ j as DEFAULT_TOOLBAR_BG_COLOR,
50
+ k as DEFAULT_TOOLBAR_ICON_COLOR,
33
51
  _ as FgArgHover,
34
52
  B as FgButtonGroup,
35
53
  _2 as FgCascader,
@@ -38,16 +56,17 @@ export {
38
56
  C2 as FgCustomInputV2,
39
57
  C3 as FgCustomMultipleInput,
40
58
  _4 as FgDragResizable,
41
- D as FgDragSort,
42
- E as FgErrorImage,
59
+ D2 as FgDragSort,
60
+ F as FgErrorImage,
43
61
  H as FgHSelect,
44
62
  _5 as FgHSelectAll,
45
63
  H2 as FgHSelectSJ,
46
64
  _6 as FgIdentifyAddress,
47
65
  _7 as FgImageLoupe,
48
- _8 as FgLazyComponent,
49
- _9 as FgLazyPopover,
50
- L as FgLoadingBtn,
66
+ _8 as FgImgViewerHost,
67
+ _9 as FgLazyComponent,
68
+ L as FgLazyPopover,
69
+ L2 as FgLoadingBtn,
51
70
  M as FgMInput,
52
71
  M2 as FgMyTable,
53
72
  _10 as FgNoRender,
@@ -60,5 +79,13 @@ export {
60
79
  S3 as FgSvgIcon,
61
80
  T as FgTextCopy,
62
81
  _15 as FgTextEllipsisTooltip,
63
- V as VirtualTable
82
+ F2 as FgViewImg,
83
+ V as FgViewImgPopover,
84
+ _16 as FgViewImgPreview,
85
+ I as ImgViewerStore,
86
+ P as PREVIEW_BASE_Z_INDEX,
87
+ V2 as VirtualTable,
88
+ g2 as getDialogZindex,
89
+ u as useImgViewerState,
90
+ a2 as useImgViewerStore
64
91
  };
@@ -1,27 +1,24 @@
1
+ type PopoverUserProps = Record<string, unknown>;
2
+ type __VLS_Props = {
3
+ props?: PopoverUserProps;
4
+ };
1
5
  declare function __VLS_template(): {
2
6
  attrs: Partial<{}>;
3
7
  slots: {
4
- reference?(_: {}): any;
5
8
  reference?(_: {}): any;
6
9
  default?(_: {}): any;
7
10
  };
8
- refs: {};
11
+ refs: {
12
+ triggerRef: HTMLSpanElement;
13
+ };
9
14
  rootEl: any;
10
15
  };
11
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
- props: {
14
- type: ObjectConstructor;
15
- default: () => {};
16
- };
17
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
- props: {
19
- type: ObjectConstructor;
20
- default: () => {};
21
- };
22
- }>> & Readonly<{}>, {
23
- props: Record<string, any>;
24
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ props: PopoverUserProps;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
20
+ triggerRef: HTMLSpanElement;
21
+ }, any>;
25
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
23
  export default _default;
27
24
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,4 @@
1
- import { _ } from "../../LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js";
1
+ import { L } from "../../LazyPopover-7ebuh-QG.js";
2
2
  export {
3
- _ as FgLazyPopover
3
+ L as FgLazyPopover
4
4
  };
@@ -1,4 +1,4 @@
1
- import { S } from "../../SelectTree-DHbWogEU.js";
1
+ import { S } from "../../SelectTree-DUH92Iwr.js";
2
2
  export {
3
3
  S as FgSelectTree
4
4
  };
@@ -1,4 +1,4 @@
1
- import { T } from "../../TextCopy-th0FAxwl.js";
1
+ import { T } from "../../TextCopy-lpbeqOUI.js";
2
2
  export {
3
3
  T as FgTextCopy
4
4
  };
@@ -0,0 +1,141 @@
1
+ import { VNode } from 'vue';
2
+ import { ImgSizeOptions } from '../../tools/imgUrl';
3
+ import { OriginalToolbarItem, SimpleCustomTool, PreviewShowPayload } from '../viewImgPreview/types';
4
+ type ObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | "";
5
+ type __VLS_Props = {
6
+ src?: string;
7
+ fit?: ObjectFit;
8
+ lazy?: boolean;
9
+ /** 外部 loading 状态,为 true 时展示 placeholder */
10
+ loading?: boolean;
11
+ /** 是否开启点击预览大图 */
12
+ preview?: boolean;
13
+ /** 预览图片列表,默认 `[src]` */
14
+ previewSrcList?: string[];
15
+ /** 预览初始索引,默认取当前 `src` 在列表中的位置 */
16
+ initialIndex?: number;
17
+ /** 兼容旧字段,等同 `initialIndex` */
18
+ defImgPreviewIndex?: number;
19
+ /** 预览是否循环切换 */
20
+ infinite?: boolean;
21
+ /** 预览层 z-index;未传时在打开时自动取 max(.el-overlay, 2000) + 1 */
22
+ zIndex?: number;
23
+ /** 点击遮罩是否关闭预览 */
24
+ hideOnClickModal?: boolean;
25
+ /** 是否按 ESC 关闭预览 */
26
+ closeOnPressEscape?: boolean;
27
+ /** 预览是否 Teleport 到 body(推荐嵌套 transform 场景设为 true) */
28
+ previewTeleported?: boolean;
29
+ /** 同 previewTeleported(兼容旧字段) */
30
+ teleported?: boolean;
31
+ /** 预览缩放速率 */
32
+ zoomRate?: number;
33
+ /** 预览初始缩放比例 */
34
+ scale?: number;
35
+ /** 预览最小缩放比例 */
36
+ minScale?: number;
37
+ /** 预览最大缩放比例 */
38
+ maxScale?: number;
39
+ /** 预览是否显示进度(如 1/3) */
40
+ showProgress?: boolean;
41
+ /** 预览工具栏背景色 */
42
+ toolbarBgColor?: string;
43
+ /** 兼容旧字段,等同 `toolbarBgColor` */
44
+ backgroundColor?: string;
45
+ /** 预览工具栏图标/文字颜色 */
46
+ toolbarIconColor?: string;
47
+ /** 自定义工具栏按钮(图标 + handler) */
48
+ simpleExtraTools?: SimpleCustomTool[];
49
+ /** 通过 h 函数自定义工具栏内容 */
50
+ renderExtraTools?: VNode | null;
51
+ /** 内置工具栏按钮配置 */
52
+ originalToolbar?: OriginalToolbarItem[];
53
+ /** 默认失败占位图颜色,透传 FgErrorImage color */
54
+ errorColor?: string;
55
+ /** 默认失败占位图 offset,透传 FgErrorImage offset */
56
+ errorOffset?: number;
57
+ /** 加载失败时的自定义文案;与默认占位图同屏展示,也可用 #error 插槽完全自定义 */
58
+ errorText?: string;
59
+ /** 是否对 src 做 OSS / TEMU 缩略图处理,需先在应用入口 configureImgUrl 注入 ossLinks */
60
+ ossProcess?: boolean;
61
+ /** 当前组件使用的 OSS 域名白名单;未传时使用 configureImgUrl 注入的全局配置 */
62
+ ossLinks?: string[];
63
+ /** OSS 缩略图参数:w-宽, h-高, s-短边, l-长边, Q/q-质量, format-格式 */
64
+ imgSize?: ImgSizeOptions;
65
+ /** 点击预览是否去掉 URL 查询参数(与主图加载失败去参重试逻辑一致) */
66
+ previewStripQuery?: boolean;
67
+ };
68
+ declare function __VLS_template(): {
69
+ attrs: Partial<{}>;
70
+ slots: {
71
+ placeholder?(_: {}): any;
72
+ error?(_: {}): any;
73
+ };
74
+ refs: {};
75
+ rootEl: any;
76
+ };
77
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
78
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
79
+ displaySrc: import('vue').Ref<string, string>;
80
+ retried: import('vue').Ref<boolean, boolean>;
81
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
82
+ switch: (index: number) => any;
83
+ show: (payload: PreviewShowPayload) => any;
84
+ close: () => any;
85
+ error: (event: Event) => any;
86
+ load: (event: Event) => any;
87
+ retry: (payload: {
88
+ from: string;
89
+ to: string;
90
+ }) => any;
91
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
92
+ onSwitch?: (index: number) => any;
93
+ onShow?: (payload: PreviewShowPayload) => any;
94
+ onClose?: () => any;
95
+ onError?: (event: Event) => any;
96
+ onLoad?: (event: Event) => any;
97
+ onRetry?: (payload: {
98
+ from: string;
99
+ to: string;
100
+ }) => any;
101
+ }>, {
102
+ backgroundColor: string;
103
+ scale: number;
104
+ zIndex: number;
105
+ infinite: boolean;
106
+ lazy: boolean;
107
+ teleported: boolean;
108
+ loading: boolean;
109
+ preview: boolean;
110
+ closeOnPressEscape: boolean;
111
+ src: string;
112
+ hideOnClickModal: boolean;
113
+ previewSrcList: string[];
114
+ previewTeleported: boolean;
115
+ fit: ObjectFit;
116
+ defImgPreviewIndex: number;
117
+ toolbarBgColor: string;
118
+ toolbarIconColor: string;
119
+ simpleExtraTools: SimpleCustomTool[];
120
+ renderExtraTools: VNode | null;
121
+ originalToolbar: OriginalToolbarItem[];
122
+ zoomRate: number;
123
+ minScale: number;
124
+ maxScale: number;
125
+ showProgress: boolean;
126
+ initialIndex: number;
127
+ errorColor: string;
128
+ errorOffset: number;
129
+ errorText: string;
130
+ ossProcess: boolean;
131
+ ossLinks: string[];
132
+ imgSize: ImgSizeOptions;
133
+ previewStripQuery: boolean;
134
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
135
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
136
+ export default _default;
137
+ type __VLS_WithTemplateSlots<T, S> = T & {
138
+ new (): {
139
+ $slots: S;
140
+ };
141
+ };
@@ -0,0 +1 @@
1
+ export { default as FgViewImg } from './ViewImg.vue';
@@ -0,0 +1,4 @@
1
+ import { F } from "../../ViewImg-Bg1AQ0T6.js";
2
+ export {
3
+ F as FgViewImg
4
+ };