@ndscnj/roomkit-web-vue3 25.12.24158 → 25.12.24159

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 (45) hide show
  1. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +2 -0
  2. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue.mjs +1 -1
  3. package/es/components/RoomFooter/VoteControl/MoreControlH5.vue2.mjs +14 -53
  4. package/es/components/RoomFooter/VoteControl/index.d.ts +2 -0
  5. package/es/components/RoomFooter/index/index.d.ts +31 -4
  6. package/es/components/RoomFooter/index/indexH5.vue.d.ts +12 -1
  7. package/es/components/RoomFooter/index/indexH5.vue.mjs +1 -1
  8. package/es/components/RoomFooter/index/indexH5.vue2.mjs +19 -4
  9. package/es/components/RoomSidebar/index.d.ts +1 -27
  10. package/es/components/RoomSidebar/indexPC.vue.d.ts +1 -5
  11. package/es/components/RoomSidebar/indexPC.vue.mjs +2 -13
  12. package/es/components/RoomVote/index.d.ts +2 -6
  13. package/es/components/RoomVote/indexH5.vue.d.ts +10 -5
  14. package/es/components/RoomVote/indexH5.vue.mjs +9 -2
  15. package/es/index.mjs +51 -51
  16. package/lib/components/Chat/index/indexH5.vue.js +1 -1
  17. package/lib/components/ManageMember/MemberItem/indexH5.vue.js +1 -1
  18. package/lib/components/ManageMember/indexH5.vue.js +1 -1
  19. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.d.ts +2 -0
  20. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue.js +1 -1
  21. package/lib/components/RoomFooter/VoteControl/MoreControlH5.vue2.js +13 -52
  22. package/lib/components/RoomFooter/VoteControl/index.d.ts +2 -0
  23. package/lib/components/RoomFooter/index/index.d.ts +31 -4
  24. package/lib/components/RoomFooter/index/indexH5.vue.d.ts +12 -1
  25. package/lib/components/RoomFooter/index/indexH5.vue.js +2 -2
  26. package/lib/components/RoomFooter/index/indexH5.vue2.js +18 -3
  27. package/lib/components/RoomInvite/indexH5.vue.js +1 -1
  28. package/lib/components/RoomMore/indexH5.vue.js +1 -1
  29. package/lib/components/RoomSidebar/index.d.ts +1 -27
  30. package/lib/components/RoomSidebar/indexH5.vue.js +1 -1
  31. package/lib/components/RoomSidebar/indexPC.vue.d.ts +1 -5
  32. package/lib/components/RoomSidebar/indexPC.vue.js +1 -12
  33. package/lib/components/RoomVote/index.d.ts +2 -6
  34. package/lib/components/RoomVote/indexH5.vue.d.ts +10 -5
  35. package/lib/components/RoomVote/indexH5.vue.js +9 -2
  36. package/lib/index.js +51 -51
  37. package/package.json +1 -1
  38. package/src/TUIRoom/components/RoomFooter/VoteControl/MoreControlH5.vue +10 -42
  39. package/src/TUIRoom/components/RoomFooter/index/indexH5.vue +14 -2
  40. package/src/TUIRoom/components/RoomSidebar/indexPC.vue +1 -12
  41. package/src/TUIRoom/components/RoomVote/indexH5.vue +1 -30
  42. package/es/components/RoomVote/indexH5.vue2.mjs +0 -51
  43. package/es/components/RoomVote/useRoomMoreHooks.mjs +0 -43
  44. package/lib/components/RoomVote/indexH5.vue2.js +0 -51
  45. package/lib/components/RoomVote/useRoomMoreHooks.js +0 -43
@@ -1,28 +1,14 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="moreControlConfig.visible" class="more-control-container">
3
+ <div v-if="voteControlConfig.visible" class="more-control-container">
4
4
  <icon-button
5
5
  v-tap="showMore"
6
- :is-active="sidebarName === 'more'"
7
- :title="t('More')"
6
+ :is-active="sidebarName === 'vote'"
7
+ :title="t('Vote')"
8
8
  >
9
9
  <IconExtension size="24" />
10
10
  </icon-button>
11
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
12
  </div>
27
13
  </template>
28
14
  <script setup lang="ts">
@@ -30,37 +16,19 @@ import { ref, onMounted, onUnmounted, defineEmits } from 'vue';
30
16
  import { IconExtension } from '@tencentcloud/uikit-base-component-vue3';
31
17
  import IconButton from '../../common/base/IconButton.vue';
