|
@@ -1301,8 +1301,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ '$route'(to, from) {
|
|
|
+ console.log(from, '---------------------------------------');
|
|
|
+ // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
|
|
|
+ if (to.query.id) {
|
|
|
+ this.getMainData();
|
|
|
+ }
|
|
|
+ },
|
|
|
'form.job_experience': {
|
|
|
handler(newVal, oldVal) {
|
|
|
+
|
|
|
newVal.forEach((item, index) => {
|
|
|
// 确保每个对象都有默认值
|
|
|
// if (!item.company_name) item.job_industry = '';
|
|
@@ -1331,13 +1339,7 @@ export default {
|
|
|
deep: true // 深度监听数组内部对象的变化
|
|
|
}
|
|
|
},
|
|
|
- '$route'(to, from) {
|
|
|
- console.log(from, '---------------------------------------');
|
|
|
- // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
|
|
|
- if (to.query.id) {
|
|
|
- this.getMainData();
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped lang="less">
|