mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 10:12:54 +08:00
删除遗漏部分
This commit is contained in:
@@ -97,6 +97,18 @@ export default {
|
||||
});
|
||||
};
|
||||
const del = ({ id, optionId }) => {
|
||||
if (optionId) {
|
||||
api.deleteVoteStemOption(optionId).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
virtualDel(id);
|
||||
}
|
||||
};
|
||||
const virtualDel = (id) => {
|
||||
// 前端删除
|
||||
curItem.value.optionDetailList.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
curItem.value.optionDetailList.splice(index, 1);
|
||||
@@ -105,11 +117,6 @@ export default {
|
||||
curItem.value.optionDetailList.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
});
|
||||
|
||||
api.deleteVoteStemOption(optionId).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -95,7 +95,6 @@ export default {
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
console.log(file);
|
||||
fileUp(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.hasImgName = file.name;
|
||||
|
||||
Reference in New Issue
Block a user