zydx-plus 1.35.565 → 1.35.567
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
|
@@ -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,8 +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 token = await this.getAccessToken('ai')
|
|
337
|
-
this.token = token.data.data
|
|
338
345
|
},
|
|
339
346
|
async getAccessToken(v) {
|
|
340
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, '')
|