@itshixun/qckeditor-vue2 1.2.1 → 1.2.2
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/README.md +37 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +57 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2716 -2635
- package/dist/src/components/QCKClassic.d.ts +12 -0
- package/dist/src/components/QCKClassic.d.ts.map +1 -1
- package/dist/src/components/QCKContent.d.ts +23 -1
- package/dist/src/components/QCKContent.d.ts.map +1 -1
- package/dist/src/components/QCKEditor.d.ts +12 -1
- package/dist/src/components/QCKEditor.d.ts.map +1 -1
- package/dist/src/components/QCKEditorPro.d.ts +25 -1
- package/dist/src/components/QCKEditorPro.d.ts.map +1 -1
- package/dist/src/types.d.ts +11 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/imageRetry.d.ts +22 -0
- package/dist/src/utils/imageRetry.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { EditorConfig } from 'ckeditor5';
|
|
3
|
+
import { QCKImageRetryOptions } from '../types';
|
|
3
4
|
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
value: {
|
|
5
6
|
type: StringConstructor;
|
|
@@ -34,6 +35,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
34
35
|
type: BooleanConstructor;
|
|
35
36
|
default: boolean;
|
|
36
37
|
};
|
|
38
|
+
/** 编辑区图片加载失败重试:透传给 QCKEditor */
|
|
39
|
+
imageRetry: {
|
|
40
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
37
43
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
38
44
|
value: {
|
|
39
45
|
type: StringConstructor;
|
|
@@ -68,6 +74,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
68
74
|
type: BooleanConstructor;
|
|
69
75
|
default: boolean;
|
|
70
76
|
};
|
|
77
|
+
/** 编辑区图片加载失败重试:透传给 QCKEditor */
|
|
78
|
+
imageRetry: {
|
|
79
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
71
82
|
}>>, {
|
|
72
83
|
value: string;
|
|
73
84
|
config: EditorConfig;
|
|
@@ -77,6 +88,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
77
88
|
dataNormalizer: (data: string) => string;
|
|
78
89
|
modelValue: string;
|
|
79
90
|
fitHeight: boolean;
|
|
91
|
+
imageRetry: boolean | QCKImageRetryOptions;
|
|
80
92
|
}>;
|
|
81
93
|
export default _default;
|
|
82
94
|
//# sourceMappingURL=QCKClassic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKClassic.d.ts","sourceRoot":"","sources":["../../../src/components/QCKClassic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"QCKClassic.d.ts","sourceRoot":"","sources":["../../../src/components/QCKClassic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE7E,OAAO,KAAK,EAAqB,oBAAoB,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;cAqBlD,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;IAExB,mCAAmC;;;;;IAKnC,gCAAgC;;cAEH,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;cA1BnD,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;IAExB,mCAAmC;;;;;IAKnC,gCAAgC;;cAEH,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;2BAVjC,MAAM,KAAK,MAAM;;;;;AAjCzD,wBAkFG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { QCKImagePreviewOptions } from '../types';
|
|
2
|
+
import { QCKImagePreviewOptions, QCKImageRetryOptions } from '../types';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<{
|
|
4
4
|
value: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -38,6 +38,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
38
38
|
type: PropType<number | string>;
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
|
+
/** 垂直方向 padding:用法同 horizontalPadding,用于补偿 trimMargin 消除的首尾段落上下间距 */
|
|
42
|
+
verticalPadding: {
|
|
43
|
+
type: PropType<number | string>;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
41
46
|
/** 为 true 时消除首尾段落的 margin:首个 p 的 margin-block-start 与末个 p 的 margin-block-end 置 0 */
|
|
42
47
|
trimMargin: {
|
|
43
48
|
type: BooleanConstructor;
|
|
@@ -47,6 +52,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
47
52
|
type: PropType<boolean | QCKImagePreviewOptions>;
|
|
48
53
|
default: boolean;
|
|
49
54
|
};
|
|
55
|
+
/** 图片加载失败重试:true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
56
|
+
imageRetry: {
|
|
57
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
50
60
|
}, {
|
|
51
61
|
container: import('vue').Ref<HTMLDivElement | null>;
|
|
52
62
|
renderHtml: import('vue').ComputedRef<string>;
|
|
@@ -98,6 +108,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
98
108
|
type: PropType<number | string>;
|
|
99
109
|
default: string;
|
|
100
110
|
};
|
|
111
|
+
/** 垂直方向 padding:用法同 horizontalPadding,用于补偿 trimMargin 消除的首尾段落上下间距 */
|
|
112
|
+
verticalPadding: {
|
|
113
|
+
type: PropType<number | string>;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
101
116
|
/** 为 true 时消除首尾段落的 margin:首个 p 的 margin-block-start 与末个 p 的 margin-block-end 置 0 */
|
|
102
117
|
trimMargin: {
|
|
103
118
|
type: BooleanConstructor;
|
|
@@ -107,16 +122,23 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
107
122
|
type: PropType<boolean | QCKImagePreviewOptions>;
|
|
108
123
|
default: boolean;
|
|
109
124
|
};
|
|
125
|
+
/** 图片加载失败重试:true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
126
|
+
imageRetry: {
|
|
127
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
110
130
|
}>>, {
|
|
111
131
|
value: string;
|
|
112
132
|
fontSize: number;
|
|
113
133
|
modelValue: string;
|
|
114
134
|
math: boolean;
|
|
135
|
+
imageRetry: boolean | QCKImageRetryOptions;
|
|
115
136
|
content: string;
|
|
116
137
|
containerClass: string;
|
|
117
138
|
sanitize: boolean;
|
|
118
139
|
highlightCode: boolean;
|
|
119
140
|
horizontalPadding: string | number;
|
|
141
|
+
verticalPadding: string | number;
|
|
120
142
|
trimMargin: boolean;
|
|
121
143
|
imagePreview: boolean | QCKImagePreviewOptions;
|
|
122
144
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEzG,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsFvD,QAAQ,CAAC,MAAM,CAAC;;;IAGlC,qFAAqF;;cAEzD,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,qEAAqE;;cAEzC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,oFAAoF;;;;;;cAMvD,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;IAGvE,8DAA8D;;cAEjC,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;;;kCAiMhC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAzN7B,QAAQ,CAAC,MAAM,CAAC;;;IAGlC,qFAAqF;;cAEzD,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,qEAAqE;;cAEzC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,oFAAoF;;;;;;cAMvD,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;IAGvE,8DAA8D;;cAEjC,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;AAzDzE,wBAuYG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { ClassicEditor, InlineEditor, DecoupledEditor, EditorConfig } from 'ckeditor5';
|
|
3
|
-
import { QEditorInstance, QEditorType } from '../types';
|
|
3
|
+
import { QEditorInstance, QEditorType, QCKImageRetryOptions } from '../types';
|
|
4
4
|
declare const _default: import('vue').DefineComponent<{
|
|
5
5
|
/** 编辑器类型:classic / inline / document */
|
|
6
6
|
type: {
|
|
@@ -40,6 +40,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
40
40
|
type: BooleanConstructor;
|
|
41
41
|
default: boolean;
|
|
42
42
|
};
|
|
43
|
+
/** 编辑区图片加载失败重试:true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
44
|
+
imageRetry: {
|
|
45
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
43
48
|
}, {
|
|
44
49
|
normalizedType: import('vue').ComputedRef<QEditorType>;
|
|
45
50
|
editorClass: import('vue').ComputedRef<typeof InlineEditor | typeof DecoupledEditor | typeof ClassicEditor>;
|
|
@@ -84,6 +89,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
84
89
|
type: BooleanConstructor;
|
|
85
90
|
default: boolean;
|
|
86
91
|
};
|
|
92
|
+
/** 编辑区图片加载失败重试:true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
93
|
+
imageRetry: {
|
|
94
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
87
97
|
}>>, {
|
|
88
98
|
value: string;
|
|
89
99
|
config: EditorConfig;
|
|
@@ -94,6 +104,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
94
104
|
modelValue: string;
|
|
95
105
|
type: QEditorType;
|
|
96
106
|
fitHeight: boolean;
|
|
107
|
+
imageRetry: boolean | QCKImageRetryOptions;
|
|
97
108
|
}>;
|
|
98
109
|
export default _default;
|
|
99
110
|
//# sourceMappingURL=QCKEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKEditor.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAwD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1F,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5G,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"QCKEditor.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAwD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1F,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5G,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAMnF,OAAO,yBAAyB,CAAC;;IAU7B,wCAAwC;;cAEtB,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;cAYrB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;IAExB,gDAAgD;;;;;IAKhD,iEAAiE;;cAEpC,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;4BAsEtC,eAAe;;;IA9G9C,wCAAwC;;cAEtB,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;cAYrB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;IAExB,gDAAgD;;;;;IAKhD,iEAAiE;;cAEpC,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;2BAVjC,MAAM,KAAK,MAAM;;;;;;AAtCzD,wBA0MG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
|
|
3
|
-
import { ExtractEditorType, QCKImagePreviewOptions } from '../types';
|
|
3
|
+
import { ExtractEditorType, QCKImagePreviewOptions, QCKImageRetryOptions } from '../types';
|
|
4
4
|
type ClassicEditorType = ExtractEditorType<typeof ClassicEditor>;
|
|
5
5
|
declare const _default: import('vue').DefineComponent<{
|
|
6
6
|
value: {
|
|
@@ -80,6 +80,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
80
80
|
type: PropType<number | string>;
|
|
81
81
|
default: string;
|
|
82
82
|
};
|
|
83
|
+
/** 预览态垂直 padding:透传给 QCKContent,数字按像素处理 */
|
|
84
|
+
verticalPadding: {
|
|
85
|
+
type: PropType<number | string>;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
83
88
|
/** 预览态消除首尾段落 margin:透传给 QCKContent */
|
|
84
89
|
trimMargin: {
|
|
85
90
|
type: BooleanConstructor;
|
|
@@ -89,6 +94,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
89
94
|
type: PropType<boolean | QCKImagePreviewOptions>;
|
|
90
95
|
default: boolean;
|
|
91
96
|
};
|
|
97
|
+
/** 图片加载失败重试(预览态与编辑态均生效):true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
98
|
+
imageRetry: {
|
|
99
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
92
102
|
}, {
|
|
93
103
|
currentValue: import('vue').Ref<string>;
|
|
94
104
|
isActive: import('vue').Ref<boolean>;
|
|
@@ -112,7 +122,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
112
122
|
containerClass: string;
|
|
113
123
|
sanitize: boolean;
|
|
114
124
|
imagePreview: boolean | QCKImagePreviewOptions;
|
|
125
|
+
imageRetry: boolean | QCKImageRetryOptions;
|
|
115
126
|
horizontalPadding: string | number;
|
|
127
|
+
verticalPadding: string | number;
|
|
116
128
|
trimMargin: boolean;
|
|
117
129
|
}>;
|
|
118
130
|
shouldApplyMinHeight: import('vue').ComputedRef<boolean>;
|
|
@@ -204,6 +216,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
204
216
|
type: PropType<number | string>;
|
|
205
217
|
default: string;
|
|
206
218
|
};
|
|
219
|
+
/** 预览态垂直 padding:透传给 QCKContent,数字按像素处理 */
|
|
220
|
+
verticalPadding: {
|
|
221
|
+
type: PropType<number | string>;
|
|
222
|
+
default: string;
|
|
223
|
+
};
|
|
207
224
|
/** 预览态消除首尾段落 margin:透传给 QCKContent */
|
|
208
225
|
trimMargin: {
|
|
209
226
|
type: BooleanConstructor;
|
|
@@ -213,6 +230,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
213
230
|
type: PropType<boolean | QCKImagePreviewOptions>;
|
|
214
231
|
default: boolean;
|
|
215
232
|
};
|
|
233
|
+
/** 图片加载失败重试(预览态与编辑态均生效):true = 默认配置(10 次 / 500ms),对象 = 覆盖配置,false = 关闭 */
|
|
234
|
+
imageRetry: {
|
|
235
|
+
type: PropType<boolean | QCKImageRetryOptions>;
|
|
236
|
+
default: boolean;
|
|
237
|
+
};
|
|
216
238
|
}>>, {
|
|
217
239
|
value: string;
|
|
218
240
|
config: EditorConfig;
|
|
@@ -223,10 +245,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
223
245
|
modelValue: string;
|
|
224
246
|
placeholder: string;
|
|
225
247
|
fitHeight: boolean;
|
|
248
|
+
imageRetry: boolean | QCKImageRetryOptions;
|
|
226
249
|
content: string;
|
|
227
250
|
containerClass: string;
|
|
228
251
|
sanitize: boolean;
|
|
229
252
|
horizontalPadding: string | number;
|
|
253
|
+
verticalPadding: string | number;
|
|
230
254
|
trimMargin: boolean;
|
|
231
255
|
imagePreview: boolean | QCKImagePreviewOptions;
|
|
232
256
|
disableExit: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhG,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAuB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,sCAAsC;;;;;;cAMT,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;IAGvE,0EAA0E;;cAE7C,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;;;;;;;;;mBAmEG,MAAM,GAAG,QAAQ;;;;;;;;;;;;;;;;kCA0BpD,KAAK;;6BAkDV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;;;wBAyCnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cA9T5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,sCAAsC;;;;;;cAMT,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;IAGvE,0EAA0E;;cAE7C,QAAQ,CAAC,OAAO,GAAG,oBAAoB,CAAC;;;;;;;;;2BApEjC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;AAlCzD,wBA2bG"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -34,6 +34,17 @@ export interface QCKImagePreviewOptions {
|
|
|
34
34
|
/** 是否显示全屏按钮,默认 true */
|
|
35
35
|
fullscreen?: boolean;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* 图片加载失败重试选项(QCKEditor / QCKEditorPro / QCKContent 通用)。
|
|
39
|
+
* 适用于图片资源正在服务端上传、尚未可访问的场景:加载失败后按间隔重试。
|
|
40
|
+
* 传 true 等价于全默认配置;传对象可覆盖对应项;传 false 关闭重试。
|
|
41
|
+
*/
|
|
42
|
+
export interface QCKImageRetryOptions {
|
|
43
|
+
/** 单张图片最大重试次数,默认 10 */
|
|
44
|
+
maxRetries?: number;
|
|
45
|
+
/** 重试间隔(毫秒),默认 500 */
|
|
46
|
+
interval?: number;
|
|
47
|
+
}
|
|
37
48
|
/**
|
|
38
49
|
* QCKEditor 支持的编辑器类型。
|
|
39
50
|
* - classic:经典编辑器(工具栏固定顶部)
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5F;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,OAAO;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,YAAY,GAAG,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5F;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,OAAO;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,YAAY,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QCKImageRetryOptions } from '../types';
|
|
2
|
+
export interface QCKImageRetryController {
|
|
3
|
+
/** 移除监听并取消挂起的重试 */
|
|
4
|
+
destroy: () => void;
|
|
5
|
+
}
|
|
6
|
+
/** 解析后的重试配置(内部使用) */
|
|
7
|
+
export interface ResolvedImageRetryOptions {
|
|
8
|
+
maxRetries: number;
|
|
9
|
+
interval: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 解析 imageRetry prop:false = 关闭(返回 null);true / undefined = 默认配置;对象 = 覆盖配置
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveImageRetryOptions(imageRetry: boolean | QCKImageRetryOptions | undefined): ResolvedImageRetryOptions | null;
|
|
15
|
+
/**
|
|
16
|
+
* 在容器上启用图片加载失败重试,返回控制器。
|
|
17
|
+
* - error 事件不冒泡,故在捕获阶段监听;容器内后续新增的 img 同样生效(事件委托)
|
|
18
|
+
* - 重试通过重设相同 src 触发重新请求:不追加 cache-busting 参数,避免破坏签名 URL
|
|
19
|
+
* - 重试次数记录在 img 的 data-qck-img-retry 属性上,元素被替换后计数自然重置
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyImageRetry(container: HTMLElement, options: ResolvedImageRetryOptions): QCKImageRetryController;
|
|
22
|
+
//# sourceMappingURL=imageRetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageRetry.d.ts","sourceRoot":"","sources":["../../../src/utils/imageRetry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,mBAAmB;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qBAAqB;AACrB,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAQD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,GACrD,yBAAyB,GAAG,IAAI,CAalC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,yBAAyB,GACjC,uBAAuB,CA4CzB"}
|
package/package.json
CHANGED