@ndscnj/roomkit-web-vue3 25.12.24151 → 25.12.24152

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 (46) hide show
  1. package/es/components/RoomFooter/index/indexPC.vue.mjs +1 -1
  2. package/es/components/RoomFooter/index/indexPC.vue2.mjs +4 -4
  3. package/es/components/RoomFooter/voteControl.vue.d.ts +15 -0
  4. package/es/components/RoomFooter/voteControl.vue.mjs +7 -0
  5. package/es/components/RoomFooter/voteControl.vue2.mjs +55 -0
  6. package/es/components/RoomVote/index.d.ts +17 -1
  7. package/es/components/RoomVote/indexPC.vue.d.ts +10 -1
  8. package/es/components/RoomVote/indexPC.vue.mjs +1 -1
  9. package/es/components/RoomVote/indexPC.vue2.mjs +6 -2
  10. package/es/index.mjs +25 -53
  11. package/lib/components/RoomFooter/index/indexPC.vue.js +1 -1
  12. package/lib/components/RoomFooter/index/indexPC.vue2.js +6 -6
  13. package/lib/components/RoomFooter/voteControl.vue.d.ts +15 -0
  14. package/lib/components/RoomFooter/voteControl.vue.js +7 -0
  15. package/lib/components/RoomFooter/voteControl.vue2.js +55 -0
  16. package/lib/components/RoomVote/index.d.ts +17 -1
  17. package/lib/components/RoomVote/indexPC.vue.d.ts +10 -1
  18. package/lib/components/RoomVote/indexPC.vue.js +1 -1
  19. package/lib/components/RoomVote/indexPC.vue2.js +5 -1
  20. package/lib/index.js +25 -53
  21. package/package.json +1 -1
  22. package/src/TUIRoom/components/RoomFooter/index/indexPC.vue +1 -1
  23. package/src/TUIRoom/components/RoomFooter/voteControl.vue +3 -0
  24. package/src/TUIRoom/components/RoomVote/indexPC.vue +4 -1
  25. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +0 -6
  26. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.mjs +0 -7
  27. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue2.mjs +0 -105
  28. package/es/components/RoomFooter/VoteControl/MoreControlPC.vue.d.ts +0 -2
  29. package/es/components/RoomFooter/VoteControl/MoreControlPC.vue.mjs +0 -49
  30. package/es/components/RoomFooter/VoteControl/MoreControlPC.vue2.mjs +0 -4
  31. package/es/components/RoomFooter/VoteControl/index.d.ts +0 -6
  32. package/es/components/RoomFooter/VoteControl/index.mjs +0 -7
  33. package/es/components/RoomFooter/VoteControl/useMoreControlHooks.mjs +0 -22
  34. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +0 -6
  35. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.js +0 -7
  36. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue2.js +0 -105
  37. package/lib/components/RoomFooter/VoteControl/MoreControlPC.vue.d.ts +0 -2
  38. package/lib/components/RoomFooter/VoteControl/MoreControlPC.vue.js +0 -49
  39. package/lib/components/RoomFooter/VoteControl/MoreControlPC.vue2.js +0 -4
  40. package/lib/components/RoomFooter/VoteControl/index.d.ts +0 -6
  41. package/lib/components/RoomFooter/VoteControl/index.js +0 -7
  42. package/lib/components/RoomFooter/VoteControl/useMoreControlHooks.js +0 -22
  43. package/src/TUIRoom/components/RoomFooter/VoteControl/MoreControlH5.vue +0 -122
  44. package/src/TUIRoom/components/RoomFooter/VoteControl/MoreControlPC.vue +0 -31
  45. package/src/TUIRoom/components/RoomFooter/VoteControl/index.ts +0 -8
  46. package/src/TUIRoom/components/RoomFooter/VoteControl/useMoreControlHooks.ts +0 -23
