@ndscnj/roomkit-web-vue3 25.12.2412 → 25.12.2414

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 (47) hide show
  1. package/es/components/RoomFooter/index/indexPC.vue.mjs +1 -1
  2. package/es/components/RoomFooter/index/indexPC.vue2.mjs +2 -2
  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 +71 -0
  6. package/es/components/RoomVote/indexPC.vue.mjs +1 -1
  7. package/es/components/RoomVote/indexPC.vue2.mjs +2 -2
  8. package/es/constants/icon.d.ts +0 -2
  9. package/es/constants/icon.mjs +0 -2
  10. package/es/index.mjs +152 -180
  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 +71 -0
  16. package/lib/components/RoomVote/indexPC.vue.js +1 -1
  17. package/lib/components/RoomVote/indexPC.vue2.js +2 -2
  18. package/lib/constants/icon.d.ts +0 -2
  19. package/lib/constants/icon.js +0 -2
  20. package/lib/index.js +152 -180
  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 +2 -3
  24. package/src/TUIRoom/components/RoomVote/indexPC.vue +2 -2
  25. package/src/TUIRoom/constants/icon.ts +0 -2
  26. package/es/components/RoomFooter/voteControl/VoteControlH5.vue.d.ts +0 -6
  27. package/es/components/RoomFooter/voteControl/VoteControlH5.vue.mjs +0 -7
  28. package/es/components/RoomFooter/voteControl/VoteControlH5.vue2.mjs +0 -105
  29. package/es/components/RoomFooter/voteControl/VoteControlPC.vue.d.ts +0 -6
  30. package/es/components/RoomFooter/voteControl/VoteControlPC.vue.mjs +0 -55
  31. package/es/components/RoomFooter/voteControl/VoteControlPC.vue2.mjs +0 -4
  32. package/es/components/RoomFooter/voteControl/index.d.ts +0 -10
  33. package/es/components/RoomFooter/voteControl/index.mjs +0 -7
  34. package/es/components/RoomFooter/voteControl/useVoteControlHooks.mjs +0 -22
  35. package/lib/components/RoomFooter/voteControl/VoteControlH5.vue.d.ts +0 -6
  36. package/lib/components/RoomFooter/voteControl/VoteControlH5.vue.js +0 -7
  37. package/lib/components/RoomFooter/voteControl/VoteControlH5.vue2.js +0 -105
  38. package/lib/components/RoomFooter/voteControl/VoteControlPC.vue.d.ts +0 -6
  39. package/lib/components/RoomFooter/voteControl/VoteControlPC.vue.js +0 -55
  40. package/lib/components/RoomFooter/voteControl/VoteControlPC.vue2.js +0 -4
  41. package/lib/components/RoomFooter/voteControl/index.d.ts +0 -10
  42. package/lib/components/RoomFooter/voteControl/index.js +0 -7
  43. package/lib/components/RoomFooter/voteControl/useVoteControlHooks.js +0 -22
  44. package/src/TUIRoom/components/RoomFooter/voteControl/VoteControlH5.vue +0 -122
  45. package/src/TUIRoom/components/RoomFooter/voteControl/VoteControlPC.vue +0 -35
  46. package/src/TUIRoom/components/RoomFooter/voteControl/index.ts +0 -8
  47. package/src/TUIRoom/components/RoomFooter/voteControl/useVoteControlHooks.ts +0 -23
