@cmstops/pro-compo 0.1.20 → 0.1.21

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.
Files changed (57) hide show
  1. package/dist/index.css +55 -0
  2. package/dist/index.min.css +1 -1
  3. package/es/contentModal/component.js +0 -1
  4. package/es/contentModal/components/ViewAllColumn/index.js +1 -0
  5. package/es/editMetaInfo/component.d.ts +0 -0
  6. package/es/editMetaInfo/component.js +87 -0
  7. package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
  8. package/es/editMetaInfo/components/metaInfoForm.js +621 -0
  9. package/es/editMetaInfo/index.d.ts +2 -0
  10. package/es/editMetaInfo/index.js +7 -0
  11. package/es/editMetaInfo/script/api.d.ts +6 -0
  12. package/es/editMetaInfo/script/api.js +17 -0
  13. package/es/editMetaInfo/script/restaurants.d.ts +4 -0
  14. package/es/editMetaInfo/script/restaurants.js +127 -0
  15. package/es/editMetaInfo/style/css.js +1 -0
  16. package/es/editMetaInfo/style/index.css +20 -0
  17. package/es/editMetaInfo/style/index.d.ts +1 -0
  18. package/es/editMetaInfo/style/index.js +1 -0
  19. package/es/editMetaInfo/style/index.less +30 -0
  20. package/es/hooks/dialogVisible.d.ts +8 -0
  21. package/es/hooks/dialogVisible.js +19 -0
  22. package/es/index.css +55 -0
  23. package/es/index.d.ts +1 -0
  24. package/es/index.js +1 -0
  25. package/es/index.less +1 -0
  26. package/es/selectThumb/component.js +3 -1
  27. package/es/selectThumb/components/colorPalette.js +32 -26
  28. package/es/selectThumb/components/colorPicker.d.ts +0 -0
  29. package/es/selectThumb/components/colorPicker.js +54 -0
  30. package/es/selectThumb/style/colorPalette.less +31 -0
  31. package/es/selectThumb/style/index.css +35 -0
  32. package/es/selectThumb/style/index.less +7 -0
  33. package/es/utils/index.d.ts +1 -0
  34. package/es/utils/index.js +16 -1
  35. package/lib/contentModal/component.js +0 -1
  36. package/lib/contentModal/components/ViewAllColumn/index.js +1 -0
  37. package/lib/editMetaInfo/component.js +88 -0
  38. package/lib/editMetaInfo/components/metaInfoForm.js +622 -0
  39. package/lib/editMetaInfo/index.js +8 -0
  40. package/lib/editMetaInfo/script/api.js +20 -0
  41. package/lib/editMetaInfo/script/restaurants.js +128 -0
  42. package/lib/editMetaInfo/style/css.js +2 -0
  43. package/lib/editMetaInfo/style/index.css +20 -0
  44. package/lib/editMetaInfo/style/index.js +2 -0
  45. package/lib/editMetaInfo/style/index.less +30 -0
  46. package/lib/hooks/dialogVisible.js +20 -0
  47. package/lib/index.css +55 -0
  48. package/lib/index.js +2 -0
  49. package/lib/index.less +1 -0
  50. package/lib/selectThumb/component.js +3 -1
  51. package/lib/selectThumb/components/colorPalette.js +32 -26
  52. package/lib/selectThumb/components/colorPicker.js +55 -0
  53. package/lib/selectThumb/style/colorPalette.less +31 -0
  54. package/lib/selectThumb/style/index.css +35 -0
  55. package/lib/selectThumb/style/index.less +7 -0
  56. package/lib/utils/index.js +16 -0
  57. package/package.json +1 -1
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var api = require("./script/api.js");
5
+ var metaInfoForm = require("./components/metaInfoForm.js");
6
+ var dialogVisible = require("../hooks/dialogVisible.js");
7
+ var config = require("../config.js");
8
+ const _hoisted_1 = { class: "edit-meta-info-container" };
9
+ const _hoisted_2 = { style: { "padding": "20px" } };
10
+ const _sfc_main = vue.defineComponent({
11
+ ...{ name: "editMetaInfo" },
12
+ __name: "component",
13
+ props: {
14
+ BASE_API: {},
15
+ visible: { type: Boolean },
16
+ hashId: {}
17
+ },
18
+ emits: ["update:visible", "submit"],
19
+ setup(__props, { emit }) {
20
+ const props = __props;
21
+ const metaInfoFormRef = vue.ref();
22
+ const editorDataPubInfo = vue.ref(null);
23
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
24
+ const handleOpen = async () => {
25
+ if (props.hashId) {
26
+ const { code, message } = await api.getDocDetailsNew(BASE_API, {
27
+ hashid: props.hashId
28
+ });
29
+ if (code === 0) {
30
+ editorDataPubInfo.value = {
31
+ id: message.id,
32
+ title: message.title,
33
+ series: message.series,
34
+ ...message.meta
35
+ };
36
+ }
37
+ }
38
+ };
39
+ const { visible, setVisible } = dialogVisible(props, emit);
40
+ const handleOk = async () => {
41
+ const meta = await metaInfoFormRef.value.getFormData("valid");
42
+ if (meta) {
43
+ const data = { id: editorDataPubInfo.value.id, meta };
44
+ emit("submit", data);
45
+ }
46
+ };
47
+ const handleCancel = () => {
48
+ setVisible(false);
49
+ };
50
+ return (_ctx, _cache) => {
51
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
52
+ vue.createVNode(vue.unref(webVue.Modal), {
53
+ visible: vue.unref(visible),
54
+ width: "800px",
55
+ "mask-closable": false,
56
+ "title-align": "start",
57
+ "body-class": "edit-meta-info-dialog-body",
58
+ "unmount-on-close": "",
59
+ title: "\u7F16\u8F91\u7A3F\u7B7E",
60
+ onOpen: handleOpen,
61
+ onOk: handleOk,
62
+ onCancel: handleCancel
63
+ }, {
64
+ default: vue.withCtx(() => [
65
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
66
+ "outer-style": "height: 60vh; overflow: auto",
67
+ style: { "height": "100%", "overflow": "auto" }
68
+ }, {
69
+ default: vue.withCtx(() => [
70
+ vue.createElementVNode("div", _hoisted_2, [
71
+ vue.createVNode(metaInfoForm, {
72
+ ref_key: "metaInfoFormRef",
73
+ ref: metaInfoFormRef,
74
+ BASE_API: vue.unref(BASE_API),
75
+ "init-data": editorDataPubInfo.value
76
+ }, null, 8, ["BASE_API", "init-data"])
77
+ ])
78
+ ]),
79
+ _: 1
80
+ })
81
+ ]),
82
+ _: 1
83
+ }, 8, ["visible"])
84
+ ]);
85
+ };
86
+ }
87
+ });
88
+ module.exports = _sfc_main;