@cmstops/pro-compo 3.9.2-alpha.22 → 3.9.2-alpha.24

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 (37) hide show
  1. package/es/contentDetailList/component.js +1 -1
  2. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +6 -177
  3. package/es/contentModal/components/ViewAllColumn/index.js +0 -1
  4. package/es/contentModal/script/api.js +1 -7
  5. package/es/selectAddTo/component.js +23 -102
  6. package/es/selectAddTo/components/SelectAddToView.js +91 -0
  7. package/es/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  8. package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +1 -4
  9. package/es/selectAddTo/components/ViewAllColumn/index.js +21 -18
  10. package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +31 -7
  11. package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
  12. package/es/selectAddTo/index.js +1 -10
  13. package/es/selectAddTo/script/api.js +1 -14
  14. package/es/selectAddTo/script/useSelectAddToState.js +16 -67
  15. package/es/selectAddTo/style/index.less +3 -3
  16. package/es/style.css +24 -18
  17. package/lib/contentDetailList/component.js +1 -1
  18. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +5 -176
  19. package/lib/contentModal/components/ViewAllColumn/index.js +0 -1
  20. package/lib/contentModal/script/api.js +0 -7
  21. package/lib/index.js +1 -1
  22. package/lib/selectAddTo/component.js +22 -101
  23. package/lib/selectAddTo/components/SelectAddToView.js +92 -0
  24. package/lib/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
  25. package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +1 -4
  26. package/lib/selectAddTo/components/ViewAllColumn/index.js +20 -17
  27. package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +34 -6
  28. package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
  29. package/lib/selectAddTo/index.js +2 -12
  30. package/lib/selectAddTo/script/api.js +0 -15
  31. package/lib/selectAddTo/script/useSelectAddToState.js +16 -67
  32. package/lib/selectAddTo/style/index.less +3 -3
  33. package/package.json +138 -138
  34. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +0 -151
  35. package/es/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -151
  36. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +0 -152
  37. package/lib/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -152
