@cmstops/pro-compo 0.3.42 → 0.3.43

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.
@@ -1,9 +1,10 @@
1
- import { defineComponent, computed, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createCommentVNode } from "vue";
1
+ import { defineComponent, computed, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, createVNode, createCommentVNode } from "vue";
2
2
  import { Drawer, Spin, Scrollbar } from "@arco-design/web-vue";
3
3
  import { DEFAULT_BASE_API } from "../config.js";
4
4
  import { useDocHistory } from "./scripts/useDocHistory.js";
5
5
  import _sfc_main$2 from "./components/DocHistoryList/index.js";
6
6
  import _sfc_main$1 from "./components/DocDiffPanel/index.js";
7
+ import emptyData from "../emptyData/index.js";
7
8
  const _hoisted_1 = { class: "doc-history-wrap" };
8
9
  const _hoisted_2 = { class: "doc-diff-panel" };
9
10
  const _hoisted_3 = { class: "doc-history-list" };
@@ -53,43 +54,49 @@ const _sfc_main = defineComponent({
53
54
  }, {
54
55
  default: withCtx(() => [
55
56
  createElementVNode("div", _hoisted_1, [
56
- createElementVNode("div", _hoisted_2, [
57
- createVNode(unref(Spin), {
58
- loading: unref(loading),
59
- style: { "height": "100%", "width": "100%" }
60
- }, {
61
- default: withCtx(() => [
62
- createVNode(unref(Scrollbar), {
63
- "outer-style": { height: "100%" },
64
- style: { "height": "100%", "overflow": "auto" }
65
- }, {
66
- default: withCtx(() => [
67
- unref(diffContent) ? (openBlock(), createBlock(_sfc_main$1, {
68
- key: 0,
69
- doc: unref(diffContent)
70
- }, null, 8, ["doc"])) : createCommentVNode("v-if", true)
71
- ]),
72
- _: 1
73
- })
74
- ]),
75
- _: 1
76
- }, 8, ["loading"])
77
- ]),
78
- createElementVNode("div", _hoisted_3, [
79
- createVNode(unref(Scrollbar), {
80
- "outer-style": { height: "100%" },
81
- style: { "height": "100%", "overflow": "auto" }
82
- }, {
83
- default: withCtx(() => [
84
- createVNode(_sfc_main$2, {
85
- list: unref(list),
86
- current: unref(current),
87
- onSelect: unref(handleSelect)
88
- }, null, 8, ["list", "current", "onSelect"])
89
- ]),
90
- _: 1
91
- })
92
- ])
57
+ unref(list).length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
58
+ createElementVNode("div", _hoisted_2, [
59
+ createVNode(unref(Spin), {
60
+ loading: unref(loading),
61
+ style: { "height": "100%", "width": "100%" }
62
+ }, {
63
+ default: withCtx(() => [
64
+ createVNode(unref(Scrollbar), {
65
+ "outer-style": { height: "100%" },
66
+ style: { "height": "100%", "overflow": "auto" }
67
+ }, {
68
+ default: withCtx(() => [
69
+ unref(diffContent) ? (openBlock(), createBlock(_sfc_main$1, {
70
+ key: 0,
71
+ doc: unref(diffContent)
72
+ }, null, 8, ["doc"])) : createCommentVNode("v-if", true)
73
+ ]),
74
+ _: 1
75
+ })
76
+ ]),
77
+ _: 1
78
+ }, 8, ["loading"])
79
+ ]),
80
+ createElementVNode("div", _hoisted_3, [
81
+ createVNode(unref(Scrollbar), {
82
+ "outer-style": { height: "100%" },
83
+ style: { "height": "100%", "overflow": "auto" }
84
+ }, {
85
+ default: withCtx(() => [
86
+ createVNode(_sfc_main$2, {
87
+ list: unref(list),
88
+ current: unref(current),
89
+ onSelect: unref(handleSelect)
90
+ }, null, 8, ["list", "current", "onSelect"])
91
+ ]),
92
+ _: 1
93
+ })
94
+ ])
95
+ ], 64)) : (openBlock(), createBlock(unref(emptyData), {
96
+ key: 1,
97
+ type: "empty",
98
+ "custom-tip": "\u6682\u65E0\u5386\u53F2\u8BB0\u5F55"
99
+ }))
93
100
  ])
94
101
  ]),
95
102
  _: 1