@@ -1,6 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "on-vote": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
- export default _default;
@@ -1,55 +0,0 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, unref, openBlock, createVNode, withCtx } from "vue";
2
- import { IconMore } from "@tencentcloud/uikit-base-component-vue3";
3
- import IconButton from "../../common/base/IconButton.vue.mjs";
4
- import useControl from "./useVoteControlHooks.mjs";
5
- import "../../../services/main.mjs";
6
- import { roomService } from "../../../services/roomService.mjs";
7
- import "../../../locales/index.mjs";
8
- import "@tencentcloud/tuiroom-engine-js";
9
- import "../../../utils/environment.mjs";
10
- import "mitt";
11
- import "../../../services/manager/roomActionManager.mjs";
12
- import "@tencentcloud/tui-core";
13
- const _hoisted_1 = {
14
- key: 0,
15
- class: "vote-control-container"
16
- };
17
- const _sfc_main = /* @__PURE__ */ defineComponent({
18
- __name: "VoteControlPC",
19
- emits: ["on-vote"],
20
- setup(__props, { emit: __emit }) {
21
- const voteControlConfig = roomService.getComponentConfig("VoteControl");
22
- const { t, basicStore, sidebarName } = useControl();
23
- const emit = __emit;
24
- function toggleMoreSidebar() {
25
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
26
- basicStore.setSidebarOpenStatus(false);
27
- basicStore.setSidebarName("");
28
- return;
29
- }
30
- basicStore.setSidebarOpenStatus(true);
31
- basicStore.setSidebarName("vote");
32
- emit("on-vote", {
33
- name: "onVote",
34
- visible: voteControlConfig.visible
35
- });
36
- }
37
- return (_ctx, _cache) => {
38
- return unref(voteControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
39
- createVNode(IconButton, {
40
- "is-active": unref(sidebarName) === "vote",
41
- title: unref(t)("Vote"),
42
- onClickIcon: toggleMoreSidebar
43
- }, {
44
- default: withCtx(() => [
45
- createVNode(unref(IconMore), { size: "24" })
46
- ]),
47
- _: 1
48
- }, 8, ["is-active", "title"])
49
- ])) : createCommentVNode("", true);
50
- };
51
- }
52
- });
53
- export {
54
- _sfc_main as default
55
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./VoteControlPC.vue.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,10 +0,0 @@
1
- declare const VoteControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "on-vote": (...args: any[]) => void;
7
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
- export default VoteControl;
@@ -1,7 +0,0 @@
1
- import VoteControlH5 from "./VoteControlH5.vue.mjs";
2
- import _sfc_main from "./VoteControlPC.vue.mjs";
3
- import { isMobile } from "../../../utils/environment.mjs";
4
- const VoteControl = isMobile ? VoteControlH5 : _sfc_main;
5
- export {
6
- VoteControl as default
7
- };
@@ -1,22 +0,0 @@
1
- import { computed } from "vue";
2
- import { useBasicStore } from "../../../stores/basic.mjs";
3
- import { storeToRefs } from "pinia";
4
- import { useI18n } from "../../../locales/index.mjs";
5
- import { ICON_NAME } from "../../../constants/icon.mjs";
6
- function useControl() {
7
- const { t } = useI18n();
8
- const basicStore = useBasicStore();
9
- const { sidebarName } = storeToRefs(basicStore);
10
- const iconName = computed(
11
- () => sidebarName.value === "vote" ? ICON_NAME.VoteActive : ICON_NAME.Vote
12
- );
13
- return {
14
- t,
15
- basicStore,
16
- iconName,
17
- sidebarName
18
- };
19
- }
20
- export {
21
- useControl as default
22
- };
@@ -1,6 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
- export default _default;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const VoteControlH5_vue_vue_type_script_setup_true_lang = require("./VoteControlH5.vue2.js");
4
- ;/* empty css */
5
- const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
6
- const VoteControlH5 = /* @__PURE__ */ _pluginVue_exportHelper.default(VoteControlH5_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-1506794c"]]);
7
- exports.default = VoteControlH5;
@@ -1,105 +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 IconButton = require("../../common/base/IconButton.vue.js");
6
- const useVoteControlHooks = require("./useVoteControlHooks.js");
7
- const ChatControl_vue_vue_type_script_setup_true_lang = require("../ChatControl.vue.js");
8
- const InviteControl = require("../InviteControl.vue.js");
9
- const ContactControl = require("../ContactControl.vue.js");
10
- const room = require("../../../stores/room.js");
11
- const useMitt = require("../../../hooks/useMitt.js");
12
- const vTap = require("../../../directives/vTap.js");
13
- require("../../../services/main.js");
14
- const roomService = require("../../../services/roomService.js");
15
- require("../../../locales/index.js");
16
- require("@tencentcloud/tuiroom-engine-js");
17
- require("../../../utils/environment.js");
18
- require("mitt");
19
- require("../../../services/manager/roomActionManager.js");
20
- require("@tencentcloud/tui-core");
21
- const _hoisted_1 = {
22
- key: 0,
23
- class: "more-control-container"
24
- };
25
- const _hoisted_2 = { class: "control-compent" };
26
- const _hoisted_3 = { class: "close" };
27
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
28
- __name: "VoteControlH5",
29
- emits: ["show-overlay"],
30
- setup(__props, { emit: __emit }) {
31
- const moreControlConfig = roomService.roomService.getComponentConfig("MoreControl");
32
- const showMoreContent = Vue.ref(false);
33
- const moreContentRef = Vue.ref();
34
- const { t, sidebarName } = useVoteControlHooks.default();
35
- const roomStore = room.useRoomStore();
36
- const emit = __emit;
37
- function showMore() {
38
- showMoreContent.value = true;
39
- }
40
- function handleCancelControl() {
41
- showMoreContent.value = false;
42
- }
43
- function handleControlClick(name) {
44
- useMitt.default.emit("experience-communication", name);
45
- }
46
- function handleShowOverlay(data) {
47
- showMoreContent.value = false;
48
- emit("show-overlay", data);
49
- }
50
- function handleDocumentClick(event) {
51
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
52
- showMoreContent.value = false;
53
- }
54
- }
55
- Vue.onMounted(() => {
56
- document == null ? void 0 : document.addEventListener("click", handleDocumentClick, true);
57
- });
58
- Vue.onUnmounted(() => {
59
- document == null ? void 0 : document.removeEventListener("click", handleDocumentClick, true);
60
- });
61
- return (_ctx, _cache) => {
62
- return Vue.openBlock(), Vue.createElementBlock("div", null, [
63
- Vue.unref(moreControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
64
- Vue.withDirectives((Vue.openBlock(), Vue.createBlock(IconButton.default, {
65
- "is-active": Vue.unref(sidebarName) === "more",
66
- title: Vue.unref(t)("More")
67
- }, {
68
- default: Vue.withCtx(() => [
69
- Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconExtension), { size: "24" })
70
- ]),
71
- _: 1
72
- }, 8, ["is-active", "title"])), [
73
- [Vue.unref(vTap.default), showMore]
74
- ])
75
- ])) : Vue.createCommentVNode("", true),
76
- showMoreContent.value ? (Vue.openBlock(), Vue.createElementBlock("div", {
77
- key: 1,
78
- ref_key: "moreContentRef",
79
- ref: moreContentRef,
80
- class: "show-more-content"
81
- }, [
82
- Vue.createElementVNode("div", _hoisted_2, [
83
- Vue.unref(roomStore).isSpeakAfterTakingSeatMode ? (Vue.openBlock(), Vue.createBlock(ChatControl_vue_vue_type_script_setup_true_lang.default, {
84
- key: 0,
85
- onClick: _cache[0] || (_cache[0] = ($event) => handleControlClick("chatControl"))
86
- })) : Vue.createCommentVNode("", true),
87
- Vue.createVNode(ContactControl.default, {
88
- onClick: _cache[1] || (_cache[1] = ($event) => handleControlClick("contactControl"))
89
- }),
90
- Vue.createVNode(InviteControl.default, {
91
- onShowOverlay: handleShowOverlay,
92
- onClick: _cache[2] || (_cache[2] = ($event) => handleControlClick("inviteControl"))
93
- })
94
- ]),
95
- Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("div", _hoisted_3, [
96
- Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Cancel")), 1)
97
- ])), [
98
- [Vue.unref(vTap.default), handleCancelControl]
99
- ])
100
- ], 512)) : Vue.createCommentVNode("", true)
101
- ]);
102
- };
103
- }
104
- });
105
- exports.default = _sfc_main;
@@ -1,6 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "on-vote": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
- export default _default;
@@ -1,55 +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 IconButton = require("../../common/base/IconButton.vue.js");
6
- const useVoteControlHooks = require("./useVoteControlHooks.js");
7
- require("../../../services/main.js");
8
- const roomService = require("../../../services/roomService.js");
9
- require("../../../locales/index.js");
10
- require("@tencentcloud/tuiroom-engine-js");
11
- require("../../../utils/environment.js");
12
- require("mitt");
13
- require("../../../services/manager/roomActionManager.js");
14
- require("@tencentcloud/tui-core");
15
- const _hoisted_1 = {
16
- key: 0,
17
- class: "vote-control-container"
18
- };
19
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
20
- __name: "VoteControlPC",
21
- emits: ["on-vote"],
22
- setup(__props, { emit: __emit }) {
23
- const voteControlConfig = roomService.roomService.getComponentConfig("VoteControl");
24
- const { t, basicStore, sidebarName } = useVoteControlHooks.default();
25
- const emit = __emit;
26
- function toggleMoreSidebar() {
27
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
28
- basicStore.setSidebarOpenStatus(false);
29
- basicStore.setSidebarName("");
30
- return;
31
- }
32
- basicStore.setSidebarOpenStatus(true);
33
- basicStore.setSidebarName("vote");
34
- emit("on-vote", {
35
- name: "onVote",
36
- visible: voteControlConfig.visible
37
- });
38
- }
39
- return (_ctx, _cache) => {
40
- return Vue.unref(voteControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
41
- Vue.createVNode(IconButton.default, {
42
- "is-active": Vue.unref(sidebarName) === "vote",
43
- title: Vue.unref(t)("Vote"),
44
- onClickIcon: toggleMoreSidebar
45
- }, {
46
- default: Vue.withCtx(() => [
47
- Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconMore), { size: "24" })
48
- ]),
49
- _: 1
50
- }, 8, ["is-active", "title"])
51
- ])) : Vue.createCommentVNode("", true);
52
- };
53
- }
54
- });
55
- exports.default = _sfc_main;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const VoteControlPC_vue_vue_type_script_setup_true_lang = require("./VoteControlPC.vue.js");
4
- exports.default = VoteControlPC_vue_vue_type_script_setup_true_lang.default;
@@ -1,10 +0,0 @@
1
- declare const VoteControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "on-vote": (...args: any[]) => void;
7
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
- "onOn-vote"?: ((...args: any[]) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
- export default VoteControl;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const VoteControlH5 = require("./VoteControlH5.vue.js");
4
- const VoteControlPC_vue_vue_type_script_setup_true_lang = require("./VoteControlPC.vue.js");
5
- const environment = require("../../../utils/environment.js");
6
- const VoteControl = environment.isMobile ? VoteControlH5.default : VoteControlPC_vue_vue_type_script_setup_true_lang.default;
7
- exports.default = VoteControl;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const Vue = require("vue");
4
- const basic = require("../../../stores/basic.js");
5
- const pinia = require("pinia");
6
- const index = require("../../../locales/index.js");
7
- const icon = require("../../../constants/icon.js");
8
- function useControl() {
9
- const { t } = index.useI18n();
10
- const basicStore = basic.useBasicStore();
11
- const { sidebarName } = pinia.storeToRefs(basicStore);
12
- const iconName = Vue.computed(
13
- () => sidebarName.value === "vote" ? icon.ICON_NAME.VoteActive : icon.ICON_NAME.Vote
14
- );
15
- return {
16
- t,
17
- basicStore,
18
- iconName,
19
- sidebarName
20
- };
21
- }
22
- exports.default = useControl;
@@ -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 userVoteControl from './useVoteControlHooks';
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 } = userVoteControl();
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,35 +0,0 @@
1
- <template>
2
- <div v-if="voteControlConfig.visible" class="vote-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 userVoteControl from './useVoteControlHooks';
16
- import { roomService } from '../../../services';
17
- import { defineEmits } from 'vue';
18
- const voteControlConfig = roomService.getComponentConfig('VoteControl');
19
- const { t, basicStore, sidebarName } = userVoteControl();
20
- const emit = defineEmits(['on-vote']);
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
- emit('on-vote', {
30
- name: 'onVote',
31
- visible: voteControlConfig.visible,
32
- });
33
- }
34
- </script>
35
- <style lang="scss" scoped></style>
@@ -1,8 +0,0 @@
1
- import VoteControlH5 from './VoteControlH5.vue';
2
- import VoteControlPc from './VoteControlPC.vue';
3
-
4
- import { isMobile } from '../../../utils/environment';
5
-
6
- const VoteControl = isMobile ? VoteControlH5 : VoteControlPc;
7
-
8
- export default VoteControl;
@@ -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 === 'vote' ? ICON_NAME.VoteActive : ICON_NAME.Vote
15
- );
16
-
17
- return {
18
- t,
19
- basicStore,
20
- iconName,
21
- sidebarName,
22
- };
23
- }