@yeepay/yee-boss-ui 0.1.5 → 0.1.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/README.md +29 -2
- package/dist/components/ellipsis-text/YeeEllipsisText.vue.d.ts +40 -0
- package/dist/components/ellipsis-text/index.d.ts +2 -0
- package/dist/components/ellipsis-text/types.d.ts +31 -0
- package/dist/components/modal/YeeModal.vue.d.ts +16 -6
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +772 -552
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
- `YeeForm` Schema 查询表单。
|
|
16
16
|
- `useYeeGrid` 与 `gridApi/formApi`。
|
|
17
17
|
- `YeeDescriptions` 配置驱动的详情展示。
|
|
18
|
+
- `YeeEllipsisText` 单行/多行省略文本与按需完整提示。
|
|
18
19
|
- `YeeFileUpload` 业务无关的文件选择与上传生命周期。
|
|
19
20
|
- `YeeModal` 统一的 Modal / Drawer 容器。
|
|
20
21
|
- `YeeSelect` 带完整文案提示的选择器。
|
|
@@ -89,6 +90,27 @@ export default {
|
|
|
89
90
|
|
|
90
91
|
## 通用业务组件
|
|
91
92
|
|
|
93
|
+
### YeeEllipsisText
|
|
94
|
+
|
|
95
|
+
通过 `line` 和 `maxWidth` 控制单行或多行省略;`tooltipWhenEllipsis` 开启后,仅在文本实际被截断时显示 Tooltip。`expand` 支持鼠标、Enter 和 Space 展开/收起,并通过 `expandChange` 通知状态变化。
|
|
96
|
+
|
|
97
|
+
```vue
|
|
98
|
+
<YeeEllipsisText
|
|
99
|
+
:line="2"
|
|
100
|
+
:max-width="360"
|
|
101
|
+
expand
|
|
102
|
+
tooltip-when-ellipsis
|
|
103
|
+
@expand-change="handleExpandChange"
|
|
104
|
+
>
|
|
105
|
+
{{ remark }}
|
|
106
|
+
<template #tooltip>
|
|
107
|
+
完整备注:{{ remark }}
|
|
108
|
+
</template>
|
|
109
|
+
</YeeEllipsisText>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`placement` 支持 `top`、`right`、`bottom`、`left`;`ellipsisThreshold` 默认是 `3px`。还可使用 `tooltipMaxWidth`、`tooltipOverlayStyle`、`tooltipBackgroundColor`、`tooltipColor` 和 `tooltipFontSize` 调整提示内容。默认背景、文字和字号消费 Yee 的 `popover`、`popoverForeground` 与 `fontSize` Theme Tokens;未使用 `PlatformConfigProvider` 时回退到对应的 `--yee-*` CSS Variables。
|
|
113
|
+
|
|
92
114
|
### YeeDescriptions
|
|
93
115
|
|
|
94
116
|
配置项使用稳定的 `name` 时,可通过 `content-${name}` 覆盖内容。`copyable` 仅复制展示值,`info` 用于补充说明。
|
|
@@ -117,10 +139,15 @@ export default {
|
|
|
117
139
|
|
|
118
140
|
### YeeModal
|
|
119
141
|
|
|
120
|
-
使用标准 `v-model:open
|
|
142
|
+
使用标准 `v-model:open`。Modal 默认在 header 右侧显示全屏切换按钮,可通过 `v-model:fullscreen` 控制状态,或通过 `:fullscreen-button="false"` 隐藏。`type="drawer"` 适合长详情或复杂表单,不显示全屏按钮;`confirm` 只通知父组件,不会主动关闭,便于父组件在异步提交成功后再更新 `open`。
|
|
121
143
|
|
|
122
144
|
```vue
|
|
123
|
-
<YeeModal
|
|
145
|
+
<YeeModal
|
|
146
|
+
v-model:fullscreen="fullscreen"
|
|
147
|
+
v-model:open="open"
|
|
148
|
+
title="提交确认"
|
|
149
|
+
@confirm="submit"
|
|
150
|
+
/>
|
|
124
151
|
```
|
|
125
152
|
|
|
126
153
|
### YeeSelect
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { YeeEllipsisTextProps } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
default?(): unknown;
|
|
7
|
+
tooltip?(): unknown;
|
|
8
|
+
}> & {
|
|
9
|
+
default?(): unknown;
|
|
10
|
+
tooltip?(): unknown;
|
|
11
|
+
};
|
|
12
|
+
refs: {
|
|
13
|
+
text: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<YeeEllipsisTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
expandChange: (expanded: boolean) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<YeeEllipsisTextProps> & Readonly<{
|
|
21
|
+
onExpandChange?: (expanded: boolean) => any;
|
|
22
|
+
}>, {
|
|
23
|
+
line: number;
|
|
24
|
+
placement: import('./types').YeeEllipsisTextPlacement;
|
|
25
|
+
expand: boolean;
|
|
26
|
+
ellipsisThreshold: number;
|
|
27
|
+
maxWidth: number | string;
|
|
28
|
+
tooltip: boolean;
|
|
29
|
+
tooltipOverlayStyle: CSSProperties;
|
|
30
|
+
tooltipWhenEllipsis: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
32
|
+
text: HTMLDivElement;
|
|
33
|
+
}, any>;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
export type YeeEllipsisTextPlacement = 'bottom' | 'left' | 'right' | 'top';
|
|
3
|
+
export interface YeeEllipsisTextProps {
|
|
4
|
+
/** 是否允许点击文本展开全部内容。 */
|
|
5
|
+
expand?: boolean;
|
|
6
|
+
/** 判定文本截断时允许的像素误差。 */
|
|
7
|
+
ellipsisThreshold?: number;
|
|
8
|
+
/** 折叠状态下最多展示的行数。 */
|
|
9
|
+
line?: number;
|
|
10
|
+
/** 文本区域最大宽度,数字按 px 处理。 */
|
|
11
|
+
maxWidth?: number | string;
|
|
12
|
+
/** Tooltip 展示位置。 */
|
|
13
|
+
placement?: YeeEllipsisTextPlacement;
|
|
14
|
+
/** 是否启用 Tooltip。 */
|
|
15
|
+
tooltip?: boolean;
|
|
16
|
+
/** Tooltip 背景色。 */
|
|
17
|
+
tooltipBackgroundColor?: string;
|
|
18
|
+
/** Tooltip 文字颜色。 */
|
|
19
|
+
tooltipColor?: string;
|
|
20
|
+
/** Tooltip 字号,单位 px。 */
|
|
21
|
+
tooltipFontSize?: number;
|
|
22
|
+
/** Tooltip 最大宽度,单位 px。 */
|
|
23
|
+
tooltipMaxWidth?: number;
|
|
24
|
+
/** Tooltip 内容区域样式。 */
|
|
25
|
+
tooltipOverlayStyle?: CSSProperties;
|
|
26
|
+
/** 是否仅在文本实际被截断时启用 Tooltip。 */
|
|
27
|
+
tooltipWhenEllipsis?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface YeeEllipsisTextEmits {
|
|
30
|
+
expandChange: [expanded: boolean];
|
|
31
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNodeChild } from 'vue';
|
|
1
2
|
import { YeeModalProps } from './types';
|
|
2
3
|
type __VLS_Props = YeeModalProps;
|
|
3
4
|
type __VLS_PublicProps = {
|
|
@@ -5,12 +6,16 @@ type __VLS_PublicProps = {
|
|
|
5
6
|
} & __VLS_Props;
|
|
6
7
|
declare function __VLS_template(): {
|
|
7
8
|
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
|
|
10
|
-
default
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
closeIcon(): VNodeChild;
|
|
11
|
+
default(): VNodeChild;
|
|
12
|
+
footer(): VNodeChild;
|
|
13
|
+
header(): VNodeChild;
|
|
14
|
+
}> & {
|
|
15
|
+
closeIcon(): VNodeChild;
|
|
16
|
+
default(): VNodeChild;
|
|
17
|
+
footer(): VNodeChild;
|
|
18
|
+
header(): VNodeChild;
|
|
14
19
|
};
|
|
15
20
|
refs: {};
|
|
16
21
|
rootEl: any;
|
|
@@ -20,23 +25,28 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
20
25
|
close: () => any;
|
|
21
26
|
confirm: (event: Event) => any;
|
|
22
27
|
cancel: (event: Event) => any;
|
|
28
|
+
"update:fullscreen": (fullscreen: boolean) => any;
|
|
23
29
|
"update:open": (value: boolean) => any;
|
|
24
30
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
31
|
onClose?: () => any;
|
|
26
32
|
onConfirm?: (event: Event) => any;
|
|
27
33
|
onCancel?: (event: Event) => any;
|
|
34
|
+
"onUpdate:fullscreen"?: (fullscreen: boolean) => any;
|
|
28
35
|
"onUpdate:open"?: (value: boolean) => any;
|
|
29
36
|
}>, {
|
|
30
37
|
type: import('./types').YeeModalType;
|
|
31
38
|
title: string;
|
|
32
39
|
width: number | string;
|
|
33
40
|
keyboard: boolean;
|
|
41
|
+
closable: boolean;
|
|
34
42
|
maskClosable: boolean;
|
|
35
43
|
destroyOnClose: boolean;
|
|
36
44
|
cancelButtonText: string;
|
|
37
45
|
centered: boolean;
|
|
38
46
|
confirmButtonLoading: boolean;
|
|
39
47
|
confirmButtonText: string;
|
|
48
|
+
fullscreen: boolean;
|
|
49
|
+
fullscreenButton: boolean;
|
|
40
50
|
showCancelButton: boolean;
|
|
41
51
|
showConfirmButton: boolean;
|
|
42
52
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
1
2
|
export type YeeModalType = 'drawer' | 'modal';
|
|
2
3
|
export interface YeeModalProps {
|
|
3
4
|
cancelButtonText?: string;
|
|
4
5
|
centered?: boolean;
|
|
6
|
+
closable?: boolean;
|
|
5
7
|
confirmButtonLoading?: boolean;
|
|
6
8
|
confirmButtonText?: string;
|
|
7
9
|
destroyOnClose?: boolean;
|
|
10
|
+
fullscreen?: boolean;
|
|
11
|
+
fullscreenButton?: boolean;
|
|
8
12
|
keyboard?: boolean;
|
|
9
13
|
maskClosable?: boolean;
|
|
10
14
|
showCancelButton?: boolean;
|
|
11
15
|
showConfirmButton?: boolean;
|
|
16
|
+
style?: StyleValue;
|
|
12
17
|
title?: string;
|
|
13
18
|
type?: YeeModalType;
|
|
14
19
|
width?: number | string;
|
|
20
|
+
wrapProps?: Record<string, unknown>;
|
|
15
21
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as PlatformConfigProvider } from './components/PlatformConfigProvider.vue';
|
|
2
2
|
export * from './components/descriptions';
|
|
3
|
+
export * from './components/ellipsis-text';
|
|
3
4
|
export * from './components/file-upload';
|
|
4
5
|
export * from './components/form';
|
|
5
6
|
export * from './components/grid';
|