This commit is contained in:
aixianling
2023-03-20 09:20:25 +08:00
parent 20408bb71f
commit a024aa6931
3 changed files with 11 additions and 4 deletions

View File

@@ -21,14 +21,13 @@
<script> <script>
import {fullScreenContainer} from '@jiaminghi/data-view' import {fullScreenContainer} from '@jiaminghi/data-view'
import AiSprite from "../../AiSprite";
import Classic from "./layout/classic"; import Classic from "./layout/classic";
import Vue from "vue" import Vue from "vue"
import Primary from "./layout/primary"; import Primary from "./layout/primary";
export default { export default {
name: "AiDvWrapper", name: "AiDvWrapper",
components: {Primary, Classic, AiSprite}, components: {Primary, Classic},
model: { model: {
prop: 'value', prop: 'value',
event: 'change' event: 'change'

View File

@@ -39,9 +39,10 @@
<script> <script>
import RightTopBorder from "../rightTopBorder"; import RightTopBorder from "../rightTopBorder";
import AiSprite from "../../../AiSprite";
export default { export default {
name: "classic", name: "classic",
components: {RightTopBorder}, components: {AiSprite, RightTopBorder},
props: { props: {
title: String, title: String,
views: {default: () => []}, views: {default: () => []},

View File

@@ -47,6 +47,14 @@ export default {
current: "" current: ""
} }
}, },
watch: {
active: {
immediate: true,
handler(v) {
if (v != this.current) this.current = this.$copy(this.active)
}
}
},
methods: { methods: {
getWeather() { getWeather() {
this.$request.post("/app/weather/queryWeather").then(res => { this.$request.post("/app/weather/queryWeather").then(res => {
@@ -57,7 +65,6 @@ export default {
} }
}, },
created() { created() {
this.current = this.$copy(this.active)
// this.getWeather() // this.getWeather()
} }
} }