@cmstops/pro-compo 0.1.42 → 0.1.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,9 @@
1
1
  import { defineComponent, ref, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode } from "vue";
2
- import { Modal, Scrollbar } from "@arco-design/web-vue";
2
+ import { Modal, Spin, Scrollbar } from "@arco-design/web-vue";
3
3
  import { getDocDetailsNew } from "./script/api.js";
4
- import _sfc_main$1 from "./components/metaInfoForm.js";
5
4
  import useDialogVisible from "../hooks/dialogVisible.js";
6
5
  import { DEFAULT_BASE_API } from "../config.js";
6
+ import _sfc_main$1 from "./components/metaInfoForm.js";
7
7
  const _hoisted_1 = { class: "edit-meta-info-container" };
8
8
  const _hoisted_2 = { style: { "padding": "20px" } };
9
9
  const _sfc_main = defineComponent({
@@ -19,14 +19,17 @@ const _sfc_main = defineComponent({
19
19
  const emit = __emit;
20
20
  const props = __props;
21
21
  const metaInfoFormRef = ref();
22
+ const isLoading = ref(false);
22
23
  const editorDataPubInfo = ref(null);
23
24
  const BASE_API = props.BASE_API || DEFAULT_BASE_API;
24
25
  const handleOpen = async () => {
25
26
  if (props.hashId) {
27
+ isLoading.value = true;
26
28
  const { code, message } = await getDocDetailsNew(BASE_API, {
27
29
  hashid: props.hashId
28
30
  });
29
31
  if (code === 0) {
32
+ isLoading.value = false;
30
33
  editorDataPubInfo.value = {
31
34
  id: message.id,
32
35
  title: message.title,
@@ -62,23 +65,31 @@ const _sfc_main = defineComponent({
62
65
  onCancel: handleCancel
63
66
  }, {
64
67
  default: withCtx(() => [
65
- createVNode(unref(Scrollbar), {
66
- "outer-style": "height: 60vh; overflow: auto",
67
- style: { "height": "100%", "overflow": "auto" }
68
+ createVNode(unref(Spin), {
69
+ loading: isLoading.value,
70
+ style: { "width": "100%" }
68
71
  }, {
69
72
  default: withCtx(() => [
70
- createElementVNode("div", _hoisted_2, [
71
- createVNode(_sfc_main$1, {
72
- ref_key: "metaInfoFormRef",
73
- ref: metaInfoFormRef,
74
- BASE_API: unref(BASE_API),
75
- "init-data": editorDataPubInfo.value,
76
- onUpload: _cache[0] || (_cache[0] = (e) => _ctx.$emit("upload", e))
77
- }, null, 8, ["BASE_API", "init-data"])
78
- ])
73
+ createVNode(unref(Scrollbar), {
74
+ "outer-style": "height: 60vh; overflow: auto",
75
+ style: { "height": "100%", "overflow": "auto" }
76
+ }, {
77
+ default: withCtx(() => [
78
+ createElementVNode("div", _hoisted_2, [
79
+ createVNode(_sfc_main$1, {
80
+ ref_key: "metaInfoFormRef",
81
+ ref: metaInfoFormRef,
82
+ BASE_API: unref(BASE_API),
83
+ "init-data": editorDataPubInfo.value,
84
+ onUpload: _cache[0] || (_cache[0] = (e) => _ctx.$emit("upload", e))
85
+ }, null, 8, ["BASE_API", "init-data"])
86
+ ])
87
+ ]),
88
+ _: 1
89
+ })
79
90
  ]),
80
91
  _: 1
81
- })
92
+ }, 8, ["loading"])
82
93
  ]),
83
94
  _: 1
84
95
  }, 8, ["visible"])
@@ -44,6 +44,7 @@ const _sfc_main = defineComponent({
44
44
  const saveLoading = ref(false);
45
45
  const editImage = ref("");
46
46
  const setVisible = (bool) => {
47
+ console.log("--0-", bool);
47
48
  emit("update:visible", bool);
48
49
  };
49
50
  const cancelDialog = () => {
@@ -313,7 +314,8 @@ const _sfc_main = defineComponent({
313
314
  "title-align": "center",
314
315
  "unmount-on-close": "",
315
316
  "modal-class": "image-crop-modal-wrapper",
316
- "body-class": "image-crop-modal-body"
317
+ "body-class": "image-crop-modal-body",
318
+ onCancel: _cache[4] || (_cache[4] = ($event) => setVisible(false))
317
319
  }, {
318
320
  title: withCtx(() => [
319
321
  createTextVNode(toDisplayString(_ctx.aspectRatioProp ? "\u88C1\u526A\u56FE\u7247" : "\u8BF7\u9009\u62E9\u88C1\u526A\u6BD4\u4F8B"), 1)
@@ -60,7 +60,7 @@ const _sfc_main = defineComponent({
60
60
  onCancel: handleCancel
61
61
  }, {
62
62
  title: withCtx(() => [
63
- createTextVNode("\u9009\u62E9\u5C01\u9762\u6765\u6E90")
63
+ createTextVNode("\u9009\u62E9\u7D20\u6750\u6765\u6E90")
64
64
  ]),
65
65
  default: withCtx(() => [
66
66
  createVNode(_sfc_main$1, {
@@ -2,9 +2,9 @@
2
2
  var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
4
  var api = require("./script/api.js");
5
- var metaInfoForm = require("./components/metaInfoForm.js");
6
5
  var dialogVisible = require("../hooks/dialogVisible.js");
7
6
  var config = require("../config.js");
7
+ var metaInfoForm = require("./components/metaInfoForm.js");
8
8
  const _hoisted_1 = { class: "edit-meta-info-container" };
9
9
  const _hoisted_2 = { style: { "padding": "20px" } };
10
10
  const _sfc_main = vue.defineComponent({
@@ -20,14 +20,17 @@ const _sfc_main = vue.defineComponent({
20
20
  const emit = __emit;
21
21
  const props = __props;
22
22
  const metaInfoFormRef = vue.ref();
23
+ const isLoading = vue.ref(false);
23
24
  const editorDataPubInfo = vue.ref(null);
24
25
  const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
25
26
  const handleOpen = async () => {
26
27
  if (props.hashId) {
28
+ isLoading.value = true;
27
29
  const { code, message } = await api.getDocDetailsNew(BASE_API, {
28
30
  hashid: props.hashId
29
31
  });
30
32
  if (code === 0) {
33
+ isLoading.value = false;
31
34
  editorDataPubInfo.value = {
32
35
  id: message.id,
33
36
  title: message.title,
@@ -63,23 +66,31 @@ const _sfc_main = vue.defineComponent({
63
66
  onCancel: handleCancel
64
67
  }, {
65
68
  default: vue.withCtx(() => [
66
- vue.createVNode(vue.unref(webVue.Scrollbar), {
67
- "outer-style": "height: 60vh; overflow: auto",
68
- style: { "height": "100%", "overflow": "auto" }
69
+ vue.createVNode(vue.unref(webVue.Spin), {
70
+ loading: isLoading.value,
71
+ style: { "width": "100%" }
69
72
  }, {
70
73
  default: vue.withCtx(() => [
71
- vue.createElementVNode("div", _hoisted_2, [
72
- vue.createVNode(metaInfoForm, {
73
- ref_key: "metaInfoFormRef",
74
- ref: metaInfoFormRef,
75
- BASE_API: vue.unref(BASE_API),
76
- "init-data": editorDataPubInfo.value,
77
- onUpload: _cache[0] || (_cache[0] = (e) => _ctx.$emit("upload", e))
78
- }, null, 8, ["BASE_API", "init-data"])
79
- ])
74
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
75
+ "outer-style": "height: 60vh; overflow: auto",
76
+ style: { "height": "100%", "overflow": "auto" }
77
+ }, {
78
+ default: vue.withCtx(() => [
79
+ vue.createElementVNode("div", _hoisted_2, [
80
+ vue.createVNode(metaInfoForm, {
81
+ ref_key: "metaInfoFormRef",
82
+ ref: metaInfoFormRef,
83
+ BASE_API: vue.unref(BASE_API),
84
+ "init-data": editorDataPubInfo.value,
85
+ onUpload: _cache[0] || (_cache[0] = (e) => _ctx.$emit("upload", e))
86
+ }, null, 8, ["BASE_API", "init-data"])
87
+ ])
88
+ ]),
89
+ _: 1
90
+ })
80
91
  ]),
81
92
  _: 1
82
- })
93
+ }, 8, ["loading"])
83
94
  ]),
84
95
  _: 1
85
96
  }, 8, ["visible"])
@@ -51,6 +51,7 @@ const _sfc_main = vue.defineComponent({
51
51
  const saveLoading = vue.ref(false);
52
52
  const editImage = vue.ref("");
53
53
  const setVisible = (bool) => {
54
+ console.log("--0-", bool);
54
55
  emit("update:visible", bool);
55
56
  };
56
57
  const cancelDialog = () => {
@@ -320,7 +321,8 @@ const _sfc_main = vue.defineComponent({
320
321
  "title-align": "center",
321
322
  "unmount-on-close": "",
322
323
  "modal-class": "image-crop-modal-wrapper",
323
- "body-class": "image-crop-modal-body"
324
+ "body-class": "image-crop-modal-body",
325
+ onCancel: _cache[4] || (_cache[4] = ($event) => setVisible(false))
324
326
  }, {
325
327
  title: vue.withCtx(() => [
326
328
  vue.createTextVNode(vue.toDisplayString(_ctx.aspectRatioProp ? "\u88C1\u526A\u56FE\u7247" : "\u8BF7\u9009\u62E9\u88C1\u526A\u6BD4\u4F8B"), 1)
@@ -61,7 +61,7 @@ const _sfc_main = vue.defineComponent({
61
61
  onCancel: handleCancel
62
62
  }, {
63
63
  title: vue.withCtx(() => [
64
- vue.createTextVNode("\u9009\u62E9\u5C01\u9762\u6765\u6E90")
64
+ vue.createTextVNode("\u9009\u62E9\u7D20\u6750\u6765\u6E90")
65
65
  ]),
66
66
  default: vue.withCtx(() => [
67
67
  vue.createVNode(index, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",