@cmstops/pro-compo 3.9.1-rc.5 → 3.9.1-stable.0

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/dist/index.css +4 -45
  2. package/dist/index.min.css +1 -1
  3. package/es/baseFilter/component.js +71 -14
  4. package/es/config.js +1 -1
  5. package/es/contentDetailList/component.js +0 -24
  6. package/es/contentDetailList/components/Content/index.js +1 -2
  7. package/es/contentDetailList/components/Doc/index.js +0 -6
  8. package/es/hooks/usePopper.d.ts +1 -1
  9. package/es/hooks/usePopper.js +3 -3
  10. package/es/index.css +4 -45
  11. package/es/selectResourceModal/components/List/ListNormal/Filter.js +90 -192
  12. package/es/selectResourceModal/components/List/ListNormal/index.js +7 -23
  13. package/es/selectResourceModal/style/index.css +4 -45
  14. package/es/selectResourceModal/style/index.less +0 -14
  15. package/es/selectResourceModal/style/list.less +4 -40
  16. package/es/selectThumb/component.js +18 -7
  17. package/es/utils/index.js +6 -6
  18. package/lib/baseFilter/component.js +69 -12
  19. package/lib/config.js +1 -1
  20. package/lib/contentDetailList/component.js +0 -24
  21. package/lib/contentDetailList/components/Content/index.js +1 -2
  22. package/lib/contentDetailList/components/Doc/index.js +0 -6
  23. package/lib/hooks/usePopper.js +3 -3
  24. package/lib/index.css +4 -45
  25. package/lib/selectResourceModal/components/List/ListNormal/Filter.js +87 -189
  26. package/lib/selectResourceModal/components/List/ListNormal/index.js +6 -22
  27. package/lib/selectResourceModal/style/index.css +4 -45
  28. package/lib/selectResourceModal/style/index.less +0 -14
  29. package/lib/selectResourceModal/style/list.less +4 -40
  30. package/lib/selectThumb/component.js +18 -7
  31. package/lib/utils/index.js +6 -6
  32. package/package.json +1 -1
  33. package/es/selectResourceModal/__demo__/module/DivWrapper.d.ts +0 -268
  34. package/es/selectResourceModal/__demo__/module/basic.d.ts +0 -299
  35. package/es/selectResourceModal/hooks/useResponsiveFilter.d.ts +0 -21
  36. package/es/selectResourceModal/hooks/useResponsiveFilter.js +0 -142
  37. package/lib/selectResourceModal/hooks/useResponsiveFilter.js +0 -144
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, computed, watch, nextTick, toRaw, openBlock, createElementBlock, Fragment, createElementVNode, withModifiers, createVNode, withCtx, renderList, createBlock, unref, normalizeStyle, createCommentVNode, renderSlot } from "vue";
2
- import { InputSearch, Select, Option, RangePicker } from "@arco-design/web-vue";
1
+ import { defineComponent, ref, computed, watch, nextTick, toRaw, openBlock, createElementBlock, Fragment, createElementVNode, withModifiers, createVNode, withCtx, renderList, createBlock, renderSlot, unref, createTextVNode, toDisplayString, normalizeStyle, createCommentVNode } from "vue";
2
+ import { InputGroup, Select, Option, Input, InputSearch, RangePicker, RadioGroup, Radio } from "@arco-design/web-vue";
3
3
  import _sfc_main$2 from "./components/filterItem.js";
4
4
  import _sfc_main$1 from "./components/FilterGroup.js";
5
5
  const _sfc_main = defineComponent({
@@ -37,9 +37,11 @@ const _sfc_main = defineComponent({
37
37
  });
38
38
  return _columns;
39
39
  });
