@blueking/ai-blueking 0.0.4 → 0.0.6

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 CHANGED
@@ -22,11 +22,11 @@ npm i @blueking/ai-blueking
22
22
  :prompts="prompts"
23
23
  :size-limit="sizeLimit"
24
24
  :start-position="startPosition"
25
- :start-size="startSize"
26
25
  @choose-prompt="handleChoosePrompt"
27
26
  @clear="handleClear"
28
27
  @close="handleClose"
29
28
  @send="handleSend"
29
+ @scroll="handleScroll"
30
30
  />
31
31
  </div>
32
32
  </template>
@@ -101,13 +101,10 @@ npm i @blueking/ai-blueking
101
101
  };
102
102
  // 初始位置
103
103
  const startPosition = {
104
+ top: window.innerHeight - 560,
105
+ bottom: 0,
106
+ left: window.innerWidth - 400,
104
107
  right: 0,
105
- left: window.innerWidth - sizeLimit.width,
106
- };
107
- // 初始大小
108
- const startSize = {
109
- height: 560,
110
- width: 400,
111
108
  };
112
109
 
113
110
  const handleClear = () => {
@@ -118,6 +115,10 @@ npm i @blueking/ai-blueking
118
115
  console.log('trigger send', val);
119
116
  };
120
117
 
118
+ const handleScroll = (event: Event) => {
119
+ console.log('trigger scroll', event);
120
+ };
121
+
121
122
  const handleClose = () => {
122
123
  console.log('trigger close');
123
124
  };
@@ -148,11 +149,11 @@ npm i @blueking/bkui-library
148
149
  :prompts="prompts"
149
150
  :size-limit="sizeLimit"
150
151
  :start-position="startPosition"
151
- :start-size="startSize"
152
152
  @choose-prompt="handleChoosePrompt"
153
153
  @clear="handleClear"
154
154
  @close="handleClose"
155
155
  @send="handleSend"
156
+ @scroll="handleScroll"
156
157
  />
157
158
  </div>
158
159
  </template>
@@ -221,12 +222,10 @@ npm i @blueking/bkui-library
221
222
  width: 400,
222
223
  },
223
224
  startPosition: {
224
- right: 0,
225
+ top: window.innerHeight - 560,
226
+ bottom: 0,
225
227
  left: window.innerWidth - 400,
226
- },
227
- startSize: {
228
- height: 560,
229
- width: 400,
228
+ right: 0,
230
229
  },
231
230
  };
232
231
  },
@@ -243,6 +242,9 @@ npm i @blueking/bkui-library
243
242
  handleChoosePrompt(prompt) {
244
243
  console.log('choose prompt', prompt);
245
244
  },
245
+ handleScroll(event: Event) {
246
+ console.log('trigger scroll', event);
247
+ },
246
248
  },
247
249
  };
248
250
  </script>
@@ -8,7 +8,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
8
8
  positionLimit?: IPositionLimit | undefined;
9
9
  sizeLimit?: ISize | undefined;
10
10
  startPosition?: IStartPosition | undefined;
11
- startSize?: ISize | undefined;
12
11
  userPhoto?: string | undefined;
13
12
  logo?: string | undefined;
14
13
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -16,6 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
16
15
  clear: () => void;
17
16
  send: (val: string) => void;
18
17
  "choose-prompt": (prompt: IPrompt) => void;
18
+ scroll: (data: Event) => void;
19
19
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
20
20
  messages: IMessage[];
21
21
  prompts?: IPrompt[] | undefined;
@@ -25,10 +25,10 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
25
25
  positionLimit?: IPositionLimit | undefined;
26
26
  sizeLimit?: ISize | undefined;
27
27
  startPosition?: IStartPosition | undefined;
28
- startSize?: ISize | undefined;
29
28
  userPhoto?: string | undefined;
30
29
  logo?: string | undefined;
31
30
  }>>> & {
31
+ onScroll?: ((data: Event) => any) | undefined;
32
32
  "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
33
33
  onClear?: (() => any) | undefined;
34
34
  onSend?: ((val: string) => any) | undefined;
@@ -10,6 +10,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
10
10
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
11
  send: (userInput: string) => void;
12
12
  "choose-prompt": (prompt: IPrompt) => void;
13
+ scroll: (data: Event) => void;
13
14
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
14
15
  messages: IMessage[];
15
16
  prompts?: IPrompt[] | undefined;
@@ -19,6 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
19
20
  }>, {
20
21
  background: string;
21
22
  }>>> & {
23
+ onScroll?: ((data: Event) => any) | undefined;
22
24
  "onChoose-prompt"?: ((prompt: IPrompt) => any) | undefined;
23
25
  onSend?: ((userInput: string) => any) | undefined;
24
26
  }, {
@@ -5,7 +5,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
5
5
  sizeLimit?: ISize | undefined;
6
6
  logo?: string | undefined;
7
7
  startPosition?: IStartPosition | undefined;
8
- startSize?: ISize | undefined;
9
8
  }>, {
10
9
  headBackground: string;
11
10
  positionLimit: () => {
@@ -18,9 +17,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
17
  height: number;
19
18
  width: number;
20
19
  };
21
- startSize: () => {
22
- height: number;
23
- width: number;
20
+ startPosition: () => {
21
+ top: number;
22
+ bottom: number;
23
+ left: number;
24
+ right: number;
24
25
  };
25
26
  logo: string;
26
27
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -32,7 +33,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
32
33
  sizeLimit?: ISize | undefined;
33
34
  logo?: string | undefined;
34
35
  startPosition?: IStartPosition | undefined;
35
- startSize?: ISize | undefined;
36
36
  }>, {
37
37
  headBackground: string;
38
38
  positionLimit: () => {
@@ -45,9 +45,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
45
45
  height: number;
46
46
  width: number;
47
47
  };
48
- startSize: () => {
49
- height: number;
50
- width: number;
48
+ startPosition: () => {
49
+ top: number;
50
+ bottom: number;
51
+ left: number;
52
+ right: number;
51
53
  };
52
54
  logo: string;
53
55
  }>>> & {
@@ -58,7 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
58
60
  positionLimit: IPositionLimit;
59
61
  sizeLimit: ISize;
60
62
  logo: string;
61
- startSize: ISize;
63
+ startPosition: IStartPosition;
62
64
  }, {}>, {
63
65
  default?(_: {}): any;
64
66
  }>;