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