浏览器推荐版本弹框
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
cf7c7cbbc1
commit
d5084e411b
16
src/App.vue
16
src/App.vue
|
@ -81,6 +81,7 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<browserTip ref="browserTip" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -91,6 +92,7 @@ import {
|
||||||
} from "@/api/dictionary/dictionary";
|
} from "@/api/dictionary/dictionary";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import i18n from "./lang";
|
import i18n from "./lang";
|
||||||
|
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
data() {
|
data() {
|
||||||
|
@ -102,9 +104,21 @@ export default {
|
||||||
arr: [],
|
arr: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: { browserTip },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"$route.path": {
|
||||||
|
handler() {
|
||||||
|
if (this.$route.path === "/login") {
|
||||||
|
this.$refs.browserTip.open();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(target, attr, e);
|
this.$set(target, attr, e);
|
||||||
|
@ -252,7 +266,7 @@ textarea {
|
||||||
.title-logo {
|
.title-logo {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
.title-logo{
|
.title-logo {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -124,6 +124,13 @@ export default {
|
||||||
Object.keys(this.form).forEach((key) => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
this.form[key] = this.data[key];
|
this.form[key] = this.data[key];
|
||||||
});
|
});
|
||||||
|
if (this.form.FileName) {
|
||||||
|
this.fileList[0] = {
|
||||||
|
name: this.form.FileName,
|
||||||
|
path: this.form.Path,
|
||||||
|
fullPath: this.form.Path,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a
|
<a
|
||||||
:href="OSSclientConfig.basePath + scope.row.FullFilePath"
|
:href="OSSclientConfig.basePath + scope.row.Path"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style="color: #428bca"
|
style="color: #428bca"
|
||||||
>
|
>
|
||||||
|
@ -139,7 +139,7 @@ const searchDataDefault = () => {
|
||||||
Title: null,
|
Title: null,
|
||||||
DownloadUrl: null,
|
DownloadUrl: null,
|
||||||
FileName: null,
|
FileName: null,
|
||||||
IsDeleted: true,
|
IsDeleted: null,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: false,
|
Asc: false,
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
<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>
|
Loading…
Reference in New Issue