@opendesign-plus-test/components 0.0.1-rc.137 → 0.0.1-rc.138

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,4 +1,7 @@
1
- import { defineComponent, computed, ref, watch, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, Fragment, unref, toDisplayString, createVNode, withCtx, renderList, createBlock, createTextVNode, createCommentVNode, withModifiers, withDirectives, nextTick } from "vue";
1
+ import { defineComponent, computed, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeClass, Fragment, unref, toDisplayString, createVNode, withCtx, renderList, createBlock, createTextVNode, createCommentVNode, withModifiers, withDirectives, nextTick } from "vue";
2
+ import { ElSelect, ElOption } from "element-plus";
3
+ import "element-plus/es/components/select/style/css";
4
+ import "element-plus/es/components/option/style/css";
2
5
  import { useDebounceFn, onClickOutside, useThrottleFn } from "@vueuse/core";
3
6
  import { useScreen } from "@opendesign-plus/composables";
4
7
  import { useI18n } from "../../i18n/index.mjs";
@@ -14,43 +17,42 @@ const _hoisted_2 = {
14
17
  class: "o-sig-filter-type"
15
18
  };
16
19
  const _hoisted_3 = { class: "o-sig-filter-title" };
17
- const _hoisted_4 = { class: "o-sig-filter-select-box" };
18
- const _hoisted_5 = {
20
+ const _hoisted_4 = {
21
+ key: 1,
22
+ class: "o-sig-filter-input"
23
+ };
24
+ const _hoisted_5 = { class: "o-sig-filter-select-box" };
25
+ const _hoisted_6 = {
19
26
  key: 0,
20
27
  class: "o-sig-search-data"
21
28
  };
22
- const _hoisted_6 = {
29
+ const _hoisted_7 = {
23
30
  key: 0,
24
31
  class: "o-sig-search-label"
25
32
  };
26
- const _hoisted_7 = ["onClick"];
27
- const _hoisted_8 = ["title"];
28
- const _hoisted_9 = {
33
+ const _hoisted_8 = ["onClick"];
34
+ const _hoisted_9 = ["title"];
35
+ const _hoisted_10 = {
29
36
  key: 2,
30
37
  class: "o-sig-no-result"
31
38
  };
32
- const _hoisted_10 = {
33
- key: 1,
34
- class: "o-sig-filter-btn"
35
- };
36
- const _hoisted_11 = { class: "o-sig-filter-text" };
37
- const _hoisted_12 = {
39
+ const _hoisted_11 = {
38
40
  key: 0,
39
41
  class: "o-sig-filter-result-tip"
40
42
  };
41
- const _hoisted_13 = { key: 0 };
42
- const _hoisted_14 = { class: "o-sig-num" };
43
- const _hoisted_15 = {
43
+ const _hoisted_12 = { key: 0 };
44
+ const _hoisted_13 = { class: "o-sig-num" };
45
+ const _hoisted_14 = {
44
46
  key: 0,
45
47
  class: "o-sig-num"
46
48
  };
47
- const _hoisted_16 = { key: 1 };
48
- const _hoisted_17 = { class: "o-sig-num" };
49
- const _hoisted_18 = {
49
+ const _hoisted_15 = { key: 1 };
50
+ const _hoisted_16 = { class: "o-sig-num" };
51
+ const _hoisted_17 = {
50
52
  key: 3,
51
53
  class: "o-sig-loading"
52
54
  };
53
- const _hoisted_19 = {
55
+ const _hoisted_18 = {
54
56
  key: 4,
55
57
  class: "o-sig-pagination"
56
58
  };
@@ -311,14 +313,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
311
313
  window.removeEventListener("scroll", throttleEvent);
312
314
  });
313
315
  return (_ctx, _cache) => {
314
- const _component_IconFilter = resolveComponent("IconFilter");
315
- const _component_OButton = resolveComponent("OButton");
316
316
  return openBlock(), createElementBlock("div", _hoisted_1, [
317
317
  createElementVNode("div", {
318
318
  class: normalizeClass(["o-sig-filter-box", `o-sig-filter-box-${locale.value} ${featureArr.value.length ? "" : "o-sig-filter-box--no-filter-type"}`])
319
319
  }, [
320
320
  featureArr.value.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
321
- !unref(lePadV) ? (openBlock(), createElementBlock("div", _hoisted_2, [
321
+ !unref(isPhone) ? (openBlock(), createElementBlock("div", _hoisted_2, [
322
322
  createElementVNode("p", _hoisted_3, toDisplayString(unref(t)("sig.type")), 1),
323
323
  createVNode(unref(ORadioGroup), {
324
324
  modelValue: featureType.value,
@@ -349,12 +349,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
349
349
  _: 1
350
350
  }, 8, ["modelValue"])
351
351
  ])) : createCommentVNode("", true),
352
- !unref(lePadV) ? (openBlock(), createBlock(unref(ODivider), {
353
- key: 1,
354
- direction: "h"
355
- })) : createCommentVNode("", true)
352
+ unref(isPhone) ? (openBlock(), createElementBlock("div", _hoisted_4, [
353
+ createVNode(unref(ElSelect), {
354
+ modelValue: featureType.value,
355
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => featureType.value = $event),
356
+ filterable: "",
357
+ size: "large",
358
+ placeholder: unref(t)("sig.selectOrSearchCate")
359
+ }, {
360
+ default: withCtx(() => [
361
+ (openBlock(true), createElementBlock(Fragment, null, renderList(featureArr.value, (option) => {
362
+ return openBlock(), createBlock(unref(ElOption), {
363
+ key: option.value,
364
+ label: option.label[locale.value] ?? option.value,
365
+ value: option.value
366
+ }, null, 8, ["label", "value"]);
367
+ }), 128))
368
+ ]),
369
+ _: 1
370
+ }, 8, ["modelValue", "placeholder"])
371
+ ])) : createCommentVNode("", true),
372
+ createVNode(unref(ODivider), { direction: "h" })
356
373
  ], 64)) : createCommentVNode("", true),
357
- createElementVNode("div", _hoisted_4, [
374
+ createElementVNode("div", _hoisted_5, [
358
375
  createElementVNode("div", {
359
376
  ref_key: "panelRef",
360
377
  ref: panelRef,
@@ -362,7 +379,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
362
379
  }, [
363
380
  createVNode(unref(OSelect), {
364
381
  modelValue: searchType.value,
365
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchType.value = $event),
382
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchType.value = $event),
366
383
  size: "large",
367
384
  trigger: "click",
368
385
  variant: "outline",
@@ -381,11 +398,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
381
398
  }, 8, ["modelValue"]),
382
399
  createVNode(unref(OInput), {
383
400
  modelValue: debounceSig.value,
384
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => debounceSig.value = $event),
401
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => debounceSig.value = $event),
385
402
  size: "large",
386
403
  clearable: "",
387
404
  placeholder: placeholderType.value,
388
- onFocusCapture: _cache[3] || (_cache[3] = ($event) => showPanel.value = true),
405
+ onFocusCapture: _cache[4] || (_cache[4] = ($event) => showPanel.value = true),
389
406
  onPressEnter: changeSearchInput,
390
407
  onClear: clearInput
391
408
  }, {
@@ -399,13 +416,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
399
416
  ]),
400
417
  _: 1
401
418
  }, 8, ["modelValue", "placeholder"]),
402
- showPanel.value && sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
419
+ showPanel.value && sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
403
420
  (openBlock(true), createElementBlock(Fragment, null, renderList(hasSearchData.value, (item) => {
404
421
  return openBlock(), createElementBlock("div", {
405
422
  key: item.id,
406
423
  class: "o-sig-search-group"
407
424
  }, [
408
- searchType.value === "all" ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(item.label), 1)) : createCommentVNode("", true),
425
+ searchType.value === "all" ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(item.label), 1)) : createCommentVNode("", true),
409
426
  item.list.length ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item.list, (it) => {
410
427
  return openBlock(), createElementBlock("div", {
411
428
  key: it.name,
@@ -415,46 +432,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
432
  withDirectives(createElementVNode("span", {
416
433
  title: stripHtml(it == null ? void 0 : it.name),
417
434
  class: "o-sig-search-title"
418
- }, null, 8, _hoisted_8), [
435
+ }, null, 8, _hoisted_9), [
419
436
  [unref(vDompurifyHtml), it == null ? void 0 : it.name]
420
437
  ])
421
- ], 8, _hoisted_7);
422
- }), 128)) : (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(unref(t)("sig.noResult")), 1))
438
+ ], 8, _hoisted_8);
439
+ }), 128)) : (openBlock(), createElementBlock("p", _hoisted_10, toDisplayString(unref(t)("sig.noResult")), 1))
423
440
  ]);
