Commit ab9138db authored by 王纵's avatar 王纵

低代码增加可配置路由参数

parent 7f2823df
......@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-30 09:41:54
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-19 14:40:12
* @LastEditTime: 2024-09-06 15:54:06
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
......@@ -50,10 +50,11 @@ const ConfigRenderComponent = {
},
inject: ['dynamicInfo'],
created() {
this.queryParams = {
...this.$route.params,
...this.$route.query
}
// this.queryParams = {
// ...this.$route.params,
// ...this.$route.query
// }
this.queryParams = this.dynamicInfo().queryParams;
},
mounted() {
this.configInfo = this.dynamicInfo().config;
......
......@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:51:56
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-06 15:26:18
* @LastEditTime: 2024-09-06 15:53:19
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
......@@ -98,6 +98,10 @@ export default {
dataLoadHandle: {
type: Function,
default: () => {}
},
routeParams: {
type: Object,
default: null
}
},
data () {
......@@ -126,23 +130,26 @@ export default {
};
},
created() {
this.params = {
...this.$route.params,
...this.$route.query
}
this.init();
},
activated() {
this.params = {
...this.$route.params,
...this.$route.query
}
console.log('activated', this.params)
this.init();
this.layoutCodeQuery();
},
beforeMount() {
this.layoutCodeQuery();
},
methods: {
init() {
if (this.routeParams) {
this.params = {...this.routeParams};
} else {
this.params = {
...this.$route.params,
...this.$route.query
}
}
},
// 获取页面布局配置
async layoutCodeQuery() {
// const {disabled} = this.props;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment