zydx-plus 1.35.592 → 1.35.593

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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/src/components/chat/index.js +6 -0
  3. package/src/components/chat/src/ai.png +0 -0
  4. package/src/components/chat/src/chat.vue +720 -0
  5. package/src/components/editor/index.js +6 -0
  6. package/src/components/editor/src/butJson-copy.js +183 -0
  7. package/src/components/editor/src/butJson.js +506 -0
  8. package/src/components/editor/src/delete-svg.vue +33 -0
  9. package/src/components/editor/src/edit-svg.vue +30 -0
  10. package/src/components/editor/src/editor-copy.vue +1360 -0
  11. package/src/components/editor/src/editor.vue +5299 -0
  12. package/src/components/editor/src/extend/contenteditable.js +33 -0
  13. package/src/components/editor/src/extend/data-url.js +33 -0
  14. package/src/components/editor/src/extend/exegesis-id.js +44 -0
  15. package/src/components/editor/src/extend/extension-image.js +86 -0
  16. package/src/components/editor/src/extend/font-size.js +49 -0
  17. package/src/components/editor/src/extend/insertHorizontalLine.js +48 -0
  18. package/src/components/editor/src/extend/line-height-id.js +43 -0
  19. package/src/components/editor/src/extend/margin.js +48 -0
  20. package/src/components/editor/src/extend/sign-id.js +43 -0
  21. package/src/components/editor/src/extend/title-id.js +43 -0
  22. package/src/components/editor/src/image/annotation.png +0 -0
  23. package/src/components/editor/src/image/center.png +0 -0
  24. package/src/components/editor/src/image/left.png +0 -0
  25. package/src/components/editor/src/image/right.png +0 -0
  26. package/src/components/editor/src/image-size.js +27 -0
  27. package/src/components/editor/src/isSelect.vue +20 -0
  28. package/src/components/editor/src/mammoth.browser.min.js +18 -0
  29. package/src/components/editor/src/margin-moderation.vue +68 -0
  30. package/src/components/editor/src/margin-narrow.vue +70 -0
  31. package/src/components/editor/src/margin-standard.vue +66 -0
  32. package/src/components/editor/src/margin-wide.vue +66 -0
  33. package/src/components/editor/src/view-svg.vue +31 -0
  34. package/src/index.js +1 -1
