@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.
- package/dist/index.css +55 -0
- package/dist/index.min.css +1 -1
- package/es/contentModal/component.js +0 -1
- package/es/contentModal/components/ViewAllColumn/index.js +1 -0
- package/es/editMetaInfo/component.d.ts +0 -0
- package/es/editMetaInfo/component.js +87 -0
- package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
- package/es/editMetaInfo/components/metaInfoForm.js +621 -0
- package/es/editMetaInfo/index.d.ts +2 -0
- package/es/editMetaInfo/index.js +7 -0
- package/es/editMetaInfo/script/api.d.ts +6 -0
- package/es/editMetaInfo/script/api.js +17 -0
- package/es/editMetaInfo/script/restaurants.d.ts +4 -0
- package/es/editMetaInfo/script/restaurants.js +127 -0
- package/es/editMetaInfo/style/css.js +1 -0
- package/es/editMetaInfo/style/index.css +20 -0
- package/es/editMetaInfo/style/index.d.ts +1 -0
- package/es/editMetaInfo/style/index.js +1 -0
- package/es/editMetaInfo/style/index.less +30 -0
- package/es/hooks/dialogVisible.d.ts +8 -0
- package/es/hooks/dialogVisible.js +19 -0
- package/es/index.css +55 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +1 -0
- package/es/selectThumb/component.js +3 -1
- package/es/selectThumb/components/colorPalette.js +32 -26
- package/es/selectThumb/components/colorPicker.d.ts +0 -0
- package/es/selectThumb/components/colorPicker.js +54 -0
- package/es/selectThumb/style/colorPalette.less +31 -0
- package/es/selectThumb/style/index.css +35 -0
- package/es/selectThumb/style/index.less +7 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +16 -1
- package/lib/contentModal/component.js +0 -1
- package/lib/contentModal/components/ViewAllColumn/index.js +1 -0
- package/lib/editMetaInfo/component.js +88 -0
- package/lib/editMetaInfo/components/metaInfoForm.js +622 -0
- package/lib/editMetaInfo/index.js +8 -0
- package/lib/editMetaInfo/script/api.js +20 -0
- package/lib/editMetaInfo/script/restaurants.js +128 -0
- package/lib/editMetaInfo/style/css.js +2 -0
- package/lib/editMetaInfo/style/index.css +20 -0
- package/lib/editMetaInfo/style/index.js +2 -0
- package/lib/editMetaInfo/style/index.less +30 -0
- package/lib/hooks/dialogVisible.js +20 -0
- package/lib/index.css +55 -0
- package/lib/index.js +2 -0
- package/lib/index.less +1 -0
- package/lib/selectThumb/component.js +3 -1
- package/lib/selectThumb/components/colorPalette.js +32 -26
- package/lib/selectThumb/components/colorPicker.js +55 -0
- package/lib/selectThumb/style/colorPalette.less +31 -0
- package/lib/selectThumb/style/index.css +35 -0
- package/lib/selectThumb/style/index.less +7 -0
- package/lib/utils/index.js +16 -0
- 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;
|