@vunk/plus 1.11.10 → 1.12.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/components/agent-chat-provider/index.mjs +1 -1
- package/components/avatar/index.mjs +1 -1
- package/components/broadcasting-markdown/index.mjs +3 -3
- package/components/bubble-list/index.mjs +3 -3
- package/components/bubble-templates/index.mjs +1 -1
- package/components/chat-independent/index.mjs +1 -1
- package/components/drawer/index.css +92 -92
- package/components/drawer/index.mjs +1 -1
- package/components/lottie-animation/index.mjs +1 -1
- package/components/metahuman-broadcasting/index.mjs +1 -1
- package/components/monaco-editor/index.mjs +1 -1
- package/components/monaco-environment/index.mjs +1 -1
- package/components/pixi-frame/index.mjs +9 -9
- package/components/recorder-button/index.mjs +1 -1
- package/components/routes-menu-content/index.mjs +3 -3
- package/components/scrollbar/index.mjs +3 -3
- package/components/sender/index.mjs +2 -2
- package/components/speech-button/index.mjs +3 -3
- package/components/table-columns/index.mjs +1 -1
- package/components/tables-v1/index.mjs +1 -1
- package/components/tables-v1-checkbox/index.mjs +1 -1
- package/components/text/index.mjs +1 -1
- package/components/thinking/index.css +125 -0
- package/components/thinking/index.d.ts +4 -0
- package/components/thinking/index.mjs +357 -0
- package/components/thinking/src/ctx.d.ts +121 -0
- package/components/thinking/src/index.vue.d.ts +2193 -0
- package/components/thinking/src/types.d.ts +46 -0
- package/components/typing-markdown/index.mjs +1 -1
- package/components/vditor/index.mjs +3 -3
- package/components/xgplayer/index.mjs +2 -2
- package/element/bubble/index.mjs +1 -1
- package/element/index.css +1 -1
- package/element/thinking/index.mjs +1 -1
- package/icons/end/index.mjs +1 -1
- package/icons/keyboard/index.mjs +1 -1
- package/icons/start/index.mjs +1 -1
- package/icons/voice/index.mjs +1 -1
- package/index.css +219 -93
- package/package.json +8 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
.vk-thinking {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-width: var(--vk-thinking-max-width);
|
|
4
|
+
color: var(--vk-thinking-color);
|
|
5
|
+
font-size: var(--vk-thinking-font-size-base);
|
|
6
|
+
}
|
|
7
|
+
.vk-thinking__card {
|
|
8
|
+
width: 100%;
|
|
9
|
+
border: 1px solid var(--vk-thinking-border-color);
|
|
10
|
+
border-radius: var(--vk-thinking-radius);
|
|
11
|
+
background: var(--vk-thinking-background-color);
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
.vk-thinking__header {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: 16px;
|
|
20
|
+
padding: 1.5em 1.75em;
|
|
21
|
+
}
|
|
22
|
+
.vk-thinking__card.is-expanded .vk-thinking__header {
|
|
23
|
+
padding-bottom: 0.75em;
|
|
24
|
+
}
|
|
25
|
+
.vk-thinking__toggle {
|
|
26
|
+
min-width: var(--vk-thinking-button-width);
|
|
27
|
+
flex: 1;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 12px;
|
|
31
|
+
padding: 0;
|
|
32
|
+
border: 0;
|
|
33
|
+
background: transparent;
|
|
34
|
+
color: inherit;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
text-align: left;
|
|
37
|
+
}
|
|
38
|
+
.vk-thinking__toggle:disabled {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
}
|
|
41
|
+
.vk-thinking__title {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: baseline;
|
|
45
|
+
color: var(--el-text-color-primary);
|
|
46
|
+
font-size: var(--vk-thinking-font-size-title);
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
line-height: 1.5;
|
|
49
|
+
}
|
|
50
|
+
.vk-thinking__card.is-thinking .vk-thinking__title {
|
|
51
|
+
animation: vk-thinking-blink 1.6s ease-in-out infinite;
|
|
52
|
+
}
|
|
53
|
+
.vk-thinking__caret {
|
|
54
|
+
font-size: var(--vk-thinking-font-size-caret);
|
|
55
|
+
flex: none;
|
|
56
|
+
color: var(--el-text-color-secondary);
|
|
57
|
+
transform: rotate(0deg);
|
|
58
|
+
transform-origin: center;
|
|
59
|
+
transition: transform var(--vk-thinking-animation-duration) ease;
|
|
60
|
+
}
|
|
61
|
+
.vk-thinking__caret.is-expanded {
|
|
62
|
+
transform: rotate(90deg);
|
|
63
|
+
}
|
|
64
|
+
.vk-thinking__skip {
|
|
65
|
+
flex: none;
|
|
66
|
+
padding: 0;
|
|
67
|
+
border: 0;
|
|
68
|
+
background: transparent;
|
|
69
|
+
color: var(--el-text-color-secondary);
|
|
70
|
+
font-size: var(--vk-thinking-font-size-skip);
|
|
71
|
+
line-height: 1.5;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
.vk-thinking__skip:hover {
|
|
76
|
+
color: var(--el-text-color-primary);
|
|
77
|
+
}
|
|
78
|
+
.vk-thinking__body {
|
|
79
|
+
padding: 0 1.75em 1.5em;
|
|
80
|
+
}
|
|
81
|
+
.vk-thinking__content {
|
|
82
|
+
color: var(--vk-thinking-color);
|
|
83
|
+
font-size: var(--vk-thinking-font-size-content);
|
|
84
|
+
line-height: 2;
|
|
85
|
+
white-space: pre-wrap;
|
|
86
|
+
word-break: break-word;
|
|
87
|
+
}
|
|
88
|
+
.vk-thinking__content p,
|
|
89
|
+
.vk-thinking__content ul,
|
|
90
|
+
.vk-thinking__content ol {
|
|
91
|
+
margin: 0 0 12px;
|
|
92
|
+
}
|
|
93
|
+
.vk-thinking__content ul,
|
|
94
|
+
.vk-thinking__content ol {
|
|
95
|
+
padding-left: 24px;
|
|
96
|
+
}
|
|
97
|
+
.vk-thinking__content li{
|
|
98
|
+
margin-bottom: 8px;
|
|
99
|
+
}
|
|
100
|
+
.vk-thinking__card.is-disabled {
|
|
101
|
+
opacity: 0.7;
|
|
102
|
+
}
|
|
103
|
+
@keyframes vk-thinking-blink {
|
|
104
|
+
0%,
|
|
105
|
+
100% {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
50% {
|
|
109
|
+
opacity: 0.58;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
@media (width <= 768px) {
|
|
113
|
+
.vk-thinking {
|
|
114
|
+
--vk-thinking-font-size-base: 14px;
|
|
115
|
+
}
|
|
116
|
+
.vk-thinking__header {
|
|
117
|
+
padding: 1.2857em 1.4286em;
|
|
118
|
+
}
|
|
119
|
+
.vk-thinking__card.is-expanded .vk-thinking__header {
|
|
120
|
+
padding-bottom: 0.7143em;
|
|
121
|
+
}
|
|
122
|
+
.vk-thinking__body {
|
|
123
|
+
padding: 0 1.4286em 1.2857em;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, watch, computed, nextTick, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, toDisplayString, createVNode, withCtx, withModifiers, createCommentVNode, withDirectives, renderSlot, vShow } from 'vue';
|
|
2
|
+
import { c as arrow_right_bold_default } from '../index2.mjs';
|
|
3
|
+
import { VkScrollbar } from '@vunk/plus/components/scrollbar';
|
|
4
|
+
import { ElCollapseTransition, ElIcon } from 'element-plus';
|
|
5
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
6
|
+
|
|
7
|
+
const props = {
|
|
8
|
+
/**
|
|
9
|
+
* @description 展开/收起状态(v-model)
|
|
10
|
+
*/
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description 思考内容文本
|
|
17
|
+
*/
|
|
18
|
+
content: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* @description 当前思考状态
|
|
24
|
+
*/
|
|
25
|
+
status: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "start"
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @description 是否禁用交互
|
|
31
|
+
*/
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @description status=end 时是否自动收起
|
|
38
|
+
*/
|
|
39
|
+
autoCollapse: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* @description 动画过渡时长
|
|
45
|
+
*/
|
|
46
|
+
duration: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "0.2s"
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* @description 头部触发按钮最小宽度
|
|
52
|
+
*/
|
|
53
|
+
buttonWidth: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "160px"
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* @description 组件最大宽度
|
|
59
|
+
*/
|
|
60
|
+
maxWidth: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "100%"
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* @description 卡片背景色
|
|
66
|
+
*/
|
|
67
|
+
backgroundColor: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "#fcfcfc"
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* @description 正文字体颜色
|
|
73
|
+
*/
|
|
74
|
+
color: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "var(--el-color-info)"
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* @description 标题文案
|
|
80
|
+
*/
|
|
81
|
+
title: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "\u5206\u6790\u7528\u6237\u9700\u6C42"
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* @description 跳过按钮文案
|
|
87
|
+
*/
|
|
88
|
+
skipText: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "\u8DF3\u8FC7\u601D\u8003"
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* @description 是否显示跳过按钮
|
|
94
|
+
*/
|
|
95
|
+
showSkip: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* @description 卡片圆角
|
|
101
|
+
*/
|
|
102
|
+
radius: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: "22px"
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* @description 卡片边框颜色
|
|
108
|
+
*/
|
|
109
|
+
borderColor: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: "#e4e7ed"
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* @description 内容区域最大高度(超过后滚动)
|
|
115
|
+
*/
|
|
116
|
+
maxHeight: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: ""
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const emits = {
|
|
122
|
+
"change": null,
|
|
123
|
+
"update:modelValue": null,
|
|
124
|
+
"skip": null
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
|
+
...{
|
|
129
|
+
name: "VkThinking",
|
|
130
|
+
inheritAttrs: false
|
|
131
|
+
},
|
|
132
|
+
__name: "index",
|
|
133
|
+
props: props,
|
|
134
|
+
emits,
|
|
135
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
136
|
+
__expose();
|
|
137
|
+
const props = __props;
|
|
138
|
+
const emit = __emit;
|
|
139
|
+
const slots = useSlots();
|
|
140
|
+
const isExpanded = ref(props.modelValue);
|
|
141
|
+
watch(
|
|
142
|
+
() => props.modelValue,
|
|
143
|
+
(newVal) => {
|
|
144
|
+
isExpanded.value = newVal;
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
watch(
|
|
148
|
+
() => props.status,
|
|
149
|
+
(newVal) => {
|
|
150
|
+
if (newVal === "end" && props.autoCollapse) {
|
|
151
|
+
isExpanded.value = false;
|
|
152
|
+
emit("update:modelValue", false);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
const displayedContent = computed(() => {
|
|
157
|
+
return props.status === "error" ? "\u601D\u8003\u8FC7\u7A0B\u4E2D\u51FA\u73B0\u9519\u8BEF" : props.content;
|
|
158
|
+
});
|
|
159
|
+
const hasContent = computed(() => {
|
|
160
|
+
return Boolean(slots.default) || Boolean(displayedContent.value);
|
|
161
|
+
});
|
|
162
|
+
const showSkipAction = computed(() => {
|
|
163
|
+
return props.showSkip && !props.disabled && props.status === "thinking";
|
|
164
|
+
});
|
|
165
|
+
const titleText = computed(() => {
|
|
166
|
+
if (props.status === "error")
|
|
167
|
+
return "\u5206\u6790\u51FA\u73B0\u95EE\u9898";
|
|
168
|
+
if (props.status === "cancel")
|
|
169
|
+
return "\u5DF2\u8DF3\u8FC7\u601D\u8003";
|
|
170
|
+
return props.title;
|
|
171
|
+
});
|
|
172
|
+
const cssVars = computed(() => ({
|
|
173
|
+
"--vk-thinking-animation-duration": props.duration,
|
|
174
|
+
"--vk-thinking-button-width": props.buttonWidth,
|
|
175
|
+
"--vk-thinking-max-width": props.maxWidth,
|
|
176
|
+
"--vk-thinking-background-color": props.backgroundColor,
|
|
177
|
+
"--vk-thinking-color": props.color,
|
|
178
|
+
"--vk-thinking-radius": props.radius,
|
|
179
|
+
"--vk-thinking-border-color": props.borderColor,
|
|
180
|
+
"--vk-thinking-body-max-height": props.maxHeight || "none",
|
|
181
|
+
"--vk-thinking-font-size-base": "16px",
|
|
182
|
+
"--vk-thinking-font-size-title": "1.125em",
|
|
183
|
+
"--vk-thinking-font-size-skip": "1em",
|
|
184
|
+
"--vk-thinking-font-size-content": "0.9em",
|
|
185
|
+
"--vk-thinking-font-size-caret": "0.8125em"
|
|
186
|
+
}));
|
|
187
|
+
const scrollbarRef = ref();
|
|
188
|
+
watch(
|
|
189
|
+
() => [props.content, isExpanded.value, props.status],
|
|
190
|
+
() => {
|
|
191
|
+
if (props.status === "thinking" && isExpanded.value) {
|
|
192
|
+
nextTick(() => {
|
|
193
|
+
scrollbarRef.value?.scrollToBottom({
|
|
194
|
+
behavior: "auto"
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{ flush: "post" }
|
|
200
|
+
);
|
|
201
|
+
function emitChange() {
|
|
202
|
+
emit("change", {
|
|
203
|
+
value: isExpanded.value,
|
|
204
|
+
status: props.status
|
|
205
|
+
});
|
|
206
|
+
emit("update:modelValue", isExpanded.value);
|
|
207
|
+
}
|
|
208
|
+
function toggleExpand() {
|
|
209
|
+
if (props.disabled || !hasContent.value)
|
|
210
|
+
return;
|
|
211
|
+
isExpanded.value = !isExpanded.value;
|
|
212
|
+
emitChange();
|
|
213
|
+
}
|
|
214
|
+
function skipThinking() {
|
|
215
|
+
if (props.disabled)
|
|
216
|
+
return;
|
|
217
|
+
isExpanded.value = false;
|
|
218
|
+
emitChange();
|
|
219
|
+
emit("skip", {
|
|
220
|
+
value: false,
|
|
221
|
+
status: props.status
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
const __returned__ = { props, emit, slots, isExpanded, displayedContent, hasContent, showSkipAction, titleText, cssVars, scrollbarRef, emitChange, toggleExpand, skipThinking, get ArrowRightBold() {
|
|
225
|
+
return arrow_right_bold_default;
|
|
226
|
+
}, get VkScrollbar() {
|
|
227
|
+
return VkScrollbar;
|
|
228
|
+
}, get ElCollapseTransition() {
|
|
229
|
+
return ElCollapseTransition;
|
|
230
|
+
}, get ElIcon() {
|
|
231
|
+
return ElIcon;
|
|
232
|
+
} };
|
|
233
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
234
|
+
return __returned__;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
const _hoisted_1 = { class: "vk-thinking__header" };
|
|
239
|
+
const _hoisted_2 = ["disabled"];
|
|
240
|
+
const _hoisted_3 = { class: "vk-thinking__title" };
|
|
241
|
+
const _hoisted_4 = { class: "vk-thinking__body" };
|
|
242
|
+
const _hoisted_5 = { class: "vk-thinking__content" };
|
|
243
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
244
|
+
return openBlock(), createElementBlock(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
class: "vk-thinking",
|
|
248
|
+
style: normalizeStyle($setup.cssVars)
|
|
249
|
+
},
|
|
250
|
+
[
|
|
251
|
+
createElementVNode(
|
|
252
|
+
"section",
|
|
253
|
+
{
|
|
254
|
+
class: normalizeClass(["vk-thinking__card", [
|
|
255
|
+
`is-${_ctx.status}`,
|
|
256
|
+
{
|
|
257
|
+
"is-disabled": _ctx.disabled,
|
|
258
|
+
"is-expanded": $setup.isExpanded && $setup.hasContent
|
|
259
|
+
}
|
|
260
|
+
]])
|
|
261
|
+
},
|
|
262
|
+
[
|
|
263
|
+
createElementVNode("header", _hoisted_1, [
|
|
264
|
+
createElementVNode("button", {
|
|
265
|
+
class: "vk-thinking__toggle",
|
|
266
|
+
type: "button",
|
|
267
|
+
disabled: _ctx.disabled,
|
|
268
|
+
onClick: $setup.toggleExpand
|
|
269
|
+
}, [
|
|
270
|
+
createElementVNode(
|
|
271
|
+
"span",
|
|
272
|
+
_hoisted_3,
|
|
273
|
+
toDisplayString($setup.titleText) + "\uFF1A",
|
|
274
|
+
1
|
|
275
|
+
/* TEXT */
|
|
276
|
+
),
|
|
277
|
+
createVNode($setup["ElIcon"], {
|
|
278
|
+
class: normalizeClass(["vk-thinking__caret", { "is-expanded": $setup.isExpanded }])
|
|
279
|
+
}, {
|
|
280
|
+
default: withCtx(() => [
|
|
281
|
+
createVNode($setup["ArrowRightBold"])
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
/* STABLE */
|
|
285
|
+
}, 8, ["class"])
|
|
286
|
+
], 8, _hoisted_2),
|
|
287
|
+
$setup.showSkipAction ? (openBlock(), createElementBlock(
|
|
288
|
+
"button",
|
|
289
|
+
{
|
|
290
|
+
key: 0,
|
|
291
|
+
class: "vk-thinking__skip",
|
|
292
|
+
type: "button",
|
|
293
|
+
onClick: withModifiers($setup.skipThinking, ["stop"])
|
|
294
|
+
},
|
|
295
|
+
toDisplayString(_ctx.skipText),
|
|
296
|
+
1
|
|
297
|
+
/* TEXT */
|
|
298
|
+
)) : createCommentVNode("v-if", true)
|
|
299
|
+
]),
|
|
300
|
+
createVNode($setup["ElCollapseTransition"], null, {
|
|
301
|
+
default: withCtx(() => [
|
|
302
|
+
withDirectives(createElementVNode(
|
|
303
|
+
"div",
|
|
304
|
+
_hoisted_4,
|
|
305
|
+
[
|
|
306
|
+
createVNode($setup["VkScrollbar"], {
|
|
307
|
+
ref: "scrollbarRef",
|
|
308
|
+
class: "vk-thinking__scrollbar",
|
|
309
|
+
"max-height": _ctx.maxHeight
|
|
310
|
+
}, {
|
|
311
|
+
default: withCtx(() => [
|
|
312
|
+
renderSlot(_ctx.$slots, "default", {
|
|
313
|
+
content: $setup.displayedContent,
|
|
314
|
+
status: _ctx.status
|
|
315
|
+
}, () => [
|
|
316
|
+
createElementVNode(
|
|
317
|
+
"div",
|
|
318
|
+
_hoisted_5,
|
|
319
|
+
toDisplayString($setup.displayedContent),
|
|
320
|
+
1
|
|
321
|
+
/* TEXT */
|
|
322
|
+
)
|
|
323
|
+
])
|
|
324
|
+
]),
|
|
325
|
+
_: 3
|
|
326
|
+
/* FORWARDED */
|
|
327
|
+
}, 8, ["max-height"])
|
|
328
|
+
],
|
|
329
|
+
512
|
|
330
|
+
/* NEED_PATCH */
|
|
331
|
+
), [
|
|
332
|
+
[vShow, $setup.isExpanded && $setup.hasContent]
|
|
333
|
+
])
|
|
334
|
+
]),
|
|
335
|
+
_: 3
|
|
336
|
+
/* FORWARDED */
|
|
337
|
+
})
|
|
338
|
+
],
|
|
339
|
+
2
|
|
340
|
+
/* CLASS */
|
|
341
|
+
)
|
|
342
|
+
],
|
|
343
|
+
4
|
|
344
|
+
/* STYLE */
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
var VkThinking = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\labCode\\vunk-plus\\packages\\components\\thinking\\src\\index.vue"]]);
|
|
348
|
+
|
|
349
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
350
|
+
__proto__: null
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
VkThinking.install = (app) => {
|
|
354
|
+
app.component(VkThinking.name || "VkThinking", VkThinking);
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export { VkThinking, types as __VkThinking, VkThinking as default };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ThinkingStatus } from './types';
|
|
3
|
+
export declare const props: {
|
|
4
|
+
/**
|
|
5
|
+
* @description 展开/收起状态(v-model)
|
|
6
|
+
*/
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description 思考内容文本
|
|
13
|
+
*/
|
|
14
|
+
content: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @description 当前思考状态
|
|
20
|
+
*/
|
|
21
|
+
status: {
|
|
22
|
+
type: PropType<ThinkingStatus>;
|
|
23
|
+
default: ThinkingStatus;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @description 是否禁用交互
|
|
27
|
+
*/
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @description status=end 时是否自动收起
|
|
34
|
+
*/
|
|
35
|
+
autoCollapse: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @description 动画过渡时长
|
|
41
|
+
*/
|
|
42
|
+
duration: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @description 头部触发按钮最小宽度
|
|
48
|
+
*/
|
|
49
|
+
buttonWidth: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @description 组件最大宽度
|
|
55
|
+
*/
|
|
56
|
+
maxWidth: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @description 卡片背景色
|
|
62
|
+
*/
|
|
63
|
+
backgroundColor: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @description 正文字体颜色
|
|
69
|
+
*/
|
|
70
|
+
color: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* @description 标题文案
|
|
76
|
+
*/
|
|
77
|
+
title: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* @description 跳过按钮文案
|
|
83
|
+
*/
|
|
84
|
+
skipText: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* @description 是否显示跳过按钮
|
|
90
|
+
*/
|
|
91
|
+
showSkip: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @description 卡片圆角
|
|
97
|
+
*/
|
|
98
|
+
radius: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* @description 卡片边框颜色
|
|
104
|
+
*/
|
|
105
|
+
borderColor: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* @description 内容区域最大高度(超过后滚动)
|
|
111
|
+
*/
|
|
112
|
+
maxHeight: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export declare const emits: {
|
|
118
|
+
change: null;
|
|
119
|
+
'update:modelValue': null;
|
|
120
|
+
skip: null;
|
|
121
|
+
};
|