zydx-plus 1.35.566 → 1.35.568
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/package.json
CHANGED
|
@@ -260,7 +260,7 @@ let buttonNames = {
|
|
|
260
260
|
score: '成绩报告',
|
|
261
261
|
analysis: '统计分析',
|
|
262
262
|
power: '学习动力',
|
|
263
|
-
studyRecord: '学习档案'
|
|
263
|
+
// studyRecord: '学习档案'
|
|
264
264
|
},
|
|
265
265
|
|
|
266
266
|
},
|
|
@@ -278,7 +278,7 @@ let buttonNames = {
|
|
|
278
278
|
lowLevel: {
|
|
279
279
|
default: "studyRecord",
|
|
280
280
|
power: '学习动力',
|
|
281
|
-
studyRecord: '学习档案'
|
|
281
|
+
// studyRecord: '学习档案'
|
|
282
282
|
},
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -441,7 +441,7 @@ let buttonNames = {
|
|
|
441
441
|
score: '成绩报告',
|
|
442
442
|
analysis: '统计分析',
|
|
443
443
|
power: '学习动力',
|
|
444
|
-
studyRecord: '学习档案'
|
|
444
|
+
// studyRecord: '学习档案'
|
|
445
445
|
},
|
|
446
446
|
},
|
|
447
447
|
2: {
|
|
@@ -458,7 +458,7 @@ let buttonNames = {
|
|
|
458
458
|
lowLevel: {
|
|
459
459
|
default: "studyRecord",
|
|
460
460
|
power: '学习动力',
|
|
461
|
-
studyRecord: '学习档案'
|
|
461
|
+
// studyRecord: '学习档案'
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -487,7 +487,7 @@ let buttonNames = {
|
|
|
487
487
|
score: '成绩报告',
|
|
488
488
|
analysis: '统计分析',
|
|
489
489
|
power: '学习动力',
|
|
490
|
-
studyRecord: '学习档案'
|
|
490
|
+
// studyRecord: '学习档案'
|
|
491
491
|
},
|
|
492
492
|
},
|
|
493
493
|
2: {
|
|
@@ -504,7 +504,7 @@ let buttonNames = {
|
|
|
504
504
|
lowLevel: {
|
|
505
505
|
default: "studyRecord",
|
|
506
506
|
power: '学习动力',
|
|
507
|
-
studyRecord: '学习档案'
|
|
507
|
+
// studyRecord: '学习档案'
|
|
508
508
|
},
|
|
509
509
|
}
|
|
510
510
|
}
|
|
@@ -759,7 +759,7 @@ let buttonNames = {
|
|
|
759
759
|
score: '成绩报告',
|
|
760
760
|
analysis: '统计分析',
|
|
761
761
|
power: '学习动力',
|
|
762
|
-
studyRecord: '学习档案'
|
|
762
|
+
// studyRecord: '学习档案'
|
|
763
763
|
},
|
|
764
764
|
},
|
|
765
765
|
2: {
|
|
@@ -776,7 +776,7 @@ let buttonNames = {
|
|
|
776
776
|
lowLevel: {
|
|
777
777
|
default: "studyRecord",
|
|
778
778
|
power: '学习动力',
|
|
779
|
-
studyRecord: '学习档案'
|
|
779
|
+
// studyRecord: '学习档案'
|
|
780
780
|
},
|
|
781
781
|
}
|
|
782
782
|
}
|
|
@@ -176,6 +176,15 @@ export default {
|
|
|
176
176
|
sessionStorage.setItem('messages', JSON.stringify(e)) // 保存聊天记录
|
|
177
177
|
},
|
|
178
178
|
deep: true
|
|
179
|
+
},
|
|
180
|
+
modelValue: {
|
|
181
|
+
handler: async function (e) {
|
|
182
|
+
if(e) {
|
|
183
|
+
const token = await this.getAccessToken('ai')
|
|
184
|
+
this.token = token.data.data
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
deep: true
|
|
179
188
|
}
|
|
180
189
|
},
|
|
181
190
|
methods: {
|
|
@@ -333,34 +342,6 @@ export default {
|
|
|
333
342
|
sampleRate: 16000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
|
|
334
343
|
numChannels: 1, // 声道,支持 1 或 2, 默认是1
|
|
335
344
|
})
|
|
336
|
-
const ais = this.getCookie('aiToken');
|
|
337
|
-
if(ais) {
|
|
338
|
-
this.token = ais
|
|
339
|
-
}else {
|
|
340
|
-
const token = await this.getAccessToken('ai')
|
|
341
|
-
this.setCookie('aiToken', token.data.data, 60)
|
|
342
|
-
this.token = token.data.data
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
setCookie(name, value, minutes) {
|
|
346
|
-
let now = new Date();
|
|
347
|
-
now.setMinutes(now.getMinutes() + minutes);
|
|
348
|
-
document.cookie = name + '=' + value + ';expires=' + now.toUTCString();
|
|
349
|
-
},
|
|
350
|
-
getCookie(cname) {
|
|
351
|
-
let name = cname + "=";
|
|
352
|
-
let decodedCookie = decodeURIComponent(document.cookie);
|
|
353
|
-
let ca = decodedCookie.split(';');
|
|
354
|
-
for(let i = 0; i < ca.length; i++) {
|
|
355
|
-
let c = ca[i];
|
|
356
|
-
while (c.charAt(0) === ' ') {
|
|
357
|
-
c = c.substring(1);
|
|
358
|
-
}
|
|
359
|
-
if (c.indexOf(name) === 0) {
|
|
360
|
-
return c.substring(name.length, c.length);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
return "";
|
|
364
345
|
},
|
|
365
346
|
async getAccessToken(v) {
|
|
366
347
|
return axios({
|
|
@@ -353,7 +353,7 @@ export default {
|
|
|
353
353
|
default: []
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
|
-
emits: ['see', 'del', 'complete', 'update:data', 'enclosureSuccess', 'download', 'updateData', 'syncDel'],
|
|
356
|
+
emits: ['see', 'del', 'complete', 'update:data', 'enclosureSuccess', 'download', 'updateData', 'syncDel','assets'],
|
|
357
357
|
watch: {
|
|
358
358
|
// 强制监听data变化
|
|
359
359
|
data: {
|
|
@@ -482,6 +482,9 @@ export default {
|
|
|
482
482
|
this.lastSelectedText = selectedText
|
|
483
483
|
console.log('selectedText', selectedText)
|
|
484
484
|
},
|
|
485
|
+
showAssets() {
|
|
486
|
+
this.$emit('assets')
|
|
487
|
+
},
|
|
485
488
|
showAi() {
|
|
486
489
|
this.isShowAi = !this.isShowAi
|
|
487
490
|
},
|
|
@@ -553,8 +556,16 @@ export default {
|
|
|
553
556
|
// 删除选中的文本
|
|
554
557
|
this.editor.chain().focus().deleteSelection().run()
|
|
555
558
|
const text = event.clipboardData.getData('text/plain');
|
|
556
|
-
const text2 = text.replace(/[\r\n]/g, '').replace(/\s*/g, '')
|
|
557
|
-
this.editor.chain().focus().insertContentAt(this.selection(), text2).run()
|
|
559
|
+
// const text2 = text.replace(/[\r\n]/g, '').replace(/\s*/g, '')
|
|
560
|
+
// this.editor.chain().focus().insertContentAt(this.selection(), text2).run()
|
|
561
|
+
const textArr = text.split(/[\r\n]/g)
|
|
562
|
+
textArr.forEach((item,index) => {
|
|
563
|
+
if(index === 0) {
|
|
564
|
+
this.editor.chain().focus().insertContentAt(this.selection(), item).run()
|
|
565
|
+
}else {
|
|
566
|
+
this.editor.chain().focus().insertContentAt(this.selection(), `<p>${item}</p>`).run()
|
|
567
|
+
}
|
|
568
|
+
})
|
|
558
569
|
},
|
|
559
570
|
addContent(text) {
|
|
560
571
|
const text2 = text.replace(/[\r\n]/g, '').replace(/\s*/g, '')
|