40
- const getOptions = (item) => {
41
- return item.options ? item.options : [];
42
- };
40
+ const getOptions = computed(() => {
41
+ return (item) => {
42
+ return item.options ? item.options : [];
43
+ };
44
+ });
43
45
  const hasValue = computed(() => {
44
46
  return (key) => {
45
47
  var _a, _b;
@@ -76,7 +78,10 @@ const _sfc_main = defineComponent({
76
78
  _form[column.range] = rangeTemp[column.range];
77
79
  } else if (column.component === "select") {
78
80
  _form[column.key] = column.defaultValue || null;
79
- } else {
81
+ } else if (column.component === "input-group") {
82
+ _form[column.selectKey] = column.selectDefaultValue || "";
83
+ _form[column.inputKey] = column.inputDefaultValue || "";
84
+ } else if (column.component) {
80
85
  _form[column.key] = column.defaultValue || "";
81
86
  }
82
87
  });
@@ -178,17 +183,48 @@ const _sfc_main = defineComponent({
178
183
  active: hasValue.value(item.key)
179
184
  }, {
180
185
  default: withCtx(() => [
181
- item.component === "input" ? (openBlock(), createBlock(unref(InputSearch), {
182
- key: 0,
186
+ item.slot ? renderSlot(_ctx.$slots, item.slot, { key: 0 }) : item.component === "input-group" ? (openBlock(), createBlock(unref(InputGroup), { key: 1 }, {
187
+ default: withCtx(() => [
188
+ createVNode(unref(Select), {
189
+ modelValue: form.value[item.selectKey],
190
+ "onUpdate:modelValue": ($event) => form.value[item.selectKey] = $event,
191
+ "default-active-first-option": "",
192
+ style: { "width": "100px" }
193
+ }, {
194
+ default: withCtx(() => [
195
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.selectOptions, (option, idx) => {
196
+ return openBlock(), createBlock(unref(Option), {
197
+ key: idx,
198
+ value: option.value
199
+ }, {
200
+ default: withCtx(() => [
201
+ createTextVNode(toDisplayString(option.label), 1)
202
+ ]),
203
+ _: 2
204
+ }, 1032, ["value"]);
205
+ }), 128))
206
+ ]),
207
+ _: 2
208
+ }, 1032, ["modelValue", "onUpdate:modelValue"]),
209
+ createVNode(unref(Input), {
210
+ modelValue: form.value[item.inputKey],
211
+ "onUpdate:modelValue": ($event) => form.value[item.inputKey] = $event,
212
+ placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.inputLabel}`,
213
+ style: { "width": "180px" }
214
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
215
+ ]),
216
+ _: 2
217
+ }, 1024)) : item.component === "input" ? (openBlock(), createBlock(unref(InputSearch), {
218
+ key: 2,
183
219
  modelValue: form.value[item.key],
184
220
  "onUpdate:modelValue": ($event) => form.value[item.key] = $event,
185
221
  style: normalizeStyle({ width: styleWidth(columnsMap.value[item.key]) }),
186
222
  "allow-clear": "",
187
223
  size: "medium",
188
- placeholder: `\u8BF7\u8F93\u5165${item.label}`
224
+ placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.label}`
189
225
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder"])) : createCommentVNode("v-if", true),
190
226
  item.component === "select" ? (openBlock(), createBlock(unref(Select), {
191
- key: 1,
227
+ key: 3,
192
228
  modelValue: form.value[item.key],
193
229
  "onUpdate:modelValue": ($event) => form.value[item.key] = $event,
194
230
  "popup-container": "#base-filter-popup-container",
@@ -196,13 +232,13 @@ const _sfc_main = defineComponent({
196
232
  "allow-search": item.allowSearch,
197
233
  "default-active-first-option": false,
198
234
  style: normalizeStyle({ width: styleWidth(columnsMap.value[item.key]) }),
199
- placeholder: `\u8BF7\u9009\u62E9${item.label}`,
235
+ placeholder: item.placeholder ? item.placeholder : `\u8BF7\u9009\u62E9${item.label}`,
200
236
  onSearch: ($event) => handleSelectSearch($event, item),
201
237
  onPopupVisibleChange: ($event) => handleSelectPopupChange($event, item),
202
238
  onChange: ($event) => handleSelectChange($event, item)
203
239
  }, {
204
240
  default: withCtx(() => [
205
- (openBlock(true), createElementBlock(Fragment, null, renderList(getOptions(item), (opt) => {
241
+ (openBlock(true), createElementBlock(Fragment, null, renderList(getOptions.value(item), (opt) => {
206
242
  return openBlock(), createBlock(unref(Option), {
207
243
  key: opt.value,
208
244
  label: opt.label,
@@ -213,7 +249,7 @@ const _sfc_main = defineComponent({
213
249
  _: 2
214
250
  }, 1032, ["modelValue", "onUpdate:modelValue", "allow-search", "style", "placeholder", "onSearch", "onPopupVisibleChange", "onChange"])) : createCommentVNode("v-if", true),
215
251
  item.component === "range-picker" ? (openBlock(), createBlock(unref(RangePicker), {
216
- key: 2,
252
+ key: 4,
217
253
  modelValue: form.value[item.key].range,
218
254
  "onUpdate:modelValue": ($event) => form.value[item.key].range = $event,
219
255
  style: normalizeStyle({ width: styleWidth(form.value[item.key]) }),
@@ -224,7 +260,28 @@ const _sfc_main = defineComponent({
224
260
  "popup-container": "#base-filter-popup-container",
225
261
  onClick: _cache[1] || (_cache[1] = withModifiers(() => {
226
262
  }, ["stop"]))
227
- }, null, 8, ["modelValue", "onUpdate:modelValue", "style"])) : createCommentVNode("v-if", true)
263
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style"])) : createCommentVNode("v-if", true),
264
+ item.component === "radio" ? (openBlock(), createBlock(unref(RadioGroup), {
265
+ key: 5,
266
+ modelValue: form.value[item.key],
267
+ "onUpdate:modelValue": ($event) => form.value[item.key] = $event,
268
+ type: "button"
269
+ }, {
270
+ default: withCtx(() => [
271
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.options || [], (option, idx) => {
272
+ return openBlock(), createBlock(unref(Radio), {
273
+ key: idx,
274
+ value: option.value
275
+ }, {
276
+ default: withCtx(() => [
277
+ createTextVNode(toDisplayString(option.label), 1)
278
+ ]),
279
+ _: 2
280
+ }, 1032, ["value"]);
281
+ }), 128))
282
+ ]),
283
+ _: 2
284
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
228
285
  ]),
229
286
  _: 2
230
287
  }, 1032, ["active"]);
package/es/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var _a, _b, _c, _d, _e, _f, _g, _h;
2
- const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.r.cmstop.xyz";
2
+ const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.cmstop.xyz";
3
3
  const DEFAULT_BASE_ACCOUNT_HOST = ((_d = (_c = window.situoyun) == null ? void 0 : _c.env) == null ? void 0 : _d.BASE_ACCOUNT_HOST) || "https://account.cmstop.xyz";
4
4
  const DEFAULT_UPLOAD_CHUNK_SIZE = ((_f = (_e = window.situoyun) == null ? void 0 : _e.env) == null ? void 0 : _f.UPLOAD_CHUNK_SIZE) || 5242880;
5
5
  const DEFAULT_UPLOAD_URL = ((_h = (_g = window.situoyun) == null ? void 0 : _g.env) == null ? void 0 : _h.BASE_STATIC_FILE_API) || "https://oss.cmstop.xyz/maple/v1";
@@ -104,12 +104,6 @@ const _sfc_main = defineComponent({
104
104
  onCellMouseEnter: tableCellMouseEnter,
105
105
  onCellMouseLeave: tableCellMouseLeave
106
106
  }, {
107
- "after-index": withCtx(() => [
108
- renderSlot(_ctx.$slots, "after-index", {
109
- row: element,
110
- index
111
- })
112
- ]),
113
107
  batch: withCtx(() => [
114
108
  renderSlot(_ctx.$slots, "batch", {
115
109
  row: element,
@@ -134,12 +128,6 @@ const _sfc_main = defineComponent({
134
128
  onCellMouseEnter: tableCellMouseEnter,
135
129
  onCellMouseLeave: tableCellMouseLeave
136
130
  }, {
137
- "after-index": withCtx(() => [
138
- renderSlot(_ctx.$slots, "after-index", {
139
- row: element,
140
- index
141
- })
142
- ]),
143
131
  tip: withCtx(() => [
144
132
  renderSlot(_ctx.$slots, "tip", {
145
133
  row: element,
@@ -236,12 +224,6 @@ const _sfc_main = defineComponent({
236
224
  onCellMouseEnter: tableCellMouseEnter,
237
225
  onCellMouseLeave: tableCellMouseLeave
238
226
  }, {
239
- "after-index": withCtx(() => [
240
- renderSlot(_ctx.$slots, "after-index", {
241
- row: item,
242
- index
243
- })
244
- ]),
245
227
  batch: withCtx(() => [
246
228
  renderSlot(_ctx.$slots, "batch", {
247
229
  row: item,
@@ -266,12 +248,6 @@ const _sfc_main = defineComponent({
266
248
  onCellMouseEnter: tableCellMouseEnter,
267
249
  onCellMouseLeave: tableCellMouseLeave
268
250
  }, {
269
- "after-index": withCtx(() => [
270
- renderSlot(_ctx.$slots, "after-index", {
271
- row: item,
272
- index
273
- })
274
- ]),
275
251
  tip: withCtx(() => [
276
252
  renderSlot(_ctx.$slots, "tip", {
277
253
  row: item,
@@ -142,8 +142,7 @@ const _sfc_main = defineComponent({
142
142
  })
143
143
  ]),
144
144
  index: withCtx(() => [
145
- createElementVNode("span", _hoisted_1, toDisplayString(_ctx.index + 1), 1),
146
- renderSlot(_ctx.$slots, "after-index")
145
+ createElementVNode("span", _hoisted_1, toDisplayString(_ctx.index + 1), 1)
147
146
  ]),
148
147
  tip: withCtx(() => [
149
148
  createCommentVNode(" \u5148\u6DFB\u52A0\u6587\u4EF6\u8D44\u6E90\uFF0C\u672A\u53D1\u5E03 "),
@@ -37,12 +37,6 @@ const _sfc_main = defineComponent({
37
37
  index: _ctx.index
38
38
  })
39
39
  ]),
40
- "after-index": withCtx(() => [
41
- renderSlot(_ctx.$slots, "after-index", {
42
- row: _ctx.element,
43
- index: _ctx.index
44
- })
45
- ]),
46
40
  batch: withCtx(() => [
47
41
  renderSlot(_ctx.$slots, "batch", {
48
42
  row: _ctx.item,
@@ -1,7 +1,7 @@
1
1
  import { Placement } from '@popperjs/core';
2
2
  import { Ref } from 'vue';
3
3
  export default function usePopper(pannel: Ref<HTMLElement | undefined>, triggerEl: Ref<HTMLElement | undefined>): {
4
- initPopper: (placement?: Placement, of?: number[] | undefined) => void;
4
+ initPopper: (placement?: Placement) => void;
5
5
  show: () => void;
6
6
  hide: () => void;
7
7
  visible: Ref<boolean, boolean>;
@@ -8,16 +8,16 @@ function usePopper(pannel, triggerEl) {
8
8
  };
9
9
  const show = () => {
10
10
  visible.value = true;
11
- window.onclick = () => {
11
+ window.onclick = (e) => {
12
12
  hide();
13
13
  visible.value = false;
14
14
  window.onclick = null;
15
15
  };
16
16
  };
17
- const initPopper = (placement = "bottom-start", of) => {
17
+ const initPopper = (placement = "bottom-start") => {
18
18
  if (!pannel.value || !triggerEl.value)
19
19
  return;
20
- const offset = of != null ? of : [0, 10];
20
+ const offset = [0, 10];
21
21
  if (window.__POWERED_BY_WUJIE__) {
22
22
  offset[1] = -54;
23
23
  }
package/es/index.css CHANGED
@@ -4529,13 +4529,11 @@
4529
4529
  }
4530
4530
  .resource-list-footer,
4531
4531
  .resource-list-header,
4532
- .resource-list-content .resource-list-content-empty,
4533
4532
  .resource-list-content .arco-scrollbar-container {
4534
4533
  padding: 0 40px;
4535
4534
  }
4536
4535
  .resource-list-footer {
4537
4536
  display: flex;
4538
- flex-wrap: wrap;
4539
4537
  justify-content: space-between;
4540
4538
  padding-bottom: 20px;
4541
4539
  }
@@ -4545,10 +4543,6 @@
4545
4543
  gap: 10px;
4546
4544
  align-items: center;
4547
4545
  justify-content: flex-end;
4548
- margin-top: 10px;
4549
- }
4550
- .resource-list-footer .footer-right .list-selected-wrapper {
4551
- font-size: 12px;
4552
4546
  }
4553
4547
  .resource-list-content-loading {
4554
4548
  display: flex;
@@ -4560,7 +4554,7 @@
4560
4554
  .resource-list .list-item-grid {
4561
4555
  display: grid;
4562
4556
  grid-gap: 20px;
4563
- grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
4557
+ grid-template-columns: repeat(5, 1fr);
4564
4558
  }
4565
4559
  .resource-list .list-content {
4566
4560
  margin-top: 30px;
@@ -4603,8 +4597,7 @@
4603
4597
  }
4604
4598
  .resource-list .list-filter-wrapper .list-filter-tags {
4605
4599
  display: flex;
4606
- flex-wrap: wrap;
4607
- gap: 10px;
4600
+ justify-content: space-between;
4608
4601
  margin-top: 10px;
4609
4602
  }
4610
4603
  .resource-list .list-filter-wrapper .list-filter-tags .list-filter-tag {
@@ -4625,41 +4618,16 @@
4625
4618
  justify-content: space-between;
4626
4619
  }
4627
4620
  .resource-list .list-filter-wrapper .list-filter .filter-list {
4628
- position: relative;
4629
- /** 给 popup 一个参考 */
4630
4621
  display: flex;
4622
+ flex-wrap: wrap;
4623
+ gap: 10px;
4631
4624
  }
4632
4625
  .resource-list .list-filter-wrapper .list-filter .filter-list .filter-item {
4633
4626
  width: 100px;
4634
- margin-right: 10px;
4635
- }
4636
- .resource-list .list-filter-wrapper .list-filter .filter-list .arco-trigger-popup {
4637
- z-index: 100000 !important;
4638
4627
  }
4639
4628
  .resource-list .list-filter-wrapper .list-filter .arco-input-prepend {
4640
4629
  padding: 0;
4641
4630
  }
4642
- .resource-list .list-filter-wrapper .list-filter .more-btn {
4643
- position: relative;
4644
- /** 给 poperjs 一个参考 */
4645
- }
4646
- .resource-list .list-filter-wrapper .list-filter .more-btn .filter-pannel {
4647
- inset: 40px auto auto auto !important;
4648
- }
4649
- .resource-list .list-filter-wrapper .filter-extra {
4650
- display: flex;
4651
- gap: 10px;
4652
- }
4653
- .resource-list .list-filter-wrapper .filter-pannel {
4654
- z-index: 100000;
4655
- display: flex;
4656
- flex-direction: column;
4657
- gap: 10px;
4658
- padding: 10px;
4659
- background-color: #fff;
4660
- border-radius: 4px;
4661
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
4662
- }
4663
4631
  .resource-list .title {
4664
4632
  display: flex;
4665
4633
  gap: 8px;
@@ -4673,10 +4641,6 @@
4673
4641
  height: 16px;
4674
4642
  background-color: #4886ff;
4675
4643
  }
4676
- .resource-select-wrap {
4677
- width: 100%;
4678
- height: 100%;
4679
- }
4680
4644
  .resource-select-modal-body {
4681
4645
  height: 80vh;
4682
4646
  padding: 0;
@@ -4705,11 +4669,6 @@
4705
4669
  .resource-select-container .resource-select-header .arco-tabs-content {
4706
4670
  display: none !important;
4707
4671
  }
4708
- .resource-select-container .resource-list-content .resource-list-content-empty {
4709
- box-sizing: border-box;
4710
- width: 100%;
4711
- height: 100%;
4712
- }
4713
4672
  .iframe-container {
4714
4673
  position: relative;
4715
4674
  height: 95vh;