32
18
  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
19
  import { roomService } from '../../../services';
40
-
41
- const moreControlConfig = roomService.getComponentConfig('MoreControl');
20
+ const voteControlConfig = roomService.getComponentConfig('MoreControl');
42
21
  const showMoreContent = ref(false);
43
22
  const moreContentRef = ref();
44
-
45
- const { t, sidebarName } = userMoreControl();
46
- const roomStore = useRoomStore();
47
- const emit = defineEmits(['show-overlay']);
23
+ const { t, sidebarName,basicStore } = userMoreControl();
24
+ const emit = defineEmits(['show-overlay','on-vote']);
48
25
  function showMore() {
49
26
  showMoreContent.value = true;
27
+ emit('on-vote', {
28
+ name: 'onVote',
29
+ visible:basicStore.isSidebarOpen,
30
+ });
50
31
  }
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
32
  function handleDocumentClick(event: MouseEvent) {
65
33
  if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
66
34
  showMoreContent.value = false;
@@ -14,6 +14,15 @@
14
14
  v-if="!roomStore.isSpeakAfterTakingSeatMode"
15
15
  v-tap="() => handleControlClick('chatControl')"
16
16
  />
17
+ <vote-control
18
+ v-tap="() => handleControlClick('voteControl')"
19
+ @show-overlay="handleShowOverlay"
20
+ @on-vote="onVote"
21
+ >
22
+ <template #content>
23
+ <slot name="content"></slot>
24
+ </template>
25
+ </vote-control>
17
26
  <AIControl
18
27
  @click="handleControlClick('AIControl')"
19
28
  />
@@ -46,6 +55,7 @@ import ChatControl from '../ChatControl.vue';
46
55
  import MasterApplyControl from '../ManageStageControl.vue';
47
56
  import MemberApplyControl from '../ApplyControl/MemberApplyControl.vue';
48
57
  import MoreControl from '../MoreControl/index';
58
+ import VoteControl from '../VoteControl/index';
49
59
  import AIControl from '../AIControl.vue';
50
60
  import bus from '../../../hooks/useMitt';
51
61
  import vTap from '../../../directives/vTap';
@@ -54,8 +64,10 @@ import useRoomFooter from './useRoomFooterHooks';
54
64
 
55
65
  const { roomStore, isMaster, isAdmin, isAudience } = useRoomFooter();
56
66
 
57
- const emit = defineEmits(['show-overlay']);
58
-
67
+ const emit = defineEmits(['show-overlay','on-vote']);
68
+ const onVote = (data: { name: string; visible: boolean }) => {
69
+ emit('on-vote', { code: data.visible, message: 'vote' });
70
+ };
59
71
  function handleControlClick(name: string) {
60
72
  bus.emit('experience-communication', name);
61
73
  }
@@ -8,7 +8,7 @@
8
8
  :size="400"
9
9
  >
10
10
  <chat v-if="sidebarName == 'chat'" />
11
- <room-vote v-if="sidebarName == 'vote'">
11
+ <room-vote v-if="sidebarName == 'vote'" >
12
12
  <template #content>
13
13
  <slot name="content"></slot>
14
14
  </template>
@@ -28,18 +28,7 @@ import RoomMore from '../RoomMore';
28
28
  import RoomVote from '../RoomVote';
29
29
  import Chat from '../Chat/index';
30
30
  import AITranscription from '../common/widgets/AITools/AITranscription.vue';
31
- import { defineEmits,watch} from 'vue';
32
31
  const { isSidebarOpen, title, handleClose, sidebarName } = useSideBar();
33
- const emit = defineEmits(['on-vote',]);
34
- watch(
35
- () => isSidebarOpen,
36
- (newValue, oldValue) => {
37
- emit('on-vote', {
38
- name: 'onVote',
39
- visible: isSidebarOpen,
40
- });
41
- }
42
- );
43
32
  </script>
44
33
 
45
34
  <style lang="scss"></style>
@@ -1,40 +1,11 @@
1
1
  <template>
2
2
  <div class="contact-container-main">
3
- <div class="contact-title-main">
4
- <div>{{ t('Contact us') }}</div>
5
- <span v-tap="handleCloseContact" class="cancel">{{ t('Cancel') }}</span>
6
- </div>
7
- <div
8
- v-for="item in contactContentList"
9
- :key="item.id"
10
- class="contact-content-main"
11
- >
12
- <span class="contact-title">{{ t(item.title) }}</span>
13
- <span class="contact-content">{{ item.content }}</span>
14
- <IconCopy v-tap="() => onCopy(item.copyLink)" class="copy" />
15
- </div>
16
- <span class="contact-bottom">
17
- {{
18
- t(
19
- 'If you have any questions, please feel free to join our QQ group or send an email'
20
- )
21
- }}
22
- </span>
3
+ <slot name="content"></slot>
23
4
  </div>
24
5
  </template>
25
6
 
26
7
  <script setup lang="ts">
27
- import useRoomMoreControl from './useRoomMoreHooks';
28
- import { IconCopy } from '@tencentcloud/uikit-base-component-vue3';
29
- import vTap from '../../directives/vTap';
30
8
 
31
- const { t, onCopy, contactContentList } = useRoomMoreControl();
32
-
33
- const emit = defineEmits(['on-close-contact']);
34
-
35
- function handleCloseContact() {
36
- emit('on-close-contact');
37
- }
38
9
  </script>
39
10
 
40
11
  <style lang="scss" scoped>
@@ -1,51 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, unref, createTextVNode, Fragment, renderList, createVNode } from "vue";
2
- import useRoomMoreHooks from "./useRoomMoreHooks.mjs";
3
- import { IconCopy } from "@tencentcloud/uikit-base-component-vue3";
4
- import vTap from "../../directives/vTap.mjs";
5
- const _hoisted_1 = { class: "contact-container-main" };
6
- const _hoisted_2 = { class: "contact-title-main" };
7
- const _hoisted_3 = { class: "cancel" };
8
- const _hoisted_4 = { class: "contact-title" };
9
- const _hoisted_5 = { class: "contact-content" };
10
- const _hoisted_6 = { class: "contact-bottom" };
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- __name: "indexH5",
13
- emits: ["on-close-contact"],
14
- setup(__props, { emit: __emit }) {
15
- const { t, onCopy, contactContentList } = useRoomMoreHooks();
16
- const emit = __emit;
17
- function handleCloseContact() {
18
- emit("on-close-contact");
19
- }
20
- return (_ctx, _cache) => {
21
- return openBlock(), createElementBlock("div", _hoisted_1, [
22
- createElementVNode("div", _hoisted_2, [
23
- createElementVNode("div", null, toDisplayString(unref(t)("Contact us")), 1),
24
- withDirectives((openBlock(), createElementBlock("span", _hoisted_3, [
25
- createTextVNode(toDisplayString(unref(t)("Cancel")), 1)
26
- ])), [
27
- [unref(vTap), handleCloseContact]
28
- ])
29
- ]),
30
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(contactContentList), (item) => {
31
- return openBlock(), createElementBlock("div", {
32
- key: item.id,
33
- class: "contact-content-main"
34
- }, [
35
- createElementVNode("span", _hoisted_4, toDisplayString(unref(t)(item.title)), 1),
36
- createElementVNode("span", _hoisted_5, toDisplayString(item.content), 1),
37
- withDirectives(createVNode(unref(IconCopy), { class: "copy" }, null, 512), [
38
- [unref(vTap), () => unref(onCopy)(item.copyLink)]
39
- ])
40
- ]);
41
- }), 128)),
42
- createElementVNode("span", _hoisted_6, toDisplayString(unref(t)(
43
- "If you have any questions, please feel free to join our QQ group or send an email"
44
- )), 1)
45
- ]);
46
- };
47
- }
48
- });
49
- export {
50
- _sfc_main as default
51
- };
@@ -1,43 +0,0 @@
1
- import { computed } from "vue";
2
- import { TUIToast, TOAST_TYPE } from "@tencentcloud/uikit-base-component-vue3";
3
- import i18n, { useI18n } from "../../locales/index.mjs";
4
- import "../../utils/environment.mjs";
5
- import { clipBoard } from "../../utils/adapter.mjs";
6
- function useRoomMoreHooks() {
7
- const { t } = useI18n();
8
- const groupNumber = "770645461";
9
- const email = "chaooliang@tencent.com";
10
- async function onCopy(value) {
11
- try {
12
- await clipBoard(value);
13
- TUIToast({
14
- message: t("Copied successfully"),
15
- type: TOAST_TYPE.SUCCESS
16
- });
17
- } catch (error) {
18
- TUIToast({
19
- message: t("Copied failure"),
20
- type: TOAST_TYPE.ERROR
21
- });
22
- }
23
- }
24
- const isZH = computed(() => i18n.global.locale.value === "zh-CN");
25
- const contactContentList = [
26
- { id: 1, title: "group chat", content: groupNumber, copyLink: groupNumber },
27
- { id: 2, title: "Email", content: email, copyLink: email }
28
- ];
29
- const handleClick = () => {
30
- window.open("https://zhiliao.qq.com/s/c5GY7HIM62CK", "_blank");
31
- };
32
- return {
33
- t,
34
- onCopy,
35
- contactContentList,
36
- email,
37
- handleClick,
38
- isZH
39
- };
40
- }
41
- export {
42
- useRoomMoreHooks as default
43
- };
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const Vue = require("vue");
4
- const useRoomMoreHooks = require("./useRoomMoreHooks.js");
5
- const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
6
- const vTap = require("../../directives/vTap.js");
7
- const _hoisted_1 = { class: "contact-container-main" };
8
- const _hoisted_2 = { class: "contact-title-main" };
9
- const _hoisted_3 = { class: "cancel" };
10
- const _hoisted_4 = { class: "contact-title" };
11
- const _hoisted_5 = { class: "contact-content" };
12
- const _hoisted_6 = { class: "contact-bottom" };
13
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
14
- __name: "indexH5",
15
- emits: ["on-close-contact"],
16
- setup(__props, { emit: __emit }) {
17
- const { t, onCopy, contactContentList } = useRoomMoreHooks.default();
18
- const emit = __emit;
19
- function handleCloseContact() {
20
- emit("on-close-contact");
21
- }
22
- return (_ctx, _cache) => {
23
- return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
24
- Vue.createElementVNode("div", _hoisted_2, [
25
- Vue.createElementVNode("div", null, Vue.toDisplayString(Vue.unref(t)("Contact us")), 1),
26
- Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("span", _hoisted_3, [
27
- Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Cancel")), 1)
28
- ])), [
29
- [Vue.unref(vTap.default), handleCloseContact]
30
- ])
31
- ]),
32
- (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(contactContentList), (item) => {
33
- return Vue.openBlock(), Vue.createElementBlock("div", {
34
- key: item.id,
35
- class: "contact-content-main"
36
- }, [
37
- Vue.createElementVNode("span", _hoisted_4, Vue.toDisplayString(Vue.unref(t)(item.title)), 1),
38
- Vue.createElementVNode("span", _hoisted_5, Vue.toDisplayString(item.content), 1),
39
- Vue.withDirectives(Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconCopy), { class: "copy" }, null, 512), [
40
- [Vue.unref(vTap.default), () => Vue.unref(onCopy)(item.copyLink)]
41
- ])
42
- ]);
43
- }), 128)),
44
- Vue.createElementVNode("span", _hoisted_6, Vue.toDisplayString(Vue.unref(t)(
45
- "If you have any questions, please feel free to join our QQ group or send an email"
46
- )), 1)
47
- ]);
48
- };
49
- }
50
- });
51
- exports.default = _sfc_main;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const Vue = require("vue");
4
- const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
5
- const index = require("../../locales/index.js");
6
- require("../../utils/environment.js");
7
- const adapter = require("../../utils/adapter.js");
8
- function useRoomMoreHooks() {
9
- const { t } = index.useI18n();
10
- const groupNumber = "770645461";
11
- const email = "chaooliang@tencent.com";
12
- async function onCopy(value) {
13
- try {
14
- await adapter.clipBoard(value);
15
- uikitBaseComponentVue3.TUIToast({
16
- message: t("Copied successfully"),
17
- type: uikitBaseComponentVue3.TOAST_TYPE.SUCCESS
18
- });
19
- } catch (error) {
20
- uikitBaseComponentVue3.TUIToast({
21
- message: t("Copied failure"),
22
- type: uikitBaseComponentVue3.TOAST_TYPE.ERROR
23
- });
24
- }
25
- }
26
- const isZH = Vue.computed(() => index.default.global.locale.value === "zh-CN");
27
- const contactContentList = [
28
- { id: 1, title: "group chat", content: groupNumber, copyLink: groupNumber },
29
- { id: 2, title: "Email", content: email, copyLink: email }
30
- ];
31
- const handleClick = () => {
32
- window.open("https://zhiliao.qq.com/s/c5GY7HIM62CK", "_blank");
33
- };
34
- return {
35
- t,
36
- onCopy,
37
- contactContentList,
38
- email,
39
- handleClick,
40
- isZH
41
- };
42
- }
43
- exports.default = useRoomMoreHooks;