解决新增商品切换页面缓存问题
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
import Vue from 'vue'
|
||||
export default new Vue
|
||||
@@ -31,7 +31,7 @@
|
||||
<script>
|
||||
import ScrollPane from './ScrollPane'
|
||||
import path from 'path'
|
||||
|
||||
import Utils from '@/assets/js/util.js';
|
||||
export default {
|
||||
components: { ScrollPane },
|
||||
data() {
|
||||
@@ -199,6 +199,7 @@ export default {
|
||||
toLastView(visitedViews, view) {
|
||||
const latestView = visitedViews.slice(-1)[0]
|
||||
if (latestView) {
|
||||
Utils.$emit('test');
|
||||
this.$router.push(latestView.fullPath)
|
||||
} else {
|
||||
// now the default is to redirect to the home page if there is no tags-view,
|
||||
|
||||
@@ -465,6 +465,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import MaterialList from '@/components/material'
|
||||
import singlePic from '@/components/singlematerial'
|
||||
import UeditorWrap from "vue-ueditor-wrap";
|
||||
import Utils from '@/assets/js/util.js';
|
||||
export default {
|
||||
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic },
|
||||
data() {
|
||||
@@ -671,16 +672,18 @@ export default {
|
||||
deep: true
|
||||
},
|
||||
$route(to,form){
|
||||
console.log(to.fullPath)
|
||||
if(to.fullPath=='/bxg/shop/goodsAdd'){
|
||||
this.resetForm()
|
||||
}else{
|
||||
if(to.fullPath!=='/bxg/shop/goodsAdd'){
|
||||
this.getInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getInfo();
|
||||
var that = this
|
||||
Utils.$on('test', function (param) {
|
||||
setTimeout(that.resetForm(),100)
|
||||
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
blur(index,row) {
|
||||
|
||||
Reference in New Issue
Block a user