鍍金池/ 問答/HTML/ vue 頁面保存的值,刷新之后有一個select不顯示之前保存的值,哪里出的問題

vue 頁面保存的值,刷新之后有一個select不顯示之前保存的值,哪里出的問題?

再進入這個界面 select里面的值一直 不顯示 但是接口數(shù)據(jù)顯示已經(jīng)返回了
求教

watch: {
      'form.discountId' (key,old) {
        this.discountschema.map(item => {
          if ( key === item.id){
            this.form.discountName = item.name;
            this.form.discountId = item.name;
          }
        });
      },
    },
return {
        form: {
          id: null,
          name: null,
          rule: [],
          rule1: null,
          rule2: null,
          rule3: null,
          rule4: null,
          discountId:'',
          discountName:'',
          vipPrice: 2,
          discount: 2,
          discount2:2,
          discountValue: null,
          other: ''
        },
        discountschema:[],
回答
編輯回答
膽怯

你給的東西也不能看出什么

2017年8月11日 22:55
編輯回答
孤酒

看看你的form.discountId值是不是預(yù)期的值

2018年4月30日 09:41