const defaultForm = {
title: "",
cid: "0",
slug: '',
media: [],
additional: [],
summary: "",
content: "",
orders: 0,
flag: "1",
seo_title: "",
seo_description: ""
};
export default {
data() {
return {
formData: {}
}
}
}
async fetchData() {
const response = await this.$request.get(`/product/${id}`);
this.formData = this.$_.pick(response.data, Object.keys(defaultForm))
}
网友评论