Skip to content

Commit c21eaf4

Browse files
committed
优化
1 parent 3893dd7 commit c21eaf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pages/detail/_id.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ export default {
9595
const element = aArray[index]
9696
if (element && element.length === 3) {
9797
if (element[1].indexOf('http') === 0) {
98-
const html = `<a href="${element[1]}" target="_blank">${element[2]}</a>`
98+
const svg =
99+
'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg>'
100+
const html = `<a href="${element[1]}" target="_blank">${element[2]}${svg}</a>`
99101
res = res.replace(element[0], html)
100102
} else {
101103
const html = `<a href="${process.env.VUE_APP_router_base}${this.$route.path}${element[1]}">${element[2]}</a>`

0 commit comments

Comments
 (0)