@jx3box/jx3box-ui 2.2.7 → 2.2.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.
@@ -62,26 +62,39 @@
62
62
  }
63
63
  }
64
64
  .c-admin-upload {
65
- .w(100%) !important;
66
- .x;
65
+ width: 100%;
67
66
 
68
67
  .el-upload {
69
- .size(100%);
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ width: 100%;
72
+ min-height: 148px;
73
+ overflow: hidden;
74
+ background-color: #fbfdff;
75
+ border: 1px dashed #c0ccda;
76
+ border-radius: 6px;
70
77
  box-sizing: border-box;
78
+ vertical-align: top;
71
79
  }
72
- overflow: hidden;
73
80
 
74
- background-color: #fbfdff;
75
- border: 1px dashed #c0ccda;
76
- border-radius: 6px;
77
- box-sizing: border-box;
78
- width: 148px;
79
- height: 148px;
80
- line-height: 146px;
81
- vertical-align: top;
81
+ img {
82
+ display: block;
83
+ width: 100%;
84
+ min-height: 148px;
85
+ max-height: 240px;
86
+ object-fit: cover;
87
+ }
88
+
89
+ .el-icon {
90
+ font-size: 24px;
91
+ color: #8c939d;
92
+ }
82
93
 
83
94
  &:hover {
84
- border-color: #409eff;
95
+ .el-upload {
96
+ border-color: #409eff;
97
+ }
85
98
  }
86
99
  }
87
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-ui",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/service/fav.js CHANGED
@@ -5,8 +5,8 @@ function hasFav(post_type, post_id) {
5
5
  return res.data.data;
6
6
  });
7
7
  }
8
- function addFav(post_type, post_id, post_title) {
9
- return $next().post(`api/article/favorites/add/${post_id}/${post_type}`, { post_title }).then((res) => {
8
+ function addFav(post_type, post_id, post_title, author_id) {
9
+ return $next().post(`api/article/favorites/add/${post_id}/${post_type}`, { post_title, author_id }).then((res) => {
10
10
  return res.data.data;
11
11
  });
12
12
  }
package/src/App.vue CHANGED
@@ -15,7 +15,7 @@
15
15
  </template>
16
16
  bread info
17
17
  <template #op-prepend>
18
- <AdminDrop :post="community" :isCommunity="true" :user-id="8" :showMove="true" />
18
+ <AdminDrop :post="community" :isCommunity="false" :user-id="8" :showMove="true" />
19
19
  </template>
20
20
  </breadcrumb>
21
21
  <LeftSidebar :open="true" :uid="8">
@@ -58,7 +58,7 @@
58
58
  <el-divider content-position="left">{{ $jx3boxT("jx3boxUi.admin.banner", "封面海报") }}</el-divider>
59
59
  <div class="c-admin-banner">
60
60
  <el-upload
61
- class="c-admin-upload el-upload--picture-card"
61
+ class="c-admin-upload"
62
62
  :action="uploadurl"
63
63
  :with-credentials="true"
64
64
  :show-file-list="false"
@@ -66,7 +66,7 @@
66
66
  :on-error="uploadFail"
67
67
  >
68
68
  <img v-if="post_banner" :src="post_banner" />
69
- <el-icon><Plus /></el-icon>
69
+ <el-icon v-else><Plus /></el-icon>
70
70
  </el-upload>
71
71
  <el-input class="u-banner" v-model="post_banner">
72
72
  <template #prepend>
@@ -39,6 +39,10 @@ export default {
39
39
  type: Boolean,
40
40
  default: false,
41
41
  },
42
+ author_id: {
43
+ type: [String, Number],
44
+ default: "",
45
+ },
42
46
  },
43
47
  data: function () {
44
48
  return {
@@ -46,6 +46,10 @@ export default {
46
46
  type: String,
47
47
  default: "",
48
48
  },
49
+ author_id: {
50
+ type: [String, Number],
51
+ default: "",
52
+ },
49
53
  },
50
54
  data() {
51
55
  return {
@@ -94,7 +98,8 @@ export default {
94
98
  type: this.type,
95
99
  id: this.id,
96
100
  data: {
97
- title: this.title
101
+ title: this.title,
102
+ author_id: this.author_id,
98
103
  }
99
104
  }
100
105
  },