diff --git a/open-isle-cli/src/views/NewPostPageView.vue b/open-isle-cli/src/views/NewPostPageView.vue
index 220451793..c0ed1c8d9 100644
--- a/open-isle-cli/src/views/NewPostPageView.vue
+++ b/open-isle-cli/src/views/NewPostPageView.vue
@@ -5,6 +5,17 @@
+
+
+
+
+
+
发布
@@ -20,12 +31,25 @@ export default {
setup() {
const title = ref('')
const content = ref('')
+ const categories = ref([
+ { id: 1, name: '闲聊' },
+ { id: 2, name: '技术' }
+ ])
+ const tags = ref([
+ { id: 1, name: 'Java' },
+ { id: 2, name: 'Python' },
+ { id: 3, name: 'AI' }
+ ])
+ const selectedCategory = ref('')
+ const selectedTags = ref([])
const submitPost = () => {
console.log('title:', title.value)
console.log('content:', content.value)
+ console.log('category:', selectedCategory.value)
+ console.log('tags:', selectedTags.value)
// 在此处可以调用接口提交帖子
}
- return { title, content, submitPost }
+ return { title, content, categories, tags, selectedCategory, selectedTags, submitPost }
}
}
@@ -65,5 +89,29 @@ export default {
.post-submit:hover {
background-color: var(--primary-color-hover);
}
+
+.post-options {
+ margin-top: 20px;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.category-select {
+ padding: 5px 10px;
+ border-radius: 5px;
+}
+
+.tag-select {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+}
+
+.tag-item {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}