424
441
  }), 128))
425
442
  ])) : createCommentVNode("", true)
426
443
  ], 2)
427
- ]),
428
- unref(lePadV) && featureArr.value.length ? (openBlock(), createElementBlock("div", _hoisted_10, [
429
- createVNode(_component_OButton, {
430
- variant: "text",
431
- color: "normal",
432
- class: "o-sig-select-btn",
433
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.filterVisible = true)
434
- }, {
435
- default: withCtx(() => [
436
- createVNode(unref(OIcon), null, {
437
- default: withCtx(() => [
438
- createVNode(_component_IconFilter)
439
- ]),
440
- _: 1
441
- }),
442
- createElementVNode("span", _hoisted_11, toDisplayString(unref(t)("sig.filter")), 1)
443
- ]),
444
- _: 1
445
- })
446
- ])) : createCommentVNode("", true)
444
+ ])
447
445
  ], 2),
448
- featureType.value !== "all" || enterSearchInput.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
449
- sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_13, [
446
+ featureType.value !== "all" || enterSearchInput.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
447
+ sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
450
448
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip1")), 1),
451
- createElementVNode("span", _hoisted_14, toDisplayString(filterSearchData.value.length), 1),
449
+ createElementVNode("span", _hoisted_13, toDisplayString(filterSearchData.value.length), 1),
452
450
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip2")), 1),
453
- locale.value === "zh" ? (openBlock(), createElementBlock("span", _hoisted_15, toDisplayString(sigInput.value), 1)) : createCommentVNode("", true),
451
+ locale.value === "zh" ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(sigInput.value), 1)) : createCommentVNode("", true),
454
452
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip3")), 1)
455
- ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
453
+ ])) : (openBlock(), createElementBlock("div", _hoisted_15, [
456
454
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip4")), 1),
457
- createElementVNode("span", _hoisted_17, toDisplayString(filterSearchData.value.length), 1),
455
+ createElementVNode("span", _hoisted_16, toDisplayString(filterSearchData.value.length), 1),
458
456
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip5")), 1)
459
457
  ]))
