@cyberpunk-vue/components 1.12.5 → 1.12.7
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/image-preview/src/image-preview.d.ts +25 -3
- package/dist/image-preview/src/image-preview.vue.d.ts +53 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2512 -2402
- package/dist/segmented/index.d.ts +191 -44
- package/dist/segmented/src/segmented.d.ts +32 -0
- package/dist/segmented/src/segmented.vue.d.ts +51 -1
- package/package.json +4 -4
- package/dist/image-preview/index.d.ts +0 -115
|
@@ -10,7 +10,173 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @see {@link SegmentedProps} 查看所有可用属性
|
|
12
12
|
*/
|
|
13
|
-
export declare const CpSegmented: import('../utils').SFCWithInstall<
|
|
13
|
+
export declare const CpSegmented: import('../utils').SFCWithInstall<{
|
|
14
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
readonly modelValue: {
|
|
16
|
+
readonly type: import('vue').PropType<import('.').SegmentedValueType>;
|
|
17
|
+
readonly default: undefined;
|
|
18
|
+
};
|
|
19
|
+
readonly options: {
|
|
20
|
+
readonly type: import('vue').PropType<(string | number | import('.').SegmentedOption)[]>;
|
|
21
|
+
readonly default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
readonly type: {
|
|
24
|
+
readonly type: import('vue').PropType<import('.').SegmentedType>;
|
|
25
|
+
readonly default: "default";
|
|
26
|
+
};
|
|
27
|
+
readonly variant: {
|
|
28
|
+
readonly type: import('vue').PropType<import('.').SegmentedVariant>;
|
|
29
|
+
readonly default: "solid";
|
|
30
|
+
};
|
|
31
|
+
readonly size: {
|
|
32
|
+
readonly type: import('vue').PropType<import('.').SegmentedSize>;
|
|
33
|
+
readonly default: "md";
|
|
34
|
+
};
|
|
35
|
+
readonly shape: {
|
|
36
|
+
readonly type: import('vue').PropType<import('.').SegmentedShape>;
|
|
37
|
+
readonly default: "clip";
|
|
38
|
+
};
|
|
39
|
+
readonly color: {
|
|
40
|
+
readonly type: StringConstructor;
|
|
41
|
+
readonly default: "";
|
|
42
|
+
};
|
|
43
|
+
readonly disabled: {
|
|
44
|
+
readonly type: BooleanConstructor;
|
|
45
|
+
readonly default: false;
|
|
46
|
+
};
|
|
47
|
+
readonly block: {
|
|
48
|
+
readonly type: BooleanConstructor;
|
|
49
|
+
readonly default: false;
|
|
50
|
+
};
|
|
51
|
+
readonly clearable: {
|
|
52
|
+
readonly type: BooleanConstructor;
|
|
53
|
+
readonly default: false;
|
|
54
|
+
};
|
|
55
|
+
readonly vertical: {
|
|
56
|
+
readonly type: BooleanConstructor;
|
|
57
|
+
readonly default: false;
|
|
58
|
+
};
|
|
59
|
+
readonly wrap: {
|
|
60
|
+
readonly type: BooleanConstructor;
|
|
61
|
+
readonly default: false;
|
|
62
|
+
};
|
|
63
|
+
readonly beforeChange: {
|
|
64
|
+
readonly type: import('vue').PropType<(next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
65
|
+
readonly default: undefined;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{
|
|
68
|
+
onClear?: (() => any) | undefined;
|
|
69
|
+
onChange?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
70
|
+
"onUpdate:modelValue"?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
71
|
+
}>, {
|
|
72
|
+
updateIndicator: () => void;
|
|
73
|
+
focus: () => void;
|
|
74
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
75
|
+
clear: () => void;
|
|
76
|
+
change: (value: import('.').SegmentedValueType | undefined) => void;
|
|
77
|
+
"update:modelValue": (value: import('.').SegmentedValueType | undefined) => void;
|
|
78
|
+
}, import('vue').PublicProps, {
|
|
79
|
+
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
80
|
+
readonly type: import('.').SegmentedType;
|
|
81
|
+
readonly color: string;
|
|
82
|
+
readonly variant: import('.').SegmentedVariant;
|
|
83
|
+
readonly disabled: boolean;
|
|
84
|
+
readonly block: boolean;
|
|
85
|
+
readonly shape: import('.').SegmentedShape;
|
|
86
|
+
readonly modelValue: import('.').SegmentedValueType;
|
|
87
|
+
readonly clearable: boolean;
|
|
88
|
+
readonly vertical: boolean;
|
|
89
|
+
readonly wrap: boolean;
|
|
90
|
+
readonly beforeChange: (next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void;
|
|
91
|
+
readonly options: (string | number | import('.').SegmentedOption)[];
|
|
92
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
93
|
+
trackRef: HTMLDivElement;
|
|
94
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
95
|
+
P: {};
|
|
96
|
+
B: {};
|
|
97
|
+
D: {};
|
|
98
|
+
C: {};
|
|
99
|
+
M: {};
|
|
100
|
+
Defaults: {};
|
|
101
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
102
|
+
readonly modelValue: {
|
|
103
|
+
readonly type: import('vue').PropType<import('.').SegmentedValueType>;
|
|
104
|
+
readonly default: undefined;
|
|
105
|
+
};
|
|
106
|
+
readonly options: {
|
|
107
|
+
readonly type: import('vue').PropType<(string | number | import('.').SegmentedOption)[]>;
|
|
108
|
+
readonly default: () => never[];
|
|
109
|
+
};
|
|
110
|
+
readonly type: {
|
|
111
|
+
readonly type: import('vue').PropType<import('.').SegmentedType>;
|
|
112
|
+
readonly default: "default";
|
|
113
|
+
};
|
|
114
|
+
readonly variant: {
|
|
115
|
+
readonly type: import('vue').PropType<import('.').SegmentedVariant>;
|
|
116
|
+
readonly default: "solid";
|
|
117
|
+
};
|
|
118
|
+
readonly size: {
|
|
119
|
+
readonly type: import('vue').PropType<import('.').SegmentedSize>;
|
|
120
|
+
readonly default: "md";
|
|
121
|
+
};
|
|
122
|
+
readonly shape: {
|
|
123
|
+
readonly type: import('vue').PropType<import('.').SegmentedShape>;
|
|
124
|
+
readonly default: "clip";
|
|
125
|
+
};
|
|
126
|
+
readonly color: {
|
|
127
|
+
readonly type: StringConstructor;
|
|
128
|
+
readonly default: "";
|
|
129
|
+
};
|
|
130
|
+
readonly disabled: {
|
|
131
|
+
readonly type: BooleanConstructor;
|
|
132
|
+
readonly default: false;
|
|
133
|
+
};
|
|
134
|
+
readonly block: {
|
|
135
|
+
readonly type: BooleanConstructor;
|
|
136
|
+
readonly default: false;
|
|
137
|
+
};
|
|
138
|
+
readonly clearable: {
|
|
139
|
+
readonly type: BooleanConstructor;
|
|
140
|
+
readonly default: false;
|
|
141
|
+
};
|
|
142
|
+
readonly vertical: {
|
|
143
|
+
readonly type: BooleanConstructor;
|
|
144
|
+
readonly default: false;
|
|
145
|
+
};
|
|
146
|
+
readonly wrap: {
|
|
147
|
+
readonly type: BooleanConstructor;
|
|
148
|
+
readonly default: false;
|
|
149
|
+
};
|
|
150
|
+
readonly beforeChange: {
|
|
151
|
+
readonly type: import('vue').PropType<(next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
152
|
+
readonly default: undefined;
|
|
153
|
+
};
|
|
154
|
+
}>> & Readonly<{
|
|
155
|
+
onClear?: (() => any) | undefined;
|
|
156
|
+
onChange?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
157
|
+
"onUpdate:modelValue"?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
158
|
+
}>, {
|
|
159
|
+
updateIndicator: () => void;
|
|
160
|
+
focus: () => void;
|
|
161
|
+
}, {}, {}, {}, {
|
|
162
|
+
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
163
|
+
readonly type: import('.').SegmentedType;
|
|
164
|
+
readonly color: string;
|
|
165
|
+
readonly variant: import('.').SegmentedVariant;
|
|
166
|
+
readonly disabled: boolean;
|
|
167
|
+
readonly block: boolean;
|
|
168
|
+
readonly shape: import('.').SegmentedShape;
|
|
169
|
+
readonly modelValue: import('.').SegmentedValueType;
|
|
170
|
+
readonly clearable: boolean;
|
|
171
|
+
readonly vertical: boolean;
|
|
172
|
+
readonly wrap: boolean;
|
|
173
|
+
readonly beforeChange: (next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void;
|
|
174
|
+
readonly options: (string | number | import('.').SegmentedOption)[];
|
|
175
|
+
}>;
|
|
176
|
+
__isFragment?: never;
|
|
177
|
+
__isTeleport?: never;
|
|
178
|
+
__isSuspense?: never;
|
|
179
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
14
180
|
readonly modelValue: {
|
|
15
181
|
readonly type: import('vue').PropType<import('.').SegmentedValueType>;
|
|
16
182
|
readonly default: undefined;
|
|
@@ -51,58 +217,30 @@ export declare const CpSegmented: import('../utils').SFCWithInstall<import('vue'
|
|
|
51
217
|
readonly type: BooleanConstructor;
|
|
52
218
|
readonly default: false;
|
|
53
219
|
};
|
|
54
|
-
|
|
55
|
-
updateIndicator: () => void;
|
|
56
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
57
|
-
clear: () => void;
|
|
58
|
-
change: (value: import('.').SegmentedValueType | undefined) => void;
|
|
59
|
-
"update:modelValue": (value: import('.').SegmentedValueType | undefined) => void;
|
|
60
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
61
|
-
readonly modelValue: {
|
|
62
|
-
readonly type: import('vue').PropType<import('.').SegmentedValueType>;
|
|
63
|
-
readonly default: undefined;
|
|
64
|
-
};
|
|
65
|
-
readonly options: {
|
|
66
|
-
readonly type: import('vue').PropType<(string | number | import('.').SegmentedOption)[]>;
|
|
67
|
-
readonly default: () => never[];
|
|
68
|
-
};
|
|
69
|
-
readonly type: {
|
|
70
|
-
readonly type: import('vue').PropType<import('.').SegmentedType>;
|
|
71
|
-
readonly default: "default";
|
|
72
|
-
};
|
|
73
|
-
readonly variant: {
|
|
74
|
-
readonly type: import('vue').PropType<import('.').SegmentedVariant>;
|
|
75
|
-
readonly default: "solid";
|
|
76
|
-
};
|
|
77
|
-
readonly size: {
|
|
78
|
-
readonly type: import('vue').PropType<import('.').SegmentedSize>;
|
|
79
|
-
readonly default: "md";
|
|
80
|
-
};
|
|
81
|
-
readonly shape: {
|
|
82
|
-
readonly type: import('vue').PropType<import('.').SegmentedShape>;
|
|
83
|
-
readonly default: "clip";
|
|
84
|
-
};
|
|
85
|
-
readonly color: {
|
|
86
|
-
readonly type: StringConstructor;
|
|
87
|
-
readonly default: "";
|
|
88
|
-
};
|
|
89
|
-
readonly disabled: {
|
|
220
|
+
readonly vertical: {
|
|
90
221
|
readonly type: BooleanConstructor;
|
|
91
222
|
readonly default: false;
|
|
92
223
|
};
|
|
93
|
-
readonly
|
|
224
|
+
readonly wrap: {
|
|
94
225
|
readonly type: BooleanConstructor;
|
|
95
226
|
readonly default: false;
|
|
96
227
|
};
|
|
97
|
-
readonly
|
|
98
|
-
readonly type:
|
|
99
|
-
readonly default:
|
|
228
|
+
readonly beforeChange: {
|
|
229
|
+
readonly type: import('vue').PropType<(next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
230
|
+
readonly default: undefined;
|
|
100
231
|
};
|
|
101
232
|
}>> & Readonly<{
|
|
102
233
|
onClear?: (() => any) | undefined;
|
|
103
234
|
onChange?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
104
235
|
"onUpdate:modelValue"?: ((value: import('.').SegmentedValueType | undefined) => any) | undefined;
|
|
105
236
|
}>, {
|
|
237
|
+
updateIndicator: () => void;
|
|
238
|
+
focus: () => void;
|
|
239
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
240
|
+
clear: () => void;
|
|
241
|
+
change: (value: import('.').SegmentedValueType | undefined) => void;
|
|
242
|
+
"update:modelValue": (value: import('.').SegmentedValueType | undefined) => void;
|
|
243
|
+
}, string, {
|
|
106
244
|
readonly size: import('@cyberpunk-vue/hooks').Size;
|
|
107
245
|
readonly type: import('.').SegmentedType;
|
|
108
246
|
readonly color: string;
|
|
@@ -112,10 +250,19 @@ export declare const CpSegmented: import('../utils').SFCWithInstall<import('vue'
|
|
|
112
250
|
readonly shape: import('.').SegmentedShape;
|
|
113
251
|
readonly modelValue: import('.').SegmentedValueType;
|
|
114
252
|
readonly clearable: boolean;
|
|
253
|
+
readonly vertical: boolean;
|
|
254
|
+
readonly wrap: boolean;
|
|
255
|
+
readonly beforeChange: (next: import('.').SegmentedValueType | undefined, current: import('.').SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void;
|
|
115
256
|
readonly options: (string | number | import('.').SegmentedOption)[];
|
|
116
|
-
}, {},
|
|
117
|
-
|
|
118
|
-
|
|
257
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
258
|
+
$slots: {
|
|
259
|
+
option?(_: {
|
|
260
|
+
option: import('.').SegmentedOption;
|
|
261
|
+
index: number;
|
|
262
|
+
active: boolean;
|
|
263
|
+
}): any;
|
|
264
|
+
};
|
|
265
|
+
})>;
|
|
119
266
|
export default CpSegmented;
|
|
120
267
|
export * from './src/segmented';
|
|
121
268
|
export type { SegmentedInstance } from './src/instance';
|
|
@@ -152,6 +152,38 @@ export declare const segmentedProps: {
|
|
|
152
152
|
readonly type: BooleanConstructor;
|
|
153
153
|
readonly default: false;
|
|
154
154
|
};
|
|
155
|
+
/**
|
|
156
|
+
* 是否纵向排列选项
|
|
157
|
+
* 启用后选项按列堆叠,键盘导航使用 ↑/↓
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
readonly vertical: {
|
|
161
|
+
readonly type: BooleanConstructor;
|
|
162
|
+
readonly default: false;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* 是否允许选项换行(仅横向布局生效)
|
|
166
|
+
* 启用后空间不足时选项会自动换到下一行,指示器跟随激活项所在行
|
|
167
|
+
* @default false
|
|
168
|
+
*/
|
|
169
|
+
readonly wrap: {
|
|
170
|
+
readonly type: BooleanConstructor;
|
|
171
|
+
readonly default: false;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* 切换前钩子
|
|
175
|
+
*
|
|
176
|
+
* 返回 `false` 或 reject 的 Promise 会取消本次切换;
|
|
177
|
+
* 返回 `true`、其他值或 resolve 的 Promise 会执行切换。
|
|
178
|
+
* 适合在切换前做权限校验、未保存提示等。
|
|
179
|
+
*
|
|
180
|
+
* @param next - 即将切换到的目标值(清空时为 `undefined`)
|
|
181
|
+
* @param current - 当前值
|
|
182
|
+
*/
|
|
183
|
+
readonly beforeChange: {
|
|
184
|
+
readonly type: PropType<(next: SegmentedValueType | undefined, current: SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
185
|
+
readonly default: undefined;
|
|
186
|
+
};
|
|
155
187
|
};
|
|
156
188
|
export type SegmentedProps = ExtractPropTypes<typeof segmentedProps>;
|
|
157
189
|
/**
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { SegmentedOption, SegmentedValueType } from './segmented';
|
|
2
|
-
declare
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
option?(_: {
|
|
6
|
+
option: SegmentedOption;
|
|
7
|
+
index: number;
|
|
8
|
+
active: boolean;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
trackRef: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
rootEl: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
18
|
readonly modelValue: {
|
|
4
19
|
readonly type: import('vue').PropType<SegmentedValueType>;
|
|
5
20
|
readonly default: undefined;
|
|
@@ -40,9 +55,23 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
40
55
|
readonly type: BooleanConstructor;
|
|
41
56
|
readonly default: false;
|
|
42
57
|
};
|
|
58
|
+
readonly vertical: {
|
|
59
|
+
readonly type: BooleanConstructor;
|
|
60
|
+
readonly default: false;
|
|
61
|
+
};
|
|
62
|
+
readonly wrap: {
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly default: false;
|
|
65
|
+
};
|
|
66
|
+
readonly beforeChange: {
|
|
67
|
+
readonly type: import('vue').PropType<(next: SegmentedValueType | undefined, current: SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
68
|
+
readonly default: undefined;
|
|
69
|
+
};
|
|
43
70
|
}>, {
|
|
44
71
|
/** @description 更新滑块位置 */
|
|
45
72
|
updateIndicator: () => void;
|
|
73
|
+
/** @description 聚焦当前激活项(无激活项则聚焦第一个可用项) */
|
|
74
|
+
focus: () => void;
|
|
46
75
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
76
|
clear: () => void;
|
|
48
77
|
change: (value: SegmentedValueType | undefined) => void;
|
|
@@ -88,6 +117,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
88
117
|
readonly type: BooleanConstructor;
|
|
89
118
|
readonly default: false;
|
|
90
119
|
};
|
|
120
|
+
readonly vertical: {
|
|
121
|
+
readonly type: BooleanConstructor;
|
|
122
|
+
readonly default: false;
|
|
123
|
+
};
|
|
124
|
+
readonly wrap: {
|
|
125
|
+
readonly type: BooleanConstructor;
|
|
126
|
+
readonly default: false;
|
|
127
|
+
};
|
|
128
|
+
readonly beforeChange: {
|
|
129
|
+
readonly type: import('vue').PropType<(next: SegmentedValueType | undefined, current: SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void>;
|
|
130
|
+
readonly default: undefined;
|
|
131
|
+
};
|
|
91
132
|
}>> & Readonly<{
|
|
92
133
|
onClear?: (() => any) | undefined;
|
|
93
134
|
onChange?: ((value: SegmentedValueType | undefined) => any) | undefined;
|
|
@@ -102,8 +143,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
102
143
|
readonly shape: import('./segmented').SegmentedShape;
|
|
103
144
|
readonly modelValue: SegmentedValueType;
|
|
104
145
|
readonly clearable: boolean;
|
|
146
|
+
readonly vertical: boolean;
|
|
147
|
+
readonly wrap: boolean;
|
|
148
|
+
readonly beforeChange: (next: SegmentedValueType | undefined, current: SegmentedValueType | undefined) => boolean | Promise<boolean | void> | void;
|
|
105
149
|
readonly options: (string | number | SegmentedOption)[];
|
|
106
150
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
107
151
|
trackRef: HTMLDivElement;
|
|
108
152
|
}, HTMLDivElement>;
|
|
153
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
109
154
|
export default _default;
|
|
155
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
156
|
+
new (): {
|
|
157
|
+
$slots: S;
|
|
158
|
+
};
|
|
159
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberpunk-vue/components",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.7",
|
|
4
4
|
"description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"vue": "^3.5.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cyberpunk-vue/
|
|
27
|
-
"@cyberpunk-vue/theme-chalk": "1.12.
|
|
28
|
-
"@cyberpunk-vue/
|
|
26
|
+
"@cyberpunk-vue/constants": "1.12.7",
|
|
27
|
+
"@cyberpunk-vue/theme-chalk": "1.12.7",
|
|
28
|
+
"@cyberpunk-vue/hooks": "1.12.7"
|
|
29
29
|
},
|
|
30
30
|
"author": "Juxest",
|
|
31
31
|
"license": "MIT",
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CpImagePreview 大图预览组件
|
|
3
|
-
*
|
|
4
|
-
* @description 赛博朋克风格全屏大图预览组件,支持缩放、旋转、多图切换。
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```vue
|
|
8
|
-
* <CpImagePreview v-model="visible" :url-list="['/a.jpg', '/b.jpg']" />
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export declare const CpImagePreview: import('../utils').SFCWithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
-
readonly modelValue: {
|
|
13
|
-
readonly type: BooleanConstructor;
|
|
14
|
-
readonly default: false;
|
|
15
|
-
};
|
|
16
|
-
readonly urlList: {
|
|
17
|
-
readonly type: import('vue').PropType<string[]>;
|
|
18
|
-
readonly default: () => never[];
|
|
19
|
-
};
|
|
20
|
-
readonly initialIndex: {
|
|
21
|
-
readonly type: NumberConstructor;
|
|
22
|
-
readonly default: 0;
|
|
23
|
-
};
|
|
24
|
-
readonly zIndex: {
|
|
25
|
-
readonly type: NumberConstructor;
|
|
26
|
-
readonly default: 2000;
|
|
27
|
-
};
|
|
28
|
-
readonly infinite: {
|
|
29
|
-
readonly type: BooleanConstructor;
|
|
30
|
-
readonly default: true;
|
|
31
|
-
};
|
|
32
|
-
readonly teleportTo: {
|
|
33
|
-
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
34
|
-
readonly default: "body";
|
|
35
|
-
};
|
|
36
|
-
readonly type: {
|
|
37
|
-
readonly type: import('vue').PropType<"default" | "primary" | "success" | "warning" | "error" | "info">;
|
|
38
|
-
readonly default: "primary";
|
|
39
|
-
};
|
|
40
|
-
readonly color: {
|
|
41
|
-
readonly type: StringConstructor;
|
|
42
|
-
readonly default: "";
|
|
43
|
-
};
|
|
44
|
-
readonly download: {
|
|
45
|
-
readonly type: BooleanConstructor;
|
|
46
|
-
readonly default: false;
|
|
47
|
-
};
|
|
48
|
-
}>, {
|
|
49
|
-
close: () => void;
|
|
50
|
-
prev: () => void;
|
|
51
|
-
next: () => void;
|
|
52
|
-
zoomIn: () => void;
|
|
53
|
-
zoomOut: () => void;
|
|
54
|
-
rotateLeft: () => void;
|
|
55
|
-
rotateRight: () => void;
|
|
56
|
-
resetTransform: () => void;
|
|
57
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
|
-
switch: (index: number) => void;
|
|
59
|
-
"update:modelValue": (value: boolean) => void;
|
|
60
|
-
close: () => void;
|
|
61
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
62
|
-
readonly modelValue: {
|
|
63
|
-
readonly type: BooleanConstructor;
|
|
64
|
-
readonly default: false;
|
|
65
|
-
};
|
|
66
|
-
readonly urlList: {
|
|
67
|
-
readonly type: import('vue').PropType<string[]>;
|
|
68
|
-
readonly default: () => never[];
|
|
69
|
-
};
|
|
70
|
-
readonly initialIndex: {
|
|
71
|
-
readonly type: NumberConstructor;
|
|
72
|
-
readonly default: 0;
|
|
73
|
-
};
|
|
74
|
-
readonly zIndex: {
|
|
75
|
-
readonly type: NumberConstructor;
|
|
76
|
-
readonly default: 2000;
|
|
77
|
-
};
|
|
78
|
-
readonly infinite: {
|
|
79
|
-
readonly type: BooleanConstructor;
|
|
80
|
-
readonly default: true;
|
|
81
|
-
};
|
|
82
|
-
readonly teleportTo: {
|
|
83
|
-
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
84
|
-
readonly default: "body";
|
|
85
|
-
};
|
|
86
|
-
readonly type: {
|
|
87
|
-
readonly type: import('vue').PropType<"default" | "primary" | "success" | "warning" | "error" | "info">;
|
|
88
|
-
readonly default: "primary";
|
|
89
|
-
};
|
|
90
|
-
readonly color: {
|
|
91
|
-
readonly type: StringConstructor;
|
|
92
|
-
readonly default: "";
|
|
93
|
-
};
|
|
94
|
-
readonly download: {
|
|
95
|
-
readonly type: BooleanConstructor;
|
|
96
|
-
readonly default: false;
|
|
97
|
-
};
|
|
98
|
-
}>> & Readonly<{
|
|
99
|
-
onSwitch?: ((index: number) => any) | undefined;
|
|
100
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
101
|
-
onClose?: (() => any) | undefined;
|
|
102
|
-
}>, {
|
|
103
|
-
readonly type: "primary" | "success" | "warning" | "error" | "info" | "default";
|
|
104
|
-
readonly color: string;
|
|
105
|
-
readonly modelValue: boolean;
|
|
106
|
-
readonly infinite: boolean;
|
|
107
|
-
readonly zIndex: number;
|
|
108
|
-
readonly initialIndex: number;
|
|
109
|
-
readonly download: boolean;
|
|
110
|
-
readonly urlList: string[];
|
|
111
|
-
readonly teleportTo: string | HTMLElement;
|
|
112
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
113
|
-
export default CpImagePreview;
|
|
114
|
-
export * from './src/image-preview';
|
|
115
|
-
export type { CpImagePreviewInstance } from './src/instance';
|