@jx3box/jx3box-editor 1.3.8 → 1.3.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-editor",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -86,12 +86,11 @@
86
86
  </template>
87
87
 
88
88
  <script>
89
- import { loadResource, loadStat, getIcons } from "../service/database";
89
+ import { loadStat, } from "../service/database";
90
90
  import { loadAuthors, loadEmotions } from "../service/cms";
91
91
  import { getUserInfo } from "../service/author";
92
92
  import { __iconPath, __Root, __OriginRoot, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
93
- import detach_types from "../assets/data/detach_type.json";
94
- import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
93
+ import { getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
95
94
  import User from "@jx3box/jx3box-common/js/user";
96
95
  export default {
97
96
  name: "Resource",
@@ -271,10 +270,14 @@ export default {
271
270
  insert: function() {
272
271
  if (this.type === 'authors') {
273
272
  if (this.userStatus == 0 && this.canInsertAuthor) {
274
- this.setAuthors();
275
- this.$emit("insert", this.html);
276
- this.dialogVisible = false;
277
- this.selectedAuthor = {};
273
+ if (this.selectedAuthor.ID) {
274
+ this.setAuthors();
275
+ this.$emit("insert", this.html);
276
+ this.dialogVisible = false;
277
+ this.selectedAuthor = {};
278
+ } else {
279
+ this.$message.warning("请选择一个用户");
280
+ }
278
281
  } else {
279
282
  this.$alert('您的等级不足或无权限(Lv2以上可用)', '消息');
280
283
  }