@@ -1,152 +0,0 @@
1
- "use strict";
2
- var vue = require("vue");
3
- var webVue = require("@arco-design/web-vue");
4
- var icon = require("@arco-design/web-vue/es/icon");
5
- var api = require("../../../script/api.js");
6
- const _hoisted_1 = { class: "column-selection-container" };
7
- const _hoisted_2 = { class: "search-column" };
8
- const _sfc_main = vue.defineComponent({
9
- ...{ name: "columnTree" },
10
- __name: "index",
11
- props: {
12
- column_id: {},
13
- tree: {},
14
- height: {},
15
- userInfo: {}
16
- },
17
- emits: ["update:column_id"],
18
- setup(__props, { emit: __emit }) {
19
- const props = __props;
20
- const emit = __emit;
21
- const treeOptions = {
22
- title: "alias",
23
- isLeaf: "leaf"
24
- };
25
- const selectAlias = vue.ref("\u5168\u90E8\u5185\u5BB9");
26
- const lastSearchKey = vue.ref(window.localStorage.getItem("lastSearchKey") || "");
27
- const searchKey = vue.ref("");
28
- const aTreeRef = vue.ref();
29
- const treeData = vue.computed(() => {
30
- if (!searchKey.value)
31
- return props.tree;
32
- return searchData(searchKey.value);
33
- });
34
- const searchData = (keyword) => {
35
- const loop = (data) => {
36
- const result = [];
37
- data.forEach((item) => {
38
- var _a;
39
- if ((_a = item.alias) == null ? void 0 : _a.includes(keyword)) {
40
- result.push({ ...item });
41
- } else if (item.children) {
42
- const filterData = loop(item.children);
43
- if (filterData.length) {
44
- result.push({
45
- ...item,
46
- children: filterData
47
- });
48
- }
49
- }
50
- });
51
- return result;
52
- };
53
- return loop(props.tree);
54
- };
55
- const clickLastItem = () => {
56
- aTreeRef.value.selectNode(lastSearchKey.value, true);
57
- };
58
- vue.watch(
59
- () => props.column_id,
60
- (val) => {
61
- setSelectAlias(val);
62
- }
63
- );
64
- const setSelectAlias = async (id) => {
65
- if (id === "all") {
66
- selectAlias.value = "\u5168\u90E8\u5185\u5BB9";
67
- return;
68
- }
69
- const { code, message } = await api.getCategoryPath(props.userInfo.BASE_API, {
70
- repo: props.userInfo.repository_id,
71
- category: id
72
- });
73
- if (code === 0) {
74
- const pathArr = [];
75
- for (const i of message) {
76
- pathArr.push(i.category_alias);
77
- }
78
- selectAlias.value = pathArr.join("/");
79
- }
80
- };
81
- const AddColumnSelected = (selectedKeys, data) => {
82
- lastSearchKey.value = selectedKeys[0];
83
- window.localStorage.setItem("lastSearchKey", lastSearchKey.value);
84
- emit("update:column_id", data.node.id);
85
- };
86
- return (_ctx, _cache) => {
87
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
88
- vue.createVNode(vue.unref(webVue.Popover), {
89
- "content-style": { minWidth: "120px" },
90
- "content-class": "column-selection-popover-content",
91
- position: "bottom",
92
- trigger: "click"
93
- }, {
94
- content: vue.withCtx(() => [
95
- vue.createElementVNode("div", _hoisted_2, [
96
- vue.createVNode(vue.unref(webVue.InputSearch), {
97
- modelValue: searchKey.value,
98
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event),
99
- placeholder: "\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"
100
- }, null, 8, ["modelValue"])
101
- ]),
102
- lastSearchKey.value ? (vue.openBlock(), vue.createElementBlock("div", {
103
- key: 0,
104
- class: "last-search-key",
105
- onClick: clickLastItem
106
- }, "\u4E0A\u4E00\u6B21\u9009\u62E9 ")) : vue.createCommentVNode("v-if", true),
107
- vue.createElementVNode("div", {
108
- style: vue.normalizeStyle({ minHeight: props.height + "px" }),
109
- class: "column-selection-main"
110
- }, [
111
- vue.createElementVNode("div", {
112
- style: vue.normalizeStyle({ height: props.height + "px" }),
113
- class: "column-v"
114
- }, [
115
- vue.createVNode(vue.unref(webVue.Scrollbar), {
116
- "outer-class": "column-outer-scrollbar",
117
- style: { "height": "100%", "overflow": "auto" }
118
- }, {
119
- default: vue.withCtx(() => [
120
- vue.createVNode(vue.unref(webVue.Tree), {
121
- ref_key: "aTreeRef",
122
- ref: aTreeRef,
123
- data: treeData.value,
124
- "default-expand-all": false,
125
- "field-names": treeOptions,
126
- "block-node": "",
127
- "check-strictly": "",
128
- onSelect: AddColumnSelected
129
- }, null, 8, ["data"])
130
- ]),
131
- _: 1
132
- })
133
- ], 4)
134
- ], 4)
135
- ]),
136
- default: vue.withCtx(() => [
137
- vue.createVNode(vue.unref(webVue.Button), { class: "button" }, {
138
- default: vue.withCtx(() => [
139
- vue.createVNode(vue.unref(icon.IconDragDotVertical)),
140
- vue.createTextVNode(" " + vue.toDisplayString(selectAlias.value) + " ", 1),
141
- vue.createVNode(vue.unref(icon.IconCaretRight))
142
- ]),
143
- _: 1
144
- })
145
- ]),
146
- _: 1
147
- })
148
- ]);
149
- };
150
- }
151
- });
152
- module.exports = _sfc_main;
@@ -1,152 +0,0 @@
1
- "use strict";
2
- var vue = require("vue");
3
- var webVue = require("@arco-design/web-vue");
4
- var icon = require("@arco-design/web-vue/es/icon");
5
- var api = require("../../../script/api.js");
6
- const _hoisted_1 = { class: "column-selection-container" };
7
- const _hoisted_2 = { class: "search-column" };
8
- const _sfc_main = vue.defineComponent({
9
- ...{ name: "columnTree" },
10
- __name: "index",
11
- props: {
12
- column_id: {},
13
- tree: {},
14
- height: {},
15
- userInfo: {}
16
- },
17
- emits: ["update:column_id"],
18
- setup(__props, { emit: __emit }) {
19
- const props = __props;
20
- const emit = __emit;
21
- const treeOptions = {
22
- title: "alias",
23
- isLeaf: "leaf"
24
- };
25
- const selectAlias = vue.ref("\u5168\u90E8\u5185\u5BB9");
26
- const lastSearchKey = vue.ref(window.localStorage.getItem("lastSearchKey") || "");
27
- const searchKey = vue.ref("");
28
- const aTreeRef = vue.ref();
29
- const treeData = vue.computed(() => {
30
- if (!searchKey.value)
31
- return props.tree;
32
- return searchData(searchKey.value);
33
- });
34
- const searchData = (keyword) => {
35
- const loop = (data) => {
36
- const result = [];
37
- data.forEach((item) => {
38
- var _a;
39
- if ((_a = item.alias) == null ? void 0 : _a.includes(keyword)) {
40
- result.push({ ...item });
41
- } else if (item.children) {
42
- const filterData = loop(item.children);
43
- if (filterData.length) {
44
- result.push({
45
- ...item,
46
- children: filterData
47
- });
48
- }
49
- }
50
- });
51
- return result;
52
- };
53
- return loop(props.tree);
54
- };
55
- const clickLastItem = () => {
56
- aTreeRef.value.selectNode(lastSearchKey.value, true);
57
- };
58
- vue.watch(
59
- () => props.column_id,
60
- (val) => {
61
- setSelectAlias(val);
62
- }
63
- );
64
- const setSelectAlias = async (id) => {
65
- if (id === "all") {
66
- selectAlias.value = "\u5168\u90E8\u5185\u5BB9";
67
- return;
68
- }
69
- const { code, message } = await api.getCategoryPath(props.userInfo.BASE_API, {
70
- repo: props.userInfo.repository_id,
71
- category: id
72
- });
73
- if (code === 0) {
74
- const pathArr = [];
75
- for (const i of message) {
76
- pathArr.push(i.category_alias);
77
- }
78
- selectAlias.value = pathArr.join("/");
79
- }
80
- };
81
- const AddColumnSelected = (selectedKeys, data) => {
82
- lastSearchKey.value = selectedKeys[0];
83
- window.localStorage.setItem("lastSearchKey", lastSearchKey.value);
84
- emit("update:column_id", data.node.id);
85
- };
86
- return (_ctx, _cache) => {
87
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
88
- vue.createVNode(vue.unref(webVue.Popover), {
89
- "content-style": { minWidth: "120px" },
90
- "content-class": "column-selection-popover-content",
91
- position: "bottom",
92
- trigger: "click"
93
- }, {
94
- content: vue.withCtx(() => [
95
- vue.createElementVNode("div", _hoisted_2, [
96
- vue.createVNode(vue.unref(webVue.InputSearch), {
97
- modelValue: searchKey.value,
98
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKey.value = $event),
99
- placeholder: "\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"
100
- }, null, 8, ["modelValue"])
101
- ]),
102
- lastSearchKey.value ? (vue.openBlock(), vue.createElementBlock("div", {
103
- key: 0,
104
- class: "last-search-key",
105
- onClick: clickLastItem
106
- }, "\u4E0A\u4E00\u6B21\u9009\u62E9 ")) : vue.createCommentVNode("v-if", true),
107
- vue.createElementVNode("div", {
108
- style: vue.normalizeStyle({ minHeight: props.height + "px" }),
109
- class: "column-selection-main"
110
- }, [
111
- vue.createElementVNode("div", {
112
- style: vue.normalizeStyle({ height: props.height + "px" }),
113
- class: "column-v"
114
- }, [
115
- vue.createVNode(vue.unref(webVue.Scrollbar), {
116
- "outer-class": "column-outer-scrollbar",
117
- style: { "height": "100%", "overflow": "auto" }
118
- }, {
119
- default: vue.withCtx(() => [
120
- vue.createVNode(vue.unref(webVue.Tree), {
121
- ref_key: "aTreeRef",
122
- ref: aTreeRef,
123
- data: treeData.value,
124
- "default-expand-all": false,
125
- "field-names": treeOptions,
126
- "block-node": "",
127
- "check-strictly": "",
128
- onSelect: AddColumnSelected
129
- }, null, 8, ["data"])
130
- ]),
131
- _: 1
132
- })
133
- ], 4)
134
- ], 4)
135
- ]),
136
- default: vue.withCtx(() => [
137
- vue.createVNode(vue.unref(webVue.Button), { class: "button" }, {
138
- default: vue.withCtx(() => [
139
- vue.createVNode(vue.unref(icon.IconDragDotVertical)),
140
- vue.createTextVNode(" " + vue.toDisplayString(selectAlias.value) + " ", 1),
141
- vue.createVNode(vue.unref(icon.IconCaretRight))
142
- ]),
143
- _: 1
144
- })
145
- ]),
146
- _: 1
147
- })
148
- ]);
149
- };
150
- }
151
- });
152
- module.exports = _sfc_main;