提交 | 用户 | 时间
|
759b1c
|
1 |
<template> |
H |
2 |
<el-alert v-if="enable()" type="success" show-icon> |
|
3 |
<template slot="title"> |
|
4 |
<div @click="goToUrl">{{ '【' + title + '】文档地址:' + url }}</div> |
|
5 |
</template> |
|
6 |
</el-alert> |
|
7 |
</template> |
|
8 |
|
|
9 |
<script> |
|
10 |
import {getDocEnable} from "@/utils/ruoyi"; |
|
11 |
|
|
12 |
export default { |
|
13 |
name: "DocAlert", |
|
14 |
props: { |
|
15 |
title: String, |
|
16 |
url: String, |
|
17 |
}, |
|
18 |
methods: { |
|
19 |
enable: function () { |
|
20 |
return getDocEnable(); |
|
21 |
}, |
|
22 |
goToUrl: function() { |
|
23 |
window.open(this.url); |
|
24 |
} |
|
25 |
} |
|
26 |
}; |
|
27 |
</script> |
|
28 |
<style scoped> |
|
29 |
.el-alert--success.is-light { |
|
30 |
margin-bottom: 10px; |
|
31 |
cursor: pointer; |
|
32 |
} |
|
33 |
</style> |