@jx3box/jx3box-common-ui 8.4.7 → 8.4.9

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.4.7",
3
+ "version": "8.4.9",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,8 +30,8 @@
30
30
  "last 2 versions"
31
31
  ],
32
32
  "dependencies": {
33
- "@jx3box/jx3box-comment-ui": "^1.8.7",
34
- "@jx3box/jx3box-common": "^8.2.16",
33
+ "@jx3box/jx3box-comment-ui": "^1.8.8",
34
+ "@jx3box/jx3box-common": "^8.2.17",
35
35
  "@jx3box/jx3box-data": "^3.5.8",
36
36
  "@jx3box/jx3box-editor": "^2.1.9",
37
37
  "@jx3box/reporter": "^0.0.4",
@@ -11,7 +11,7 @@
11
11
  <el-dropdown-item v-if="isEditor" command="directMessage" icon="el-icon-message">
12
12
  <span>私信</span>
13
13
  </el-dropdown-item>
14
- <el-dropdown-item v-if="isEditor && showMove" command="onMoveToCommunity" icon="el-icon-upload">
14
+ <el-dropdown-item v-if="isEditor && showMove" command="onMoveToCommunity" icon="el-icon-refresh">
15
15
  <span>转移</span>
16
16
  </el-dropdown-item>
17
17
  <el-dropdown-item icon="el-icon-upload" command="designTask" v-if="hasPermission('push_banner')">
@@ -21,20 +21,28 @@
21
21
  <el-form-item label="简介">
22
22
  <el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="form.introduction"> </el-input>
23
23
  </el-form-item>
24
+ </el-form>
24
25
 
25
- <el-divider content-position="left">附图</el-divider>
26
- <div class="u-imgs">
27
- <div
28
- :class="`u-imgs-item ${form.banner_img === item && 'active'}`"
29
- v-for="(item, i) in form.extra_images"
30
- :key="i"
31
- @click="setBannerIndex(item)"
32
- >
33
- <el-image :src="item" fit="cover" style="width: 148px; height: 148px" />
34
- <div class="u-mark">封面</div>
35
- </div>
26
+ <el-divider content-position="left">附图</el-divider>
27
+ <div class="u-imgs">
28
+ <div
29
+ :class="`u-imgs-item ${form.banner_img === item && 'active'}`"
30
+ v-for="(item, i) in form.extra_images"
31
+ :key="i"
32
+ @click="setBannerIndex(item)"
33
+ >
34
+ <el-image :src="item" fit="cover" style="width: 148px; height: 148px" />
35
+ <div class="u-mark">封面</div>
36
36
  </div>
37
- </el-form>
37
+ </div>
38
+
39
+ <el-divider content-position="left"></el-divider>
40
+
41
+ <div class="u_r_box">
42
+ <el-popover placement="top" trigger="manual" size="mini" content="请确认此操作不可逆" v-model="visible">
43
+ <el-checkbox slot="reference" v-model="checked">我已确认此操作不可逆</el-checkbox>
44
+ </el-popover>
45
+ </div>
38
46
  <template #footer>
39
47
  <el-button @click="close">取 消</el-button>
40
48
  <el-button type="primary" @click="onConfirm">确 定</el-button>
@@ -66,12 +74,14 @@ export default {
66
74
  emits: ["update:modelValue"],
67
75
  data() {
68
76
  return {
77
+ visible: false,
78
+ checked: false,
69
79
  form: {
70
80
  category: "",
71
81
  id: "",
72
82
  introduction: "",
73
- banner_img: "",
74
- extra_images: [],
83
+ banner_img: undefined,
84
+ extra_images: undefined,
75
85
  },
76
86
  categoryList: [],
77
87
  isPhone: window.innerWidth < 768,
@@ -84,6 +94,11 @@ export default {
84
94
  this.initForm();
85
95
  }
86
96
  },
97
+ checked(val) {
98
+ if (val) {
99
+ this.visible = false;
100
+ }
101
+ },
87
102
  },
88
103
  methods: {
89
104
  initForm() {
@@ -91,7 +106,7 @@ export default {
91
106
  const content = this.post.post_content;
92
107
  this.form.introduction = this.getIntroduction(content);
93
108
  const imgs = this.getImgSrc(content);
94
- this.form.extra_images = [...new Set(imgs)];
109
+ if (imgs.length > 0) this.form.extra_images = [...new Set(imgs)];
95
110
  },
96
111
 
97
112
  close() {
@@ -112,6 +127,10 @@ export default {
112
127
  this.$message.error("请选择分类!");
113
128
  return;
114
129
  }
130
+ if (!this.checked) {
131
+ this.visible = true;
132
+ return;
133
+ }
115
134
  recoverTopicFromPosts(this.form).then(() => {
116
135
  this.$message.success("操作成功");
117
136
  this.close();
@@ -153,6 +172,10 @@ export default {
153
172
  </script>
154
173
 
155
174
  <style lang="less">
175
+ .u_r_box {
176
+ display: flex;
177
+ justify-content: flex-end;
178
+ }
156
179
  .u-imgs {
157
180
  display: flex;
158
181
  overflow-x: auto;