|
@@ -48,7 +48,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom" v-if="toastType==='comfirm'">
|
|
|
- <span @click="visible=false" class="btn primary">{{lang==='en'?'Cancel':'取消'}}</span>
|
|
|
+ <span @click="visible=false" class="btn primary">{{language==='zh'?'取消':'Cancel'}}</span>
|
|
|
<span class="b-line"></span>
|
|
|
<span class="btn primary" @click="emitCallback">{{diycomfirm||comfirmtxt}}</span>
|
|
|
</div>
|
|
@@ -65,7 +65,7 @@ import binding from './binding'
|
|
|
import addcart from './addcart'
|
|
|
import cooperation from './cooperation'
|
|
|
import loading from './loadingicon'
|
|
|
-
|
|
|
+import { mapState } from 'vuex'
|
|
|
let types = {
|
|
|
warn: '提示',
|
|
|
error: '错误',
|
|
@@ -109,6 +109,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState({
|
|
|
+ language: state => state.language.current
|
|
|
+ }),
|
|
|
typeTxt () {
|
|
|
return this.lang === 'en' ? typesEn[this.type] : types[this.type]
|
|
|
},
|
|
@@ -120,10 +123,13 @@ export default {
|
|
|
watch: {
|
|
|
visible: function (newVal) {
|
|
|
this.lang = localStorage.getItem('language')
|
|
|
- this.comfirmtxt = this.lang === 'en' ? 'OK' : '确定'
|
|
|
+ this.comfirmtxt = this.lang === 'zh' ? '确定' : 'OK'
|
|
|
}
|
|
|
},
|
|
|
- mounted () {},
|
|
|
+ mounted () {
|
|
|
+ this.lang = localStorage.getItem('language')
|
|
|
+ this.comfirmtxt = this.lang === 'zh' ? '确定' : 'OK'
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleCooClose (data) {
|
|
|
this.cooperationVisible = false
|