+
{{ characters == 1 ? "联系我们" : "Contact us" }}
@@ -88,20 +91,7 @@ export default {
charactersMy: 1,
};
},
- watch: {
- // languageLsit(newVal) {
- // this.setCharacters([
- // {
- // name: "Cn",
- // value: 1
- // },
- // {
- // name: "En",
- // value: 2
- // }
- // ]);
- // }
- },
+
computed: {
...mapState({
characters: (state) => state.publicObj.characters,
@@ -117,7 +107,7 @@ export default {
this.$router.push(`/${path}`);
},
goView(id) {
- if (id == "Technology" || id == "Solutions") {
+ if (id == "Technology" || id == "Solutions" || id == "aboutUs") {
this.$router.push(`/`);
setTimeout(() => {
document.querySelector("#" + id).scrollIntoView({
@@ -154,6 +144,29 @@ export default {
},
created() {
this.handleScrollTop();
+ // this.charactersMy = this.$store.state.publicObj.characters;
+ // console.log();
+ // console.log(this.charactersMy);
+ },
+ watch: {
+ "$store.state.publicObj.characters": {
+ handler(newVal) {
+ console.log(newVal, "vuex");
+ this.charactersMy = newVal;
+ },
+ },
+ // languageLsit(newVal) {
+ // this.setCharacters([
+ // {
+ // name: "Cn",
+ // value: 1
+ // },
+ // {
+ // name: "En",
+ // value: 2
+ // }
+ // ]);
+ // }
},
};
diff --git a/src/components/home/home.vue b/src/components/home/home.vue
index 903b14a..d901902 100644
--- a/src/components/home/home.vue
+++ b/src/components/home/home.vue
@@ -42,7 +42,11 @@
freely