@opendesign-plus-test/components 0.0.1-rc.85 → 0.0.1-rc.87
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.
- package/dist/components/header/OHeader.vue.d.ts +6 -2
- package/dist/components/header/index.d.ts +3 -1
- package/dist/components.cjs.js +40 -40
- package/dist/components.css +1 -1
- package/dist/components.es.js +7276 -7233
- package/dist/treeshaking/components/common/MoreText.css +12 -12
- package/dist/treeshaking/components/common/MoreText.vue.mjs +86 -5
- package/dist/treeshaking/components/common/MoreText.vue3.mjs +5 -0
- package/dist/treeshaking/components/common/ThFilter.css +10 -10
- package/dist/treeshaking/components/common/TooltipText.css +13 -6
- package/dist/treeshaking/components/common/TooltipText.vue.mjs +83 -6
- package/dist/treeshaking/components/common/TooltipText.vue3.mjs +5 -0
- package/dist/treeshaking/components/header/OHeader.css +13 -18
- package/dist/treeshaking/components/header/OHeader.vue.d.ts +6 -2
- package/dist/treeshaking/components/header/OHeader.vue.mjs +1 -1
- package/dist/treeshaking/components/header/OHeader.vue2.mjs +80 -9
- package/dist/treeshaking/components/header/OHeaderMobile.css +20 -20
- package/dist/treeshaking/components/header/OHeaderMobile.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderContent.css +253 -263
- package/dist/treeshaking/components/header/components/HeaderContent.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderContent.vue2.mjs +15 -12
- package/dist/treeshaking/components/header/components/HeaderNav.css +26 -26
- package/dist/treeshaking/components/header/components/HeaderNav.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderNav.vue2.mjs +1 -3
- package/dist/treeshaking/components/header/index.d.ts +3 -1
- package/dist/treeshaking/components/header-language-switcher/OHeaderLanguageSwitcher.css +43 -29
- package/dist/treeshaking/components/header-language-switcher/OHeaderLanguageSwitcher.vue.mjs +1 -1
- package/dist/treeshaking/components/header-language-switcher/OHeaderLanguageSwitcher.vue2.mjs +1 -1
- package/dist/treeshaking/components/header-source-code/OHeaderSourceCode.css +25 -26
- package/dist/treeshaking/components/header-source-code/OHeaderSourceCode.vue.mjs +1 -1
- package/dist/treeshaking/components/header-source-code/OHeaderSourceCode.vue2.mjs +1 -0
- package/dist/treeshaking/components/header-user/OHeaderUser.css +26 -26
- package/dist/treeshaking/components/header-user/OHeaderUser.vue.mjs +1 -1
- package/dist/treeshaking/components/header-user/OHeaderUser2.css +5 -0
- package/dist/treeshaking/components/meeting/OMeetingCalendar.vue.mjs +13 -5
- package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +3 -2
- package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +3 -2
- package/dist/treeshaking/components/meeting/components/OMeetingDetail.vue.mjs +3 -2
- package/package.json +3 -3
- package/dist/treeshaking/components/common/MoreText.vue2.mjs +0 -88
- package/dist/treeshaking/components/common/TooltipText.vue2.mjs +0 -85
- package/dist/treeshaking/components/common/TooltipText2.css +0 -15
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-22ffeea2] {
|
|
2
2
|
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
3
3
|
}
|
|
4
4
|
@media (hover: hover) {
|
|
5
|
-
.hover-icon-rotate:hover .o-icon[data-v-
|
|
5
|
+
.hover-icon-rotate:hover .o-icon[data-v-22ffeea2] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.header-user[data-v-
|
|
9
|
+
.header-user[data-v-22ffeea2] {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
height: 100%;
|
|
@@ -14,30 +14,30 @@
|
|
|
14
14
|
opacity: 1;
|
|
15
15
|
transition: opacity 0.15s;
|
|
16
16
|
}
|
|
17
|
-
.user-info[data-v-
|
|
17
|
+
.user-info[data-v-22ffeea2] {
|
|
18
18
|
height: 100%;
|
|
19
19
|
min-width: 32px;
|
|
20
20
|
display: flex;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
}
|
|
23
|
-
.info-wrap[data-v-
|
|
23
|
+
.info-wrap[data-v-22ffeea2] {
|
|
24
24
|
height: calc(100% - 10px);
|
|
25
25
|
margin: 5px 0;
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: center;
|
|
28
28
|
}
|
|
29
|
-
.info-wrap .icon[data-v-
|
|
29
|
+
.info-wrap .icon[data-v-22ffeea2] {
|
|
30
30
|
margin-left: 4px;
|
|
31
31
|
}
|
|
32
|
-
.user-avatar[data-v-
|
|
32
|
+
.user-avatar[data-v-22ffeea2] {
|
|
33
33
|
margin-right: 4px;
|
|
34
34
|
}
|
|
35
|
-
.user-avatar[data-v-
|
|
35
|
+
.user-avatar[data-v-22ffeea2] .o-badge-content {
|
|
36
36
|
--badge-dot-size: 6px;
|
|
37
37
|
right: 7px;
|
|
38
38
|
top: 2px;
|
|
39
39
|
}
|
|
40
|
-
.o-dropdown-item[data-v-
|
|
40
|
+
.o-dropdown-item[data-v-22ffeea2] {
|
|
41
41
|
white-space: nowrap;
|
|
42
42
|
--dropdown-item-color: var(--o-color-info1);
|
|
43
43
|
--dropdown-item-padding: 5px 12px;
|
|
@@ -45,39 +45,39 @@
|
|
|
45
45
|
line-height: 22px;
|
|
46
46
|
}
|
|
47
47
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
48
|
-
.o-dropdown-item[data-v-
|
|
48
|
+
.o-dropdown-item[data-v-22ffeea2] {
|
|
49
49
|
font-size: 12px;
|
|
50
50
|
line-height: 18px;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
54
|
-
.o-dropdown-item[data-v-
|
|
54
|
+
.o-dropdown-item[data-v-22ffeea2] {
|
|
55
55
|
font-size: 12px;
|
|
56
56
|
line-height: 18px;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
60
|
-
.o-dropdown-item[data-v-
|
|
60
|
+
.o-dropdown-item[data-v-22ffeea2] {
|
|
61
61
|
font-size: 12px;
|
|
62
62
|
line-height: 18px;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
@media (max-width: 600px) {
|
|
66
|
-
.o-dropdown-item[data-v-
|
|
66
|
+
.o-dropdown-item[data-v-22ffeea2] {
|
|
67
67
|
font-size: 12px;
|
|
68
68
|
line-height: 18px;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
@media (hover: hover) {
|
|
72
|
-
.o-dropdown-item[data-v-
|
|
72
|
+
.o-dropdown-item[data-v-22ffeea2]:hover {
|
|
73
73
|
color: var(--o-color-primary1);
|
|
74
74
|
background: var(--o-color-control2-light);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
.notice-not[data-v-
|
|
77
|
+
.notice-not[data-v-22ffeea2] .o-badge-content {
|
|
78
78
|
display: none;
|
|
79
79
|
}
|
|
80
|
-
.user-account[data-v-
|
|
80
|
+
.user-account[data-v-22ffeea2] {
|
|
81
81
|
color: var(--o-color-info1);
|
|
82
82
|
max-width: 96px;
|
|
83
83
|
font-weight: 500;
|
|
@@ -85,30 +85,30 @@
|
|
|
85
85
|
line-height: 22px;
|
|
86
86
|
}
|
|
87
87
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
88
|
-
.user-account[data-v-
|
|
88
|
+
.user-account[data-v-22ffeea2] {
|
|
89
89
|
font-size: 12px;
|
|
90
90
|
line-height: 18px;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
94
|
-
.user-account[data-v-
|
|
94
|
+
.user-account[data-v-22ffeea2] {
|
|
95
95
|
font-size: 12px;
|
|
96
96
|
line-height: 18px;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
100
|
-
.user-account[data-v-
|
|
100
|
+
.user-account[data-v-22ffeea2] {
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
line-height: 18px;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
@media (max-width: 600px) {
|
|
106
|
-
.user-account[data-v-
|
|
106
|
+
.user-account[data-v-22ffeea2] {
|
|
107
107
|
font-size: 12px;
|
|
108
108
|
line-height: 18px;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
.user-account[data-v-
|
|
111
|
+
.user-account[data-v-22ffeea2] {
|
|
112
112
|
overflow: hidden;
|
|
113
113
|
text-overflow: ellipsis;
|
|
114
114
|
word-break: break-all;
|
|
@@ -117,19 +117,19 @@
|
|
|
117
117
|
-webkit-line-clamp: 1;
|
|
118
118
|
}
|
|
119
119
|
@media (max-width: 840px) {
|
|
120
|
-
.header-user[data-v-
|
|
120
|
+
.header-user[data-v-22ffeea2] {
|
|
121
121
|
min-width: auto;
|
|
122
122
|
}
|
|
123
|
-
.header-user .user-info[data-v-
|
|
123
|
+
.header-user .user-info[data-v-22ffeea2] {
|
|
124
124
|
min-width: 24px;
|
|
125
125
|
}
|
|
126
|
-
.header-user .user-info .info-wrap .user-avatar[data-v-
|
|
126
|
+
.header-user .user-info .info-wrap .user-avatar[data-v-22ffeea2] {
|
|
127
127
|
margin-right: 0;
|
|
128
128
|
}
|
|
129
|
-
.header-user .user-info .info-wrap .user-account[data-v-
|
|
129
|
+
.header-user .user-info .info-wrap .user-account[data-v-22ffeea2] {
|
|
130
130
|
display: none;
|
|
131
131
|
}
|
|
132
|
-
.header-user .user-info .info-wrap .icon[data-v-
|
|
132
|
+
.header-user .user-info .info-wrap .icon[data-v-22ffeea2] {
|
|
133
133
|
display: none;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./OHeaderUser.vue2.mjs";
|
|
|
2
2
|
import './OHeaderUser.css';
|
|
3
3
|
import './OHeaderUser2.css';
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const _OHeaderUser = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const _OHeaderUser = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-22ffeea2"]]);
|
|
6
6
|
export {
|
|
7
7
|
_OHeaderUser as default
|
|
8
8
|
};
|
|
@@ -175,16 +175,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
175
|
const allDates = computed(() => {
|
|
176
176
|
return [.../* @__PURE__ */ new Set([...dateList.value, ...summitDates.value, ...eventsDates.value])].flat().sort((a, b) => dayjs(a).isAfter(dayjs(b)) ? 1 : -1);
|
|
177
177
|
});
|
|
178
|
+
const latestDayLoaded = ref("");
|
|
178
179
|
const latestDay = computed(() => {
|
|
179
|
-
if (
|
|
180
|
-
return
|
|
181
|
-
}
|
|
180
|
+
if (latestDayLoaded.value) {
|
|
181
|
+
return latestDayLoaded.value;
|
|
182
|
+
}
|
|
183
|
+
if (allDates.value.length) {
|
|
182
184
|
let find = allDates.value.find((v) => dayjs(v).isAfter(dayjs()));
|
|
183
185
|
if (!find) {
|
|
184
186
|
find = [...allDates.value].reverse().find((v) => dayjs().isAfter(dayjs(v)));
|
|
185
187
|
}
|
|
186
188
|
return formatDate(find);
|
|
187
189
|
}
|
|
190
|
+
return null;
|
|
188
191
|
});
|
|
189
192
|
const changeMeetingDay = useDebounceFn((day, event) => {
|
|
190
193
|
if (isAutoClick.value) {
|
|
@@ -201,8 +204,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
201
204
|
() => latestDay.value,
|
|
202
205
|
() => {
|
|
203
206
|
var _a;
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
if (latestDay.value) {
|
|
208
|
+
latestDayLoaded.value = latestDay.value;
|
|
209
|
+
(_a = calendar.value) == null ? void 0 : _a.pickDay(dayjs(latestDay.value));
|
|
210
|
+
changeMeetingDay(latestDay.value);
|
|
211
|
+
} else {
|
|
212
|
+
changeMeetingDay(formatDate());
|
|
213
|
+
}
|
|
206
214
|
},
|
|
207
215
|
{
|
|
208
216
|
immediate: true
|
|
@@ -13,7 +13,8 @@ import { useDebounceFn } from "@vueuse/core";
|
|
|
13
13
|
import { useScreen } from "@opendesign-plus/composables";
|
|
14
14
|
import { Locales } from "../../i18n/index.mjs";
|
|
15
15
|
import IconCopy from "../../_virtual/icon-copy.mjs";
|
|
16
|
-
import
|
|
16
|
+
import _sfc_main$2 from "../common/TooltipText.vue.mjs";
|
|
17
|
+
import '../common/TooltipText.css';
|
|
17
18
|
const _hoisted_1 = { class: "o-my-meeting-calendar" };
|
|
18
19
|
const _hoisted_2 = { class: "meeting-list" };
|
|
19
20
|
const _hoisted_3 = { class: "list-calendar-mb" };
|
|
@@ -680,7 +681,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
680
681
|
row.is_delete ? (openBlock(), createElementBlock("div", _hoisted_13, toDisplayString(unref(t)("meeting.meetingCancelled")), 1)) : createCommentVNode("", true),
|
|
681
682
|
createElementVNode("div", _hoisted_14, [
|
|
682
683
|
createElementVNode("div", _hoisted_15, [
|
|
683
|
-
createVNode(
|
|
684
|
+
createVNode(_sfc_main$2, null, {
|
|
684
685
|
default: withCtx(() => [
|
|
685
686
|
createTextVNode(toDisplayString(row.topic), 1)
|
|
686
687
|
]),
|
|
@@ -9,7 +9,8 @@ import { INTERVAL_DAY, INTERVAL_WEEK, INTERVAL_MONTH } from "../config.mjs";
|
|
|
9
9
|
import { formatDate } from "../utils.mjs";
|
|
10
10
|
import { useMeetingConfig } from "../composables/useMeetingConfig.mjs";
|
|
11
11
|
import { useActivityConfig } from "../../activity/composables/useActivityConfig.mjs";
|
|
12
|
-
import
|
|
12
|
+
import _sfc_main$2 from "../../common/TooltipText.vue.mjs";
|
|
13
|
+
import '../../common/TooltipText.css';
|
|
13
14
|
const _hoisted_1 = { class: "meet-title-left" };
|
|
14
15
|
const _hoisted_2 = ["title"];
|
|
15
16
|
const _hoisted_3 = { class: "text" };
|
|
@@ -245,7 +246,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
245
246
|
_: 2
|
|
246
247
|
}, 1032, ["style"]),
|
|
247
248
|
createElementVNode("div", _hoisted_3, [
|
|
248
|
-
createVNode(
|
|
249
|
+
createVNode(_sfc_main$2, null, {
|
|
249
250
|
default: withCtx(() => [
|
|
250
251
|
createTextVNode(toDisplayString((item.topic || item.name || item.title).repeat(3)), 1)
|
|
251
252
|
]),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createBlock, unref, withCtx, createTextVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { OLink } from "@opensig/opendesign";
|
|
3
3
|
import { CalendarDataType } from "../types.mjs";
|
|
4
|
-
import
|
|
4
|
+
import _sfc_main$1 from "../../common/MoreText.vue.mjs";
|
|
5
|
+
import '../../common/MoreText.css';
|
|
5
6
|
import { formatDate } from "../utils.mjs";
|
|
6
7
|
import { useMeetingConfig } from "../composables/useMeetingConfig.mjs";
|
|
7
8
|
import { useI18n } from "../../../i18n/index.mjs";
|
|
@@ -146,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
147
|
getField(info.key) && !info.isRecord ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
147
148
|
createElementVNode("span", _hoisted_2, toDisplayString(info.label), 1),
|
|
148
149
|
createElementVNode("span", { class: "split-mark" }, toDisplayString(SPLIT_MARK)),
|
|
149
|
-
info.ellipsis ? (openBlock(), createBlock(
|
|
150
|
+
info.ellipsis ? (openBlock(), createBlock(_sfc_main$1, {
|
|
150
151
|
key: 0,
|
|
151
152
|
show: __props.show,
|
|
152
153
|
text: getField(info.key) || "-"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendesign-plus-test/components",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.87",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"vue-dompurify-html": "^3.1.2",
|
|
45
45
|
"vue": "^3.5.13",
|
|
46
46
|
"element-plus": "2.13.1",
|
|
47
|
-
"@opendesign-plus/
|
|
48
|
-
"@opendesign-plus/
|
|
47
|
+
"@opendesign-plus/composables": "0.0.1-rc.10",
|
|
48
|
+
"@opendesign-plus/styles": "0.0.1-rc.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, watch, nextTick, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, toDisplayString, unref, createVNode, withCtx, createCommentVNode } from "vue";
|
|
2
|
-
import { OIcon, OIconChevronDown, OIconChevronUp } from "@opensig/opendesign";
|
|
3
|
-
import { useI18n } from "../../i18n/index.mjs";
|
|
4
|
-
const _hoisted_1 = { class: "more-text-wrapper" };
|
|
5
|
-
const _hoisted_2 = { key: 0 };
|
|
6
|
-
const _hoisted_3 = { key: 1 };
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "MoreText",
|
|
9
|
-
props: {
|
|
10
|
-
text: { default: "" },
|
|
11
|
-
link: { type: Boolean, default: false },
|
|
12
|
-
lines: { default: 3 },
|
|
13
|
-
show: { type: Boolean, default: false }
|
|
14
|
-
},
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
const { t } = useI18n();
|
|
18
|
-
const expanded = ref(false);
|
|
19
|
-
const showBtn = ref(false);
|
|
20
|
-
const offsetHeight = ref(0);
|
|
21
|
-
const contentRef = ref(null);
|
|
22
|
-
onMounted(() => {
|
|
23
|
-
determineHeight();
|
|
24
|
-
});
|
|
25
|
-
watch([() => props.text, () => props.show], () => {
|
|
26
|
-
determineHeight();
|
|
27
|
-
});
|
|
28
|
-
const determineHeight = () => {
|
|
29
|
-
nextTick(() => {
|
|
30
|
-
const ele = contentRef.value;
|
|
31
|
-
if (ele) {
|
|
32
|
-
const range = document.createRange();
|
|
33
|
-
range.setStart(ele, 0);
|
|
34
|
-
range.setEnd(ele, ele.childNodes.length);
|
|
35
|
-
showBtn.value = range.getBoundingClientRect().height > ele.offsetHeight + 10 || ele.scrollHeight > ele.offsetHeight + 10;
|
|
36
|
-
offsetHeight.value = range.getBoundingClientRect().height || ele.scrollHeight;
|
|
37
|
-
} else {
|
|
38
|
-
showBtn.value = false;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
const clickText = () => {
|
|
43
|
-
if (props.link) {
|
|
44
|
-
window.open(props.text);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
49
|
-
createElementVNode("div", {
|
|
50
|
-
class: normalizeClass(["more-text-content", __props.link && "is-link"]),
|
|
51
|
-
ref_key: "contentRef",
|
|
52
|
-
ref: contentRef,
|
|
53
|
-
style: normalizeStyle({
|
|
54
|
-
"max-height": expanded.value ? offsetHeight.value + "px" : "4.5em",
|
|
55
|
-
"-webkit-line-clamp": expanded.value ? "initial" : __props.lines
|
|
56
|
-
}),
|
|
57
|
-
onClick: clickText
|
|
58
|
-
}, toDisplayString(__props.text), 7),
|
|
59
|
-
showBtn.value ? (openBlock(), createElementBlock("div", {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "more-text-btn",
|
|
62
|
-
onClick: _cache[0] || (_cache[0] = ($event) => expanded.value = !expanded.value)
|
|
63
|
-
}, [
|
|
64
|
-
!expanded.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
65
|
-
createElementVNode("span", null, toDisplayString(unref(t)("common.expand")), 1),
|
|
66
|
-
createVNode(unref(OIcon), null, {
|
|
67
|
-
default: withCtx(() => [
|
|
68
|
-
createVNode(unref(OIconChevronDown))
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
})
|
|
72
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
73
|
-
createElementVNode("span", null, toDisplayString(unref(t)("common.collapse")), 1),
|
|
74
|
-
createVNode(unref(OIcon), null, {
|
|
75
|
-
default: withCtx(() => [
|
|
76
|
-
createVNode(unref(OIconChevronUp))
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
})
|
|
80
|
-
]))
|
|
81
|
-
])) : createCommentVNode("", true)
|
|
82
|
-
]);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
export {
|
|
87
|
-
_sfc_main as default
|
|
88
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, useSlots, onMounted, onUnmounted, watch, computed, openBlock, createElementBlock, normalizeStyle, createVNode, unref, withCtx, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
|
|
2
|
-
import { isClient, OPopover } from "@opensig/opendesign";
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "TooltipText",
|
|
5
|
-
props: {
|
|
6
|
-
lines: {},
|
|
7
|
-
width: {},
|
|
8
|
-
type: { default: "" },
|
|
9
|
-
size: { default: 14 }
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
const contentRef = ref(null);
|
|
13
|
-
const ellipsis = ref(true);
|
|
14
|
-
const props = __props;
|
|
15
|
-
const slots = useSlots();
|
|
16
|
-
let resizeObserver = null;
|
|
17
|
-
const checkOverflow = () => {
|
|
18
|
-
if (!isClient) return;
|
|
19
|
-
const ele = contentRef.value;
|
|
20
|
-
if (!ele) return;
|
|
21
|
-
ellipsis.value = ele.scrollWidth > ele.offsetWidth + 1 || ele.scrollHeight > ele.offsetHeight + 1;
|
|
22
|
-
};
|
|
23
|
-
onMounted(() => {
|
|
24
|
-
checkOverflow();
|
|
25
|
-
if (!isClient || !contentRef.value) return;
|
|
26
|
-
resizeObserver = new ResizeObserver(() => checkOverflow());
|
|
27
|
-
resizeObserver.observe(contentRef.value);
|
|
28
|
-
});
|
|
29
|
-
onUnmounted(() => {
|
|
30
|
-
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
31
|
-
});
|
|
32
|
-
watch(() => [props.lines, props.width], () => {
|
|
33
|
-
if (isClient) requestAnimationFrame(checkOverflow);
|
|
34
|
-
});
|
|
35
|
-
const getTextFromNode = (node) => {
|
|
36
|
-
const children = node.children ?? "";
|
|
37
|
-
if (Array.isArray(children)) {
|
|
38
|
-
return children.map((v) => getTextFromNode(v)).join("");
|
|
39
|
-
}
|
|
40
|
-
return String(children);
|
|
41
|
-
};
|
|
42
|
-
const contentText = computed(() => {
|
|
43
|
-
var _a;
|
|
44
|
-
const nodes = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
|
|
45
|
-
return nodes.map((node) => getTextFromNode(node)).join("\n");
|
|
46
|
-
});
|
|
47
|
-
const wrapperStyle = computed(() => {
|
|
48
|
-
const calcWidth = Number.isNaN(Number(props.width)) ? props.width : `${props.width}px`;
|
|
49
|
-
return { width: calcWidth };
|
|
50
|
-
});
|
|
51
|
-
return (_ctx, _cache) => {
|
|
52
|
-
return openBlock(), createElementBlock("div", {
|
|
53
|
-
class: "tooltip-text-wrapper",
|
|
54
|
-
style: normalizeStyle(wrapperStyle.value)
|
|
55
|
-
}, [
|
|
56
|
-
createVNode(unref(OPopover), {
|
|
57
|
-
anchor: "",
|
|
58
|
-
disabled: !ellipsis.value,
|
|
59
|
-
adjustMinWidth: false,
|
|
60
|
-
adjustWidth: true
|
|
61
|
-
}, {
|
|
62
|
-
target: withCtx(() => [
|
|
63
|
-
createElementVNode("div", {
|
|
64
|
-
class: normalizeClass(["tooltip-text", __props.type, ellipsis.value && "ellipsis", __props.lines > 1 && "multi-lines"]),
|
|
65
|
-
ref_key: "contentRef",
|
|
66
|
-
ref: contentRef,
|
|
67
|
-
style: normalizeStyle(`--lines: ${__props.lines};`)
|
|
68
|
-
}, [
|
|
69
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
70
|
-
], 6)
|
|
71
|
-
]),
|
|
72
|
-
default: withCtx(() => [
|
|
73
|
-
createElementVNode("div", {
|
|
74
|
-
class: normalizeClass(["popup-box2", `fz-${__props.size}`])
|
|
75
|
-
}, toDisplayString(contentText.value), 3)
|
|
76
|
-
]),
|
|
77
|
-
_: 3
|
|
78
|
-
}, 8, ["disabled"])
|
|
79
|
-
], 4);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
export {
|
|
84
|
-
_sfc_main as default
|
|
85
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon {
|
|
2
|
-
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
3
|
-
}
|
|
4
|
-
@media (hover: hover) {
|
|
5
|
-
.hover-icon-rotate:hover .o-icon {
|
|
6
|
-
transform: rotate(-180deg);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
.tooltip-text-wrapper .popup-box2 {
|
|
10
|
-
color: var(--o-color-info2);
|
|
11
|
-
}
|
|
12
|
-
.tooltip-text-wrapper .popup-box2.fz-14 {
|
|
13
|
-
font-size: 14px;
|
|
14
|
-
line-height: 22px;
|
|
15
|
-
}
|