@jx3box/jx3box-common-ui 8.6.2 → 8.6.4

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.6.2",
3
+ "version": "8.6.4",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <el-drawer
3
- class="c-admin"
3
+ class="c-admin c-community-admin"
4
4
  title="管理面板"
5
5
  :visible.sync="modelValue"
6
6
  :before-close="close"
@@ -9,8 +9,25 @@
9
9
  :withHeader="false"
10
10
  >
11
11
  <div class="c-admin-wrapper">
12
- <el-divider content-position="left">标签</el-divider>
13
-
12
+ <el-divider content-position="left">信息设置</el-divider>
13
+ <div class="c-admin-extend">
14
+ <div class="u-condition u-map">
15
+ <el-input v-model="form.title" placeholder="请输入标题" class="input-author drawer-item-content">
16
+ <template #prepend>
17
+ <span class="u-keyword">标题</span>
18
+ </template>
19
+ </el-input>
20
+ </div>
21
+ </div>
22
+ <div class="c-admin-extend">
23
+ <div class="u-condition u-map">
24
+ <span class="u-prepend el-input-group__prepend">分类</span>
25
+ <el-select v-model="form.category" filterable placeholder="请选择">
26
+ <el-option v-for="item in categoryList" :value="item.name" :label="item.name" :key="item.name">
27
+ </el-option>
28
+ </el-select>
29
+ </div>
30
+ </div>
14
31
  <div class="c-admin-extend">
15
32
  <div class="u-condition u-map">
16
33
  <span class="u-prepend el-input-group__prepend">标签</span>
@@ -28,6 +45,21 @@
28
45
  </el-select>
29
46
  </div>
30
47
  </div>
48
+ <div class="c-admin-extend">
49
+ <div class="u-condition u-map">
50
+ <div>
51
+ <el-input
52
+ v-model="form.user_id"
53
+ placeholder="请输入作者ID"
54
+ class="input-author drawer-item-content"
55
+ >
56
+ <template #prepend>
57
+ <span class="u-keyword">作者ID</span>
58
+ </template>
59
+ </el-input>
60
+ </div>
61
+ </div>
62
+ </div>
31
63
 
32
64
  <el-divider content-position="left">高亮置顶</el-divider>
33
65
 
@@ -151,18 +183,6 @@ export default {
151
183
  showColors() {
152
184
  return this.form.is_hight;
153
185
  },
154
- params() {
155
- return {
156
- ...this.post,
157
- category: this.form.category,
158
- tags: this.form.tags,
159
- is_top: this.form.is_top,
160
- is_star: this.form.is_star,
161
- is_hight: this.form.is_hight,
162
- is_category_top: this.form.is_category_top,
163
- // color: this.color,
164
- };
165
- },
166
186
  },
167
187
  watch: {
168
188
  post() {
@@ -174,6 +194,8 @@ export default {
174
194
  is_star: this.post.is_star,
175
195
  tags: this.post.tags,
176
196
  is_category_top: this.post.is_category_top,
197
+ user_id: this.post.user_id,
198
+ title: this.post.title,
177
199
  };
178
200
  },
179
201
  form() {
@@ -256,10 +278,13 @@ export default {
256
278
  updateTopicItem(id, {
257
279
  ...this.post,
258
280
  tags: this.form.tags,
259
- is_top: 0,
281
+ user_id: this.form.user_id,
282
+ title: this.form.title,
283
+ category: this.form.category,
260
284
  }).then((res) => {
261
285
  this.$message.success("修改成功");
262
286
  this.$emit("update:modelValue", false);
287
+ window.location.reload();
263
288
  });
264
289
  },
265
290
  getCommunityTags() {
@@ -318,20 +343,35 @@ export default {
318
343
 
319
344
  <style lang="less">
320
345
  @import "../../assets/css/admin.less";
321
- .c-admin-space {
322
- .flex;
323
- align-items: center;
324
- flex-wrap: wrap;
325
- height: 28px;
326
- gap: 4px;
327
- }
328
- .c-admin-lable {
329
- font-size: 14px;
330
- font-weight: 500;
331
- }
332
- .c-admin-buttons {
333
- width: 100%;
334
- position: absolute;
335
- bottom: 80px;
346
+ .c-community-admin {
347
+ .c-admin-space {
348
+ .flex;
349
+ align-items: center;
350
+ flex-wrap: wrap;
351
+ height: 28px;
352
+ gap: 4px;
353
+ }
354
+ .c-admin-lable {
355
+ font-size: 14px;
356
+ font-weight: 500;
357
+ }
358
+ .c-admin-buttons {
359
+ width: 100%;
360
+ padding-top: 30px;
361
+ // position: absolute;
362
+ // bottom: 50px;
363
+ }
364
+ .c-admin-extend .u-map .u-prepend {
365
+ font-size: 14px;
366
+ min-width: 62px;
367
+ }
368
+ .c-admin-extend .u-map .el-select {
369
+ margin-left: 62px;
370
+ }
371
+ .el-input-group__prepend {
372
+ text-align: center;
373
+ min-width: 62px;
374
+ box-sizing: border-box;
375
+ }
336
376
  }
337
377
  </style>
@@ -43,7 +43,7 @@
43
43
  </div>
44
44
  </div>
45
45
  <span slot="footer" class="dialog-footer">
46
- <el-button @click="visible = false">取 消</el-button>
46
+ <el-button @click="onClose">取 消</el-button>
47
47
  <el-button type="primary" @click="submit" :disabled="!ready || submitting">确 定</el-button>
48
48
  </span>
49
49
  </el-dialog>
@@ -162,9 +162,6 @@ export default {
162
162
  }
163
163
  },
164
164
  methods: {
165
- openBoxcoinPop: function () {
166
- this.visible = true;
167
- },
168
165
  // 选择要打赏的对象
169
166
  handleChosen(userId) {
170
167
  this.chosen = userId
@@ -196,7 +193,7 @@ export default {
196
193
  })
197
194
  .finally(() => {
198
195
  this.submitting = false;
199
- this.visible = false;
196
+ this.onClose();
200
197
  });
201
198
  },
202
199
  insertCurrentRelease: function() {