@jx3box/jx3box-common-ui 8.5.1 → 8.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "8.5.1",
3
+ "version": "8.5.3",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@jx3box/jx3box-comment-ui": "^1.8.8",
34
- "@jx3box/jx3box-common": "^8.2.17",
34
+ "@jx3box/jx3box-common": "^8.2.18",
35
35
  "@jx3box/jx3box-data": "^3.5.8",
36
36
  "@jx3box/jx3box-editor": "^2.1.9",
37
37
  "@jx3box/reporter": "^0.0.4",
@@ -68,4 +68,4 @@
68
68
  "type": "git",
69
69
  "url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
70
70
  }
71
- }
71
+ }
@@ -7,8 +7,8 @@
7
7
  title="迁移至论坛"
8
8
  append-to-body
9
9
  >
10
- <el-form :model="form" ref="form" :label-position="isPhone ? 'top' : 'left'" label-width="80px">
11
- <el-form-item label="分类">
10
+ <el-form :model="form" ref="form" :rules="rules" :label-position="isPhone ? 'top' : 'left'" label-width="80px">
11
+ <el-form-item label="分类" prop="category">
12
12
  <el-select v-model="form.category" placeholder="请选择文章分类" style="width: 100%" filterable>
13
13
  <el-option
14
14
  v-for="item in categoryList"
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
  <template #footer>
47
47
  <el-button @click="close">取 消</el-button>
48
- <el-button type="primary" @click="onConfirm">确 定</el-button>
48
+ <el-button type="primary" @click="onConfirm" :disabled="!checked">确 定</el-button>
49
49
  </template>
50
50
  </el-dialog>
51
51
  </template>
@@ -85,6 +85,9 @@ export default {
85
85
  },
86
86
  categoryList: [],
87
87
  isPhone: window.innerWidth < 768,
88
+ rules: {
89
+ category: [{ required: true, message: "请选择分类", trigger: "blur" }],
90
+ }
88
91
  };
89
92
  },
90
93
  watch: {
@@ -131,11 +134,17 @@ export default {
131
134
  this.visible = true;
132
135
  return;
133
136
  }
134
- recoverTopicFromPosts(this.form).then(() => {
135
- this.$message.success("操作成功");
136
- this.close();
137
- this.clearForm();
138
- });
137
+
138
+ this.$refs.form?.validate(valid => {
139
+ if (valid) {
140
+ recoverTopicFromPosts(this.form).then(() => {
141
+ this.$message.success("操作成功");
142
+ this.close();
143
+ this.clearForm();
144
+ });
145
+ }
146
+ })
147
+
139
148
  },
140
149
  onCancel() {
141
150
  this.close();