@opendesign-plus-test/components 0.0.1-rc.153 → 0.0.1-rc.154

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.
@@ -22,28 +22,32 @@ const _hoisted_3 = {
22
22
  };
23
23
  const _hoisted_4 = { class: "o-sig-filter-select-box" };
24
24
  const _hoisted_5 = {
25
+ key: 0,
26
+ class: "o-sig-search-loading"
27
+ };
28
+ const _hoisted_6 = {
25
29
  key: 0,
26
30
  class: "o-sig-search-label"
27
31
  };
28
- const _hoisted_6 = ["onClick"];
29
- const _hoisted_7 = ["title"];
30
- const _hoisted_8 = {
32
+ const _hoisted_7 = ["onClick"];
33
+ const _hoisted_8 = ["title"];
34
+ const _hoisted_9 = {
31
35
  key: 2,
32
36
  class: "o-sig-no-result"
33
37
  };
34
- const _hoisted_9 = {
38
+ const _hoisted_10 = {
35
39
  key: 0,
36
40
  class: "o-sig-filter-result-tip"
37
41
  };
38
- const _hoisted_10 = { key: 0 };
39
- const _hoisted_11 = { class: "o-sig-num" };
40
- const _hoisted_12 = {
42
+ const _hoisted_11 = { key: 0 };
43
+ const _hoisted_12 = { class: "o-sig-num" };
44
+ const _hoisted_13 = {
41
45
  key: 0,
42
46
  class: "o-sig-num"
43
47
  };
44
- const _hoisted_13 = { key: 1 };
45
- const _hoisted_14 = { class: "o-sig-num" };
46
- const _hoisted_15 = {
48
+ const _hoisted_14 = { key: 1 };
49
+ const _hoisted_15 = { class: "o-sig-num" };
50
+ const _hoisted_16 = {
47
51
  key: 4,
48
52
  class: "o-sig-pagination"
49
53
  };
@@ -127,6 +131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
127
131
  const v = String(val);
128
132
  placeholderType.value = ((_a = sigOptions.find((e) => e.value === v)) == null ? void 0 : _a.placeholder) ?? "";
129
133
  enterSearchType.value = v;
134
+ hasSearchData.value = [];
130
135
  sigSearch();
131
136
  };
132
137
  const uniqueArray = (array) => {
@@ -137,6 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
142
  const sigInput = ref("");
138
143
  const showPanel = ref(false);
139
144
  const hasSearchData = ref([]);
145
+ const searching = ref(false);
140
146
  const buildSearchGroups = (res, type) => {
141
147
  const top3 = (arr) => uniqueArray(arr).sort((a, b) => b.socre - a.socre).slice(0, 3);
142
148
  const all = [
@@ -148,7 +154,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
148
154
  };
149
155
  const sigSearch = () => {
150
156
  if (!props.searchFn) return;
151
- hasSearchData.value = [];
157
+ searching.value = true;
152
158
  const params = {
153
159
  keyword: sigInput.value,
154
160
  keywordType: searchType.value
@@ -167,20 +173,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
173
  }))
168
174
  }));
169
175
  }
176
+ searching.value = false;
170
177
  }).catch(() => {
171
178
  hasSearchData.value = buildSearchGroups({}, searchType.value);
179
+ searching.value = false;
172
180
  });
173
181
  };
174
- const updataSig = (val) => {
175
- sigInput.value = val;
182
+ const debouncedSearch = useDebounceFn(() => {
176
183
  resetSigQuery();
177
184
  sigSearch();
178
- };
179
- const debounceFn = useDebounceFn(updataSig, 300);
180
- const debounceSig = computed({
181
- get: () => sigInput.value.trim(),
182
- set: (val) => debounceFn(val)
183
- });
185
+ }, 300);
184
186
  const enterSearchType = ref("all");
185
187
  const enterSearchInput = ref("");
186
188
  const changeSearchInput = () => {
@@ -214,6 +216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
214
216
  (val) => {
215
217
  showPanel.value = !!val;
216
218
  if (!val) enterSearchInput.value = val;
219
+ if (val) debouncedSearch();
217
220
  }
218
221
  );
219
222
  const filterSigData = ref([]);
@@ -386,8 +389,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
386
389
  _: 1
387
390
  }, 8, ["modelValue"]),
388
391
  createVNode(unref(OInput), {
389
- modelValue: debounceSig.value,
390
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => debounceSig.value = $event),
392
+ modelValue: sigInput.value,
393
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => sigInput.value = $event),
391
394
  size: "large",
392
395
  clearable: "",
393
396
  placeholder: placeholderType.value,