@@ -26,7 +26,7 @@ function useDocHistory(BASE_API) {
26
26
  const { code, message } = await getDocHistory(BASE_API, id.value, pub.value);
27
27
  if (code !== 0)
28
28
  return;
29
- list.value = message;
29
+ list.value = message || [];
30
30
  handleSelect(0);
31
31
  } catch (e) {
32
32
  console.log(e);
@@ -5,6 +5,7 @@ var config = require("../config.js");
5
5
  var useDocHistory = require("./scripts/useDocHistory.js");
6
6
  var index$1 = require("./components/DocHistoryList/index.js");
7
7
  var index = require("./components/DocDiffPanel/index.js");
8
+ var index$2 = require("../emptyData/index.js");
8
9
  const _hoisted_1 = { class: "doc-history-wrap" };
9
10
  const _hoisted_2 = { class: "doc-diff-panel" };
10
11
  const _hoisted_3 = { class: "doc-history-list" };
@@ -54,43 +55,49 @@ const _sfc_main = vue.defineComponent({
54
55
  }, {
55
56
  default: vue.withCtx(() => [
56
57
  vue.createElementVNode("div", _hoisted_1, [
57
- vue.createElementVNode("div", _hoisted_2, [
58
- vue.createVNode(vue.unref(webVue.Spin), {
59
- loading: vue.unref(loading),
60
- style: { "height": "100%", "width": "100%" }
61
- }, {
62
- default: vue.withCtx(() => [
63
- vue.createVNode(vue.unref(webVue.Scrollbar), {
64
- "outer-style": { height: "100%" },
65
- style: { "height": "100%", "overflow": "auto" }
66
- }, {
67
- default: vue.withCtx(() => [
68
- vue.unref(diffContent) ? (vue.openBlock(), vue.createBlock(index, {
69
- key: 0,
70
- doc: vue.unref(diffContent)
71
- }, null, 8, ["doc"])) : vue.createCommentVNode("v-if", true)
72
- ]),
73
- _: 1
74
- })
75
- ]),
76
- _: 1
77
- }, 8, ["loading"])
78
- ]),
79
- vue.createElementVNode("div", _hoisted_3, [
80
- vue.createVNode(vue.unref(webVue.Scrollbar), {
81
- "outer-style": { height: "100%" },
82
- style: { "height": "100%", "overflow": "auto" }
83
- }, {
84
- default: vue.withCtx(() => [
85
- vue.createVNode(index$1, {
86
- list: vue.unref(list),
87
- current: vue.unref(current),
88
- onSelect: vue.unref(handleSelect)
89
- }, null, 8, ["list", "current", "onSelect"])
90
- ]),
91
- _: 1
92
- })
93
- ])
58
+ vue.unref(list).length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
59
+ vue.createElementVNode("div", _hoisted_2, [
60
+ vue.createVNode(vue.unref(webVue.Spin), {
61
+ loading: vue.unref(loading),
62
+ style: { "height": "100%", "width": "100%" }
63
+ }, {
64
+ default: vue.withCtx(() => [
65
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
66
+ "outer-style": { height: "100%" },
67
+ style: { "height": "100%", "overflow": "auto" }
68
+ }, {
69
+ default: vue.withCtx(() => [
70
+ vue.unref(diffContent) ? (vue.openBlock(), vue.createBlock(index, {
71
+ key: 0,
72
+ doc: vue.unref(diffContent)
73
+ }, null, 8, ["doc"])) : vue.createCommentVNode("v-if", true)
74
+ ]),
75
+ _: 1
76
+ })
77
+ ]),
78
+ _: 1
79
+ }, 8, ["loading"])
80
+ ]),
81
+ vue.createElementVNode("div", _hoisted_3, [
82
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
83
+ "outer-style": { height: "100%" },
84
+ style: { "height": "100%", "overflow": "auto" }
85
+ }, {
86
+ default: vue.withCtx(() => [
87
+ vue.createVNode(index$1, {
88
+ list: vue.unref(list),
89
+ current: vue.unref(current),
90
+ onSelect: vue.unref(handleSelect)
91
+ }, null, 8, ["list", "current", "onSelect"])
92
+ ]),
93
+ _: 1
94
+ })
95
+ ])
96
+ ], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(index$2), {
97
+ key: 1,
98
+ type: "empty",
99
+ "custom-tip": "\u6682\u65E0\u5386\u53F2\u8BB0\u5F55"
100
+ }))
94
101
  ])
95
102
  ]),
96
103
  _: 1
@@ -28,7 +28,7 @@ function useDocHistory(BASE_API) {
28
28
  const { code, message } = await getDocHistory(BASE_API, id.value, pub.value);
29
29
  if (code !== 0)
30
30
  return;
31
- list.value = message;
31
+ list.value = message || [];
32
32
  handleSelect(0);
33
33
  } catch (e) {
34
34
  console.log(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",