@yh-ui/components 0.1.56 → 1.0.4
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/affix/index.d.ts +11 -6
- package/dist/affix/src/affix.d.ts +10 -0
- package/dist/affix/src/affix.vue.d.ts +2 -2
- package/dist/ai-action-group/index.d.ts +5 -0
- package/dist/ai-action-group/src/ai-action-group.d.ts +3 -0
- package/dist/ai-agent-card/index.d.ts +7 -0
- package/dist/ai-agent-card/src/ai-agent-card.d.ts +10 -0
- package/dist/ai-artifacts/index.d.ts +8 -0
- package/dist/ai-artifacts/src/ai-artifacts.d.ts +11 -1
- package/dist/ai-attachments/index.d.ts +5 -0
- package/dist/ai-attachments/src/ai-attachments.d.ts +12 -1
- package/dist/ai-bubble/index.d.ts +12 -0
- package/dist/ai-bubble/src/ai-bubble.d.ts +8 -1
- package/dist/ai-bubble/src/ai-bubble.vue +24 -20
- package/dist/ai-bubble-list/index.d.ts +3 -0
- package/dist/ai-bubble-list/src/ai-bubble-list.d.ts +14 -1
- package/dist/ai-chat/index.d.ts +5 -0
- package/dist/ai-chat/src/ai-chat.d.ts +9 -0
- package/dist/ai-code-block/index.d.ts +4 -0
- package/dist/ai-code-block/src/ai-code-block.d.ts +4 -0
- package/dist/ai-code-editor/index.d.ts +5 -0
- package/dist/ai-code-editor/src/ai-code-editor.d.ts +2 -0
- package/dist/ai-code-runner/index.d.ts +5 -0
- package/dist/ai-code-runner/src/ai-code-runner.d.ts +2 -0
- package/dist/ai-conversations/index.d.ts +5 -0
- package/dist/ai-conversations/src/ai-conversations.d.ts +16 -1
- package/dist/ai-editor-sender/index.d.ts +9 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.d.ts +15 -0
- package/dist/ai-file-card/index.d.ts +8 -0
- package/dist/ai-file-card/src/ai-file-card.d.ts +5 -1
- package/dist/ai-mention/index.d.ts +9 -0
- package/dist/ai-mention/src/ai-mention.d.ts +3 -0
- package/dist/ai-mermaid/index.d.ts +5 -0
- package/dist/ai-mermaid/src/ai-mermaid.d.ts +6 -1
- package/dist/ai-mermaid/src/ai-mermaid.vue +6 -1
- package/dist/ai-prompts/index.d.ts +5 -0
- package/dist/ai-prompts/src/ai-prompts.d.ts +10 -0
- package/dist/ai-provider/index.d.ts +10 -0
- package/dist/ai-provider/src/ai-provider.d.ts +28 -0
- package/dist/ai-sender/index.d.ts +6 -0
- package/dist/ai-sender/src/ai-sender.d.ts +11 -1
- package/dist/ai-sources/index.d.ts +6 -0
- package/dist/ai-sources/src/ai-sources.d.ts +5 -1
- package/dist/ai-thinking/index.d.ts +5 -0
- package/dist/ai-thinking/src/ai-thinking.d.ts +3 -0
- package/dist/ai-thought-chain/index.d.ts +6 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.d.ts +3 -0
- package/dist/ai-voice-trigger/index.d.ts +5 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.d.ts +4 -0
- package/dist/ai-welcome/index.d.ts +5 -0
- package/dist/ai-welcome/src/ai-welcome.d.ts +6 -0
- package/dist/alert/index.d.ts +6 -0
- package/dist/alert/src/alert.d.ts +7 -0
- package/dist/alert/src/alert.vue +1 -1
- package/dist/autocomplete/index.d.ts +8 -0
- package/dist/avatar/index.cjs +15 -0
- package/dist/avatar/index.d.ts +19 -9
- package/dist/avatar/index.mjs +1 -0
- package/dist/back-top/index.d.ts +4 -0
- package/dist/back-top/src/back-top.d.ts +3 -0
- package/dist/badge/index.d.ts +4 -0
- package/dist/breadcrumb/index.d.ts +6 -0
- package/dist/breadcrumb/src/breadcrumb.d.ts +6 -0
- package/dist/button/index.d.ts +9 -0
- package/dist/calendar/index.d.ts +16 -1230
- package/dist/calendar/src/calendar.d.ts +16 -0
- package/dist/calendar/src/calendar.vue.d.ts +2 -415
- package/dist/card/index.d.ts +4 -0
- package/dist/carousel/index.d.ts +9 -0
- package/dist/carousel/src/carousel-item.d.ts +3 -0
- package/dist/carousel/src/carousel.d.ts +25 -0
- package/dist/cascader/index.d.ts +9 -7
- package/dist/cascader/src/cascader.d.ts +2 -2
- package/dist/cascader/src/cascader.vue +82 -30
- package/dist/cascader/src/cascader.vue.d.ts +1 -1
- package/dist/category-nav/index.d.ts +4 -0
- package/dist/category-nav/src/category-nav.d.ts +15 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/col/index.d.ts +34 -180
- package/dist/col/src/col.d.ts +14 -30
- package/dist/col/src/col.vue.d.ts +15 -90
- package/dist/color-picker/index.d.ts +11 -1
- package/dist/color-picker/src/color-picker.d.ts +8 -0
- package/dist/color-picker/src/color-picker.vue +6 -0
- package/dist/color-picker/src/color-picker.vue.d.ts +6 -1
- package/dist/config-provider/index.d.ts +3 -0
- package/dist/config-provider/src/config-provider.cjs +9 -0
- package/dist/config-provider/src/config-provider.d.ts +3 -0
- package/dist/config-provider/src/config-provider.mjs +9 -0
- package/dist/container/index.d.ts +15 -0
- package/dist/container/src/container.d.ts +12 -0
- package/dist/countdown/index.d.ts +9 -0
- package/dist/coupon-card/index.d.ts +3 -0
- package/dist/coupon-card/src/coupon-card.d.ts +10 -0
- package/dist/date-picker/index.d.ts +8 -0
- package/dist/date-picker/src/date-picker.d.ts +9 -0
- package/dist/descriptions/index.d.ts +6 -0
- package/dist/descriptions/src/descriptions.d.ts +9 -0
- package/dist/dialog/index.d.ts +12 -6
- package/dist/dialog/src/dialog.d.ts +13 -0
- package/dist/dialog/src/dialog.vue.d.ts +2 -2
- package/dist/divider/index.d.ts +2 -0
- package/dist/drawer/index.d.ts +8 -3
- package/dist/drawer/src/drawer.d.ts +11 -0
- package/dist/drawer/src/drawer.vue.d.ts +1 -1
- package/dist/dropdown/index.d.ts +11 -0
- package/dist/dropdown/src/dropdown.d.ts +10 -0
- package/dist/empty/index.cjs +15 -0
- package/dist/empty/index.d.ts +6 -0
- package/dist/empty/index.mjs +1 -0
- package/dist/filter-bar/index.d.ts +9 -0
- package/dist/filter-bar/src/filter-bar.d.ts +12 -0
- package/dist/form/index.d.ts +11 -0
- package/dist/gantt-chart/index.d.ts +8 -6
- package/dist/gantt-chart/src/gantt-chart.d.ts +1 -4
- package/dist/gantt-chart/src/gantt-chart.vue +43 -33
- package/dist/grid/index.d.ts +6 -0
- package/dist/grid/src/grid.d.ts +3 -0
- package/dist/icon/index.d.ts +5 -0
- package/dist/image/index.d.ts +18 -1
- package/dist/image/src/image-viewer.d.ts +11 -0
- package/dist/image/src/image-viewer.vue +56 -9
- package/dist/image/src/image-viewer.vue.d.ts +9 -1
- package/dist/image/src/image.d.ts +4 -0
- package/dist/image/src/image.vue +1 -1
- package/dist/image-magnifier/index.d.ts +6 -0
- package/dist/image-magnifier/src/image-magnifier.d.ts +15 -0
- package/dist/image-magnifier/src/image-magnifier.vue +9 -5
- package/dist/infinite-scroll/index.d.ts +5 -0
- package/dist/infinite-scroll/src/infinite-scroll.d.ts +10 -0
- package/dist/infinite-scroll/src/infinite-scroll.vue +37 -25
- package/dist/infinite-scroll/src/infinite-scroll.vue.d.ts +0 -2
- package/dist/input/index.d.ts +10 -0
- package/dist/input-number/index.d.ts +7 -0
- package/dist/input-tag/index.d.ts +7 -0
- package/dist/loading/index.d.ts +2 -0
- package/dist/loading/src/service.cjs +5 -1
- package/dist/loading/src/service.mjs +3 -1
- package/dist/lucky-draw/index.d.ts +4 -0
- package/dist/lucky-draw/src/lucky-draw.d.ts +6 -0
- package/dist/markdown-it.d.ts +2 -1
- package/dist/marquee/index.d.ts +12 -6
- package/dist/marquee/src/marquee.d.ts +8 -0
- package/dist/marquee/src/marquee.vue +16 -6
- package/dist/marquee/src/marquee.vue.d.ts +2 -5
- package/dist/mention/index.d.ts +9 -0
- package/dist/menu/index.d.ts +14 -0
- package/dist/menu/src/menu.d.ts +9 -0
- package/dist/message/index.d.ts +11 -0
- package/dist/message/src/message.d.ts +40 -32
- package/dist/message/src/message.vue.d.ts +1 -1
- package/dist/message-box/index.d.ts +7 -0
- package/dist/notification/index.d.ts +11 -0
- package/dist/notification/src/notification.d.ts +37 -33
- package/dist/notification/src/notification.vue.d.ts +1 -1
- package/dist/pagination/index.d.ts +6 -0
- package/dist/pagination/src/pagination.d.ts +3 -0
- package/dist/popconfirm/index.d.ts +5 -0
- package/dist/popconfirm/src/popconfirm.d.ts +11 -1
- package/dist/popover/index.d.ts +6 -0
- package/dist/popover/src/popover.d.ts +12 -1
- package/dist/price/index.d.ts +1 -0
- package/dist/price/src/price.d.ts +7 -0
- package/dist/product-card/index.d.ts +7 -3
- package/dist/product-card/src/product-card.cjs +1 -36
- package/dist/product-card/src/product-card.d.ts +5 -35
- package/dist/product-card/src/product-card.mjs +1 -36
- package/dist/product-card/src/product-card.vue +8 -14
- package/dist/product-card/src/product-card.vue.d.ts +1 -1
- package/dist/progress/index.d.ts +5 -0
- package/dist/progress/src/progress.d.ts +5 -0
- package/dist/radio/index.d.ts +14 -0
- package/dist/rate/index.d.ts +11 -6
- package/dist/rate/src/rate.d.ts +10 -1
- package/dist/rate/src/rate.vue.d.ts +3 -3
- package/dist/result/index.d.ts +4 -0
- package/dist/row/index.d.ts +18 -12
- package/dist/row/src/row.d.ts +13 -8
- package/dist/row/src/row.vue.d.ts +6 -6
- package/dist/scrollbar/index.d.ts +10 -20
- package/dist/scrollbar/src/scrollbar.d.ts +16 -4
- package/dist/scrollbar/src/scrollbar.vue.d.ts +2 -8
- package/dist/select/index.d.ts +15 -3
- package/dist/select/src/select.d.ts +4 -1
- package/dist/select/src/select.vue +1 -1
- package/dist/select/src/select.vue.d.ts +1 -1
- package/dist/skeleton/index.d.ts +6 -0
- package/dist/skeleton/src/skeleton.d.ts +4 -0
- package/dist/sku-selector/index.d.ts +5 -0
- package/dist/sku-selector/src/sku-selector.cjs +1 -14
- package/dist/sku-selector/src/sku-selector.d.ts +15 -17
- package/dist/sku-selector/src/sku-selector.mjs +1 -14
- package/dist/sku-selector/src/sku-selector.vue +6 -11
- package/dist/slider/index.d.ts +20 -3
- package/dist/slider/src/slider.d.ts +15 -0
- package/dist/slider/src/slider.vue +5 -0
- package/dist/slider/src/slider.vue.d.ts +5 -1
- package/dist/smart-address/index.d.ts +11 -6
- package/dist/smart-address/src/smart-address.cjs +0 -19
- package/dist/smart-address/src/smart-address.d.ts +13 -20
- package/dist/smart-address/src/smart-address.mjs +0 -19
- package/dist/smart-address/src/smart-address.vue.d.ts +3 -3
- package/dist/space/index.cjs +15 -0
- package/dist/space/index.d.ts +22 -12
- package/dist/space/index.mjs +1 -0
- package/dist/spin/index.d.ts +16 -10
- package/dist/spin/src/spin.cjs +5 -1
- package/dist/spin/src/spin.d.ts +13 -1
- package/dist/spin/src/spin.mjs +4 -0
- package/dist/spin/src/spin.vue +2 -2
- package/dist/spin/src/spin.vue.d.ts +4 -5
- package/dist/steps/index.d.ts +13 -0
- package/dist/steps/src/step.d.ts +6 -0
- package/dist/steps/src/steps.d.ts +3 -0
- package/dist/submit-bar/index.d.ts +3 -0
- package/dist/submit-bar/src/submit-bar.d.ts +7 -0
- package/dist/switch/index.d.ts +5 -0
- package/dist/switch/src/switch.d.ts +11 -1
- package/dist/table/index.d.ts +14 -4
- package/dist/tabs/index.d.ts +11 -0
- package/dist/tabs/src/tab-pane.d.ts +3 -0
- package/dist/tabs/src/tabs.d.ts +12 -0
- package/dist/tag/index.d.ts +7 -0
- package/dist/time-picker/index.d.ts +13 -3
- package/dist/time-picker/src/time-picker.d.ts +2 -2
- package/dist/time-picker/src/time-picker.vue +1 -1
- package/dist/time-picker/src/time-picker.vue.d.ts +1 -1
- package/dist/time-select/index.d.ts +10 -3
- package/dist/time-select/src/time-select.d.ts +2 -2
- package/dist/time-select/src/time-select.vue +79 -35
- package/dist/time-select/src/time-select.vue.d.ts +1 -1
- package/dist/tooltip/index.d.ts +7 -0
- package/dist/tooltip/src/tooltip.d.ts +11 -1
- package/dist/transfer/index.d.ts +6 -4
- package/dist/transfer/src/transfer-panel.vue +78 -27
- package/dist/transfer/src/transfer-panel.vue.d.ts +1 -1
- package/dist/transfer/src/transfer.d.ts +4 -4
- package/dist/transfer/src/transfer.vue +82 -26
- package/dist/transfer/src/transfer.vue.d.ts +2 -2
- package/dist/tree/index.d.ts +7 -0
- package/dist/tree-select/index.d.ts +8 -0
- package/dist/typography/index.d.ts +11 -0
- package/dist/upload/index.d.ts +10 -0
- package/dist/upload/src/upload.d.ts +19 -0
- package/dist/viewerjs.d.ts +2 -1
- package/dist/waterfall/index.d.ts +6 -0
- package/dist/waterfall/src/waterfall.d.ts +25 -7
- package/dist/watermark/index.d.ts +11 -54
- package/dist/watermark/src/watermark.d.ts +16 -9
- package/dist/watermark/src/watermark.vue +27 -5
- package/dist/watermark/src/watermark.vue.d.ts +3 -27
- package/package.json +6 -5
|
@@ -437,3 +437,11 @@ export declare const YhTreeSelect: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
437
437
|
export default YhTreeSelect;
|
|
438
438
|
export * from './src/tree-select';
|
|
439
439
|
export type TreeSelectInstance = InstanceType<typeof TreeSelect>;
|
|
440
|
+
export type YhTreeSelectInstance = TreeSelectInstance;
|
|
441
|
+
export type YhTreeSelectProps = import('./src/tree-select').TreeSelectProps;
|
|
442
|
+
export type YhTreeSelectEmits = import('./src/tree-select').TreeSelectEmits;
|
|
443
|
+
export type YhTreeSelectNode = import('./src/tree-select').TreeSelectNode;
|
|
444
|
+
export type YhTreeOption = import('./src/tree-select').TreeOption;
|
|
445
|
+
export type YhTreeKey = import('./src/tree-select').TreeKey;
|
|
446
|
+
export type YhTreeCheckedInfo = import('./src/tree-select').TreeCheckedInfo;
|
|
447
|
+
export type YhTreePropsAlias = import('./src/tree-select').TreePropsAlias;
|
|
@@ -188,3 +188,14 @@ export type TypographyTitleInstance = InstanceType<typeof Title>;
|
|
|
188
188
|
export type TypographyTextInstance = InstanceType<typeof Text>;
|
|
189
189
|
export type TypographyParagraphInstance = InstanceType<typeof Paragraph>;
|
|
190
190
|
export type TypographyLinkInstance = InstanceType<typeof Link>;
|
|
191
|
+
export type YhTypographyTitleInstance = TypographyTitleInstance;
|
|
192
|
+
export type YhTypographyTextInstance = TypographyTextInstance;
|
|
193
|
+
export type YhTypographyParagraphInstance = TypographyParagraphInstance;
|
|
194
|
+
export type YhTypographyLinkInstance = TypographyLinkInstance;
|
|
195
|
+
export type YhTypographyTitleProps = import('./src/typography').TypographyTitleProps;
|
|
196
|
+
export type YhTypographyTextProps = import('./src/typography').TypographyTextProps;
|
|
197
|
+
export type YhTypographyParagraphProps = import('./src/typography').TypographyParagraphProps;
|
|
198
|
+
export type YhTypographyLinkProps = import('./src/typography').TypographyLinkProps;
|
|
199
|
+
export type YhTypographySlots = import('./src/typography').TypographySlots;
|
|
200
|
+
export type YhTypographyTitleLevel = import('./src/typography').TypographyTitleLevel;
|
|
201
|
+
export type YhTypographyType = import('./src/typography').TypographyType;
|
package/dist/upload/index.d.ts
CHANGED
|
@@ -393,3 +393,13 @@ export declare const YhUpload: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
393
393
|
export default YhUpload;
|
|
394
394
|
export * from './src/upload';
|
|
395
395
|
export type UploadInstance = InstanceType<typeof Upload>;
|
|
396
|
+
export type YhUploadInstance = UploadInstance;
|
|
397
|
+
export type YhUploadProps = import('./src/upload').UploadProps;
|
|
398
|
+
export type YhUploadEmits = import('./src/upload').UploadEmits;
|
|
399
|
+
export type YhUploadSlots = import('./src/upload').UploadSlots;
|
|
400
|
+
export type YhUploadExpose = import('./src/upload').UploadExpose;
|
|
401
|
+
export type YhUploadFile = import('./src/upload').UploadFile;
|
|
402
|
+
export type YhUploadRawFile = import('./src/upload').UploadRawFile;
|
|
403
|
+
export type YhUploadProgressEvent = import('./src/upload').UploadProgressEvent;
|
|
404
|
+
export type YhUploadRequestOptions = import('./src/upload').UploadRequestOptions;
|
|
405
|
+
export type YhUploadStatus = import('./src/upload').UploadStatus;
|
|
@@ -146,3 +146,22 @@ export declare const uploadEmits: {
|
|
|
146
146
|
};
|
|
147
147
|
export type UploadProps = ExtractPropTypes<typeof uploadProps>;
|
|
148
148
|
export type UploadEmits = typeof uploadEmits;
|
|
149
|
+
export interface UploadSlots {
|
|
150
|
+
default?: () => unknown;
|
|
151
|
+
trigger?: () => unknown;
|
|
152
|
+
tip?: () => unknown;
|
|
153
|
+
file?: (props: {
|
|
154
|
+
file: UploadFile;
|
|
155
|
+
}) => unknown;
|
|
156
|
+
'file-icon'?: (props: {
|
|
157
|
+
file: UploadFile;
|
|
158
|
+
}) => unknown;
|
|
159
|
+
}
|
|
160
|
+
export interface UploadExpose {
|
|
161
|
+
triggerInput: () => void;
|
|
162
|
+
handleRemove: (file: UploadFile) => void | Promise<void>;
|
|
163
|
+
handlePreview: (file: UploadFile) => void;
|
|
164
|
+
handleDownload: (file: UploadFile) => void;
|
|
165
|
+
handleFiles: (files: File[] | FileList) => Promise<void>;
|
|
166
|
+
submit: () => void;
|
|
167
|
+
}
|
package/dist/viewerjs.d.ts
CHANGED
|
@@ -62,3 +62,9 @@ export interface WaterfallInstance {
|
|
|
62
62
|
/** 触发重新布局 */
|
|
63
63
|
layout: () => void;
|
|
64
64
|
}
|
|
65
|
+
export type YhWaterfallInstance = WaterfallInstance;
|
|
66
|
+
export type YhWaterfallCols = import('./src/waterfall').WaterfallCols;
|
|
67
|
+
export type YhWaterfallItemBase = import('./src/waterfall').WaterfallItemBase;
|
|
68
|
+
export type YhWaterfallProps = import('./src/waterfall').WaterfallProps;
|
|
69
|
+
export type YhWaterfallSlots = import('./src/waterfall').WaterfallSlots;
|
|
70
|
+
export type YhWaterfallExpose = import('./src/waterfall').WaterfallExpose;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface WaterfallCols {
|
|
3
|
+
xs?: number;
|
|
4
|
+
sm?: number;
|
|
5
|
+
md?: number;
|
|
6
|
+
lg?: number;
|
|
7
|
+
xl?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface WaterfallItemBase {
|
|
10
|
+
id?: string | number;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
2
13
|
export declare const waterfallProps: {
|
|
3
14
|
/** 数据源 */
|
|
4
15
|
readonly items: {
|
|
@@ -7,13 +18,7 @@ export declare const waterfallProps: {
|
|
|
7
18
|
};
|
|
8
19
|
/** 列数,支持响应式对象 { xs, sm, md, lg, xl } */
|
|
9
20
|
readonly cols: {
|
|
10
|
-
readonly type: PropType<number |
|
|
11
|
-
xs?: number;
|
|
12
|
-
sm?: number;
|
|
13
|
-
md?: number;
|
|
14
|
-
lg?: number;
|
|
15
|
-
xl?: number;
|
|
16
|
-
}>;
|
|
21
|
+
readonly type: PropType<number | WaterfallCols>;
|
|
17
22
|
readonly default: 2;
|
|
18
23
|
};
|
|
19
24
|
/** 间距 (px) */
|
|
@@ -63,3 +68,16 @@ export declare const waterfallProps: {
|
|
|
63
68
|
};
|
|
64
69
|
};
|
|
65
70
|
export type WaterfallProps = ExtractPropTypes<typeof waterfallProps>;
|
|
71
|
+
export interface WaterfallSlots<T = Record<string, unknown>> {
|
|
72
|
+
default?: (props: {
|
|
73
|
+
item: T;
|
|
74
|
+
index: number;
|
|
75
|
+
column: number;
|
|
76
|
+
}) => unknown;
|
|
77
|
+
loading?: () => unknown;
|
|
78
|
+
empty?: () => unknown;
|
|
79
|
+
'loading-overlay'?: () => unknown;
|
|
80
|
+
}
|
|
81
|
+
export interface WaterfallExpose {
|
|
82
|
+
layout: () => void;
|
|
83
|
+
}
|
|
@@ -23,15 +23,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
23
23
|
readonly default: "YH-UI";
|
|
24
24
|
};
|
|
25
25
|
readonly font: {
|
|
26
|
-
readonly type: import("vue").PropType<
|
|
27
|
-
color?: string;
|
|
28
|
-
fontSize?: number | string;
|
|
29
|
-
fontWeight?: string | number;
|
|
30
|
-
fontFamily?: string;
|
|
31
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
32
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
33
|
-
lineHeight?: number;
|
|
34
|
-
}>;
|
|
26
|
+
readonly type: import("vue").PropType<import("./index.js").WatermarkFont>;
|
|
35
27
|
readonly default: () => {
|
|
36
28
|
color: string;
|
|
37
29
|
fontSize: number;
|
|
@@ -70,15 +62,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
70
62
|
renderWatermark: () => void;
|
|
71
63
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
72
64
|
readonly content: string | string[];
|
|
73
|
-
readonly font:
|
|
74
|
-
color?: string;
|
|
75
|
-
fontSize?: number | string;
|
|
76
|
-
fontWeight?: string | number;
|
|
77
|
-
fontFamily?: string;
|
|
78
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
79
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
80
|
-
lineHeight?: number;
|
|
81
|
-
};
|
|
65
|
+
readonly font: import("./index.js").WatermarkFont;
|
|
82
66
|
readonly width: number;
|
|
83
67
|
readonly height: number;
|
|
84
68
|
readonly gap: [number, number];
|
|
@@ -119,15 +103,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
119
103
|
readonly default: "YH-UI";
|
|
120
104
|
};
|
|
121
105
|
readonly font: {
|
|
122
|
-
readonly type: import("vue").PropType<
|
|
123
|
-
color?: string;
|
|
124
|
-
fontSize?: number | string;
|
|
125
|
-
fontWeight?: string | number;
|
|
126
|
-
fontFamily?: string;
|
|
127
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
128
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
129
|
-
lineHeight?: number;
|
|
130
|
-
}>;
|
|
106
|
+
readonly type: import("vue").PropType<import("./index.js").WatermarkFont>;
|
|
131
107
|
readonly default: () => {
|
|
132
108
|
color: string;
|
|
133
109
|
fontSize: number;
|
|
@@ -166,15 +142,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
166
142
|
renderWatermark: () => void;
|
|
167
143
|
}, {}, {}, {}, {
|
|
168
144
|
readonly content: string | string[];
|
|
169
|
-
readonly font:
|
|
170
|
-
color?: string;
|
|
171
|
-
fontSize?: number | string;
|
|
172
|
-
fontWeight?: string | number;
|
|
173
|
-
fontFamily?: string;
|
|
174
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
175
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
176
|
-
lineHeight?: number;
|
|
177
|
-
};
|
|
145
|
+
readonly font: import("./index.js").WatermarkFont;
|
|
178
146
|
readonly width: number;
|
|
179
147
|
readonly height: number;
|
|
180
148
|
readonly gap: [number, number];
|
|
@@ -212,15 +180,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
212
180
|
readonly default: "YH-UI";
|
|
213
181
|
};
|
|
214
182
|
readonly font: {
|
|
215
|
-
readonly type: import("vue").PropType<
|
|
216
|
-
color?: string;
|
|
217
|
-
fontSize?: number | string;
|
|
218
|
-
fontWeight?: string | number;
|
|
219
|
-
fontFamily?: string;
|
|
220
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
221
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
222
|
-
lineHeight?: number;
|
|
223
|
-
}>;
|
|
183
|
+
readonly type: import("vue").PropType<import("./index.js").WatermarkFont>;
|
|
224
184
|
readonly default: () => {
|
|
225
185
|
color: string;
|
|
226
186
|
fontSize: number;
|
|
@@ -259,15 +219,7 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
259
219
|
renderWatermark: () => void;
|
|
260
220
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
261
221
|
readonly content: string | string[];
|
|
262
|
-
readonly font:
|
|
263
|
-
color?: string;
|
|
264
|
-
fontSize?: number | string;
|
|
265
|
-
fontWeight?: string | number;
|
|
266
|
-
fontFamily?: string;
|
|
267
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
268
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
269
|
-
lineHeight?: number;
|
|
270
|
-
};
|
|
222
|
+
readonly font: import("./index.js").WatermarkFont;
|
|
271
223
|
readonly width: number;
|
|
272
224
|
readonly height: number;
|
|
273
225
|
readonly gap: [number, number];
|
|
@@ -286,3 +238,8 @@ export declare const YhWatermark: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
286
238
|
export default YhWatermark;
|
|
287
239
|
export * from './src/watermark';
|
|
288
240
|
export type WatermarkInstance = InstanceType<typeof Watermark>;
|
|
241
|
+
export type YhWatermarkInstance = WatermarkInstance;
|
|
242
|
+
export type YhWatermarkProps = import('./src/watermark').WatermarkProps;
|
|
243
|
+
export type YhWatermarkFont = import('./src/watermark').WatermarkFont;
|
|
244
|
+
export type YhWatermarkSlots = import('./src/watermark').WatermarkSlots;
|
|
245
|
+
export type YhWatermarkExpose = import('./src/watermark').WatermarkExpose;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface WatermarkFont {
|
|
3
|
+
color?: string;
|
|
4
|
+
fontSize?: number | string;
|
|
5
|
+
fontWeight?: string | number;
|
|
6
|
+
fontFamily?: string;
|
|
7
|
+
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
8
|
+
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center';
|
|
9
|
+
lineHeight?: number;
|
|
10
|
+
}
|
|
2
11
|
export declare const watermarkProps: {
|
|
3
12
|
/** 宽度 */
|
|
4
13
|
readonly width: {
|
|
@@ -29,15 +38,7 @@ export declare const watermarkProps: {
|
|
|
29
38
|
};
|
|
30
39
|
/** 字体设置 */
|
|
31
40
|
readonly font: {
|
|
32
|
-
readonly type: PropType<
|
|
33
|
-
color?: string;
|
|
34
|
-
fontSize?: number | string;
|
|
35
|
-
fontWeight?: string | number;
|
|
36
|
-
fontFamily?: string;
|
|
37
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
38
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
39
|
-
lineHeight?: number;
|
|
40
|
-
}>;
|
|
41
|
+
readonly type: PropType<WatermarkFont>;
|
|
41
42
|
readonly default: () => {
|
|
42
43
|
color: string;
|
|
43
44
|
fontSize: number;
|
|
@@ -80,3 +81,9 @@ export declare const watermarkProps: {
|
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
export type WatermarkProps = ExtractPropTypes<typeof watermarkProps>;
|
|
84
|
+
export interface WatermarkSlots {
|
|
85
|
+
default?: () => unknown;
|
|
86
|
+
}
|
|
87
|
+
export interface WatermarkExpose {
|
|
88
|
+
renderWatermark: () => void;
|
|
89
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
ref="containerRef"
|
|
4
|
+
:class="[ns.b(), { [ns.m('fullscreen')]: fullScreen }]"
|
|
5
|
+
:style="containerStyle"
|
|
6
|
+
>
|
|
3
7
|
<slot />
|
|
4
8
|
</div>
|
|
5
9
|
</template>
|
|
@@ -14,7 +18,10 @@ defineOptions({
|
|
|
14
18
|
});
|
|
15
19
|
const props = defineProps(watermarkProps);
|
|
16
20
|
const ns = useNamespace("watermark");
|
|
17
|
-
const { themeStyle } = useComponentTheme(
|
|
21
|
+
const { themeStyle } = useComponentTheme(
|
|
22
|
+
"watermark",
|
|
23
|
+
computed(() => props.themeOverrides)
|
|
24
|
+
);
|
|
18
25
|
const containerRef = ref(null);
|
|
19
26
|
let watermarkRef = null;
|
|
20
27
|
const watermarkUrl = ref("");
|
|
@@ -131,9 +138,24 @@ const initGuard = () => {
|
|
|
131
138
|
}
|
|
132
139
|
}, 3e3);
|
|
133
140
|
};
|
|
134
|
-
watch(
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
watch(
|
|
142
|
+
() => [
|
|
143
|
+
props.content,
|
|
144
|
+
props.image,
|
|
145
|
+
props.width,
|
|
146
|
+
props.height,
|
|
147
|
+
props.gap,
|
|
148
|
+
props.rotate,
|
|
149
|
+
props.globalRotate,
|
|
150
|
+
props.zIndex,
|
|
151
|
+
props.fullScreen,
|
|
152
|
+
props.font
|
|
153
|
+
],
|
|
154
|
+
() => {
|
|
155
|
+
renderWatermark();
|
|
156
|
+
},
|
|
157
|
+
{ deep: true }
|
|
158
|
+
);
|
|
137
159
|
onMounted(() => {
|
|
138
160
|
renderWatermark();
|
|
139
161
|
nextTick(() => {
|
|
@@ -25,15 +25,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
25
25
|
readonly default: "YH-UI";
|
|
26
26
|
};
|
|
27
27
|
readonly font: {
|
|
28
|
-
readonly type: import("vue").PropType<
|
|
29
|
-
color?: string;
|
|
30
|
-
fontSize?: number | string;
|
|
31
|
-
fontWeight?: string | number;
|
|
32
|
-
fontFamily?: string;
|
|
33
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
34
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
35
|
-
lineHeight?: number;
|
|
36
|
-
}>;
|
|
28
|
+
readonly type: import("vue").PropType<import("./watermark").WatermarkFont>;
|
|
37
29
|
readonly default: () => {
|
|
38
30
|
color: string;
|
|
39
31
|
fontSize: number;
|
|
@@ -93,15 +85,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
93
85
|
readonly default: "YH-UI";
|
|
94
86
|
};
|
|
95
87
|
readonly font: {
|
|
96
|
-
readonly type: import("vue").PropType<
|
|
97
|
-
color?: string;
|
|
98
|
-
fontSize?: number | string;
|
|
99
|
-
fontWeight?: string | number;
|
|
100
|
-
fontFamily?: string;
|
|
101
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
102
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
103
|
-
lineHeight?: number;
|
|
104
|
-
}>;
|
|
88
|
+
readonly type: import("vue").PropType<import("./watermark").WatermarkFont>;
|
|
105
89
|
readonly default: () => {
|
|
106
90
|
color: string;
|
|
107
91
|
fontSize: number;
|
|
@@ -138,15 +122,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
138
122
|
};
|
|
139
123
|
}>> & Readonly<{}>, {
|
|
140
124
|
readonly content: string | string[];
|
|
141
|
-
readonly font:
|
|
142
|
-
color?: string;
|
|
143
|
-
fontSize?: number | string;
|
|
144
|
-
fontWeight?: string | number;
|
|
145
|
-
fontFamily?: string;
|
|
146
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
147
|
-
textAlign?: "start" | "end" | "left" | "right" | "center";
|
|
148
|
-
lineHeight?: number;
|
|
149
|
-
};
|
|
125
|
+
readonly font: import("./watermark").WatermarkFont;
|
|
150
126
|
readonly width: number;
|
|
151
127
|
readonly height: number;
|
|
152
128
|
readonly gap: [number, number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yh-ui/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "YH-UI Vue 3 Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"require": "./dist/resolver.cjs"
|
|
24
24
|
},
|
|
25
25
|
"./style": "./dist/style.css",
|
|
26
|
+
"./style.css": "./dist/style.css",
|
|
26
27
|
"./*": {
|
|
27
28
|
"types": "./dist/*.d.ts",
|
|
28
29
|
"import": "./dist/*.mjs",
|
|
@@ -36,10 +37,10 @@
|
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@webcontainer/api": "^1.6.1",
|
|
38
39
|
"@floating-ui/dom": "^1.7.4",
|
|
39
|
-
"@yh-ui/hooks": "^0.
|
|
40
|
-
"@yh-ui/locale": "^0.
|
|
41
|
-
"@yh-ui/theme": "^0.
|
|
42
|
-
"@yh-ui/utils": "^0.
|
|
40
|
+
"@yh-ui/hooks": "^1.0.4",
|
|
41
|
+
"@yh-ui/locale": "^1.0.4",
|
|
42
|
+
"@yh-ui/theme": "^1.0.4",
|
|
43
|
+
"@yh-ui/utils": "^1.0.4",
|
|
43
44
|
"async-validator": "^4.2.5",
|
|
44
45
|
"dayjs": "^1.11.19",
|
|
45
46
|
"markdown-it": "^14.1.1",
|