@@ -420,12 +423,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
420
423
  createElementVNode("div", {
421
424
  class: normalizeClass(["o-sig-search-data", `o-sig-search-data-${locale.value}`])
422
425
  }, [
423
- (openBlock(true), createElementBlock(Fragment, null, renderList(hasSearchData.value, (item) => {
426
+ searching.value && !hasSearchData.value.length ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(unref(t)("sig.loading")), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(hasSearchData.value, (item) => {
424
427
  return openBlock(), createElementBlock("div", {
425
428
  key: item.id,
426
429
  class: "o-sig-search-group"
427
430
  }, [
428
- searchType.value === "all" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(item.label), 1)) : createCommentVNode("", true),
431
+ searchType.value === "all" ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(item.label), 1)) : createCommentVNode("", true),
429
432
  item.list.length ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item.list, (it) => {
430
433
  return openBlock(), createElementBlock("div", {
431
434
  key: it.name,
@@ -435,11 +438,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
435
438
  withDirectives(createElementVNode("span", {
436
439
  title: stripHtml(it == null ? void 0 : it.name),
437
440
  class: "o-sig-search-title"
438
- }, null, 8, _hoisted_7), [
441
+ }, null, 8, _hoisted_8), [
439
442
  [unref(vDompurifyHtml), it == null ? void 0 : it.name]
440
443
  ])
441
- ], 8, _hoisted_6);
442
- }), 128)) : (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(unref(t)("sig.noResult")), 1))
444
+ ], 8, _hoisted_7);
445
+ }), 128)) : (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(unref(t)("sig.noResult")), 1))
443
446
  ]);
444
447
  }), 128))
445
448
  ], 2)
@@ -449,16 +452,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
449
452
  ], 2)
450
453
  ])
451
454
  ], 2),
452
- featureType.value !== "all" || enterSearchInput.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
453
- sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
455
+ featureType.value !== "all" || enterSearchInput.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
456
+ sigInput.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
454
457
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip1")), 1),
455
- createElementVNode("span", _hoisted_11, toDisplayString(filterSearchData.value.length), 1),
458
+ createElementVNode("span", _hoisted_12, toDisplayString(filterSearchData.value.length), 1),
456
459
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip2")), 1),
457
- locale.value === "zh" ? (openBlock(), createElementBlock("span", _hoisted_12, toDisplayString(sigInput.value), 1)) : createCommentVNode("", true),
460
+ locale.value === "zh" ? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString(sigInput.value), 1)) : createCommentVNode("", true),
458
461
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip3")), 1)
459
- ])) : (openBlock(), createElementBlock("div", _hoisted_13, [
462
+ ])) : (openBlock(), createElementBlock("div", _hoisted_14, [
460
463
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip4")), 1),
461
- createElementVNode("span", _hoisted_14, toDisplayString(filterSearchData.value.length), 1),
464
+ createElementVNode("span", _hoisted_15, toDisplayString(filterSearchData.value.length), 1),
462
465
  createElementVNode("span", null, toDisplayString(unref(t)("sig.filterResultTip5")), 1)
463
466
  ]))
464
467
  ])) : createCommentVNode("", true),
@@ -500,7 +503,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
500
503
  ref: loadingRef,
501
504
  class: "o-sig-loading"
502
505
  }, toDisplayString(unref(t)("sig.loading")), 513)) : createCommentVNode("", true),
503
- filterSearchData.value.length > COUNT_PER_PAGE[0] ? (openBlock(), createElementBlock("div", _hoisted_15, [
506
+ filterSearchData.value.length > COUNT_PER_PAGE[0] ? (openBlock(), createElementBlock("div", _hoisted_16, [
504
507
  createVNode(unref(OPagination), {
505
508
  page: sigQuery.value.page,
506
509
  "onUpdate:page": _cache[5] || (_cache[5] = ($event) => sigQuery.value.page = $event),
@@ -154,7 +154,7 @@ const en = {
154
154
  "meeting.meetingEtherpad": "Meeting Minutes",
155
155
  "meeting.meetingReplay": "Playback",
156
156
  "meeting.searchSubtitlePlaceholder": "Enter",
157
- "meeting.detailHalfYearMeetings": "默认显示近半年的会议。",
157
+ "meeting.detailHalfYearMeetings": "The conference system currently only retains meeting records from the past six months",
158
158
  "meeting.tencent": "Tencent",
159
159
  "meeting.etherpad": "Meeting Minutes",
160
160
  "common.confirm": "Confirm",
@@ -153,7 +153,7 @@ const zh = {
153
153
  "meeting.meetingEtherpad": "会议纪要",
154
154
  "meeting.meetingReplay": "智能回放",
155
155
  "meeting.searchSubtitlePlaceholder": "请输入搜索内容",
156
- "meeting.detailHalfYearMeetings": "默认显示近半年的会议。",
156
+ "meeting.detailHalfYearMeetings": "会议系统当前仅保留最近半年会议记录",
157
157
  "meeting.tencent": "腾讯会议",
158
158
  "meeting.etherpad": "会议纪要",
159
159
  "common.confirm": "确认",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.153",
3
+ "version": "0.0.1-rc.154",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",