@jx3box/jx3box-common-ui 8.4.8 → 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
|
@@ -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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
</
|
|
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;
|