fix(frontend): 注册 ElementPlus 插件,修复 async 语法错误
- 统一在 createApp 后调用 app.use(ElementPlus) - 为 handlePublish 添加 async 关键字 - 修正静态资源路径引用 - 解决登录页空白、按钮不可用问题 版本: v1.0.1
This commit is contained in:
@@ -54,3 +54,4 @@ automation/data/published/*
|
|||||||
!automation/data/published/.gitkeep
|
!automation/data/published/.gitkeep
|
||||||
content/published/*
|
content/published/*
|
||||||
!content/published/.gitkeep
|
!content/published/.gitkeep
|
||||||
|
data/*.db
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -162,7 +162,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Vue.createApp(App).mount('#app');
|
const app = Vue.createApp(App);
|
||||||
|
app.use(ElementPlus);
|
||||||
|
app.mount('#app');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -107,7 +107,9 @@
|
|||||||
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Vue.createApp(LogsApp).mount('#app');
|
const app = Vue.createApp(LogsApp);
|
||||||
|
app.use(ElementPlus);
|
||||||
|
app.mount('#app');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
await this.fetchTopics();
|
await this.fetchTopics();
|
||||||
} else { this.$message.info('仅待审查选题可优化'); }
|
} else { this.$message.info('仅待审查选题可优化'); }
|
||||||
},
|
},
|
||||||
handlePublish(topic) { this.$message.success('发布:' + topic.title); await this.fetchTopics(); },
|
async handlePublish(topic) { this.$message.success('发布:' + topic.title); await this.fetchTopics(); },
|
||||||
deleteTopic(id) {
|
deleteTopic(id) {
|
||||||
this.$confirm('确定删除?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
|
this.$confirm('确定删除?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
|
||||||
.then(async () => { this.$message.success('删除成功'); await this.fetchTopics(); }).catch(() => {});
|
.then(async () => { this.$message.success('删除成功'); await this.fetchTopics(); }).catch(() => {});
|
||||||
@@ -182,7 +182,9 @@
|
|||||||
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Vue.createApp(TopicsApp).mount('#app');
|
const app = Vue.createApp(TopicsApp);
|
||||||
|
app.use(ElementPlus);
|
||||||
|
app.mount('#app');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -127,7 +127,9 @@
|
|||||||
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
.catch(() => { localStorage.removeItem('authToken'); window.location.href = '/'; });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Vue.createApp(UsersApp).mount('#app');
|
const app = Vue.createApp(UsersApp);
|
||||||
|
app.use(ElementPlus);
|
||||||
|
app.mount('#app');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user