How do I add a value to form in vue?

there is currently only one field in the form form. Name, now needs to add a few values to the form

data() {
    return {
            // form
            form: {
                name: ""
        }
    }
},
methods: {
    getCheckedNodes() {
        let idStr = "";
        let idArr = [];
        for (let i = 0; i < this.$refs.tree.getCheckedNodes().length; iPP) {
            let element = this.$refs.tree.getCheckedNodes()[i];
            let id = element.id;
            idArr.push(id);
        }
        // privilegeIdsform
        console.log("idArr", idArr);
        // idthis.multipleSelection[0].idform
        console.log("idArr", idArr);
        // form, 
        // form: {
        //    name: "",
        //    id: "",  // this.multipleSelection[0].id
        //    privilegeIds: [], // idArr
        // }
    }
}

here are the values for printing this.multipleSelection [0] .id and idArr
clipboard.png

Apr.03,2021

this.form {

name: "",
id: this.multipleSelection[0].id, 
privilegeIds:idArr, 

}

is that all right?


form["id"] = this.multipleSelection[0].id;
form["privilegeIds"] = idArr;
Menu