@cmstops/pro-compo 0.1.63 → 0.1.65

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,11 +1,20 @@
1
- declare const platform: {
1
+ declare const platform: ({
2
2
  id: number;
3
3
  key: string;
4
4
  name: string;
5
5
  indexUrl: string;
6
6
  isDataAsync: boolean;
7
7
  type: string[];
8
- }[];
8
+ pfIcon?: undefined;
9
+ } | {
10
+ id: number;
11
+ key: string;
12
+ name: string;
13
+ indexUrl: string;
14
+ pfIcon: string;
15
+ isDataAsync: boolean;
16
+ type: string[];
17
+ })[];
9
18
  export declare function getPlatformInfoById(id: number): any;
10
19
  export declare const accounts: {
11
20
  id: number;
@@ -123,6 +123,12 @@ const _sfc_main = defineComponent({
123
123
  onCellMouseEnter: tableCellMouseEnter,
124
124
  onCellMouseLeave: tableCellMouseLeave
125
125
  }, {
126
+ tip: withCtx(() => [
127
+ renderSlot(_ctx.$slots, "tip", {
128
+ row: element,
129
+ index
130
+ })
131
+ ]),
126
132
  batch: withCtx(() => [
127
133
  renderSlot(_ctx.$slots, "batch", {
128
134
  row: element,
@@ -202,6 +208,12 @@ const _sfc_main = defineComponent({
202
208
  onCellMouseEnter: tableCellMouseEnter,
203
209
  onCellMouseLeave: tableCellMouseLeave
204
210
  }, {
211
+ tip: withCtx(() => [
212
+ renderSlot(_ctx.$slots, "tip", {
213
+ row: item,
214
+ index
215
+ })
216
+ ]),
205
217
  batch: withCtx(() => [
206
218
  renderSlot(_ctx.$slots, "batch", {
207
219
  row: item,
@@ -29,6 +29,12 @@ const _sfc_main = defineComponent({
29
29
  onCellMouseEnter: cellMouseEnter,
30
30
  onCellMouseLeave: cellMouseLeave
31
31
  }, {
32
+ tip: withCtx(() => [
33
+ renderSlot(_ctx.$slots, "tip", {
34
+ row: _ctx.item,
35
+ index: _ctx.index
36
+ })
37
+ ]),
32
38
  batch: withCtx(() => [
33
39
  renderSlot(_ctx.$slots, "batch", {
34
40
  row: _ctx.item,
@@ -19,7 +19,7 @@ const _sfc_main = defineComponent({
19
19
  setup(__props, { emit: __emit }) {
20
20
  const props = __props;
21
21
  const BASE_API_R = props.BASE_API || DEFAULT_BASE_API;
22
- const injectMediaUseType = inject("mediaUseType");
22
+ const injectMediaUseType = inject("mediaUseType", 1);
23
23
  if (!injectMediaUseType && props.mediaUseType) {
24
24
  provide("mediaUseType", props.mediaUseType || mediaUseEnum.THUMB);
25
25
  }
@@ -12,7 +12,7 @@ const _sfc_main = defineComponent({
12
12
  __name: "SystemResourceFilter",
13
13
  emits: ["search", "changeScen"],
14
14
  setup(__props, { expose: __expose, emit: __emit }) {
15
- const mediaUseType = inject("mediaUseType");
15
+ const mediaUseType = inject("mediaUseType", 1);
16
16
  const baseApi = inject("baseAPI");
17
17
  const filter = ref({
18
18
  keyword: "",
@@ -30,7 +30,7 @@ const _sfc_main = defineComponent({
30
30
  emits: ["confirm"],
31
31
  setup(__props, { emit: __emit }) {
32
32
  const emits = __emit;
33
- const mediaUseType = inject("mediaUseType");
33
+ const mediaUseType = inject("mediaUseType", 1);
34
34
  const baseApi = inject("baseAPI");
35
35
  const scenList = ref([]);
36
36
  const choseScen = ref("");
@@ -32,7 +32,7 @@ const _sfc_main = defineComponent({
32
32
  setup(__props, { emit: __emit }) {
33
33
  const props = __props;
34
34
  const emit = __emit;
35
- const mediaUseType = inject("mediaUseType");
35
+ const mediaUseType = inject("mediaUseType", 1);
36
36
  const baseApi = inject("baseAPI");
37
37
  const aigcGenUrl = `${baseApi}/aigcm/#/inlay/aigc-image-created?scene=selectThumb`;
38
38
  const confirm = (itemData) => {
@@ -8,7 +8,7 @@ export declare type FilesQueryParamType = {
8
8
  offset: number;
9
9
  catalog: string;
10
10
  };
11
- export declare type MediaUseType = 0 | 1 | 2 | 3 | 4 | 5;
11
+ export declare type MediaUseType = 1 | 2 | 3 | 4 | 5 | 6;
12
12
  export declare const mediaUseEnum: {
13
13
  [key: string]: MediaUseType;
14
14
  };
@@ -3,6 +3,7 @@ const mediaUseEnum = {
3
3
  COMPOICON: 2,
4
4
  PUSHICON: 3,
5
5
  NAVBG: 4,
6
- NAVICON: 5
6
+ NAVICON: 5,
7
+ LOCALLIVE: 6
7
8
  };
8
9
  export { mediaUseEnum };
@@ -123,6 +123,15 @@ const _sfc_main = defineComponent({
123
123
  data = { model: 3, data: [{ url: "", thumb: "" }] };
124
124
  } else if (props.mode === "smiple") {
125
125
  data = { model: 3, data: [{ url: value, thumb: value }] };
126
+ } else if (Array.isArray(value)) {
127
+ data = {
128
+ model: value.length > 1 ? 1 : 3,
129
+ data: value.map((img) => {
130
+ return {
131
+ url: img
132
+ };
133
+ })
134
+ };
126
135
  } else {
127
136
  data = { ...JSON.parse(value) };
128
137
  }
@@ -152,11 +161,18 @@ const _sfc_main = defineComponent({
152
161
  if (!temp.data) {
153
162
  temp.data = [];
154
163
  }
155
- emit("update:dataValue", JSON.stringify(temp));
164
+ if (props.mode === "matrixDoc") {
165
+ emit(
166
+ "update:dataValue",
167
+ JSON.parse(JSON.stringify(temp.data.map((item) => item.url)))
168
+ );
169
+ } else {
170
+ emit("update:dataValue", JSON.stringify(temp));
171
+ }
156
172
  }
157
173
  };
158
174
  const curtemplate = computed(() => {
159
- if (props.mode !== "doc") {
175
+ if (!["doc", "matrixDoc"].includes(props.mode)) {
160
176
  return docThumbObjMap[3];
161
177
  }
162
178
  return docThumbObjMap[parseInt(model.value, 10)];
@@ -220,7 +236,7 @@ const _sfc_main = defineComponent({
220
236
  var _a;
221
237
  const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
222
238
  const _useCropper = props.mode === "doc" ? true : useCropper.value;
223
- if (props.mode === "smiple") {
239
+ if (["smiple", "matrixDoc"].includes(props.mode)) {
224
240
  dialogMediaSelectionShow.value = false;
225
241
  const medias = data.map((media) => {
226
242
  return { url: media.url, thumb: media.url };
@@ -379,7 +395,7 @@ const _sfc_main = defineComponent({
379
395
  createElementVNode("div", _hoisted_6, [
380
396
  ((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (openBlock(), createElementBlock("span", _hoisted_7, " (" + toDisplayString((_e = curtemplate.value) == null ? void 0 : _e.alias) + "\u6BD4\u4F8B\uFF1A" + toDisplayString((_f = curtemplate.value) == null ? void 0 : _f.ratioStr) + ") ", 1)) : createCommentVNode("v-if", true)
381
397
  ]),
382
- _ctx.mode === "doc" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
398
+ ["matrixDoc", "doc"].includes(_ctx.mode) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
383
399
  createCommentVNode(" \u9009\u62E9\u5927\u56FE\u3001\u4E09\u56FE\u3001\u5355\u56FE...\u7B49\u6A21\u5F0F "),
384
400
  createVNode(unref(RadioGroup), {
385
401
  modelValue: model.value,
@@ -128,6 +128,12 @@ const _sfc_main = vue.defineComponent({
128
128
  onCellMouseEnter: tableCellMouseEnter,
129
129
  onCellMouseLeave: tableCellMouseLeave
130
130
  }, {
131
+ tip: vue.withCtx(() => [
132
+ vue.renderSlot(_ctx.$slots, "tip", {
133
+ row: element,
134
+ index: index$3
135
+ })
136
+ ]),
131
137
  batch: vue.withCtx(() => [
132
138
  vue.renderSlot(_ctx.$slots, "batch", {
133
139
  row: element,
@@ -207,6 +213,12 @@ const _sfc_main = vue.defineComponent({
207
213
  onCellMouseEnter: tableCellMouseEnter,
208
214
  onCellMouseLeave: tableCellMouseLeave
209
215
  }, {
216
+ tip: vue.withCtx(() => [
217
+ vue.renderSlot(_ctx.$slots, "tip", {
218
+ row: item,
219
+ index: index$3
220
+ })
221
+ ]),
210
222
  batch: vue.withCtx(() => [
211
223
  vue.renderSlot(_ctx.$slots, "batch", {
212
224
  row: item,
@@ -30,6 +30,12 @@ const _sfc_main = vue.defineComponent({
30
30
  onCellMouseEnter: cellMouseEnter,
31
31
  onCellMouseLeave: cellMouseLeave
32
32
  }, {
33
+ tip: vue.withCtx(() => [
34
+ vue.renderSlot(_ctx.$slots, "tip", {
35
+ row: _ctx.item,
36
+ index: _ctx.index
37
+ })
38
+ ]),
33
39
  batch: vue.withCtx(() => [
34
40
  vue.renderSlot(_ctx.$slots, "batch", {
35
41
  row: _ctx.item,
@@ -20,7 +20,7 @@ const _sfc_main = vue.defineComponent({
20
20
  setup(__props, { emit: __emit }) {
21
21
  const props = __props;
22
22
  const BASE_API_R = props.BASE_API || config.DEFAULT_BASE_API;
23
- const injectMediaUseType = vue.inject("mediaUseType");
23
+ const injectMediaUseType = vue.inject("mediaUseType", 1);
24
24
  if (!injectMediaUseType && props.mediaUseType) {
25
25
  vue.provide("mediaUseType", props.mediaUseType || mediaSelection.mediaUseEnum.THUMB);
26
26
  }
@@ -13,7 +13,7 @@ const _sfc_main = vue.defineComponent({
13
13
  __name: "SystemResourceFilter",
14
14
  emits: ["search", "changeScen"],
15
15
  setup(__props, { expose: __expose, emit: __emit }) {
16
- const mediaUseType = vue.inject("mediaUseType");
16
+ const mediaUseType = vue.inject("mediaUseType", 1);
17
17
  const baseApi = vue.inject("baseAPI");
18
18
  const filter$1 = vue.ref({
19
19
  keyword: "",
@@ -31,7 +31,7 @@ const _sfc_main = vue.defineComponent({
31
31
  emits: ["confirm"],
32
32
  setup(__props, { emit: __emit }) {
33
33
  const emits = __emit;
34
- const mediaUseType = vue.inject("mediaUseType");
34
+ const mediaUseType = vue.inject("mediaUseType", 1);
35
35
  const baseApi = vue.inject("baseAPI");
36
36
  const scenList = vue.ref([]);
37
37
  const choseScen = vue.ref("");
@@ -33,7 +33,7 @@ const _sfc_main = vue.defineComponent({
33
33
  setup(__props, { emit: __emit }) {
34
34
  const props = __props;
35
35
  const emit = __emit;
36
- const mediaUseType = vue.inject("mediaUseType");
36
+ const mediaUseType = vue.inject("mediaUseType", 1);
37
37
  const baseApi = vue.inject("baseAPI");
38
38
  const aigcGenUrl = `${baseApi}/aigcm/#/inlay/aigc-image-created?scene=selectThumb`;
39
39
  const confirm = (itemData) => {
@@ -5,6 +5,7 @@ const mediaUseEnum = {
5
5
  COMPOICON: 2,
6
6
  PUSHICON: 3,
7
7
  NAVBG: 4,
8
- NAVICON: 5
8
+ NAVICON: 5,
9
+ LOCALLIVE: 6
9
10
  };
10
11
  exports.mediaUseEnum = mediaUseEnum;
@@ -124,6 +124,15 @@ const _sfc_main = vue.defineComponent({
124
124
  data = { model: 3, data: [{ url: "", thumb: "" }] };
125
125
  } else if (props.mode === "smiple") {
126
126
  data = { model: 3, data: [{ url: value, thumb: value }] };
127
+ } else if (Array.isArray(value)) {
128
+ data = {
129
+ model: value.length > 1 ? 1 : 3,
130
+ data: value.map((img) => {
131
+ return {
132
+ url: img
133
+ };
134
+ })
135
+ };
127
136
  } else {
128
137
  data = { ...JSON.parse(value) };
129
138
  }
@@ -153,11 +162,18 @@ const _sfc_main = vue.defineComponent({
153
162
  if (!temp.data) {
154
163
  temp.data = [];
155
164
  }
156
- emit("update:dataValue", JSON.stringify(temp));
165
+ if (props.mode === "matrixDoc") {
166
+ emit(
167
+ "update:dataValue",
168
+ JSON.parse(JSON.stringify(temp.data.map((item) => item.url)))
169
+ );
170
+ } else {
171
+ emit("update:dataValue", JSON.stringify(temp));
172
+ }
157
173
  }
158
174
  };
159
175
  const curtemplate = vue.computed(() => {
160
- if (props.mode !== "doc") {
176
+ if (!["doc", "matrixDoc"].includes(props.mode)) {
161
177
  return doc.docThumbObjMap[3];
162
178
  }
163
179
  return doc.docThumbObjMap[parseInt(model.value, 10)];
@@ -221,7 +237,7 @@ const _sfc_main = vue.defineComponent({
221
237
  var _a;
222
238
  const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
223
239
  const _useCropper = props.mode === "doc" ? true : useCropper.value;
224
- if (props.mode === "smiple") {
240
+ if (["smiple", "matrixDoc"].includes(props.mode)) {
225
241
  dialogMediaSelectionShow.value = false;
226
242
  const medias = data.map((media) => {
227
243
  return { url: media.url, thumb: media.url };
@@ -380,7 +396,7 @@ const _sfc_main = vue.defineComponent({
380
396
  vue.createElementVNode("div", _hoisted_6, [
381
397
  ((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, " (" + vue.toDisplayString((_e = curtemplate.value) == null ? void 0 : _e.alias) + "\u6BD4\u4F8B\uFF1A" + vue.toDisplayString((_f = curtemplate.value) == null ? void 0 : _f.ratioStr) + ") ", 1)) : vue.createCommentVNode("v-if", true)
382
398
  ]),
383
- _ctx.mode === "doc" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
399
+ ["matrixDoc", "doc"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
384
400
  vue.createCommentVNode(" \u9009\u62E9\u5927\u56FE\u3001\u4E09\u56FE\u3001\u5355\u56FE...\u7B49\u6A21\u5F0F "),
385
401
  vue.createVNode(vue.unref(webVue.RadioGroup), {
386
402
  modelValue: model.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",