460
458
  ])) : createCommentVNode("", true),
@@ -491,8 +489,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
491
489
  "--result-image-height": "170px"
492
490
  }
493
491
  })),
494
- unref(lePadV) && filterDataMb.value.length && filterDataMb.value.length < filterSearchData.value.length ? (openBlock(), createElementBlock("p", _hoisted_18, toDisplayString(unref(t)("sig.loading")), 1)) : createCommentVNode("", true),
495
- filterSearchData.value.length > COUNT_PER_PAGE[0] ? (openBlock(), createElementBlock("div", _hoisted_19, [
492
+ unref(lePadV) && filterDataMb.value.length && filterDataMb.value.length < filterSearchData.value.length ? (openBlock(), createElementBlock("p", _hoisted_17, toDisplayString(unref(t)("sig.loading")), 1)) : createCommentVNode("", true),
493
+ filterSearchData.value.length > COUNT_PER_PAGE[0] ? (openBlock(), createElementBlock("div", _hoisted_18, [
496
494
  createVNode(unref(OPagination), {
497
495
  page: sigQuery.value.page,
498
496
  "onUpdate:page": _cache[5] || (_cache[5] = ($event) => sigQuery.value.page = $event),
@@ -26,7 +26,7 @@
26
26
  }
27
27
  @media (max-width: 840px) {
28
28
  .o-sig-detail-info-card {
29
- padding: var(--o-gap-3);
29
+ padding: var(--o-gap-3) var(--o-gap-2);
30
30
  }
31
31
  }
32
32
  .o-sig-detail-info-card .o-sig-detail-name-box {
@@ -123,4 +123,14 @@
123
123
  font-size: 12px;
124
124
  line-height: 18px;
125
125
  }
126
+ }
127
+ @media (min-width: 601px) {
128
+ .o-sig-detail-info-card .o-sig-detail-description {
129
+ overflow: hidden;
130
+ text-overflow: ellipsis;
131
+ word-break: break-all;
132
+ display: -webkit-box;
133
+ -webkit-box-orient: vertical;
134
+ -webkit-line-clamp: 4;
135
+ }
126
136
  }
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, c
2
2
  import { ODataTable, OLink, OPagination } from "@opensig/opendesign";
3
3
  import { useI18n } from "../../../i18n/index.mjs";
4
4
  import { useScreen } from "@opendesign-plus/composables";
5
- import { getGitUrl, getGitId } from "./utils.mjs";
5
+ import { getGitId, getGitUrl } from "./utils.mjs";
6
6
  const _hoisted_1 = {
7
7
  id: "repositories",
8
8
  class: "o-sig-detail-repo"
@@ -30,8 +30,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  return props.repositories.filter((item) => {
31
31
  var _a, _b, _c, _d, _e;
32
32
  if (((_a = conditions.value.repo) == null ? void 0 : _a.length) && !conditions.value.repo.includes(item.repo)) return false;
33
- if (((_b = conditions.value.maintainers) == null ? void 0 : _b.length) && !((_c = item.maintainers) == null ? void 0 : _c.some((m) => conditions.value.maintainers.includes(m.user_login)))) return false;
34
- if (((_d = conditions.value.committers) == null ? void 0 : _d.length) && !((_e = item.committers) == null ? void 0 : _e.some((c) => conditions.value.committers.includes(c.user_login)))) return false;
33
+ if (((_b = conditions.value.maintainers) == null ? void 0 : _b.length) && !((_c = item.maintainers) == null ? void 0 : _c.some((m) => conditions.value.maintainers.includes(getGitId(m))))) return false;
34
+ if (((_d = conditions.value.committers) == null ? void 0 : _d.length) && !((_e = item.committers) == null ? void 0 : _e.some((c) => conditions.value.committers.includes(getGitId(c))))) return false;
35
35
  return true;
36
36
  });
37
37
  });
@@ -63,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
63
  const uniqueLogins = (rows, field) => {
64
64
  const set = /* @__PURE__ */ new Set();
65
65
  rows.forEach(
66
- (item) => (item[field] || []).forEach((p) => p.user_login && set.add(p.user_login))
66
+ (item) => (item[field] || []).forEach((p) => getGitId(p) && set.add(getGitId(p)))
67
67
  );
68
68
  return [...set].map((v) => ({ label: v, value: v }));
69
69
  };
@@ -122,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
122
  (openBlock(true), createElementBlock(Fragment, null, renderList(row.maintainers, (item, index) => {
123
123
  return openBlock(), createBlock(unref(OLink), {
124
124
  target: "_blank",
125
- key: item.user_login,
125
+ key: index,
126
126
  rel: "noopener noreferrer",
127
127
  href: unref(getGitUrl)(item)
128
128
  }, {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 判断链接来自 GITEE / ATOMGIT
3
3
  */
4
- export declare const detectGitPlatform: (url: string) => string;
4
+ export declare const detectGitPlatform: (url: string | undefined) => string;
5
5
  /**
6
6
  * 根据用户标识生成对应的代码托管平台主页地址。
7
7
  *
@@ -17,7 +17,7 @@ export declare const detectGitPlatform: (url: string) => string;
17
17
  * @param params 用户名或用户信息对象
18
18
  * @returns 代码托管平台主页地址,无匹配时为 `undefined`
19
19
  */
20
- export declare const getGitUrl: (params: string | {
20
+ export declare const getGitUrl: (params: undefined | string | {
21
21
  gitee_id?: string;
22
22
  gitcode_id?: string;
23
23
  atomgit_id?: string;
@@ -33,7 +33,7 @@ export declare const getGitUrl: (params: string | {
33
33
  * @param params 用户信息对象
34
34
  * @returns 首个匹配的 git 标识,无匹配时为空字符串
35
35
  */
36
- export declare const getGitId: (params: {
36
+ export declare const getGitId: (params: undefined | {
37
37
  gitee_id?: string;
38
38
  gitcode_id?: string;
39
39
  atomgit_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.137",
3
+ "version": "0.0.1-rc.138",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -45,8 +45,8 @@
45
45
  "vue-dompurify-html": "^3.1.2",
46
46
  "vue": "^3.5.13",
47
47
  "element-plus": "2.13.1",
48
- "@opendesign-plus/styles": "0.0.1-rc.2",
49
- "@opendesign-plus/composables": "0.0.1-rc.10"
48
+ "@opendesign-plus/composables": "0.0.1-rc.10",
49
+ "@opendesign-plus/styles": "0.0.1-rc.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@vitejs/plugin-vue": "^5.2.1",