update 配方详情页面
This commit is contained in:
@@ -1,30 +1,52 @@
|
||||
<template>
|
||||
<ListView :table-config="tableConfig" :dialog-configs="dialogConfigs" :listQueryExtra="['name']" />
|
||||
<ListView
|
||||
:table-config="tableConfig"
|
||||
:dialog-configs="dialogConfigs"
|
||||
:listQueryExtra="[{ key: name }]"
|
||||
attach-list-query-extra="key"
|
||||
:trigger-update="triggerUpdateKey"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import initConfig from './config';
|
||||
import ListView from '@/views/atomViews/ListView.vue';
|
||||
import initConfig from "./config";
|
||||
import ListView from "@/views/atomViews/ListView.vue";
|
||||
|
||||
export default {
|
||||
name: 'BomDetailsView',
|
||||
components: { ListView },
|
||||
provide() {
|
||||
return {
|
||||
urls: this.allUrls
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const { tableConfig, urls, dialogConfigs } = initConfig.call(this);
|
||||
return {
|
||||
tableConfig,
|
||||
allUrls: urls,
|
||||
dialogConfigs,
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
name: "BomDetailsView",
|
||||
components: { ListView },
|
||||
provide() {
|
||||
return {
|
||||
urls: this.allUrls,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 配方名称
|
||||
name() {
|
||||
return this.$route.query.name || "";
|
||||
},
|
||||
},
|
||||
data() {
|
||||
const { tableConfig, urls, dialogConfigs } = initConfig.call(this);
|
||||
return {
|
||||
tableConfig,
|
||||
allUrls: urls,
|
||||
dialogConfigs,
|
||||
triggerUpdateKey: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (route) {
|
||||
if (route.query.name) {
|
||||
this.triggerUpdateKey = Math.random().toString();
|
||||
console.log("[$oute changed] val.query.name", route.query.name, this.triggerUpdateKey);
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user