2022-03-19 19:29:35 +08:00
|
|
|
|
<template>
|
2023-01-30 02:30:42 +08:00
|
|
|
|
<el-alert v-if="enable()" type="success" show-icon>
|
|
|
|
|
<template slot="title">
|
|
|
|
|
<div @click="goToUrl">{{ '【' + title + '】文档地址:' + url }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-alert>
|
2022-03-19 19:29:35 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getDocEnable} from "@/utils/ruoyi";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "DocAlert",
|
|
|
|
|
props: {
|
|
|
|
|
title: String,
|
|
|
|
|
url: String,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
enable: function () {
|
|
|
|
|
return getDocEnable();
|
2023-01-30 02:30:42 +08:00
|
|
|
|
},
|
|
|
|
|
goToUrl: function() {
|
|
|
|
|
window.open(this.url);
|
2022-03-19 19:29:35 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.el-alert--success.is-light {
|
|
|
|
|
margin-bottom: 10px;
|
2023-02-04 20:38:51 +08:00
|
|
|
|
cursor: pointer;
|
2022-03-19 19:29:35 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|