83 lines
2.1 KiB
Vue
83 lines
2.1 KiB
Vue
<template>
|
|
<base-model :config="config">
|
|
<div slot="dialog-body">
|
|
<el-form ref="form" :model="form" label-width="100px" size="small">
|
|
<el-form-item
|
|
:label="$t('dictionary:browser:tip:form:title')"
|
|
prop="Title"
|
|
>
|
|
<span>{{ form.Title }}</span>
|
|
</el-form-item>
|
|
<el-form-item
|
|
:label="$t('dictionary:browser:tip:form:version')"
|
|
prop="Version"
|
|
>
|
|
<span>{{ form.Version }}</span>
|
|
</el-form-item>
|
|
<el-form-item
|
|
:label="$t('dictionary:browser:tip:form:downloadUrl')"
|
|
prop="DownloadUrl"
|
|
>
|
|
<a :href="form.DownloadUrl" target="_blank" style="color: #428bca">{{
|
|
form.DownloadUrl
|
|
}}</a>
|
|
</el-form-item>
|
|
<el-form-item prop="FileName">
|
|
<a
|
|
:href="OSSclientConfig.basePath + form.Path"
|
|
target="_blank"
|
|
style="color: #428bca"
|
|
>
|
|
{{ form.FileName }}
|
|
</a>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</base-model>
|
|
</template>
|
|
<script>
|
|
import { getExploreRecommentInfo } from "@/api/dictionary";
|
|
import baseModel from "@/components/BaseModel";
|
|
export default {
|
|
name: "browserTip",
|
|
components: { baseModel },
|
|
data() {
|
|
return {
|
|
config: {
|
|
visible: false,
|
|
showClose: true,
|
|
width: "600px",
|
|
title: this.$t("dictionary:browser:tip:title"),
|
|
appendToBody: true,
|
|
},
|
|
form: {},
|
|
};
|
|
},
|
|
methods: {
|
|
async getInfo() {
|
|
try {
|
|
let res = await getExploreRecommentInfo();
|
|
if (res.IsSuccess) {
|
|
return res.Result;
|
|
}
|
|
return false;
|
|
} catch (err) {
|
|
console.log(err);
|
|
return false;
|
|
}
|
|
},
|
|
async open() {
|
|
try {
|
|
let res = await this.getInfo();
|
|
if (!res) return this.$t("dictionary:browser:tip:getError");
|
|
this.form = res;
|
|
this.config.visible = true;
|
|
} catch (err) {
|
|
console.log(err);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
</style> |