@@ -0,0 +1,720 @@
1
+ <template>
2
+ <teleport to="body">
3
+ <drag-popup
4
+ v-if='modelValue'
5
+ ref="dragPopup"
6
+ class='popup_chat'
7
+ :title="title"
8
+ :width="960"
9
+ :height="400"
10
+ :minWidth="300"
11
+ :minHeight="400"
12
+ :minimizeCir='!isHideMini'
13
+ @close="aiClose">
14
+ <template v-slot:content>
15
+ <div v-if="!isHideInput" class="chat-input">
16
+ <div class="chat-text">
17
+ <textarea :disabled="disabled" @keydown="handleKeydown" @input="autoResize" v-model="userText" placeholder="问AI试试..."></textarea>
18
+ </div>
19
+ <div class="chat-operate">
20
+ <div class="chat-send">
21
+ <div :class="{'disabled': disabled}" @click="clearTextarea">
22
+ <i class= "theme-text iconfont zydx-a-qingchuAizhushou"></i>
23
+ <span class="theme-text">清空</span>
24
+ </div>
25
+ <div class="line"></div>
26
+ <div :class="{'disabled': disabled}" @click="speak">
27
+ <i :class="{'speak': microphone, 'theme-text': true}" class="iconfont zydx-a-yuyinshuruAi"></i>
28
+ <span :class="{'speak': microphone, 'theme-text': true}">语音输入</span>
29
+ </div>
30
+ <div class="line"></div>
31
+ <div @click="send('')">
32
+ <i class="theme-text iconfont zydx-a-sousuoAizhushou" :class="{'disabled': disabled}"></i>
33
+ <button :disabled="disabled" :class="{'disabled': disabled, 'theme-text': true}">搜索</button>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <div :class="{'chat-in': true, 'chat-in-height': isHideInput}" ref="content">
39
+ <div class="AI-tips-line">
40
+ <div class="tips">
41
+ <span>AI回答</span>
42
+ <span>(以下内容为AI生成,请注意辨别信息真伪)</span>
43
+ </div>
44
+ <div :class="{'operate':true, 'operate-position': isHideInput }" v-if="currentMessage">
45
+ <div @click="send('')" :class="{'disabled': disabled}">
46
+ <i class="theme-text iconfont zydx-a-zhongzhiAi"></i>
47
+ <span class="theme-text">重新生成</span>
48
+ </div>
49
+ <div class="line"></div>
50
+ <div @click="copy">
51
+ <i class="theme-text iconfont zydx-a-fuzhiAI"></i>
52
+ <span class="theme-text">复制</span>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="chat-in-cont" ref="contentLi">
57
+ <div class="chat-in-li left">
58
+ <div class="text-cont">{{currentMessage}}</div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <div class="microphone" v-if="microphone">
63
+ <div class="microphone-cont mic-anim">
64
+ <div class="microphone1">
65
+ <div class="microphone2">
66
+ <div class="microphone3" @click="stopRecording">
67
+ <div>
68
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 68" width="26" height="48">
69
+ <path id="并集_轮廓_" data-name="并集 (轮廓)" fill="#ccc"
70
+ d="M10,44a3,3,0,0,1-3-3V3a3,3,0,0,1,3-3H28a3,3,0,0,1,3,3V41a3,3,0,0,1-3,3Zm17-4V4H11V40ZM0,47V24a2,2,0,0,1,4,0V45a2,2,0,0,0,2,2H32a2,2,0,0,0,2-2V24a2,2,0,0,1,4,0V47a4,4,0,0,1-4,4H21v9c7.34.26,13,1.93,13,4,0,2.21-6.72,4-15,4S4,66.21,4,64c0-2,5.66-3.7,13-4V51H4A4,4,0,0,1,0,47ZM19,64h.79L19,64l-.79,0Z"/>
71
+ <rect fill="#fff" x="11" y="4" width="16" height="36"/>
72
+ <rect class="volume" :height="volume(vol)" width="12" :y="volume2(vol)" x="13" fill="#43cf7c"/>
73
+ </svg>
74
+ </div>
75
+ <p>{{ voiceLoading? '语音转换中...': `正在说话:${countdown}s` }}</p>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </template>
82
+ </drag-popup>
83
+ </teleport>
84
+ </template>
85
+
86
+ <script>
87
+ import Recorder from 'js-audio-recorder'
88
+ import axios from 'axios'
89
+ import Message from '../../../components/tipBox/index';
90
+ import dragPopup from '../../dragPopup/src/dragPopup.vue'
91
+ export default {
92
+ name: 'zydx-chat',
93
+ components: { dragPopup },
94
+ data() {
95
+ return {
96
+ token: '',
97
+ messages: [],
98
+ currentMessage: '',
99
+ userText: '',
100
+ disabled: false,
101
+ x: '',
102
+ y: '',
103
+ left: 0,
104
+ top: 0,
105
+ isMove: false,
106
+ microphone: false,
107
+ recorder: null,
108
+ countdown: 59,
109
+ fileSize: 0,
110
+ vol: 0,
111
+ base64: '',
112
+ voiceLoading: false,
113
+ isSearched: false
114
+ }
115
+ },
116
+ props: {
117
+ apiPrefix: {
118
+ type: String,
119
+ default: 'zydx'
120
+ },
121
+ title: {
122
+ type: String,
123
+ default: 'AI助手'
124
+ },
125
+ modelValue: {
126
+ type: Boolean,
127
+ default: false
128
+ },
129
+ isHideInput: {
130
+ type: Boolean,
131
+ default: false
132
+ },
133
+ isHideMini: {
134
+ type: Boolean,
135
+ default: false
136
+ }
137
+ },
138
+ beforeUnmount() {
139
+ this.recorder?.destroy()
140
+ },
141
+ mounted() {
142
+ const _this = this
143
+ this.init()
144
+ this.recorder.onprogress = function (params) {
145
+ if(_this.countdown <= 0) {
146
+ _this.stopRecording()
147
+ }else {
148
+ _this.countdown = 59 - parseInt(params.duration)
149
+ _this.vol = params.vol
150
+ }
151
+ }
152
+ document.addEventListener('mousemove', (e) => {
153
+ if (!this.isMove) return
154
+ this.x = e.clientX - this.left;
155
+ this.y = e.clientY - this.top;
156
+ // 超出边界
157
+ const w = document.documentElement.clientWidth;
158
+ const h = document.documentElement.clientHeight;
159
+ if (this.x < 0) {
160
+ this.x = 0;
161
+ }
162
+ if (this.y < 0) {
163
+ this.y = 0;
164
+ }
165
+ if (this.x > (w - 600)) {
166
+ this.x = w - 600;
167
+ }
168
+ // if (this.y > (h - 650)) {
169
+ // this.y = h - 650;
170
+ // }
171
+ this.$emit('move', {x: this.x, y: this.y})
172
+ })
173
+ document.addEventListener('mouseup', (event) => {
174
+ this.isMove = false
175
+ })
176
+ },
177
+ watch: {
178
+ messages: {
179
+ handler: function (e, oldVal) {
180
+ sessionStorage.setItem('messages', JSON.stringify(e)) // 保存聊天记录
181
+ },
182
+ deep: true
183
+ },
184
+ modelValue: {
185
+ handler: async function (e) {
186
+ if(e) {
187
+ const token = await this.getAccessToken('ai')
188
+ this.token = token.data.data
189
+ }
190
+ },
191
+ deep: true
192
+ }
193
+ },
194
+ methods: {
195
+ autoResize(e) {
196
+ e.target.style.height = 'auto'
197
+ console.log(e.target.scrollHeight)
198
+ e.target.style.height = `${e.target.scrollHeight }px`
199
+ },
200
+ clearTextarea() {
201
+ if(this.disabled) return
202
+ this.userText = ''
203
+ },
204
+ copy() {
205
+ var el = document.createElement("input");
206
+ el.setAttribute("value", this.currentMessage);
207
+ document.body.appendChild(el);
208
+ el.select();
209
+ document.execCommand("copy");
210
+ document.body.removeChild(el);
211
+ Message({type: 'text', cancelShow: false, promptContent: '复制成功'})
212
+ },
213
+ speak() {
214
+ if(this.disabled) return
215
+ this.microphone = !this.microphone
216
+ if(this.microphone) {
217
+ this.recorder.start().then(() => { // 开始录音
218
+ this.countdown = 59
219
+ this.fileSize = 0
220
+ this.vol = 0
221
+ this.base64 = ''
222
+ }, (error) => {
223
+ this.microphone = false
224
+ Message({type: 'text', promptContent: '录音失败,请检查麦克风是否可用'})
225
+ // this.$message({
226
+ // type: 'text',
227
+ // cancelShow: false,
228
+ // promptContent: '录音失败,请检查麦克风是否可用'
229
+ // })
230
+ });
231
+ }else {
232
+ this.microphone = true
233
+ this.stopRecording()
234
+ }
235
+ },
236
+ stopRecording() {
237
+ this.recorder.stop() // 停止录音
238
+ // 获取录音文件
239
+ const pcm = this.recorder.getPCMBlob()
240
+ const file = new File([pcm], 'audio.pcm', {type: 'audio/pcm'})
241
+ let reader = new FileReader();
242
+ reader.readAsDataURL(file)
243
+ reader.onload = async () => {
244
+ this.base64 = reader.result.split('base64,')[1]
245
+ await this.getSpeech()
246
+ }
247
+ },
248
+ async getSpeech() {
249
+ const _this = this
250
+ const token = await this.getAccessToken('voice')
251
+ const data = {
252
+ format: "pcm",
253
+ rate: 16000,
254
+ channel: 1,
255
+ cuid: "Ukvpuzv27RdJhltQBlpITVLNTcxs5ctM",
256
+ token: token.data.data,
257
+ speech: this.base64,
258
+ len: this.recorder.fileSize,
259
+ };
260
+ _this.voiceLoading = true
261
+ axios.post('/server_api', data)
262
+ .then(function(data){
263
+ _this.voiceLoading = false
264
+ _this.microphone = false
265
+ for(let i=0; i< data.data.result.length; i++) {
266
+ _this.userText += data.data.result[i]
267
+ }
268
+ _this.recorder.destroy()
269
+ })
270
+ .catch(function(err){
271
+ _this.recorder.destroy()
272
+ });
273
+ },
274
+ volume(v) {
275
+ if(v === 0) {
276
+ return 32
277
+ }else {
278
+ return v/3 > 32 ? 32 : v/5
279
+ }
280
+ },
281
+ volume2(v) {
282
+ if(v === 0) {
283
+ return 6
284
+ }else {
285
+ return 6 + 32 - this.volume(v)
286
+ }
287
+ },
288
+ chatMousedown(event) {
289
+ event.preventDefault()
290
+ //鼠标按下事件 左侧有10px的padding
291
+ this.left = event.offsetX + 10;
292
+ this.top = event.offsetY;
293
+ this.isMove = true
294
+ },
295
+ chatMouseup() {
296
+ this.isMove = false
297
+ },
298
+ // 监听键盘事件
299
+ handleKeydown(e) {
300
+ if(e.keyCode === 32){
301
+ e.preventDefault();
302
+ return;
303
+ }
304
+ if(e.keyCode === 13){
305
+ e.preventDefault();
306
+ this.send()
307
+ }
308
+ },
309
+ toggleAI(str) {
310
+ this.$emit('update:modelValue', !this.modelValue)
311
+ if (!this.modelValue) {
312
+ this.send(str)
313
+ }
314
+ },
315
+ // 发送消息
316
+ send(str) {
317
+ const _this = this
318
+ // 去掉换行和空格
319
+ this.userText = str || this.userText
320
+ let text = this.userText.replace(/[\r\n]/g, '').replace(/\s*/g, '')
321
+ if(!text) return
322
+ _this.disabled = true
323
+ _this.isSearched = true
324
+ this.currentMessage = '努力思考中...'
325
+ axios.post(`/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=${_this.token}`,{
326
+ messages: [{ role: "user", content: text }]
327
+ }).then(function(data){
328
+ if(data.data.error_code){
329
+ _this.disabled = false
330
+ _this.currentMessage = '这个问题太难了!'
331
+ return
332
+ }
333
+ _this.currentMessage = data.data.result
334
+ _this.disabled = false
335
+ }).catch(function(err){
336
+ _this.disabled = false
337
+ this.$message({promptContent: err, cancelShow: false})
338
+ });
339
+ },
340
+ // 初始化
341
+ async init() {
342
+ this.messages = JSON.parse(sessionStorage.getItem('messages')) || []
343
+ // 初始化录音
344
+ this.recorder = new Recorder({
345
+ sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
346
+ sampleRate: 16000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
347
+ numChannels: 1, // 声道,支持 1 或 2, 默认是1
348
+ })
349
+ },
350
+ async getAccessToken(v) {
351
+ return axios({
352
+ url: `/${this.apiPrefix}/voice/getBaiduToken`,
353
+ method: 'post',
354
+ headers: {
355
+ 'Authorization': localStorage.getItem('sessionId') || sessionStorage.getItem('sessionId'),
356
+ 'Content-Type': 'application/x-www-form-urlencoded'
357
+ },
358
+ params: {
359
+ type: v,
360
+ }
361
+ }).then(function(data){
362
+ return data
363
+ })
364
+ .catch(function(err){
365
+ console.log(err)
366
+ });
367
+ },
368
+ // 关闭
369
+ aiClose() {
370
+ this.$emit('update:modelValue', false)
371
+ this.$emit('cancel')
372
+ }
373
+ }
374
+ }
375
+ </script>
376
+
377
+ <style scoped>
378
+ /* 避免AI助手弹出层级小于全局弹窗 */
379
+ .popup_chat{
380
+ z-index: 10001;
381
+ }
382
+ .disabled{
383
+ opacity: 0.5;
384
+ }
385
+ .chat-content {
386
+ width: 600px;
387
+ background: #fff;
388
+ box-shadow: 0 0 10px rgba(0, 0, 0, .2);
389
+ position: fixed;
390
+ z-index: 10000;
391
+ }
392
+
393
+ .chat-header {
394
+ height: 30px;
395
+ background: #6F3D92;
396
+ display: flex;
397
+ line-height: 30px;
398
+ padding: 0 10px;
399
+ box-sizing: border-box;
400
+ color: #fff;
401
+ font-size: 14px;
402
+ position: relative;
403
+ }
404
+ .chat-header-title{
405
+ cursor: move;
406
+ display: inline-block;
407
+ width: calc(100% - 30px);
408
+ margin-right: 30px;
409
+ }
410
+
411
+ .chat-header i {
412
+ cursor: pointer;
413
+ font-size: 18px;
414
+ position: absolute;
415
+ top: 0;
416
+ right: 10px;
417
+ z-index: 1;
418
+ }
419
+
420
+ .chat-in {
421
+ height: calc(65% - 10px);
422
+ }
423
+ .chat-in-height{
424
+ height: calc(100% - 5px);
425
+ }
426
+ .AI-tips-line{
427
+ overflow: hidden;
428
+ padding: 0 5px;
429
+ margin: 5px 0;
430
+ }
431
+ .AI-tips-line .tips{
432
+ float: left;
433
+ }
434
+ .tips span:nth-of-type(1) {
435
+ font-size: 14px;
436
+ font-weight: 700;
437
+ }
438
+ .tips span:nth-of-type(2) {
439
+ font-size: 12px;
440
+ font-weight: 400;
441
+ color: rgba(0, 0, 0, 0.6);
442
+ }
443
+ .AI-tips-line .operate{
444
+ float: right;
445
+ width: 140px;
446
+ font-size: 12px;
447
+ padding-right: 14px;
448
+ }
449
+ .AI-tips-line .operate-position{
450
+ width: 130px;
451
+ padding-right: 0;
452
+ }
453
+ .operate >div{
454
+ float: left;
455
+ cursor: pointer;
456
+ }
457
+ .operate i {
458
+ display: inline-block;
459
+ width: 24px;
460
+ height: 24px;
461
+ width: 24px;
462
+ box-sizing: border-box;
463
+ text-align: center;
464
+ line-height: 23px;
465
+ font-size: 14px;
466
+ background: #fff;
467
+ }
468
+ .operate .line {
469
+ position: relative;
470
+ margin-left: 5px;
471
+ top: 6px;
472
+ width: 1px;
473
+ background: #6F3D92;
474
+ height: 12px;
475
+ }
476
+ .chat-in-cont{
477
+ height: calc(100% - 30px);
478
+ box-sizing: border-box;
479
+ overflow-y: auto;
480
+ transition: all 0.5s;
481
+ margin: 5px;
482
+ margin-top: 0;
483
+ border-radius: 5px;
484
+ border: 1px solid #CCC;
485
+ }
486
+ .chat-in-cont::-webkit-scrollbar{
487
+ width: 12px;
488
+ height: 100%;
489
+ border-radius: 0 5px 5px 0;
490
+ }
491
+
492
+ .chat-input {
493
+ margin: 5px;
494
+ margin-bottom: 0;
495
+ padding: 10px 10px 3px;
496
+ min-height: 121px;
497
+ height: 35%;
498
+ border-radius: 5px;
499
+ border: 1px solid #CCC;
500
+ overflow: hidden;
501
+ background: #fff;
502
+ box-sizing: border-box;
503
+ }
504
+
505
+ .chat-text {
506
+ width: 100%;
507
+ min-height: 82px;
508
+ height: calc(100% - 24px);
509
+ background: #fff;
510
+ box-sizing: border-box;
511
+ }
512
+
513
+ .chat-text textarea {
514
+ width: 100%;
515
+ height: 100% !important;
516
+ font-family: Helvetica, sans-serif;
517
+ border: none;
518
+ outline: none;
519
+ resize: none;
520
+ overflow-y: auto;
521
+ font-size: 14px;
522
+ }
523
+ .chat-operate{
524
+ overflow: hidden;
525
+ background: #fff;
526
+ }
527
+ .chat-send {
528
+ float: right;
529
+ width: 182px;
530
+ height: 24px;
531
+ }
532
+ .chat-send >div{
533
+ float: left;
534
+ cursor: pointer;
535
+ font-size: 12px;
536
+ }
537
+ .chat-send .line {
538
+ position: relative;
539
+ margin-left: 5px;
540
+ top: 6px;
541
+ width: 1px;
542
+ background: #6F3D92;
543
+ height: 12px;
544
+ }
545
+ .theme-text{
546
+ color: #6F3D92;
547
+ }
548
+
549
+ .chat-send i {
550
+ width: 24px;
551
+ display: inline-block;
552
+ height: 24px;
553
+ box-sizing: border-box;
554
+ text-align: center;
555
+ line-height: 23px;
556
+ font-size: 14px;
557
+ background: #fff;
558
+ cursor: pointer;
559
+ }
560
+
561
+ .chat-send button {
562
+ border: none;
563
+ outline: none;
564
+ height: 24px;
565
+ background: #fff;
566
+ font-size: 12px;
567
+ border-radius: 3px;
568
+ cursor: pointer;
569
+ box-sizing: border-box;
570
+ }
571
+
572
+ .left{
573
+ position: relative;
574
+ min-height: 50px;
575
+ }
576
+ .left .text-cont{
577
+ /* box-shadow: 0 0 10px rgba(0,0,0,.2); */
578
+ background: #fff;
579
+ /* margin-left: 60px; */
580
+ }
581
+ .right{
582
+ text-align: right;
583
+ }
584
+ .right .text-cont{
585
+ background: #fff;
586
+ background: rgba(149, 236, 105, 1);
587
+ }
588
+ .text-cont{
589
+ padding: 10px;
590
+ border-radius: 5px;
591
+ display: inline-block;
592
+ text-align: justify !important;
593
+ /* max-width: 60%; */
594
+ font-size: 14px;
595
+ line-height: 24px;
596
+ white-space: pre-line;
597
+ }
598
+ .ai-avatar{
599
+ position: absolute;
600
+ left: 0;
601
+ top: 10px;
602
+ width: 50px;
603
+ height: 50px;
604
+ border-radius: 50%;
605
+ overflow: hidden;
606
+ box-shadow: 0 0 10px rgba(0,0,0,.2);
607
+ background: #fff;
608
+ padding: 5px;
609
+ box-sizing: border-box;
610
+ }
611
+ .ai-avatar img{
612
+ width: 100%;
613
+ height: 100%;
614
+ }
615
+ .speak{
616
+ /* background: #43cf7c !important; */
617
+ color: #43cf7c !important;
618
+ /* border: 1px solid #43cf7c !important; */
619
+ }
620
+ .microphone{
621
+ position: absolute;
622
+ left: 50%;
623
+ top: 50%;
624
+ z-index: 50;
625
+ width: 150px;
626
+ height: 150px;
627
+ transform: translate(-50%,-50%);
628
+ }
629
+ .microphone-cont{
630
+ width: 100%;
631
+ height: 100%;
632
+ border-radius: 50%;
633
+ position: relative;
634
+ }
635
+ .microphone1{
636
+ width: 100%;
637
+ height: 100%;
638
+ border-radius: 50%;
639
+ background: rgba(67, 207, 124, 0.3);
640
+ }
641
+ .microphone2{
642
+ width: calc(100% - 30px);
643
+ height: calc(100% - 30px);
644
+ border-radius: 50%;
645
+ background: rgba(67, 207, 124, 0.5);
646
+ position: absolute;
647
+ top: 50%;
648
+ left: 50%;
649
+ z-index: 1;
650
+ transform: translate(-50%,-50%);
651
+ }
652
+ .microphone3{
653
+ width: calc(100% - 30px);
654
+ height: calc(100% - 30px);
655
+ border-radius: 50%;
656
+ background: rgba(67, 207, 124, 0.8);
657
+ position: absolute;
658
+ top: 50%;
659
+ left: 50%;
660
+ z-index: 1;
661
+ transform: translate(-50%,-50%);
662
+ text-align: center;
663
+ padding-top: 10px;
664
+ box-sizing: border-box;
665
+ cursor: pointer;
666
+ }
667
+ .microphone3 p{
668
+ font-size: 12px;
669
+ color: #fff;
670
+ line-height: 18px;
671
+ }
672
+ .mic-anim .microphone1{
673
+ animation: mic-anim 1.5s infinite;
674
+ }
675
+ @keyframes mic-anim{
676
+ 0%{
677
+ background: rgba(67, 207, 124, 0.2);
678
+ }
679
+ 80%{
680
+ background: rgba(67, 207, 124, 0.4);
681
+ }
682
+ 100%{
683
+ background: rgba(67, 207, 124, 0.2);
684
+ }
685
+ }
686
+ .mic-anim .microphone2{
687
+ animation: mic-anim2 1.5s infinite;
688
+ }
689
+ @keyframes mic-anim2{
690
+ 0%{
691
+ background: rgba(67, 207, 124, 0.4);
692
+ }
693
+ 40%{
694
+ background: rgba(67, 207, 124, 0.6);
695
+ }
696
+ 80%{
697
+ background: rgba(67, 207, 124, 0.4);
698
+ }
699
+ 100%{
700
+ background: rgba(67, 207, 124, 0.4);
701
+ }
702
+ }
703
+ .mic-anim .microphone3{
704
+ animation: mic-anim3 1.5s infinite;
705
+ }
706
+ @keyframes mic-anim3{
707
+ 0%{
708
+ background: rgba(67, 207, 124, 0.8);
709
+ }
710
+ 20%{
711
+ background: rgba(67, 207, 124, 1);
712
+ }
713
+ 40%{
714
+ background: rgba(67, 207, 124, 0.8);
715
+ }
716
+ 100%{
717
+ background: rgba(67, 207, 124, 0.8);
718
+ }
719
+ }
720
+ </style>
@@ -0,0 +1,6 @@
1
+ import main from './src/editor';
2
+
3
+ main.install = function(Vue) {
4
+ Vue.component(main.name, main);
5
+ };
6
+ export default main;