@jx3box/jx3box-common-ui 8.4.8 → 8.5.0
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 +2 -2
- package/src/bread/DesignTask.vue +16 -4
- package/src/bread/MoveToCommunityDialog.vue +38 -15
- package/vue.config.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"type": "git",
|
|
69
69
|
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
package/src/bread/DesignTask.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog custom-class="m-design-task" :width="isPhone ? '95%' : '600px'" :visible="modelValue" @close="close" title="快捷推送" append-to-body>
|
|
3
|
-
<el-form :model="form" ref="form" :label-position="isPhone ? 'top' : 'left'" label-width="80px">
|
|
4
|
-
<el-form-item label="标题">
|
|
3
|
+
<el-form :model="form" ref="form" :rules="rules" :label-position="isPhone ? 'top' : 'left'" label-width="80px">
|
|
4
|
+
<el-form-item label="标题" prop="title">
|
|
5
5
|
<el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
|
6
6
|
</el-form-item>
|
|
7
|
-
<el-form-item label="类型">
|
|
7
|
+
<el-form-item label="类型" prop="type">
|
|
8
8
|
<el-select v-model="form.type" placeholder="请选择类型" style="width:100%;" filterable>
|
|
9
9
|
<el-option v-for="item in config" :key="item.id" :label="item.label" :value="item.name"></el-option>
|
|
10
10
|
</el-select>
|
|
@@ -92,7 +92,16 @@ export default {
|
|
|
92
92
|
"std": "旗舰",
|
|
93
93
|
"origin": "缘起",
|
|
94
94
|
"wujie": "无界",
|
|
95
|
-
"test": "
|
|
95
|
+
"test": "体服"
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
rules: {
|
|
99
|
+
title: [
|
|
100
|
+
{ required: true, message: "请输入标题", trigger: "blur"}
|
|
101
|
+
],
|
|
102
|
+
type: [
|
|
103
|
+
{ required: true, message: "请选择类型", trigger: "change"}
|
|
104
|
+
]
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
107
|
},
|
|
@@ -101,6 +110,9 @@ export default {
|
|
|
101
110
|
if (val) {
|
|
102
111
|
if (this.post) {
|
|
103
112
|
this.form.title = this.post.post_title;
|
|
113
|
+
if (this.post?.post_type) {
|
|
114
|
+
this.form.type = this.post.post_type;
|
|
115
|
+
}
|
|
104
116
|
}
|
|
105
117
|
this.loadLogs();
|
|
106
118
|
|
|
@@ -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;
|
package/vue.config.js
CHANGED
|
@@ -98,7 +98,7 @@ module.exports = {
|
|
|
98
98
|
.rule("images")
|
|
99
99
|
.use("url-loader")
|
|
100
100
|
.loader("url-loader")
|
|
101
|
-
.tap((options) => Object.assign(options, { limit: 10240
|
|
101
|
+
.tap((options) => Object.assign(options, { limit: 10240 }));
|
|
102
102
|
|
|
103
103
|
//💝 in-line svg imgs ~
|
|
104
104
|
config.module
|