savor-ui 0.3.3 → 0.4.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.
- package/CHANGELOG.md +29 -0
- package/dist/es/components/index.d.ts +4 -0
- package/dist/es/components/index.mjs +5 -0
- package/dist/es/components/src/alert/alert.d.ts +22 -0
- package/dist/es/components/src/alert/alert.vue.mjs +5 -0
- package/dist/es/components/src/alert/alert.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
- package/dist/es/components/src/alert/index.d.ts +26 -0
- package/dist/es/components/src/alert/index.mjs +7 -0
- package/dist/es/components/src/alert/types.d.ts +24 -0
- package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +5 -5
- package/dist/es/components/src/chat-list/chat-list.d.ts +35 -0
- package/dist/es/components/src/chat-list/chat-list.vue.mjs +5 -0
- package/dist/es/components/src/chat-list/chat-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +55 -0
- package/dist/es/components/src/chat-list/index.d.ts +47 -0
- package/dist/es/components/src/chat-list/index.mjs +7 -0
- package/dist/es/components/src/chat-list/types.d.ts +44 -0
- package/dist/es/components/src/chat-sender/chat-sender.d.ts +26 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue.mjs +5 -0
- package/dist/es/components/src/chat-sender/chat-sender.vue_vue_type_script_setup_true_vapor_true_lang.mjs +92 -0
- package/dist/es/components/src/chat-sender/index.d.ts +27 -0
- package/dist/es/components/src/chat-sender/index.mjs +7 -0
- package/dist/es/components/src/chat-sender/types.d.ts +24 -0
- package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/date-picker/date-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/datetime-picker/datetime-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
- package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +72 -72
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +13 -13
- package/dist/es/components/src/form/use-form-item.d.ts +1 -1
- package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +24 -23
- package/dist/es/components/src/grid/grid.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -7
- package/dist/es/components/src/grid/types.d.ts +1 -0
- package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/input-number/input-number.vue_vue_type_script_setup_true_vapor_true_lang.mjs +83 -83
- package/dist/es/components/src/input-tag/input-tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -10
- package/dist/es/components/src/layer/layer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +105 -105
- package/dist/es/components/src/list/index.d.ts +5 -5
- package/dist/es/components/src/list/list.d.ts +3 -3
- package/dist/es/components/src/list/list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +7 -12
- package/dist/es/components/src/list/types.d.ts +7 -5
- package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +121 -121
- package/dist/es/components/src/panel/panel.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/popover/index.d.ts +1 -0
- package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +77 -76
- package/dist/es/components/src/popover/types.d.ts +4 -0
- package/dist/es/components/src/scrollbar/index.d.ts +7 -2
- package/dist/es/components/src/scrollbar/scrollbar.d.ts +5 -2
- package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +131 -96
- package/dist/es/components/src/scrollbar/types.d.ts +15 -1
- package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +41 -45
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/table/col-group.d.ts +22 -0
- package/dist/es/components/src/table/col-group.vue.mjs +5 -0
- package/dist/es/components/src/table/col-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +25 -0
- package/dist/es/components/src/table/index.d.ts +18 -41
- package/dist/es/components/src/table/index.mjs +1 -0
- package/dist/es/components/src/table/table-body.d.ts +32 -0
- package/dist/es/components/src/table/table-body.vue.mjs +5 -0
- package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +153 -0
- package/dist/es/components/src/table/table-header.d.ts +23 -0
- package/dist/es/components/src/table/table-header.vue.mjs +5 -0
- package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +80 -0
- package/dist/es/components/src/table/table.d.ts +12 -25
- package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +167 -391
- package/dist/es/components/src/table/types.d.ts +61 -45
- package/dist/es/components/src/table/types.mjs +4 -0
- package/dist/es/components/src/textarea/textarea.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -6
- package/dist/es/components/src/tooltip/index.d.ts +1 -0
- package/dist/es/components/src/tooltip/tooltip.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -0
- package/dist/es/components/src/tooltip/types.d.ts +2 -0
- package/dist/es/components/src/transition/index.d.ts +29 -0
- package/dist/es/components/src/transition/index.mjs +7 -0
- package/dist/es/components/src/{_comp/HeightTransition.d.ts → transition/transition-height.d.ts} +0 -4
- package/dist/es/components/src/transition/transition-height.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-height.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition-opacity.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/OpacityTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-opacity.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-scale.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/ScaleTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-scale.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-side.vue.mjs +5 -0
- package/dist/es/components/src/{_comp/SideTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-side.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
- package/dist/es/components/src/transition/transition-width.d.ts +31 -0
- package/dist/es/components/src/transition/transition-width.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition-width.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
- package/dist/es/components/src/transition/transition.d.ts +27 -0
- package/dist/es/components/src/transition/transition.vue.mjs +5 -0
- package/dist/es/components/src/transition/transition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +47 -0
- package/dist/es/components/src/transition/types.d.ts +28 -0
- package/dist/es/components/src/tree/index.d.ts +5 -5
- package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_vapor_true_lang.mjs +26 -29
- package/dist/es/components/src/tree/tree.d.ts +3 -1
- package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +45 -49
- package/dist/es/components/src/tree/types.d.ts +5 -9
- package/dist/es/core/components.mjs +94 -86
- package/dist/es/core/index.mjs +84 -79
- package/dist/es/hooks/src/use-element-size.mjs +7 -38
- package/dist/es/icons/index.d.ts +4 -1
- package/dist/es/icons/index.mjs +3 -0
- package/dist/es/icons/src/loading-stop.d.ts +19 -0
- package/dist/es/icons/src/loading-stop.vue.mjs +11 -0
- package/dist/es/icons/src/send.d.ts +19 -0
- package/dist/es/icons/src/send.vue.mjs +11 -0
- package/dist/es/icons/src/stop.d.ts +19 -0
- package/dist/es/icons/src/stop.vue.mjs +5 -0
- package/dist/es/theme/components/alert.scss +101 -0
- package/dist/es/theme/components/chat-list.scss +134 -0
- package/dist/es/theme/components/chat-sender.scss +123 -0
- package/dist/es/theme/components/index.scss +3 -0
- package/dist/es/theme/components/input.scss +0 -1
- package/dist/es/theme/components/list.scss +7 -0
- package/dist/es/theme/components/menu.scss +1 -1
- package/dist/es/theme/components/scrollbar.scss +61 -7
- package/dist/es/theme/components/table.scss +360 -329
- package/dist/es/theme/components/transition.scss +21 -21
- package/dist/es/theme/components/tree.scss +8 -0
- package/dist/es/utils/src/tool.d.ts +8 -3
- package/dist/es/utils/src/tool.mjs +6 -6
- package/dist/json/vetur-attributes.json +170 -48
- package/dist/json/vetur-tags.json +74 -15
- package/dist/json/web-types.json +391 -83
- package/package.json +1 -1
- package/dist/es/components/src/_comp/HeightTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/HeightTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +0 -77
- package/dist/es/components/src/_comp/OpacityTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/ScaleTransition.vue.mjs +0 -5
- package/dist/es/components/src/_comp/SideTransition.vue.mjs +0 -5
- /package/dist/es/components/src/{_comp/OpacityTransition.d.ts → transition/transition-opacity.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/ScaleTransition.d.ts → transition/transition-scale.d.ts} +0 -0
- /package/dist/es/components/src/{_comp/SideTransition.d.ts → transition/transition-side.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
# [0.4.0](https://gitee.com/mach552/savor-ui/compare/v0.3.3...v0.4.0) (2026-06-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **cascader:** 修复清空值后没有清空激活状态的问题 ([0e7b7c8](https://gitee.com/mach552/savor-ui/commits/0e7b7c8c50f2b4c8bdf9b2c7f368db7babf2fa62))
|
|
11
|
+
* **grid:** 修复动态计算span无效的问题 ([23c5e60](https://gitee.com/mach552/savor-ui/commits/23c5e606aa8a1f030ff7ddfc5a1f1aa17748fe32))
|
|
12
|
+
* **menu:** 修复子菜单展开动画卡顿问题 ([e245006](https://gitee.com/mach552/savor-ui/commits/e245006281ad47719e10190fb052811bc5695e7b))
|
|
13
|
+
* **popover:** 修复快速打开关闭时没有定位样式的问题 ([5190f75](https://gitee.com/mach552/savor-ui/commits/5190f75a3cb2e733e2dba5634de4c5e6f39d8686))
|
|
14
|
+
* **scrollbar:** 修复容器和滚动条位置不一致问题 ([5fa85dd](https://gitee.com/mach552/savor-ui/commits/5fa85dd2b5abffff502f0b06ecdddebf4fa2035e))
|
|
15
|
+
* **segmented:** 修复激活块偶发宽度不足的问题 ([a50c4c4](https://gitee.com/mach552/savor-ui/commits/a50c4c461b12919714662d1ce46e31e6bf01231e))
|
|
16
|
+
* **table:** 修复从有数据变成数据为空时报错问题 ([ff7dfa0](https://gitee.com/mach552/savor-ui/commits/ff7dfa0295fb5cc82ed83bfeb3451e7c10b11ad0))
|
|
17
|
+
* **table:** 修复单独设置`minWidth`无效的问题 ([a645d10](https://gitee.com/mach552/savor-ui/commits/a645d108cf615cee1b4d0e7551f830cb1804ebe6))
|
|
18
|
+
* **table:** 修复复选框没有垂直居中的问题 ([923fe9b](https://gitee.com/mach552/savor-ui/commits/923fe9be0bed99e4e5c0109255c9ac8d09a21cfd))
|
|
19
|
+
* **table:** 修复高度不足时空状态导致的表格整体滚动问题 ([9dc78c9](https://gitee.com/mach552/savor-ui/commits/9dc78c9a6de12a73a64836ca6b7b962db3b965fa))
|
|
20
|
+
* **table:** 修复列宽无法固定的问题 ([02a8e36](https://gitee.com/mach552/savor-ui/commits/02a8e361a6c0a56869f1d5083a6be31bd563a822))
|
|
21
|
+
* **table:** 修复fiexd列的阴影样式显示异常问题 ([41d8adf](https://gitee.com/mach552/savor-ui/commits/41d8adf817919136f198af57f435b14927b1a6d3))
|
|
22
|
+
* **tree:** 修复容器高度计算错误的问题 ([7208476](https://gitee.com/mach552/savor-ui/commits/720847683d04664a8b0e91c34d88a907b64d5340))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **alert:** 新增警告提示组件 ([aae1dce](https://gitee.com/mach552/savor-ui/commits/aae1dce10f29f9aa2999ed11b5cfaf4cc4d510c0))
|
|
28
|
+
* **chat-list:** 新增对话列表组件 ([7a28c84](https://gitee.com/mach552/savor-ui/commits/7a28c8420cd105d48b08ec618fa2cc7f9191c23f))
|
|
29
|
+
* **scrollbar:** 新增滚动到结束方法 ([c41e4fc](https://gitee.com/mach552/savor-ui/commits/c41e4fcafb2a48c0c6bdb7ab818491a4bba8857d))
|
|
30
|
+
* **scrollbar:** 新增原生滚动属性和触底事件 ([92b3474](https://gitee.com/mach552/savor-ui/commits/92b3474bcf19d4208e473ecaafb074d7ac5906aa))
|
|
31
|
+
* **sender:** 新增AI对话输入组件 ([3ad13b0](https://gitee.com/mach552/savor-ui/commits/3ad13b0fd9bfc3faddfd629514cb5c202398aac7))
|
|
32
|
+
* **transition:** 新增过渡组件 ([d2cbf62](https://gitee.com/mach552/savor-ui/commits/d2cbf623b64fd9300888f0c5448f4090c3e203f1))
|
|
33
|
+
|
|
5
34
|
## [0.3.3](https://gitee.com/mach552/savor-ui/compare/v0.3.2...v0.3.3) (2026-06-09)
|
|
6
35
|
|
|
7
36
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './src/alert';
|
|
1
2
|
export * from './src/anchor';
|
|
2
3
|
export * from './src/auto-complete';
|
|
3
4
|
export * from './src/avatar';
|
|
@@ -7,6 +8,8 @@ export * from './src/button';
|
|
|
7
8
|
export * from './src/card';
|
|
8
9
|
export * from './src/carousel';
|
|
9
10
|
export * from './src/cascader';
|
|
11
|
+
export * from './src/chat-list';
|
|
12
|
+
export * from './src/chat-sender';
|
|
10
13
|
export * from './src/checkbox';
|
|
11
14
|
export * from './src/collapse';
|
|
12
15
|
export * from './src/color-picker';
|
|
@@ -53,6 +56,7 @@ export * from './src/text';
|
|
|
53
56
|
export * from './src/textarea';
|
|
54
57
|
export * from './src/timeline';
|
|
55
58
|
export * from './src/tooltip';
|
|
59
|
+
export * from './src/transition';
|
|
56
60
|
export * from './src/tree';
|
|
57
61
|
export * from './src/upload';
|
|
58
62
|
export * from './src/waterfall';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./src/alert/index.mjs";
|
|
1
2
|
import "./src/anchor/types.mjs";
|
|
2
3
|
import "./src/anchor/index.mjs";
|
|
3
4
|
import "./src/form/types.mjs";
|
|
@@ -18,8 +19,11 @@ import "./src/card/index.mjs";
|
|
|
18
19
|
import "./src/carousel/index.mjs";
|
|
19
20
|
import "./src/empty/index.mjs";
|
|
20
21
|
import "./src/cascader/index.mjs";
|
|
22
|
+
import "./src/chat-list/index.mjs";
|
|
23
|
+
import "./src/chat-sender/index.mjs";
|
|
21
24
|
import "./src/checkbox/types.mjs";
|
|
22
25
|
import "./src/checkbox/index.mjs";
|
|
26
|
+
import "./src/transition/index.mjs";
|
|
23
27
|
import "./src/collapse/types.mjs";
|
|
24
28
|
import "./src/collapse/index.mjs";
|
|
25
29
|
import "./src/icon/index.mjs";
|
|
@@ -63,6 +67,7 @@ import "./src/skeleton/index.mjs";
|
|
|
63
67
|
import "./src/space/index.mjs";
|
|
64
68
|
import "./src/statistic/index.mjs";
|
|
65
69
|
import "./src/switch/index.mjs";
|
|
70
|
+
import "./src/table/types.mjs";
|
|
66
71
|
import "./src/table/index.mjs";
|
|
67
72
|
import "./src/tabs/types.mjs";
|
|
68
73
|
import "./src/tabs/index.mjs";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AlertProps, AlertSlots } from './types';
|
|
2
|
+
import { PublicProps, VNode } from 'vue';
|
|
3
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<AlertProps & {
|
|
5
|
+
onClose?: (() => any) | undefined;
|
|
6
|
+
}> & (typeof globalThis extends {
|
|
7
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
8
|
+
} ? P : {});
|
|
9
|
+
expose: (exposed: {}) => void;
|
|
10
|
+
attrs: any;
|
|
11
|
+
slots: AlertSlots;
|
|
12
|
+
emit: (evt: "close") => void;
|
|
13
|
+
}>) => VNode & {
|
|
14
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
19
|
+
[K in keyof T]: T[K];
|
|
20
|
+
} : {
|
|
21
|
+
[K in keyof T as K]: T[K];
|
|
22
|
+
}) & {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import t from "../../../icons/src/check-circle-fill.vue.mjs";
|
|
4
|
+
import n from "../../../icons/src/close-circle-fill.vue.mjs";
|
|
5
|
+
import r from "../../../icons/src/close.vue.mjs";
|
|
6
|
+
import i from "../../../icons/src/info-circle-fill.vue.mjs";
|
|
7
|
+
import a from "../../../icons/src/warning-circle-fill.vue.mjs";
|
|
8
|
+
import "../../../icons/index.mjs";
|
|
9
|
+
import { child as o, createComponent as s, createIf as c, createInvoker as l, createSlot as u, defineVaporComponent as d, delegateEvents as f, renderEffect as p, setClass as m, setInsertionState as h, setText as g, template as _, toDisplayString as v, unref as y } from "vue";
|
|
10
|
+
//#region ../components/src/alert/alert.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
11
|
+
var b = _("<div>"), x = _(" "), S = _("<div><div></div>"), C = _("<div><div><div></div>", 1);
|
|
12
|
+
f("click");
|
|
13
|
+
var w = /*@__PURE__*/ d({
|
|
14
|
+
name: "SAlert",
|
|
15
|
+
__name: "alert",
|
|
16
|
+
props: {
|
|
17
|
+
type: { default: "default" },
|
|
18
|
+
size: { default: "medium" },
|
|
19
|
+
showIcon: { type: Boolean },
|
|
20
|
+
title: {},
|
|
21
|
+
content: {},
|
|
22
|
+
closable: { type: Boolean }
|
|
23
|
+
},
|
|
24
|
+
emits: ["close"],
|
|
25
|
+
setup(d, { emit: f, slots: _ }) {
|
|
26
|
+
let w = f, T = e("alert"), E = () => {
|
|
27
|
+
w("close");
|
|
28
|
+
}, D = C(), O = o(D, 1), k = o(O, 1);
|
|
29
|
+
return p(() => {
|
|
30
|
+
let e = y(T);
|
|
31
|
+
m(D, [
|
|
32
|
+
e.b(),
|
|
33
|
+
e.m(d.type),
|
|
34
|
+
e.m(d.size)
|
|
35
|
+
]);
|
|
36
|
+
}), h(D, 0, 0), c(() => d.title || _.title, () => {
|
|
37
|
+
let e = S(), r = o(e, 1);
|
|
38
|
+
return p(() => m(e, [y(T).e("header")])), h(e, 0, 0), c(() => d.showIcon && (d.title || _.title), () => {
|
|
39
|
+
let e = b();
|
|
40
|
+
return p(() => m(e, [y(T).e("icon")])), h(e, null, 0), c(() => d.type === "warning", () => s(y(a)), () => c(() => d.type === "primary", () => s(y(i)), () => c(() => d.type === "info", () => s(y(i)), () => c(() => d.type === "success", () => s(y(t)), () => c(() => d.type === "danger", () => s(y(n))), 1029), 773), 517), 261), e;
|
|
41
|
+
}), p(() => m(r, [y(T).e("title")])), h(r, null, 0), u("title", null, () => {
|
|
42
|
+
let e = x();
|
|
43
|
+
return p(() => g(e, v(d.title))), e;
|
|
44
|
+
}), e;
|
|
45
|
+
}), p(() => m(O, [y(T).e("body")])), h(O, 0, 0), c(() => d.showIcon && (!d.title || !_.title), () => {
|
|
46
|
+
let e = b();
|
|
47
|
+
return p(() => m(e, [y(T).e("icon")])), h(e, null, 0), c(() => d.type === "warning", () => s(y(a)), () => c(() => d.type === "primary", () => s(y(i)), () => c(() => d.type === "info", () => s(y(i)), () => c(() => d.type === "success", () => s(y(t)), () => c(() => d.type === "danger", () => s(y(n))), 2821), 2565), 2309), 2053), e;
|
|
48
|
+
}), p(() => m(k, [y(T).e("content")])), h(k, null, 0), u("default", null, () => {
|
|
49
|
+
let e = x();
|
|
50
|
+
return p(() => g(e, v(d.content))), e;
|
|
51
|
+
}), h(O, null, 2), c(() => d.closable, () => {
|
|
52
|
+
let e = b();
|
|
53
|
+
return p(() => m(e, [y(T).e("close")])), h(e, null, 0), s(y(r)), e.$evtclick = l(E), e;
|
|
54
|
+
}), D;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { w as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlertSlots } from './types';
|
|
2
|
+
import { PublicProps, VNode, Plugin } from 'vue';
|
|
3
|
+
export declare const SAlert: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
slots: AlertSlots;
|
|
6
|
+
emit: (evt: "close") => void;
|
|
7
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: PublicProps & {
|
|
9
|
+
type?: "default" | "primary" | "success" | "warning" | "danger" | "info" | undefined;
|
|
10
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
11
|
+
showIcon?: boolean | undefined;
|
|
12
|
+
title?: string | undefined;
|
|
13
|
+
content?: string | undefined;
|
|
14
|
+
closable?: boolean | undefined;
|
|
15
|
+
onClose?: (() => any) | undefined;
|
|
16
|
+
} & (typeof globalThis extends {
|
|
17
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
18
|
+
} ? P : {});
|
|
19
|
+
expose: (exposed: {}) => void;
|
|
20
|
+
attrs: any;
|
|
21
|
+
slots: AlertSlots;
|
|
22
|
+
emit: (evt: "close") => void;
|
|
23
|
+
}>) => VNode & {
|
|
24
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
25
|
+
}) & Plugin;
|
|
26
|
+
export * from './types';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AlertProps {
|
|
2
|
+
/** 类型 */
|
|
3
|
+
type?: "default" | "primary" | "success" | "warning" | "danger" | "info";
|
|
4
|
+
/** 大小 */
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
/** 是否显示图标 */
|
|
7
|
+
showIcon?: boolean;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** 内容 */
|
|
11
|
+
content?: string;
|
|
12
|
+
/** 是否可关闭 */
|
|
13
|
+
closable?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AlertSlots {
|
|
16
|
+
/** 默认 */
|
|
17
|
+
default?: () => any;
|
|
18
|
+
/** 标题 */
|
|
19
|
+
title?: () => any;
|
|
20
|
+
}
|
|
21
|
+
export interface AlertEmits {
|
|
22
|
+
/** 关闭 */
|
|
23
|
+
close: [];
|
|
24
|
+
}
|
package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import n from "../../../icons/src/down.vue.mjs";
|
|
3
|
+
import t from "../../../icons/src/down.vue.mjs";
|
|
5
4
|
import "../../../icons/index.mjs";
|
|
5
|
+
import { useFormItem as n } from "../form/use-form-item.mjs";
|
|
6
6
|
import { SPopover as r } from "../popover/index.mjs";
|
|
7
7
|
import { SInput as i } from "../input/index.mjs";
|
|
8
8
|
import { SEmpty as a } from "../empty/index.mjs";
|
|
@@ -52,7 +52,7 @@ var M = /*@__PURE__*/ p({
|
|
|
52
52
|
"update:expanded"
|
|
53
53
|
]),
|
|
54
54
|
setup(p, { emit: m }) {
|
|
55
|
-
let h = p, C = e("cascader"), M = m, N = E(p, "modelValue"), { size: P, error: F } = w(h), { mergedSize: I, mergedError: L } =
|
|
55
|
+
let h = p, C = e("cascader"), M = m, N = E(p, "modelValue"), { size: P, error: F } = w(h), { mergedSize: I, mergedError: L } = n({
|
|
56
56
|
size: P,
|
|
57
57
|
error: F
|
|
58
58
|
}), R = E(p, "expandedKeys"), z = E(p, "expanded"), B = s(() => ({
|
|
@@ -106,7 +106,7 @@ var M = /*@__PURE__*/ p({
|
|
|
106
106
|
R.value.includes(e[B.value.key]) && (V.value = V.value ? `${V.value}${h.pathSeparator}${e[B.value.label]}` : e[B.value.label], e[B.value.children] && Q(e[B.value.children]));
|
|
107
107
|
}) : Z();
|
|
108
108
|
}, te = () => {
|
|
109
|
-
N.value = "", M("clear");
|
|
109
|
+
N.value = "", R.value = [], z.value = [], V.value = "", M("clear");
|
|
110
110
|
};
|
|
111
111
|
O(N, () => {
|
|
112
112
|
Z();
|
|
@@ -156,7 +156,7 @@ var M = /*@__PURE__*/ p({
|
|
|
156
156
|
}, { suffix: () => l(re, {
|
|
157
157
|
class: () => [T(C).e("suffix-icon")],
|
|
158
158
|
style: () => ({ transform: G.value ? "rotate(180deg)" : "" })
|
|
159
|
-
}, () => c(T(
|
|
159
|
+
}, () => c(T(t))) })
|
|
160
160
|
}), W, null, "popoverRef"), $.$evtclick = d(q), $;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChatListProps, ChatListItemProps } from './types';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<ChatListProps> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: ShallowUnwrapRef<{
|
|
8
|
+
scrollToTop: () => void;
|
|
9
|
+
scrollToBottom: () => void;
|
|
10
|
+
}>) => void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {
|
|
13
|
+
'user-text'?: (props: {
|
|
14
|
+
item: ChatListItemProps;
|
|
15
|
+
}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
'assistant-text'?: (props: {
|
|
18
|
+
item: ChatListItemProps;
|
|
19
|
+
}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
extra?: (props: {
|
|
22
|
+
item: ChatListItemProps;
|
|
23
|
+
}) => any;
|
|
24
|
+
};
|
|
25
|
+
emit: {};
|
|
26
|
+
}>) => VNode & {
|
|
27
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
28
|
+
};
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} : {
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
|
+
}) & {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import { SScrollbar as t } from "../scrollbar/index.mjs";
|
|
4
|
+
import { child as n, createComponent as r, createFor as i, createIf as a, createSlot as o, defineVaporComponent as s, next as c, renderEffect as l, setClass as u, setInsertionState as d, setStaticTemplateRef as f, setText as p, template as m, toDisplayString as h, unref as g, useTemplateRef as _ } from "vue";
|
|
5
|
+
//#region ../components/src/chat-list/chat-list.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
+
var v = m(" "), y = m("<div><div><div></div></div><div>U</div>"), b = m("<div><div>AI</div><div><div></div></div>"), x = m("<div>"), S = m("<div>", 1), C = /*@__PURE__*/ s({
|
|
7
|
+
name: "SChatList",
|
|
8
|
+
__name: "chat-list",
|
|
9
|
+
props: { data: { default: () => [] } },
|
|
10
|
+
setup(s, { expose: m, slots: C }) {
|
|
11
|
+
let w = s, T = e("chat-list"), E = _("scrollRef");
|
|
12
|
+
m({
|
|
13
|
+
scrollToTop: () => {
|
|
14
|
+
E.value?.scrollTo(0);
|
|
15
|
+
},
|
|
16
|
+
scrollToBottom: () => {
|
|
17
|
+
E.value?.scrollToEnd("y", !1);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
let D = S();
|
|
21
|
+
return l(() => u(D, [g(T).b()])), d(D, null, 0), f(r(g(t), { padding: "20px" }, () => {
|
|
22
|
+
let e = x();
|
|
23
|
+
return l(() => u(e, [g(T).e("list")])), d(e, null, 0), i(() => w.data, (e) => {
|
|
24
|
+
let t = x();
|
|
25
|
+
return l(() => u(t, [g(T).e("item")])), d(t, null, 0), a(() => e.value.role === "user", () => {
|
|
26
|
+
let t = y(), r = n(t), i = n(r), a = c(r, 1);
|
|
27
|
+
return l(() => {
|
|
28
|
+
let e = g(T);
|
|
29
|
+
u(t, [e.e("user")]), u(r, [e.e("content"), e.e("user-content")]), u(i, [e.e("text"), e.e("user-text")]);
|
|
30
|
+
}), d(i, null, 0), o("user-text", { item: () => e.value }, () => {
|
|
31
|
+
let t = v();
|
|
32
|
+
return l(() => p(t, h(e.value?.content?.[0]?.data))), t;
|
|
33
|
+
}), l(() => {
|
|
34
|
+
let e = g(T);
|
|
35
|
+
u(a, [e.e("avatar"), e.e("user-avatar")]);
|
|
36
|
+
}), t;
|
|
37
|
+
}, () => a(() => e.value.role === "assistant", () => {
|
|
38
|
+
let t = b(), r = n(t), i = c(r, 1), a = n(i);
|
|
39
|
+
return l(() => {
|
|
40
|
+
let e = g(T);
|
|
41
|
+
u(t, [e.e("assistant")]), u(r, [e.e("avatar"), e.e("assistant-avatar")]), u(i, [e.e("content"), e.e("assistant-content")]), u(a, [e.e("text"), e.e("assistant-text")]);
|
|
42
|
+
}), d(a, null, 0), o("assistant-text", { item: () => e.value }, () => {
|
|
43
|
+
let t = v();
|
|
44
|
+
return l(() => p(t, h(e.value?.content?.[0]?.data))), t;
|
|
45
|
+
}), t;
|
|
46
|
+
}), 261), d(t, null, 1), a(() => C.extra, () => {
|
|
47
|
+
let t = x();
|
|
48
|
+
return l(() => u(t, [g(T).e("extra")])), d(t, null, 0), o("extra", { item: () => e.value }), t;
|
|
49
|
+
}), t;
|
|
50
|
+
}, (e) => e.datetime, 9), e;
|
|
51
|
+
}), E, null, "scrollRef"), D;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { C as default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ChatListItemProps } from './types.js';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
3
|
+
export declare const SChatList: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
slots: {
|
|
6
|
+
'user-text'?: (props: {
|
|
7
|
+
item: ChatListItemProps;
|
|
8
|
+
}) => any;
|
|
9
|
+
} & {
|
|
10
|
+
'assistant-text'?: (props: {
|
|
11
|
+
item: ChatListItemProps;
|
|
12
|
+
}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
extra?: (props: {
|
|
15
|
+
item: ChatListItemProps;
|
|
16
|
+
}) => any;
|
|
17
|
+
};
|
|
18
|
+
emit: {};
|
|
19
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
20
|
+
props: PublicProps & {
|
|
21
|
+
data?: ChatListItemProps[] | undefined;
|
|
22
|
+
} & (typeof globalThis extends {
|
|
23
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
24
|
+
} ? P : {});
|
|
25
|
+
expose: (exposed: ShallowUnwrapRef<{
|
|
26
|
+
scrollToTop: () => void;
|
|
27
|
+
scrollToBottom: () => void;
|
|
28
|
+
}>) => void;
|
|
29
|
+
attrs: any;
|
|
30
|
+
slots: {
|
|
31
|
+
'user-text'?: (props: {
|
|
32
|
+
item: ChatListItemProps;
|
|
33
|
+
}) => any;
|
|
34
|
+
} & {
|
|
35
|
+
'assistant-text'?: (props: {
|
|
36
|
+
item: ChatListItemProps;
|
|
37
|
+
}) => any;
|
|
38
|
+
} & {
|
|
39
|
+
extra?: (props: {
|
|
40
|
+
item: ChatListItemProps;
|
|
41
|
+
}) => any;
|
|
42
|
+
};
|
|
43
|
+
emit: {};
|
|
44
|
+
}>) => VNode & {
|
|
45
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
46
|
+
}) & Plugin;
|
|
47
|
+
export * from './types.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ChatListProps {
|
|
2
|
+
/** 聊天列表数据 */
|
|
3
|
+
data?: ChatListItemProps[];
|
|
4
|
+
}
|
|
5
|
+
export interface ChatListSlots {
|
|
6
|
+
/** 额外内容 */
|
|
7
|
+
extra?: (props: {
|
|
8
|
+
item: ChatListItemProps;
|
|
9
|
+
}) => any;
|
|
10
|
+
/** 用户文本 */
|
|
11
|
+
"user-text"?: (props: {
|
|
12
|
+
item: ChatListItemProps;
|
|
13
|
+
}) => any;
|
|
14
|
+
/** 助手文本 */
|
|
15
|
+
"assistant-text"?: (props: {
|
|
16
|
+
item: ChatListItemProps;
|
|
17
|
+
}) => any;
|
|
18
|
+
}
|
|
19
|
+
export interface ChatListItemProps {
|
|
20
|
+
/** 头像 */
|
|
21
|
+
avatar?: string;
|
|
22
|
+
/** 名称 */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** 时间 */
|
|
25
|
+
datetime?: string;
|
|
26
|
+
/** 角色 */
|
|
27
|
+
role?: "user" | "assistant" | "error" | "model-change" | "system";
|
|
28
|
+
/** 内容 */
|
|
29
|
+
content?: ChatListItemContentProps[];
|
|
30
|
+
/** 状态 */
|
|
31
|
+
status?: "error";
|
|
32
|
+
}
|
|
33
|
+
export interface ChatListItemContentProps {
|
|
34
|
+
/** 类型 */
|
|
35
|
+
type?: "text" | "markdown";
|
|
36
|
+
/** 数据 */
|
|
37
|
+
data?: any;
|
|
38
|
+
}
|
|
39
|
+
export interface ChatListExpose {
|
|
40
|
+
/** 滚动到顶部 */
|
|
41
|
+
scrollToTop: () => void;
|
|
42
|
+
/** 滚动到底部 */
|
|
43
|
+
scrollToBottom: () => void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChatSenderExpose, ChatSenderProps, ChatSenderSlots } from './types';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<(ChatSenderProps & {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
}) & {
|
|
7
|
+
onStop?: (() => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
+
onSend?: (() => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: ShallowUnwrapRef<ChatSenderExpose>) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: ChatSenderSlots;
|
|
16
|
+
emit: (((evt: "stop") => void) & ((evt: "send") => void)) & ((event: "update:modelValue", value: string) => void);
|
|
17
|
+
}>) => VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import t from "../../../icons/src/loading-stop.vue.mjs";
|
|
4
|
+
import n from "../../../icons/src/send.vue.mjs";
|
|
5
|
+
import "../../../icons/index.mjs";
|
|
6
|
+
import { SButton as r } from "../button/index.mjs";
|
|
7
|
+
import { child as i, createComponent as a, createIf as o, createInvoker as s, createSlot as c, createTemplateRefSetter as l, defineVaporComponent as u, delegateEvents as d, mergeModels as f, next as p, on as m, onMounted as h, ref as g, renderEffect as _, setClass as v, setInsertionState as y, setProp as b, setValue as x, template as S, unref as C, useModel as w, useTemplateRef as T, watch as E } from "vue";
|
|
8
|
+
//#region ../components/src/chat-sender/chat-sender.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
9
|
+
var D = S("<div><div><textarea></textarea></div><div></div>"), O = S("<div><div><textarea></textarea></div><div><div></div><div>"), k = S("<div>", 1);
|
|
10
|
+
d("input", "keydown");
|
|
11
|
+
var A = /*@__PURE__*/ u({
|
|
12
|
+
name: "SChatSender",
|
|
13
|
+
__name: "chat-sender",
|
|
14
|
+
props: /*@__PURE__*/ f({
|
|
15
|
+
modelValue: {},
|
|
16
|
+
loading: { type: Boolean },
|
|
17
|
+
autofocus: { type: Boolean },
|
|
18
|
+
placeholder: { default: "发消息..." },
|
|
19
|
+
updown: { type: Boolean }
|
|
20
|
+
}, {
|
|
21
|
+
modelValue: { default: "" },
|
|
22
|
+
modelModifiers: {}
|
|
23
|
+
}),
|
|
24
|
+
emits: /*@__PURE__*/ f(["send", "stop"], ["update:modelValue"]),
|
|
25
|
+
setup(u, { expose: d, emit: f }) {
|
|
26
|
+
let S = u, A = f, j = e("chat-sender"), M = w(u, "modelValue"), N = T("textareaRef"), P = () => {
|
|
27
|
+
let e = N.value;
|
|
28
|
+
if (!e) return;
|
|
29
|
+
let t = S.updown ? 1 : 2, n = getComputedStyle(e), r = parseInt(n.lineHeight, 10) || 20, i = (parseInt(n.paddingTop, 10) || 0) + (parseInt(n.paddingBottom, 10) || 0), a = t * r + i, o = 6 * r + i;
|
|
30
|
+
e.style.height = "0px";
|
|
31
|
+
let s = e.scrollHeight, c = s;
|
|
32
|
+
S.updown && M.value && s <= a && (c = a), c = Math.max(c, a), c = Math.min(c, o), e.style.height = `${c}px`;
|
|
33
|
+
}, F = g(!1), I = () => {
|
|
34
|
+
F.value = !0;
|
|
35
|
+
}, L = (e) => {
|
|
36
|
+
F.value = !1, R(e);
|
|
37
|
+
}, R = (e) => {
|
|
38
|
+
M.value = e.target.value;
|
|
39
|
+
}, z = () => {
|
|
40
|
+
M.value && A("send");
|
|
41
|
+
}, B = () => {
|
|
42
|
+
A("stop");
|
|
43
|
+
}, V = (e) => {
|
|
44
|
+
if (e.key === "Enter" && !e.ctrlKey && !e.metaKey && (e.preventDefault(), z()), e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
let t = e.target, n = t.selectionStart;
|
|
47
|
+
t.value = t.value.slice(0, n) + "\n" + t.value.slice(n), t.selectionStart = t.selectionEnd = n + 1;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
E(M, () => {
|
|
51
|
+
P();
|
|
52
|
+
}, { immediate: !0 }), h(() => {
|
|
53
|
+
P();
|
|
54
|
+
}), d();
|
|
55
|
+
let H = l(), U = k();
|
|
56
|
+
return _(() => v(U, [C(j).b()])), y(U, null, 0), o(() => u.updown, () => {
|
|
57
|
+
let e = D(), c = i(e), l = i(c), d = p(c, 1);
|
|
58
|
+
return l.$evtinput = s(R), m(l, "compositionend", L), m(l, "compositionstart", I), l.$evtkeydown = s(V), H(l, N, null, "textareaRef"), _(() => {
|
|
59
|
+
let t = C(j);
|
|
60
|
+
v(e, [t.e("updown-wrapper")]), v(c, [t.e("inner")]), x(l, M.value), v(l, [t.e("textarea")]), b(l, "autofocus", u.autofocus), b(l, "placeholder", u.placeholder), v(d, [t.e("operation")]);
|
|
61
|
+
}), y(d, null, 0), a(C(r), {
|
|
62
|
+
type: "primary",
|
|
63
|
+
circle: "",
|
|
64
|
+
disabled: () => !M.value,
|
|
65
|
+
secondary: () => !M.value,
|
|
66
|
+
onClick: () => z
|
|
67
|
+
}, { icon: () => a(C(n), { style: "height: 20px; width: 20px" }) }), y(d, null, 1), o(() => u.loading, () => a(C(r), {
|
|
68
|
+
type: "primary",
|
|
69
|
+
circle: "",
|
|
70
|
+
onClick: () => B
|
|
71
|
+
}, { icon: () => a(C(t), { style: "height: 20px; width: 20px" }) })), e;
|
|
72
|
+
}, () => {
|
|
73
|
+
let e = O(), l = i(e), d = i(l), f = p(l, 1), h = i(f), g = p(h, 1);
|
|
74
|
+
return d.$evtinput = s(R), m(d, "compositionend", L), m(d, "compositionstart", I), d.$evtkeydown = s(V), H(d, N, null, "textareaRef"), _(() => {
|
|
75
|
+
let t = C(j);
|
|
76
|
+
v(e, [t.e("wrapper")]), v(l, [t.e("inner")]), x(d, M.value), v(d, [t.e("textarea")]), b(d, "autofocus", u.autofocus), b(d, "placeholder", u.placeholder), v(f, [t.e("footer")]), v(h, t.e("extra"));
|
|
77
|
+
}), y(h, null, 0), c("extra"), _(() => v(g, [C(j).e("operation")])), y(g, null, 0), a(C(r), {
|
|
78
|
+
type: "primary",
|
|
79
|
+
circle: "",
|
|
80
|
+
disabled: () => !M.value,
|
|
81
|
+
secondary: () => !M.value,
|
|
82
|
+
onClick: () => z
|
|
83
|
+
}, { icon: () => a(C(n), { style: "height: 20px; width: 20px" }) }), y(g, null, 1), o(() => u.loading, () => a(C(r), {
|
|
84
|
+
type: "primary",
|
|
85
|
+
circle: "",
|
|
86
|
+
onClick: () => B
|
|
87
|
+
}, { icon: () => a(C(t), { style: "height: 20px; width: 20px" }) })), e;
|
|
88
|
+
}, 517), U;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
export { A as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChatSenderSlots, ChatSenderExpose } from './types.js';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
3
|
+
export declare const SChatSender: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
slots: ChatSenderSlots;
|
|
6
|
+
emit: (((evt: "stop") => void) & ((evt: "send") => void)) & ((event: "update:modelValue", value: string) => void);
|
|
7
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: PublicProps & {
|
|
9
|
+
modelValue?: string | undefined;
|
|
10
|
+
loading?: boolean | undefined;
|
|
11
|
+
autofocus?: boolean | undefined;
|
|
12
|
+
placeholder?: string | undefined;
|
|
13
|
+
updown?: boolean | undefined;
|
|
14
|
+
onStop?: (() => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
onSend?: (() => any) | undefined;
|
|
17
|
+
} & (typeof globalThis extends {
|
|
18
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
19
|
+
} ? P : {});
|
|
20
|
+
expose: (exposed: ShallowUnwrapRef<ChatSenderExpose>) => void;
|
|
21
|
+
attrs: any;
|
|
22
|
+
slots: ChatSenderSlots;
|
|
23
|
+
emit: (((evt: "stop") => void) & ((evt: "send") => void)) & ((event: "update:modelValue", value: string) => void);
|
|
24
|
+
}>) => VNode & {
|
|
25
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
|
+
}) & Plugin;
|
|
27
|
+
export * from './types.js';
|