setup() {
const contractData = reactive<contractTerminationData>({
is_terminated: 2,
selectList: [],
dataSource: [],
isEnter: true, //新增
cusUiButtonObj: {
submit: {
cusClass: 'gic_btn_box',
visible: true,
},
},
selectedRows: [],
contractTypeList: [],
contractCategoryList: [],
});
}
return {
...toRefs(contractData),
}
...toRefs(contractData)
把contractData里面所有属性一起导出
这样就不用每个属性都导出
普通是这样
const cusFormObj = reactive<any>({});
return {
cusFormObj,
};