JQ修改为vue

This commit is contained in:
Wjl
2021-12-16 11:25:04 +08:00
parent 4f902aecdd
commit c38bb2e96f
11 changed files with 433 additions and 237 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div style="margin: 0 auto" class="container">
<div style="margin: 0 auto" :class="mode?'old_container':'container'">
<el-button
type="primary"
@click="testdownload4()"
@@ -20,12 +20,13 @@
<script>
import { mgop } from "@aligov/jssdk-mgop";
import { changeBottomStyle } from "@/olderMode/1.js";
import $ from "jquery";
/* import { changeBottomStyle } from "@/olderMode/1.js";
import $ from "jquery"; */
export default {
components: {},
data() {
return {
mode:"",
url: "",
apidata: {},
pic_width: "100%",
@@ -34,16 +35,27 @@ export default {
};
},
created() {
if (sessionStorage.getItem("mode") == "older") {
this.mode = this.$root.mode
/* if (sessionStorage.getItem("mode") == "older") {
changeBottomStyle();
}
} */
this.onInit();
},
mounted() {
if (sessionStorage.getItem("mode") == "older") {
$(".container").addClass("old_container");
}
},
mounted(){},
computed:{
watchMode(){
return this.$root.mode
}
},
watch: {
watchMode(val, oldVal) {
this.mode = val
}
},
methods: {
onInit() {
if (this.$route.params.id) {