@ndscnj/roomkit-web-vue3 25.12.24157 → 25.12.24158

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.
@@ -1,2 +1,6 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
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>;
2
6
  export default _default;
@@ -16,9 +16,11 @@ const _hoisted_1 = {
16
16
  };
17
17
  const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  __name: "MoreControlPC",
19
- setup(__props) {
19
+ emits: ["on-vote"],
20
+ setup(__props, { emit: __emit }) {
20
21
  const moreControlConfig = roomService.getComponentConfig("MoreControl");
21
22
  const { t, basicStore, sidebarName } = useControl();
23
+ const emit = __emit;
22
24
  function toggleMoreSidebar() {
23
25
  if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
24
26
  basicStore.setSidebarOpenStatus(false);
@@ -27,6 +29,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
29
  }
28
30
  basicStore.setSidebarOpenStatus(true);
29
31
  basicStore.setSidebarName("vote");
32
+ emit("on-vote", {
33
+ name: "onVote",
34
+ visible: basicStore.isSidebarOpen
35
+ });
30
36
  }
31
37
  return (_ctx, _cache) => {
32
38
  return unref(moreControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
@@ -2,5 +2,9 @@ declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, imp
2
2
  "show-overlay": (...args: any[]) => void;
3
3
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
4
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
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>;
6
10
  export default MoreControl;
@@ -7,6 +7,7 @@ function useControl() {
7
7
  const { t } = useI18n();
8
8
  const basicStore = useBasicStore();
9
9
  const { sidebarName } = storeToRefs(basicStore);
10
+ const isSidebarOpen = computed(() => basicStore.isSidebarOpen);
10
11
  const iconName = computed(
11
12
  () => sidebarName.value === "vote" ? ICON_NAME.MoreActive : ICON_NAME.More
12
13
  );
@@ -14,7 +15,8 @@ function useControl() {
14
15
  t,
15
16
  basicStore,
16
17
  iconName,
17
- sidebarName
18
+ sidebarName,
19
+ isSidebarOpen
18
20
  };
19
21
  }
20
22
  export {
@@ -1,2 +1,6 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
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>;
2
6
  export default _default;
@@ -18,9 +18,11 @@ const _hoisted_1 = {
18
18
  };
19
19
  const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
20
20
  __name: "MoreControlPC",
21
- setup(__props) {
21
+ emits: ["on-vote"],
22
+ setup(__props, { emit: __emit }) {
22
23
  const moreControlConfig = roomService.roomService.getComponentConfig("MoreControl");
23
24
  const { t, basicStore, sidebarName } = useMoreControlHooks.default();
25
+ const emit = __emit;
24
26
  function toggleMoreSidebar() {
25
27
  if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "vote") {
26
28
  basicStore.setSidebarOpenStatus(false);
@@ -29,6 +31,10 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
29
31
  }
30
32
  basicStore.setSidebarOpenStatus(true);
31
33
  basicStore.setSidebarName("vote");
34
+ emit("on-vote", {
35
+ name: "onVote",
36
+ visible: basicStore.isSidebarOpen
37
+ });
32
38
  }
33
39
  return (_ctx, _cache) => {
34
40
  return Vue.unref(moreControlConfig).visible ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
@@ -2,5 +2,9 @@ declare const MoreControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, imp
2
2
  "show-overlay": (...args: any[]) => void;
3
3
  }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
4
  "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
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>;
6
10
  export default MoreControl;
@@ -9,6 +9,7 @@ function useControl() {
9
9
  const { t } = index.useI18n();
10
10
  const basicStore = basic.useBasicStore();
11
11
  const { sidebarName } = pinia.storeToRefs(basicStore);
12
+ const isSidebarOpen = Vue.computed(() => basicStore.isSidebarOpen);
12
13
  const iconName = Vue.computed(
13
14
  () => sidebarName.value === "vote" ? icon.ICON_NAME.MoreActive : icon.ICON_NAME.More
14
15
  );
@@ -16,7 +17,8 @@ function useControl() {
16
17
  t,
17
18
  basicStore,
18
19
  iconName,
19
- sidebarName
20
+ sidebarName,
21
+ isSidebarOpen
20
22
  };
21
23
  }
22
24
  exports.default = useControl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndscnj/roomkit-web-vue3",
3
- "version": "25.12.24157",
3
+ "version": "25.12.24158",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.mjs",
6
6
  "types": "./es/index.d.ts",
@@ -14,10 +14,10 @@ import { IconMore } from '@tencentcloud/uikit-base-component-vue3';
14
14
  import IconButton from '../../common/base/IconButton.vue';
15
15
  import userMoreControl from './useMoreControlHooks';
16
16
  import { roomService } from '../../../services';
17
-
17
+ import { defineEmits} from 'vue';
18
18
  const moreControlConfig = roomService.getComponentConfig('MoreControl');
19
19
  const { t, basicStore, sidebarName } = userMoreControl();
20
-
20
+ const emit = defineEmits(['on-vote']);
21
21
  function toggleMoreSidebar() {
22
22
  if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === 'vote') {
23
23
  basicStore.setSidebarOpenStatus(false);
@@ -26,6 +26,10 @@ function toggleMoreSidebar() {
26
26
  }
27
27
  basicStore.setSidebarOpenStatus(true);
28
28
  basicStore.setSidebarName('vote');
29
+ emit('on-vote', {
30
+ name: 'onVote',
31
+ visible:basicStore.isSidebarOpen,
32
+ });
29
33
  }
30
34
  </script>
31
35
  <style lang="scss" scoped></style>
@@ -9,7 +9,7 @@ export default function useControl() {
9
9
 
10
10
  const basicStore = useBasicStore();
11
11
  const { sidebarName } = storeToRefs(basicStore);
12
-
12
+ const isSidebarOpen = computed(() => basicStore.isSidebarOpen);
13
13
  const iconName = computed(() =>
14
14
  sidebarName.value === 'vote' ? ICON_NAME.MoreActive : ICON_NAME.More
15
15
  );
@@ -19,5 +19,6 @@ export default function useControl() {
19
19
  basicStore,
20
20
  iconName,
21
21
  sidebarName,
22
+ isSidebarOpen
22
23
  };
23
24
  }