fix: 文件二维码在前端拼接结果好像错误
This commit is contained in:
@@ -60,8 +60,9 @@ md.use(markdownItKatex, { blockClass: 'katexmath-block rounded-md p-[10px]', err
|
||||
function renderMarkdown(message: string) {
|
||||
return md.render(message);
|
||||
}
|
||||
|
||||
function getQrCodeUrl(code:string) {
|
||||
return window.location.origin + '/#/?code=' + code;
|
||||
return code.startsWith('http') ? code : window.location.origin + code;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -96,7 +97,7 @@ function getQrCodeUrl(code:string) {
|
||||
</template>
|
||||
<div style="width: 200px;">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<qrcode-vue v-if="value.name!=='文本分享'" :value="value.text" :size="100"></qrcode-vue>
|
||||
<qrcode-vue v-if="value.name!=='文本分享'" :value="getQrCodeUrl(value.text)" :size="100"></qrcode-vue>
|
||||
<div v-else style="width: 100px;height: 100px;flex-wrap: wrap;overflow-y:scroll ">{{value.text}}</div>
|
||||
<div style="display: flex;flex-direction: column;justify-content: space-around">
|
||||
<el-tag size="large" style="cursor: pointer" @click="copyText(value.code)">{{ value.code }}</el-tag>
|
||||
|
||||
Reference in New Issue
Block a user