Refactoring the page status change

parent 13273728
...@@ -190,11 +190,10 @@ ...@@ -190,11 +190,10 @@
message: response.data.message, message: response.data.message,
}); });
this.$refs.pageTable.clearSelection(); this.$refs.pageTable.clearSelection();
this.data.find((page) => { this.data.filter(page => pageIds.indexOf(page.id) >= 0)
if (pageIds.indexOf(page.id) >= 0) { .map((page) => {
page.translations.status = action === 'mark-online'; page.translations.status = action === 'mark-online';
} });
});
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
......
...@@ -91992,10 +91992,10 @@ exports.default = { ...@@ -91992,10 +91992,10 @@ exports.default = {
message: response.data.message message: response.data.message
}); });
_this2.$refs.pageTable.clearSelection(); _this2.$refs.pageTable.clearSelection();
_this2.data.find(function (page) { _this2.data.filter(function (page) {
if (pageIds.indexOf(page.id) >= 0) { return pageIds.indexOf(page.id) >= 0;
page.translations.status = action === 'mark-online'; }).map(function (page) {
} page.translations.status = action === 'mark-online';
}); });
}).catch(function () { }).catch(function () {
_this2.$message({ _this2.$message({
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment