vue-element-ui-x 0.1.9-beta → 0.1.10-beta
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/lib/components/Attachments/index.js +2 -2
- package/lib/components/Bubble/index.js +47 -34
- package/lib/components/BubbleList/index.js +57 -49
- package/lib/components/Conversations/index.js +27 -64
- package/lib/components/FilesCard/index.js +1 -1
- package/lib/components/Prompts/index.js +21 -21
- package/lib/components/Sender/index.js +4 -4
- package/lib/components/Think/index.js +1 -1
- package/lib/components/Thinking/index.js +1 -1
- package/lib/components/ThoughtChain/index.js +47 -34
- package/lib/components/Typewriter/index.js +46 -33
- package/lib/components/Welcome/index.js +1 -1
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +220 -160
- package/lib/index.umd.js +1 -1
- package/lib/mixins/index.js +105 -16
- package/package.json +1 -1
- package/src/components/Attachments/index.js +8 -8
- package/src/components/Bubble/index.js +6 -6
- package/src/components/Bubble/src/main.vue +299 -299
- package/src/components/BubbleList/index.js +8 -8
- package/src/components/BubbleList/src/loading.vue +75 -75
- package/src/components/BubbleList/src/main.vue +461 -466
- package/src/components/Conversations/index.js +8 -8
- package/src/components/Conversations/src/components/item.vue +13 -34
- package/src/components/Conversations/src/main.vue +4 -18
- package/src/components/FilesCard/index.js +8 -8
- package/src/components/FilesCard/src/fileSvg/audio.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/code.vue +35 -35
- package/src/components/FilesCard/src/fileSvg/database.vue +94 -94
- package/src/components/FilesCard/src/fileSvg/excel.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/file.vue +40 -40
- package/src/components/FilesCard/src/fileSvg/image.vue +40 -40
- package/src/components/FilesCard/src/fileSvg/index.js +46 -46
- package/src/components/FilesCard/src/fileSvg/link.vue +54 -54
- package/src/components/FilesCard/src/fileSvg/mark.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/pdf.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/ppt.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/three.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/txt.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/unknown.vue +54 -54
- package/src/components/FilesCard/src/fileSvg/video.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/word.vue +38 -38
- package/src/components/FilesCard/src/fileSvg/zip.vue +38 -38
- package/src/components/FilesCard/src/options.js +18 -18
- package/src/components/Prompts/index.js +8 -8
- package/src/components/Prompts/src/main.vue +248 -248
- package/src/components/Sender/index.js +8 -8
- package/src/components/Sender/src/components/ClearButton.vue +28 -28
- package/src/components/Sender/src/components/Loading.vue +53 -53
- package/src/components/Sender/src/components/LoadingButton.vue +39 -39
- package/src/components/Sender/src/components/SendButton.vue +26 -26
- package/src/components/Sender/src/components/SpeechButton.vue +24 -24
- package/src/components/Sender/src/components/SpeechLoading.vue +87 -87
- package/src/components/Sender/src/components/SpeechLoadingButton.vue +43 -43
- package/src/components/Think/index.js +8 -8
- package/src/components/Think/src/main.vue +190 -190
- package/src/components/Thinking/index.js +8 -8
- package/src/components/ThoughtChain/index.js +8 -8
- package/src/components/Typewriter/index.js +8 -8
- package/src/components/Typewriter/src/main.vue +10 -2
- package/src/components/Welcome/index.js +8 -8
- package/src/components/Welcome/src/main.vue +151 -151
- package/src/mixins/recordMixin.js +0 -1
- package/src/mixins/sendMixin.js +104 -11
- package/src/mixins/streamMixin.js +3 -5
- package/src/styles/Attachments.scss +236 -236
- package/src/styles/Bubble.scss +157 -157
- package/src/styles/BubbleList.scss +148 -148
- package/src/styles/Conversations.scss +260 -260
- package/src/styles/FilesCard.scss +221 -221
- package/src/styles/Prompts.scss +195 -195
- package/src/styles/Sender.scss +199 -199
- package/src/styles/Think.scss +134 -134
- package/src/styles/ThoughtChain.scss +113 -113
- package/src/styles/Typewriter.scss +66 -66
- package/src/theme/var.scss +72 -72
- package/src/styles/button.scss +0 -302
- package/src/styles/var.scss +0 -1052
|
@@ -1,248 +1,248 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="['el-x-prompts', { 'el-x-prompts-rtl': direction === 'rtl' }, rootClassName]"
|
|
4
|
-
:style="customStyle"
|
|
5
|
-
>
|
|
6
|
-
<!-- 标题 -->
|
|
7
|
-
<h5
|
|
8
|
-
v-if="title"
|
|
9
|
-
class="el-x-prompts-title"
|
|
10
|
-
:class="[classNames.title]"
|
|
11
|
-
:style="titleStyle"
|
|
12
|
-
>
|
|
13
|
-
{{ title }}
|
|
14
|
-
</h5>
|
|
15
|
-
|
|
16
|
-
<!-- 提示列表 -->
|
|
17
|
-
<div
|
|
18
|
-
:class="[
|
|
19
|
-
'el-x-prompts-list',
|
|
20
|
-
{
|
|
21
|
-
'el-x-prompts-list-wrap': wrap,
|
|
22
|
-
'el-x-prompts-list-vertical': vertical,
|
|
23
|
-
},
|
|
24
|
-
classNames.list,
|
|
25
|
-
]"
|
|
26
|
-
:style="listStyle"
|
|
27
|
-
>
|
|
28
|
-
<div
|
|
29
|
-
v-for="(info, index) in items"
|
|
30
|
-
:key="info.key || `key_${index}`"
|
|
31
|
-
:class="[
|
|
32
|
-
'el-x-prompts-item',
|
|
33
|
-
{
|
|
34
|
-
'el-x-prompts-item-disabled': info.disabled,
|
|
35
|
-
'el-x-prompts-item-has-nest': hasChildren(info),
|
|
36
|
-
},
|
|
37
|
-
classNames.item,
|
|
38
|
-
]"
|
|
39
|
-
:style="itemStyle"
|
|
40
|
-
@click="handleItemClick(info)"
|
|
41
|
-
>
|
|
42
|
-
<!-- 图标 -->
|
|
43
|
-
<div
|
|
44
|
-
v-if="info.icon"
|
|
45
|
-
class="el-x-prompts-icon"
|
|
46
|
-
>
|
|
47
|
-
<slot
|
|
48
|
-
name="icon"
|
|
49
|
-
:item="info"
|
|
50
|
-
>
|
|
51
|
-
<i :class="info.icon"></i>
|
|
52
|
-
</slot>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<!-- 内容 -->
|
|
56
|
-
<div
|
|
57
|
-
:class="['el-x-prompts-content', classNames.itemContent]"
|
|
58
|
-
:style="itemContentStyle"
|
|
59
|
-
>
|
|
60
|
-
<!-- 标签 -->
|
|
61
|
-
<h6
|
|
62
|
-
v-if="info.label"
|
|
63
|
-
class="el-x-prompts-label"
|
|
64
|
-
>
|
|
65
|
-
<slot
|
|
66
|
-
name="label"
|
|
67
|
-
:item="info"
|
|
68
|
-
>{{ info.label }}</slot
|
|
69
|
-
>
|
|
70
|
-
</h6>
|
|
71
|
-
|
|
72
|
-
<!-- 描述 -->
|
|
73
|
-
<p
|
|
74
|
-
v-if="info.description"
|
|
75
|
-
class="el-x-prompts-desc"
|
|
76
|
-
>
|
|
77
|
-
<slot
|
|
78
|
-
name="description"
|
|
79
|
-
:item="info"
|
|
80
|
-
>{{ info.description }}</slot
|
|
81
|
-
>
|
|
82
|
-
</p>
|
|
83
|
-
|
|
84
|
-
<!-- 子项 -->
|
|
85
|
-
<component
|
|
86
|
-
:is="$options.name"
|
|
87
|
-
v-if="hasChildren(info)"
|
|
88
|
-
class="el-x-prompts-nested"
|
|
89
|
-
:items="info.children"
|
|
90
|
-
:vertical="true"
|
|
91
|
-
@on-item-click="$emit('on-item-click', $event)"
|
|
92
|
-
:class-names="{
|
|
93
|
-
list: classNames.subList,
|
|
94
|
-
item: classNames.subItem,
|
|
95
|
-
}"
|
|
96
|
-
:styles="{
|
|
97
|
-
list: styles.subList,
|
|
98
|
-
item: styles.subItem,
|
|
99
|
-
}"
|
|
100
|
-
/>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</template>
|
|
106
|
-
|
|
107
|
-
<script>
|
|
108
|
-
export default {
|
|
109
|
-
name: 'ElXPrompts',
|
|
110
|
-
|
|
111
|
-
props: {
|
|
112
|
-
/**
|
|
113
|
-
* 包含多个提示项的列表
|
|
114
|
-
*/
|
|
115
|
-
items: {
|
|
116
|
-
type: Array,
|
|
117
|
-
default: () => [],
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* 显示在提示列表顶部的标题
|
|
122
|
-
*/
|
|
123
|
-
title: {
|
|
124
|
-
type: String,
|
|
125
|
-
default: '',
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Item 提示项被点击时的回调函数
|
|
130
|
-
*/
|
|
131
|
-
onItemClick: {
|
|
132
|
-
type: Function,
|
|
133
|
-
default: null,
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* 提示列表是否垂直排列
|
|
138
|
-
*/
|
|
139
|
-
vertical: {
|
|
140
|
-
type: Boolean,
|
|
141
|
-
default: false,
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* 提示列表是否换行
|
|
146
|
-
*/
|
|
147
|
-
wrap: {
|
|
148
|
-
type: Boolean,
|
|
149
|
-
default: false,
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* 自定义样式,用于各个提示项的不同部分
|
|
154
|
-
*/
|
|
155
|
-
styles: {
|
|
156
|
-
type: Object,
|
|
157
|
-
default: () => ({}),
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* 自定义样式类名,用于各个提示项的不同部分
|
|
162
|
-
*/
|
|
163
|
-
classNames: {
|
|
164
|
-
type: Object,
|
|
165
|
-
default: () => ({}),
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* 根节点的样式类名
|
|
170
|
-
*/
|
|
171
|
-
rootClassName: {
|
|
172
|
-
type: String,
|
|
173
|
-
default: '',
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* 自定义样式
|
|
178
|
-
*/
|
|
179
|
-
customStyle: {
|
|
180
|
-
type: Object,
|
|
181
|
-
default: () => ({}),
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* 方向
|
|
186
|
-
*/
|
|
187
|
-
direction: {
|
|
188
|
-
type: String,
|
|
189
|
-
default: 'ltr',
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
computed: {
|
|
194
|
-
titleStyle() {
|
|
195
|
-
return {
|
|
196
|
-
...this.styles.title,
|
|
197
|
-
};
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
listStyle() {
|
|
201
|
-
return {
|
|
202
|
-
...this.styles.list,
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
itemStyle() {
|
|
207
|
-
return {
|
|
208
|
-
...this.styles.item,
|
|
209
|
-
};
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
itemContentStyle() {
|
|
213
|
-
return {
|
|
214
|
-
...this.styles.itemContent,
|
|
215
|
-
};
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
methods: {
|
|
220
|
-
hasChildren(item) {
|
|
221
|
-
return item.children && item.children.length > 0;
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
handleItemClick(info) {
|
|
225
|
-
if (info.disabled) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
// 如果有子项,不触发点击事件
|
|
229
|
-
if (this.hasChildren(info)) {
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
this.$emit('on-item-click', {
|
|
233
|
-
data: info,
|
|
234
|
-
});
|
|
235
|
-
// 向后兼容性
|
|
236
|
-
if (this.onItemClick) {
|
|
237
|
-
this.onItemClick({
|
|
238
|
-
data: info,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
};
|
|
244
|
-
</script>
|
|
245
|
-
|
|
246
|
-
<style lang="scss" scoped>
|
|
247
|
-
@import '../../../styles/Prompts.scss';
|
|
248
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="['el-x-prompts', { 'el-x-prompts-rtl': direction === 'rtl' }, rootClassName]"
|
|
4
|
+
:style="customStyle"
|
|
5
|
+
>
|
|
6
|
+
<!-- 标题 -->
|
|
7
|
+
<h5
|
|
8
|
+
v-if="title"
|
|
9
|
+
class="el-x-prompts-title"
|
|
10
|
+
:class="[classNames.title]"
|
|
11
|
+
:style="titleStyle"
|
|
12
|
+
>
|
|
13
|
+
{{ title }}
|
|
14
|
+
</h5>
|
|
15
|
+
|
|
16
|
+
<!-- 提示列表 -->
|
|
17
|
+
<div
|
|
18
|
+
:class="[
|
|
19
|
+
'el-x-prompts-list',
|
|
20
|
+
{
|
|
21
|
+
'el-x-prompts-list-wrap': wrap,
|
|
22
|
+
'el-x-prompts-list-vertical': vertical,
|
|
23
|
+
},
|
|
24
|
+
classNames.list,
|
|
25
|
+
]"
|
|
26
|
+
:style="listStyle"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
v-for="(info, index) in items"
|
|
30
|
+
:key="info.key || `key_${index}`"
|
|
31
|
+
:class="[
|
|
32
|
+
'el-x-prompts-item',
|
|
33
|
+
{
|
|
34
|
+
'el-x-prompts-item-disabled': info.disabled,
|
|
35
|
+
'el-x-prompts-item-has-nest': hasChildren(info),
|
|
36
|
+
},
|
|
37
|
+
classNames.item,
|
|
38
|
+
]"
|
|
39
|
+
:style="itemStyle"
|
|
40
|
+
@click="handleItemClick(info)"
|
|
41
|
+
>
|
|
42
|
+
<!-- 图标 -->
|
|
43
|
+
<div
|
|
44
|
+
v-if="info.icon"
|
|
45
|
+
class="el-x-prompts-icon"
|
|
46
|
+
>
|
|
47
|
+
<slot
|
|
48
|
+
name="icon"
|
|
49
|
+
:item="info"
|
|
50
|
+
>
|
|
51
|
+
<i :class="info.icon"></i>
|
|
52
|
+
</slot>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<!-- 内容 -->
|
|
56
|
+
<div
|
|
57
|
+
:class="['el-x-prompts-content', classNames.itemContent]"
|
|
58
|
+
:style="itemContentStyle"
|
|
59
|
+
>
|
|
60
|
+
<!-- 标签 -->
|
|
61
|
+
<h6
|
|
62
|
+
v-if="info.label"
|
|
63
|
+
class="el-x-prompts-label"
|
|
64
|
+
>
|
|
65
|
+
<slot
|
|
66
|
+
name="label"
|
|
67
|
+
:item="info"
|
|
68
|
+
>{{ info.label }}</slot
|
|
69
|
+
>
|
|
70
|
+
</h6>
|
|
71
|
+
|
|
72
|
+
<!-- 描述 -->
|
|
73
|
+
<p
|
|
74
|
+
v-if="info.description"
|
|
75
|
+
class="el-x-prompts-desc"
|
|
76
|
+
>
|
|
77
|
+
<slot
|
|
78
|
+
name="description"
|
|
79
|
+
:item="info"
|
|
80
|
+
>{{ info.description }}</slot
|
|
81
|
+
>
|
|
82
|
+
</p>
|
|
83
|
+
|
|
84
|
+
<!-- 子项 -->
|
|
85
|
+
<component
|
|
86
|
+
:is="$options.name"
|
|
87
|
+
v-if="hasChildren(info)"
|
|
88
|
+
class="el-x-prompts-nested"
|
|
89
|
+
:items="info.children"
|
|
90
|
+
:vertical="true"
|
|
91
|
+
@on-item-click="$emit('on-item-click', $event)"
|
|
92
|
+
:class-names="{
|
|
93
|
+
list: classNames.subList,
|
|
94
|
+
item: classNames.subItem,
|
|
95
|
+
}"
|
|
96
|
+
:styles="{
|
|
97
|
+
list: styles.subList,
|
|
98
|
+
item: styles.subItem,
|
|
99
|
+
}"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<script>
|
|
108
|
+
export default {
|
|
109
|
+
name: 'ElXPrompts',
|
|
110
|
+
|
|
111
|
+
props: {
|
|
112
|
+
/**
|
|
113
|
+
* 包含多个提示项的列表
|
|
114
|
+
*/
|
|
115
|
+
items: {
|
|
116
|
+
type: Array,
|
|
117
|
+
default: () => [],
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 显示在提示列表顶部的标题
|
|
122
|
+
*/
|
|
123
|
+
title: {
|
|
124
|
+
type: String,
|
|
125
|
+
default: '',
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Item 提示项被点击时的回调函数
|
|
130
|
+
*/
|
|
131
|
+
onItemClick: {
|
|
132
|
+
type: Function,
|
|
133
|
+
default: null,
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 提示列表是否垂直排列
|
|
138
|
+
*/
|
|
139
|
+
vertical: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false,
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 提示列表是否换行
|
|
146
|
+
*/
|
|
147
|
+
wrap: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: false,
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 自定义样式,用于各个提示项的不同部分
|
|
154
|
+
*/
|
|
155
|
+
styles: {
|
|
156
|
+
type: Object,
|
|
157
|
+
default: () => ({}),
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 自定义样式类名,用于各个提示项的不同部分
|
|
162
|
+
*/
|
|
163
|
+
classNames: {
|
|
164
|
+
type: Object,
|
|
165
|
+
default: () => ({}),
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* 根节点的样式类名
|
|
170
|
+
*/
|
|
171
|
+
rootClassName: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: '',
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* 自定义样式
|
|
178
|
+
*/
|
|
179
|
+
customStyle: {
|
|
180
|
+
type: Object,
|
|
181
|
+
default: () => ({}),
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* 方向
|
|
186
|
+
*/
|
|
187
|
+
direction: {
|
|
188
|
+
type: String,
|
|
189
|
+
default: 'ltr',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
computed: {
|
|
194
|
+
titleStyle() {
|
|
195
|
+
return {
|
|
196
|
+
...this.styles.title,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
listStyle() {
|
|
201
|
+
return {
|
|
202
|
+
...this.styles.list,
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
itemStyle() {
|
|
207
|
+
return {
|
|
208
|
+
...this.styles.item,
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
itemContentStyle() {
|
|
213
|
+
return {
|
|
214
|
+
...this.styles.itemContent,
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
methods: {
|
|
220
|
+
hasChildren(item) {
|
|
221
|
+
return item.children && item.children.length > 0;
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
handleItemClick(info) {
|
|
225
|
+
if (info.disabled) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
// 如果有子项,不触发点击事件
|
|
229
|
+
if (this.hasChildren(info)) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
this.$emit('on-item-click', {
|
|
233
|
+
data: info,
|
|
234
|
+
});
|
|
235
|
+
// 向后兼容性
|
|
236
|
+
if (this.onItemClick) {
|
|
237
|
+
this.onItemClick({
|
|
238
|
+
data: info,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
</script>
|
|
245
|
+
|
|
246
|
+
<style lang="scss" scoped>
|
|
247
|
+
@import '../../../styles/Prompts.scss';
|
|
248
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ElXSender from './src/main.vue';
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
ElXSender.install = function (Vue) {
|
|
5
|
-
Vue.component(ElXSender.name, ElXSender);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default ElXSender;
|
|
1
|
+
import ElXSender from './src/main.vue';
|
|
2
|
+
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
ElXSender.install = function (Vue) {
|
|
5
|
+
Vue.component(ElXSender.name, ElXSender);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default ElXSender;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="el-x-send-button">
|
|
3
|
-
<el-button
|
|
4
|
-
circle
|
|
5
|
-
@click="$emit('clear')"
|
|
6
|
-
size="small"
|
|
7
|
-
>
|
|
8
|
-
<i class="el-icon-brush"></i>
|
|
9
|
-
</el-button>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
name: 'ClearButton',
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<style scoped lang="scss">
|
|
20
|
-
.el-x-send-button {
|
|
21
|
-
.el-button {
|
|
22
|
-
.el-icon-brush {
|
|
23
|
-
// 旋转180
|
|
24
|
-
transform: rotate(180deg);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="el-x-send-button">
|
|
3
|
+
<el-button
|
|
4
|
+
circle
|
|
5
|
+
@click="$emit('clear')"
|
|
6
|
+
size="small"
|
|
7
|
+
>
|
|
8
|
+
<i class="el-icon-brush"></i>
|
|
9
|
+
</el-button>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: 'ClearButton',
|
|
16
|
+
};
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style scoped lang="scss">
|
|
20
|
+
.el-x-send-button {
|
|
21
|
+
.el-button {
|
|
22
|
+
.el-icon-brush {
|
|
23
|
+
// 旋转180
|
|
24
|
+
transform: rotate(180deg);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
viewBox="0 0 1000 1000"
|
|
4
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
-
>
|
|
7
|
-
<title>Loading</title>
|
|
8
|
-
<rect
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
height="250"
|
|
11
|
-
rx="24"
|
|
12
|
-
ry="24"
|
|
13
|
-
width="250"
|
|
14
|
-
x="375"
|
|
15
|
-
y="375"
|
|
16
|
-
/>
|
|
17
|
-
<circle
|
|
18
|
-
cx="500"
|
|
19
|
-
cy="500"
|
|
20
|
-
fill="none"
|
|
21
|
-
r="450"
|
|
22
|
-
stroke="currentColor"
|
|
23
|
-
stroke-width="100"
|
|
24
|
-
opacity="0.45"
|
|
25
|
-
/>
|
|
26
|
-
<circle
|
|
27
|
-
cx="500"
|
|
28
|
-
cy="500"
|
|
29
|
-
fill="none"
|
|
30
|
-
r="450"
|
|
31
|
-
stroke="currentColor"
|
|
32
|
-
stroke-width="100"
|
|
33
|
-
stroke-dasharray="600 9999999"
|
|
34
|
-
>
|
|
35
|
-
<animateTransform
|
|
36
|
-
attributeName="transform"
|
|
37
|
-
dur="1s"
|
|
38
|
-
from="0 500 500"
|
|
39
|
-
repeatCount="indefinite"
|
|
40
|
-
to="360 500 500"
|
|
41
|
-
type="rotate"
|
|
42
|
-
/>
|
|
43
|
-
</circle>
|
|
44
|
-
</svg>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
export default {
|
|
49
|
-
name: 'Loading',
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 1000 1000"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
>
|
|
7
|
+
<title>Loading</title>
|
|
8
|
+
<rect
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
height="250"
|
|
11
|
+
rx="24"
|
|
12
|
+
ry="24"
|
|
13
|
+
width="250"
|
|
14
|
+
x="375"
|
|
15
|
+
y="375"
|
|
16
|
+
/>
|
|
17
|
+
<circle
|
|
18
|
+
cx="500"
|
|
19
|
+
cy="500"
|
|
20
|
+
fill="none"
|
|
21
|
+
r="450"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
stroke-width="100"
|
|
24
|
+
opacity="0.45"
|
|
25
|
+
/>
|
|
26
|
+
<circle
|
|
27
|
+
cx="500"
|
|
28
|
+
cy="500"
|
|
29
|
+
fill="none"
|
|
30
|
+
r="450"
|
|
31
|
+
stroke="currentColor"
|
|
32
|
+
stroke-width="100"
|
|
33
|
+
stroke-dasharray="600 9999999"
|
|
34
|
+
>
|
|
35
|
+
<animateTransform
|
|
36
|
+
attributeName="transform"
|
|
37
|
+
dur="1s"
|
|
38
|
+
from="0 500 500"
|
|
39
|
+
repeatCount="indefinite"
|
|
40
|
+
to="360 500 500"
|
|
41
|
+
type="rotate"
|
|
42
|
+
/>
|
|
43
|
+
</circle>
|
|
44
|
+
</svg>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
export default {
|
|
49
|
+
name: 'Loading',
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped></style>
|