@cmstops/pro-compo 3.9.1 → 3.9.2

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,3 +1,4 @@
1
+ import { Ref } from 'vue';
1
2
  export declare function getAttachmentsAll(BASE_API: string, query?: any): Promise<import("axios").AxiosResponse<any, any>>;
2
3
  export declare function getAttachmentsMy(BASE_API: string, query?: any): Promise<import("axios").AxiosResponse<any, any>>;
3
4
  export declare function getAttachmentsMyMessage(BASE_API: string, query: any): Promise<import("axios").AxiosResponse<any, any>>;
@@ -6,12 +7,12 @@ declare type OptionsType = {
6
7
  BASE_API: string;
7
8
  };
8
9
  export default function useAttachement(options: OptionsType): {
9
- list: import("vue").Ref<any[], any[]>;
10
- total: import("vue").Ref<number, number>;
11
- limit: import("vue").Ref<number, number>;
12
- offset: import("vue").Ref<number, number>;
10
+ list: Ref<any[], any[]>;
11
+ total: Ref<number, number>;
12
+ limit: Ref<number, number>;
13
+ offset: Ref<number, number>;
13
14
  pageIdx: import("vue").ComputedRef<number>;
14
- loading: import("vue").Ref<boolean, boolean>;
15
+ loading: Ref<boolean, boolean>;
15
16
  changeFilter: (f: any) => void;
16
17
  changeKey: (k: string) => void;
17
18
  changePage: (o: number) => void;
@@ -19,7 +20,7 @@ export default function useAttachement(options: OptionsType): {
19
20
  loadData: () => Promise<void>;
20
21
  };
21
22
  export declare function useLocalRecource(): {
22
- localList: import("vue").Ref<any[], any[]>;
23
+ localList: Ref<any[], any[]>;
23
24
  initLocalList: () => void;
24
25
  setLocalList: (list: any[]) => void;
25
26
  };
@@ -30,24 +31,4 @@ export declare const mediaUseEnum: {
30
31
  export declare function getSysRsByTag(BASE_API: string, params: any): Promise<import("axios").AxiosResponse<any, any>>;
31
32
  export declare function getSysRsClassifyList(BASE_API: string, sys_tag: number): Promise<import("axios").AxiosResponse<any, any>>;
32
33
  export declare function getSysRsPage(BASE_API: string, params: any): Promise<import("axios").AxiosResponse<any, any>>;
33
- export declare function getDirectory(BASE_API: string, params: any): Promise<import("axios").AxiosResponse<any, any>>;
34
- /**
35
- * 数据结构:
36
- * Array<{
37
- * "id": {dirid},
38
- * "alias": {dirname},
39
- * "parent_id": {parent_dirid},
40
- * "children": [],
41
- * ...
42
- * }>
43
- */
44
- declare type DirOptionsType = {
45
- key?: string;
46
- BASE_API: string;
47
- };
48
- export declare function useDirectory(options: DirOptionsType): {
49
- tree: import("vue").Ref<any[], any[]>;
50
- init: () => Promise<void>;
51
- loadMore: (target: any) => Promise<void>;
52
- };
53
34
  export {};
@@ -1,4 +1,4 @@
1
- import { ref, computed, onMounted } from "vue";
1
+ import { ref, computed } from "vue";
2
2
  import request from "../utils/request.js";
3
3
  function getAttachmentsAll(BASE_API, query) {
4
4
  return request(BASE_API, {
@@ -108,51 +108,4 @@ function getSysRsPage(BASE_API, params) {
108
108
  params
109
109
  });
110
110
  }
111
- function getDirectory(BASE_API, params) {
112
- return request(BASE_API, {
113
- url: "/poplar/v3/directories",
114
- method: "get",
115
- params
116
- });
117
- }
118
- function useDirectory(options) {
119
- const tree = ref([]);
120
- async function loadDirTree(parent_id) {
121
- const params = parent_id ? { parent_id } : {};
122
- const { code, message } = await getDirectory(options.BASE_API, params);
123
- if (code === 0) {
124
- if (!Array.isArray(message.data))
125
- return [];
126
- return message.data.map(({ alias, id }) => {
127
- return {
128
- title: alias,
129
- key: id,
130
- isLeaf: false,
131
- children: []
132
- };
133
- });
134
- }
135
- return [];
136
- }
137
- async function init() {
138
- const result = await loadDirTree();
139
- if (!Array.isArray(result))
140
- return;
141
- tree.value = result;
142
- }
143
- async function loadMore(target) {
144
- const children = await loadDirTree(target.key);
145
- target.children = children;
146
- if (children.length === 0)
147
- target.isLeaf = true;
148
- }
149
- onMounted(() => {
150
- init();
151
- });
152
- return {
153
- tree,
154
- init,
155
- loadMore
156
- };
157
- }
158
- export { useAttachement as default, getAttachmentsAll, getAttachmentsMy, getAttachmentsMyMessage, getDirectory, getSysRsByTag, getSysRsPage, useDirectory };
111
+ export { useAttachement as default, getAttachmentsAll, getAttachmentsMy, getAttachmentsMyMessage, getSysRsByTag, getSysRsPage };
@@ -1,8 +1,7 @@
1
1
  import { defineComponent, inject, computed, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeClass } from "vue";
2
- import { Input, Dropdown, Doption, Button, Select, Option, TreeSelect, RangePicker } from "@arco-design/web-vue";
2
+ import { Input, Dropdown, Doption, Button, Select, Option, RangePicker } from "@arco-design/web-vue";
3
3
  import { IconUpload } from "@arco-design/web-vue/es/icon";
4
4
  import useSelection from "../../../../hooks/useSelection.js";
5
- import { useDirectory } from "../../../../hooks/useAttachement.js";
6
5
  import { RESOURCE_SOURCE_OPTIONS, RESOURCE_CATALOG_OPTIONS } from "../../../../utils/typeMap.js";
7
6
  import { getAccountList } from "../../../scripts/selectionApis.js";
8
7
  import { keywordsSelection } from "../../../../utils/resource.js";
@@ -57,9 +56,6 @@ const _sfc_main = defineComponent({
57
56
  });
58
57
  const resourceSource = RESOURCE_SOURCE_OPTIONS;
59
58
  const resourceCatalog = RESOURCE_CATALOG_OPTIONS;
60
- const { tree, loadMore: loadDirMore } = useDirectory({
61
- BASE_API: baseAPI
62
- });
63
59
  const originFilter = {
64
60
  catalog: [],
65
61
  source: "",
@@ -68,8 +64,7 @@ const _sfc_main = defineComponent({
68
64
  keyword: "",
69
65
  precise_keyword: "",
70
66
  upload_by: null,
71
- sf: "",
72
- directory_id: void 0
67
+ sf: ""
73
68
  };
74
69
  const filter = ref(JSON.parse(JSON.stringify(originFilter)));
75
70
  const handleReset = () => {
@@ -185,13 +180,13 @@ const _sfc_main = defineComponent({
185
180
  }, {
186
181
  content: withCtx(() => [
187
182
  createVNode(unref(Doption), { value: 0 }, {
188
- default: withCtx(() => _cache[8] || (_cache[8] = [
183
+ default: withCtx(() => _cache[7] || (_cache[7] = [
189
184
  createTextVNode("\u7CBE\u51C6\u641C")
190
185
  ])),
191
186
  _: 1
192
187
  }),
193
188
  createVNode(unref(Doption), { value: 1 }, {
194
- default: withCtx(() => _cache[9] || (_cache[9] = [
189
+ default: withCtx(() => _cache[8] || (_cache[8] = [
195
190
  createTextVNode("\u6A21\u7CCA\u641C")
196
191
  ])),
197
192
  _: 1
@@ -233,20 +228,10 @@ const _sfc_main = defineComponent({
233
228
  _: 1
234
229
  }, 8, ["modelValue", "disabled"])
235
230
  ]),
236
- createCommentVNode(" \u76EE\u5F55 "),
237
- createVNode(unref(TreeSelect), {
238
- modelValue: filter.value.directory_id,
239
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.directory_id = $event),
240
- data: unref(tree),
241
- "load-more": unref(loadDirMore),
242
- placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
243
- style: { "width": "180px" },
244
- "allow-clear": ""
245
- }, null, 8, ["modelValue", "data", "load-more"]),
246
231
  createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
247
232
  createVNode(unref(RangePicker), {
248
233
  modelValue: rangeTime.value,
249
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
234
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeTime.value = $event),
250
235
  "allow-clear": "",
251
236
  style: { "width": "240px" }
252
237
  }, null, 8, ["modelValue"]),
@@ -254,7 +239,7 @@ const _sfc_main = defineComponent({
254
239
  createElementVNode("div", _hoisted_6, [
255
240
  createVNode(unref(Select), {
256
241
  modelValue: filter.value.source,
257
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
242
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.source = $event),
258
243
  "allow-clear": "",
259
244
  placeholder: "\u6765\u6E90"
260
245
  }, {
@@ -274,7 +259,7 @@ const _sfc_main = defineComponent({
274
259
  !_ctx.disableUploadBy ? (openBlock(), createElementBlock("div", _hoisted_7, [
275
260
  createVNode(unref(Select), {
276
261
  modelValue: filter.value.upload_by,
277
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
262
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.upload_by = $event),
278
263
  "allow-clear": "",
279
264
  placeholder: "\u4E0A\u4F20\u4EBA",
280
265
  loading: unref(loading),
@@ -299,7 +284,7 @@ const _sfc_main = defineComponent({
299
284
  type: "text",
300
285
  onClick: handleReset
301
286
  }, {
302
- default: withCtx(() => _cache[10] || (_cache[10] = [
287
+ default: withCtx(() => _cache[9] || (_cache[9] = [
303
288
  createTextVNode(" \u91CD\u7F6E ")
304
289
  ])),
305
290
  _: 1
@@ -308,13 +293,13 @@ const _sfc_main = defineComponent({
308
293
  createElementVNode("div", _hoisted_8, [
309
294
  createVNode(unref(Button), {
310
295
  type: "primary",
311
- onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
296
+ onClick: _cache[6] || (_cache[6] = ($event) => emits("upload"))
312
297
  }, {
313
298
  icon: withCtx(() => [
314
299
  createVNode(unref(IconUpload))
315
300
  ]),
316
301
  default: withCtx(() => [
317
- _cache[11] || (_cache[11] = createTextVNode(" \u4E0A\u4F20 "))
302
+ _cache[10] || (_cache[10] = createTextVNode(" \u4E0A\u4F20 "))
318
303
  ]),
319
304
  _: 1
320
305
  })
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, provide, computed, watch, nextTick, onMounted, openBlock, createElementBlock, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, Fragment, renderList, createBlock, createVNode, unref, withCtx, createTextVNode } from "vue";
1
+ import { defineComponent, ref, provide, computed, watch, nextTick, openBlock, createElementBlock, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, Fragment, renderList, createBlock, createVNode, unref, withCtx, createTextVNode } from "vue";
2
2
  import { RadioGroup, Radio, Switch } from "@arco-design/web-vue";
3
3
  import { docThumbObjMap, docThumbArrMap } from "../utils/doc.js";
4
4
  import _sfc_main$4 from "../imageCrop/component.js";
@@ -234,6 +234,7 @@ const _sfc_main = defineComponent({
234
234
  thumbOptionIndex.value = index;
235
235
  };
236
236
  const openDialogMediaSelection = (type, index) => {
237
+ console.log(type, index, "dkdk");
237
238
  thumbBannerModel.value = type || "thumb";
238
239
  thumbOptionIndex.value = index || 0;
239
240
  dialogMediaSelectionShow.value = true;
@@ -270,16 +271,6 @@ const _sfc_main = defineComponent({
270
271
  temp = [{ url: data[0].url, thumb: data[0].url }];
271
272
  }
272
273
  styleData.value.data = temp;
273
- styleData.value.cover_url = data[0].url;
274
- const getColors = getThemeColor(BASE_API, data[0].url);
275
- getColors.then((themes) => {
276
- styleData.value.cover_colorList = JSON.parse(JSON.stringify(themes));
277
- styleData.value.cover_theme_color = `rgb(${themes[1]})`;
278
- callback(styleData.value);
279
- }).catch((e) => {
280
- styleData.value.banner_theme_color = `rgb(255, 255, 255)`;
281
- callback(styleData.value);
282
- });
283
274
  } else if (thumbBannerModel.value === "banner") {
284
275
  styleData.value.banner_url = data[0].url;
285
276
  const getColors = getThemeColor(BASE_API, data[0].url);
@@ -347,13 +338,10 @@ const _sfc_main = defineComponent({
347
338
  });
348
339
  };
349
340
  const modelChange = () => {
350
- styleData.value.cover_theme_color = "";
351
341
  if (!props.dataValue)
352
342
  return;
353
343
  if (styleData.value.model === oldData.value.model) {
354
344
  styleData.value.data = oldData.value.data;
355
- styleData.value.cover_theme_color = oldData.value.cover_theme_color;
356
- styleData.value.cover_colorList = oldData.value.cover_colorList;
357
345
  } else {
358
346
  styleData.value.data = [];
359
347
  }
@@ -366,15 +354,6 @@ const _sfc_main = defineComponent({
366
354
  },
367
355
  set(value) {
368
356
  styleData.value.banner_url = value.url;
369
- styleData.value.cover_colorList = styleData.value.banner_colorList;
370
- }
371
- });
372
- const cover = computed({
373
- get() {
374
- const { cover_theme_color } = styleData.value;
375
- return cover_theme_color;
376
- },
377
- set() {
378
357
  }
379
358
  });
380
359
  const hasBanner = computed({
@@ -387,15 +366,6 @@ const _sfc_main = defineComponent({
387
366
  callback(styleData.value);
388
367
  }
389
368
  });
390
- const hasCover = computed({
391
- get() {
392
- return !!cover.value;
393
- },
394
- set(value) {
395
- styleData.value.cover = value;
396
- callback(styleData.value);
397
- }
398
- });
399
369
  const pcBanner = computed({
400
370
  get() {
401
371
  const { pc_banner_url_info, pc_banner_url } = styleData.value;
@@ -408,23 +378,6 @@ const _sfc_main = defineComponent({
408
378
  const colorChange = (styleData2) => {
409
379
  callback(styleData2);
410
380
  };
411
- onMounted(() => {
412
- if (!styleData.value.cover_url) {
413
- setTimeout(() => {
414
- styleData.value.cover_url = styleData.value.data[0].url;
415
- const getColors = getThemeColor(BASE_API, styleData.value.data[0].url);
416
- getColors.then((themes) => {
417
- styleData.value.cover_colorList = JSON.parse(JSON.stringify(themes));
418
- styleData.value.cover_theme_color = `rgb(${themes[1]})`;
419
- oldData.value = JSON.parse(JSON.stringify(styleData.value));
420
- callback(styleData.value);
421
- }).catch((e) => {
422
- styleData.value.banner_theme_color = `rgb(255, 255, 255)`;
423
- callback(styleData.value);
424
- });
425
- }, 700);
426
- }
427
- });
428
381
  return (_ctx, _cache) => {
429
382
  var _a, _b, _c, _d, _e, _f;
430
383
  return openBlock(), createElementBlock("div", {
@@ -517,14 +470,7 @@ const _sfc_main = defineComponent({
517
470
  ]),
518
471
  _: 1
519
472
  }, 8, ["modelValue"])
520
- ], 64)) : createCommentVNode("v-if", true),
521
- hasCover.value ? (openBlock(), createBlock(_sfc_main$2, {
522
- key: 3,
523
- "style-data": styleData.value,
524
- model: "cover",
525
- style: { "margin-top": "10px" },
526
- onChange: colorChange
527
- }, null, 8, ["style-data"])) : createCommentVNode("v-if", true)
473
+ ], 64)) : createCommentVNode("v-if", true)
528
474
  ])
529
475
  ], 2),
530
476
  _ctx.mode === "doc" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -110,58 +110,9 @@ function getSysRsPage(BASE_API, params) {
110
110
  params
111
111
  });
112
112
  }
113
- function getDirectory(BASE_API, params) {
114
- return request(BASE_API, {
115
- url: "/poplar/v3/directories",
116
- method: "get",
117
- params
118
- });
119
- }
120
- function useDirectory(options) {
121
- const tree = vue.ref([]);
122
- async function loadDirTree(parent_id) {
123
- const params = parent_id ? { parent_id } : {};
124
- const { code, message } = await getDirectory(options.BASE_API, params);
125
- if (code === 0) {
126
- if (!Array.isArray(message.data))
127
- return [];
128
- return message.data.map(({ alias, id }) => {
129
- return {
130
- title: alias,
131
- key: id,
132
- isLeaf: false,
133
- children: []
134
- };
135
- });
136
- }
137
- return [];
138
- }
139
- async function init() {
140
- const result = await loadDirTree();
141
- if (!Array.isArray(result))
142
- return;
143
- tree.value = result;
144
- }
145
- async function loadMore(target) {
146
- const children = await loadDirTree(target.key);
147
- target.children = children;
148
- if (children.length === 0)
149
- target.isLeaf = true;
150
- }
151
- vue.onMounted(() => {
152
- init();
153
- });
154
- return {
155
- tree,
156
- init,
157
- loadMore
158
- };
159
- }
160
113
  exports["default"] = useAttachement;
161
114
  exports.getAttachmentsAll = getAttachmentsAll;
162
115
  exports.getAttachmentsMy = getAttachmentsMy;
163
116
  exports.getAttachmentsMyMessage = getAttachmentsMyMessage;
164
- exports.getDirectory = getDirectory;
165
117
  exports.getSysRsByTag = getSysRsByTag;
166
118
  exports.getSysRsPage = getSysRsPage;
167
- exports.useDirectory = useDirectory;
@@ -3,7 +3,6 @@ var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
4
  var icon = require("@arco-design/web-vue/es/icon");
5
5
  var useSelection = require("../../../../hooks/useSelection.js");
6
- var useAttachement = require("../../../../hooks/useAttachement.js");
7
6
  var typeMap = require("../../../../utils/typeMap.js");
8
7
  var selectionApis = require("../../../scripts/selectionApis.js");
9
8
  var resource = require("../../../../utils/resource.js");
@@ -58,9 +57,6 @@ const _sfc_main = vue.defineComponent({
58
57
  });
59
58
  const resourceSource = typeMap.RESOURCE_SOURCE_OPTIONS;
60
59
  const resourceCatalog = typeMap.RESOURCE_CATALOG_OPTIONS;
61
- const { tree, loadMore: loadDirMore } = useAttachement.useDirectory({
62
- BASE_API: baseAPI
63
- });
64
60
  const originFilter = {
65
61
  catalog: [],
66
62
  source: "",
@@ -69,8 +65,7 @@ const _sfc_main = vue.defineComponent({
69
65
  keyword: "",
70
66
  precise_keyword: "",
71
67
  upload_by: null,
72
- sf: "",
73
- directory_id: void 0
68
+ sf: ""
74
69
  };
75
70
  const filter = vue.ref(JSON.parse(JSON.stringify(originFilter)));
76
71
  const handleReset = () => {
@@ -186,13 +181,13 @@ const _sfc_main = vue.defineComponent({
186
181
  }, {
187
182
  content: vue.withCtx(() => [
188
183
  vue.createVNode(vue.unref(webVue.Doption), { value: 0 }, {
189
- default: vue.withCtx(() => _cache[8] || (_cache[8] = [
184
+ default: vue.withCtx(() => _cache[7] || (_cache[7] = [
190
185
  vue.createTextVNode("\u7CBE\u51C6\u641C")
191
186
  ])),
192
187
  _: 1
193
188
  }),
194
189
  vue.createVNode(vue.unref(webVue.Doption), { value: 1 }, {
195
- default: vue.withCtx(() => _cache[9] || (_cache[9] = [
190
+ default: vue.withCtx(() => _cache[8] || (_cache[8] = [
196
191
  vue.createTextVNode("\u6A21\u7CCA\u641C")
197
192
  ])),
198
193
  _: 1
@@ -234,20 +229,10 @@ const _sfc_main = vue.defineComponent({
234
229
  _: 1
235
230
  }, 8, ["modelValue", "disabled"])
236
231
  ]),
237
- vue.createCommentVNode(" \u76EE\u5F55 "),
238
- vue.createVNode(vue.unref(webVue.TreeSelect), {
239
- modelValue: filter.value.directory_id,
240
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.directory_id = $event),
241
- data: vue.unref(tree),
242
- "load-more": vue.unref(loadDirMore),
243
- placeholder: "\u8BF7\u9009\u62E9\u76EE\u5F55",
244
- style: { "width": "180px" },
245
- "allow-clear": ""
246
- }, null, 8, ["modelValue", "data", "load-more"]),
247
232
  vue.createCommentVNode(" \u65F6\u95F4\u8303\u56F4 "),
248
233
  vue.createVNode(vue.unref(webVue.RangePicker), {
249
234
  modelValue: rangeTime.value,
250
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => rangeTime.value = $event),
235
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => rangeTime.value = $event),
251
236
  "allow-clear": "",
252
237
  style: { "width": "240px" }
253
238
  }, null, 8, ["modelValue"]),
@@ -255,7 +240,7 @@ const _sfc_main = vue.defineComponent({
255
240
  vue.createElementVNode("div", _hoisted_6, [
256
241
  vue.createVNode(vue.unref(webVue.Select), {
257
242
  modelValue: filter.value.source,
258
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.source = $event),
243
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.source = $event),
259
244
  "allow-clear": "",
260
245
  placeholder: "\u6765\u6E90"
261
246
  }, {
@@ -275,7 +260,7 @@ const _sfc_main = vue.defineComponent({
275
260
  !_ctx.disableUploadBy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
276
261
  vue.createVNode(vue.unref(webVue.Select), {
277
262
  modelValue: filter.value.upload_by,
278
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.upload_by = $event),
263
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.upload_by = $event),
279
264
  "allow-clear": "",
280
265
  placeholder: "\u4E0A\u4F20\u4EBA",
281
266
  loading: vue.unref(loading),
@@ -300,7 +285,7 @@ const _sfc_main = vue.defineComponent({
300
285
  type: "text",
301
286
  onClick: handleReset
302
287
  }, {
303
- default: vue.withCtx(() => _cache[10] || (_cache[10] = [
288
+ default: vue.withCtx(() => _cache[9] || (_cache[9] = [
304
289
  vue.createTextVNode(" \u91CD\u7F6E ")
305
290
  ])),
306
291
  _: 1
@@ -309,13 +294,13 @@ const _sfc_main = vue.defineComponent({
309
294
  vue.createElementVNode("div", _hoisted_8, [
310
295
  vue.createVNode(vue.unref(webVue.Button), {
311
296
  type: "primary",
312
- onClick: _cache[7] || (_cache[7] = ($event) => emits("upload"))
297
+ onClick: _cache[6] || (_cache[6] = ($event) => emits("upload"))
313
298
  }, {
314
299
  icon: vue.withCtx(() => [
315
300
  vue.createVNode(vue.unref(icon.IconUpload))
316
301
  ]),
317
302
  default: vue.withCtx(() => [
318
- _cache[11] || (_cache[11] = vue.createTextVNode(" \u4E0A\u4F20 "))
303
+ _cache[10] || (_cache[10] = vue.createTextVNode(" \u4E0A\u4F20 "))
319
304
  ]),
320
305
  _: 1
321
306
  })
@@ -235,6 +235,7 @@ const _sfc_main = vue.defineComponent({
235
235
  thumbOptionIndex.value = index2;
236
236
  };
237
237
  const openDialogMediaSelection = (type, index2) => {
238
+ console.log(type, index2, "dkdk");
238
239
  thumbBannerModel.value = type || "thumb";
239
240
  thumbOptionIndex.value = index2 || 0;
240
241
  dialogMediaSelectionShow.value = true;
@@ -271,16 +272,6 @@ const _sfc_main = vue.defineComponent({
271
272
  temp = [{ url: data[0].url, thumb: data[0].url }];
272
273
  }
273
274
  styleData.value.data = temp;
274
- styleData.value.cover_url = data[0].url;
275
- const getColors = index.getThemeColor(BASE_API, data[0].url);
276
- getColors.then((themes) => {
277
- styleData.value.cover_colorList = JSON.parse(JSON.stringify(themes));
278
- styleData.value.cover_theme_color = `rgb(${themes[1]})`;
279
- callback(styleData.value);
280
- }).catch((e) => {
281
- styleData.value.banner_theme_color = `rgb(255, 255, 255)`;
282
- callback(styleData.value);
283
- });
284
275
  } else if (thumbBannerModel.value === "banner") {
285
276
  styleData.value.banner_url = data[0].url;
286
277
  const getColors = index.getThemeColor(BASE_API, data[0].url);
@@ -348,13 +339,10 @@ const _sfc_main = vue.defineComponent({
348
339
  });
349
340
  };
350
341
  const modelChange = () => {
351
- styleData.value.cover_theme_color = "";
352
342
  if (!props.dataValue)
353
343
  return;
354
344
  if (styleData.value.model === oldData.value.model) {
355
345
  styleData.value.data = oldData.value.data;
356
- styleData.value.cover_theme_color = oldData.value.cover_theme_color;
357
- styleData.value.cover_colorList = oldData.value.cover_colorList;
358
346
  } else {
359
347
  styleData.value.data = [];
360
348
  }
@@ -367,15 +355,6 @@ const _sfc_main = vue.defineComponent({
367
355
  },
368
356
  set(value) {
369
357
  styleData.value.banner_url = value.url;
370
- styleData.value.cover_colorList = styleData.value.banner_colorList;
371
- }
372
- });
373
- const cover = vue.computed({
374
- get() {
375
- const { cover_theme_color } = styleData.value;
376
- return cover_theme_color;
377
- },
378
- set() {
379
358
  }
380
359
  });
381
360
  const hasBanner = vue.computed({
@@ -388,15 +367,6 @@ const _sfc_main = vue.defineComponent({
388
367
  callback(styleData.value);
389
368
  }
390
369
  });
391
- const hasCover = vue.computed({
392
- get() {
393
- return !!cover.value;
394
- },
395
- set(value) {
396
- styleData.value.cover = value;
397
- callback(styleData.value);
398
- }
399
- });
400
370
  const pcBanner = vue.computed({
401
371
  get() {
402
372
  const { pc_banner_url_info, pc_banner_url } = styleData.value;
@@ -409,23 +379,6 @@ const _sfc_main = vue.defineComponent({
409
379
  const colorChange = (styleData2) => {
410
380
  callback(styleData2);
411
381
  };
412
- vue.onMounted(() => {
413
- if (!styleData.value.cover_url) {
414
- setTimeout(() => {
415
- styleData.value.cover_url = styleData.value.data[0].url;
416
- const getColors = index.getThemeColor(BASE_API, styleData.value.data[0].url);
417
- getColors.then((themes) => {
418
- styleData.value.cover_colorList = JSON.parse(JSON.stringify(themes));
419
- styleData.value.cover_theme_color = `rgb(${themes[1]})`;
420
- oldData.value = JSON.parse(JSON.stringify(styleData.value));
421
- callback(styleData.value);
422
- }).catch((e) => {
423
- styleData.value.banner_theme_color = `rgb(255, 255, 255)`;
424
- callback(styleData.value);
425
- });
426
- }, 700);
427
- }
428
- });
429
382
  return (_ctx, _cache) => {
430
383
  var _a, _b, _c, _d, _e, _f;
431
384
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -518,14 +471,7 @@ const _sfc_main = vue.defineComponent({
518
471
  ]),
519
472
  _: 1
520
473
  }, 8, ["modelValue"])
521
- ], 64)) : vue.createCommentVNode("v-if", true),
522
- hasCover.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
523
- key: 3,
524
- "style-data": styleData.value,
525
- model: "cover",
526
- style: { "margin-top": "10px" },
527
- onChange: colorChange
528
- }, null, 8, ["style-data"])) : vue.createCommentVNode("v-if", true)
474
+ ], 64)) : vue.createCommentVNode("v-if", true)
529
475
  ])
530
476
  ], 2),
531
477
  _ctx.mode === "doc" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",