@@ -1,122 +0,0 @@
1
- <template>
2
- <div>
3
- <div v-if="moreControlConfig.visible" class="more-control-container">
4
- <icon-button
5
- v-tap="showMore"
6
- :is-active="sidebarName === 'more'"
7
- :title="t('More')"
8
- >
9
- <IconExtension size="24" />
10
- </icon-button>
11
- </div>
12
- <div v-if="showMoreContent" ref="moreContentRef" class="show-more-content">
13
- <div class="control-compent">
14
- <chat-control
15
- v-if="roomStore.isSpeakAfterTakingSeatMode"
16
- @click="handleControlClick('chatControl')"
17
- />
18
- <contact-control @click="handleControlClick('contactControl')" />
19
- <invite-control
20
- @show-overlay="handleShowOverlay"
21
- @click="handleControlClick('inviteControl')"
22
- />
23
- </div>
24
- <div v-tap="handleCancelControl" class="close">{{ t('Cancel') }}</div>
25
- </div>
26
- </div>
27
- </template>
28
- <script setup lang="ts">
29
- import { ref, onMounted, onUnmounted, defineEmits } from 'vue';
30
- import { IconExtension } from '@tencentcloud/uikit-base-component-vue3';
31
- import IconButton from '../../common/base/IconButton.vue';
32
- import userMoreControl from './useMoreControlHooks';
33
- import ChatControl from '../ChatControl.vue';
34
- import InviteControl from '../InviteControl.vue';
35
- import ContactControl from '../ContactControl.vue';
36
- import { useRoomStore } from '../../../stores/room';
37
- import bus from '../../../hooks/useMitt';
38
- import vTap from '../../../directives/vTap';
39
- import { roomService } from '../../../services';
40
-
41
- const moreControlConfig = roomService.getComponentConfig('MoreControl');
42
- const showMoreContent = ref(false);
43
- const moreContentRef = ref();
44
-
45
- const { t, sidebarName } = userMoreControl();
46
- const roomStore = useRoomStore();
47
- const emit = defineEmits(['show-overlay']);
48
- function showMore() {
49
- showMoreContent.value = true;
50
- }
51
-
52
- function handleCancelControl() {
53
- showMoreContent.value = false;
54
- }
55
- function handleControlClick(name: string) {
56
- bus.emit('experience-communication', name);
57
- }
58
-
59
- function handleShowOverlay(data: { name: string; visible: boolean }) {
60
- showMoreContent.value = false;
61
- emit('show-overlay', data);
62
- }
63
-
64
- function handleDocumentClick(event: MouseEvent) {
65
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
66
- showMoreContent.value = false;
67
- }
68
- }
69
-
70
- onMounted(() => {
71
- document?.addEventListener('click', handleDocumentClick, true);
72
- });
73
-
74
- onUnmounted(() => {
75
- document?.removeEventListener('click', handleDocumentClick, true);
76
- });
77
- </script>
78
- <style lang="scss" scoped>
79
- .show-more-content {
80
- position: absolute;
81
- bottom: 15px;
82
- left: 5%;
83
- width: 90%;
84
- height: 17vh;
85
- padding: 10px;
86
- border-radius: 13px;
87
- animation-name: popup;
88
- animation-duration: 200ms;
89
- background-color: var(--bg-color-operate);
90
- }
91
-
92
- @keyframes popup {
93
- from {
94
- bottom: 0;
95
- }
96
-
97
- to {
98
- bottom: 15px;
99
- }
100
- }
101
-
102
- .control-compent {
103
- display: flex;
104
- }
105
-
106
- .close {
107
- position: relative;
108
- top: 10%;
109
- display: flex;
110
- align-items: center;
111
- justify-content: center;
112
- width: 100%;
113
- padding: 10px;
114
- font-style: normal;
115
- font-weight: 400;
116
- line-height: 24px;
117
- text-align: center;
118
- border-radius: 8px;
119
- color: var(--text-color-primary);
120
- background-color: var(--button-color-secondary-default);
121
- }
122
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <div v-if="moreControlConfig.visible" class="more-control-container">
3
- <icon-button
4
- :is-active="sidebarName === 'vote'"
5
- :title="t('Vote')"
6
- @click-icon="toggleMoreSidebar"
7
- >
8
- <IconMore size="24" />
9
- </icon-button>
10
- </div>
11
- </template>
12
- <script setup lang="ts">
13
- import { IconMore } from '@tencentcloud/uikit-base-component-vue3';
14
- import IconButton from '../../common/base/IconButton.vue';
15
- import userMoreControl from './useMoreControlHooks';
16
- import { roomService } from '../../../services';
17
-
18
- const moreControlConfig = roomService.getComponentConfig('VoteControl');
19
- const { t, basicStore, sidebarName } = userMoreControl();
20
-
21
- function toggleMoreSidebar() {
22
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === 'vote') {
23
- basicStore.setSidebarOpenStatus(false);
24
- basicStore.setSidebarName('');
25
- return;
26
- }
27
- basicStore.setSidebarOpenStatus(true);
28
- basicStore.setSidebarName('vote');
29
- }
30
- </script>
31
- <style lang="scss" scoped></style>
@@ -1,8 +0,0 @@
1
- import MoreControlH5 from './MoreControlH5.vue';
2
- import MoreControlPc from './MoreControlPC.vue';
3
-
4
- import { isMobile } from '../../../utils/environment';
5
-
6
- const MoreControl = isMobile ? MoreControlH5 : MoreControlPc;
7
-
8
- export default MoreControl;
@@ -1,23 +0,0 @@
1
- import { computed } from 'vue';
2
- import { useBasicStore } from '../../../stores/basic';
3
- import { storeToRefs } from 'pinia';
4
- import { useI18n } from '../../../locales';
5
- import { ICON_NAME } from '../../../constants/icon';
6
-
7
- export default function useControl() {
8
- const { t } = useI18n();
9
-
10
- const basicStore = useBasicStore();
11
- const { sidebarName } = storeToRefs(basicStore);
12
-
13
- const iconName = computed(() =>
14
- sidebarName.value === 'more' ? ICON_NAME.MoreActive : ICON_NAME.More
15
- );
16
-
17
- return {
18
- t,
19
- basicStore,
20
- iconName,
21
- sidebarName,
22
- };
23
- }