@jx3box/jx3box-common-ui 9.5.1 → 9.5.2

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.
@@ -26,6 +26,10 @@
26
26
  .c-admin-wrapper{
27
27
  padding:20px;
28
28
  box-sizing: border-box;
29
+
30
+ .u-refresh-btn {
31
+ margin-left: 10px;;
32
+ }
29
33
  }
30
34
 
31
35
  .c-admin-highlight-checkbox{
@@ -0,0 +1,5 @@
1
+ import emitt from 'emitt'
2
+
3
+ const emitter = emitt()
4
+
5
+ export default emitter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "9.5.1",
3
+ "version": "9.5.2",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -39,6 +39,7 @@
39
39
  "axios": "^0.26.1",
40
40
  "dayjs": "^1.11.0",
41
41
  "element-ui": "^2.13.2",
42
+ "emitt": "^1.3.4",
42
43
  "jquery": "^3.5.1",
43
44
  "lodash": "^4.17.15",
44
45
  "qrcode.vue": "^1.7.0",
@@ -17,6 +17,7 @@
17
17
  option
18
18
  }}</el-radio-button>
19
19
  </el-radio-group>
20
+ <el-button type="primary" size="small" class="u-refresh-btn" @click="onRefreshCache">刷新缓存</el-button>
20
21
  <!-- </template> -->
21
22
 
22
23
  <el-divider content-position="left">可见性变更</el-divider>
@@ -130,6 +131,7 @@ import { getSetting, postSetting } from "../../service/admin";
130
131
  import User from "@jx3box/jx3box-common/js/user";
131
132
  import { cms as marks } from "@jx3box/jx3box-common/data/mark.json";
132
133
  import { getTopicBucket } from "../../service/cms";
134
+ import emitter from "../../assets/js/emitt";
133
135
  export default {
134
136
  name: "Admin",
135
137
  props: {
@@ -352,6 +354,12 @@ export default {
352
354
  this.tags = data;
353
355
  });
354
356
  },
357
+ onRefreshCache() {
358
+ emitter.emit("refreshCache", {
359
+ type: this.post_type,
360
+ id: this.pid,
361
+ });
362
+ }
355
363
  },
356
364
  watch: {
357
365
  "$route.params.id": function (id) {