@peng_kai/kit 0.3.0-beta.26 → 0.3.0-beta.28
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/admin/layout/large/Notice.vue +5 -1
- package/antd/hooks/useAntdModal.ts +2 -2
- package/libs/dayjs.ts +2 -2
- package/package.json +1 -1
- package/utils/index.ts +1 -4
- package/utils/string.ts +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { useIntervalFn } from '@vueuse/core';
|
|
2
|
+
import { useEventListener, useIntervalFn } from '@vueuse/core';
|
|
3
3
|
import { Empty, Dropdown, Badge, Menu, MenuItem } from 'ant-design-vue';
|
|
4
4
|
import { type UseQueryReturnType } from '@tanstack/vue-query'
|
|
5
5
|
import { watch, ref, computed } from 'vue'
|
|
@@ -8,6 +8,7 @@ import { useRouter } from 'vue-router';
|
|
|
8
8
|
import audioURL from './y682.mp3?url';
|
|
9
9
|
|
|
10
10
|
const noticeAudio = new Audio(audioURL);
|
|
11
|
+
noticeAudio.muted = true;
|
|
11
12
|
noticeAudio.src = audioURL;
|
|
12
13
|
document.body.append(noticeAudio);
|
|
13
14
|
|
|
@@ -50,6 +51,9 @@ function operate(notice: TNotice) {
|
|
|
50
51
|
// watch(noticeNum, (num = 0, oldNum = 0) => {
|
|
51
52
|
// num > oldNum && noticeAudio.play();
|
|
52
53
|
// }, { immediate: true });
|
|
54
|
+
useEventListener(document, 'click', () => {
|
|
55
|
+
noticeAudio.muted = false;
|
|
56
|
+
});
|
|
53
57
|
|
|
54
58
|
useIntervalFn(() => {
|
|
55
59
|
const num = noticeNum.value;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Modal as AntModal } from 'ant-design-vue';
|
|
2
|
-
import { tryOnBeforeUnmount } from '@vueuse/core';
|
|
2
|
+
import { tryOnBeforeUnmount, tryOnMounted } from '@vueuse/core';
|
|
3
3
|
import { createVNode, defineComponent, isProxy, onDeactivated, onMounted, reactive, toRef, toRefs } from 'vue';
|
|
4
4
|
import type { Component } from 'vue';
|
|
5
5
|
import type { ModalProps } from 'ant-design-vue';
|
|
@@ -128,7 +128,7 @@ export function useAntdModal<Comp extends Component>(
|
|
|
128
128
|
(compProps as any).onConfirm = onConfirm;
|
|
129
129
|
|
|
130
130
|
tryOnBeforeUnmount(_onClose);
|
|
131
|
-
onDeactivated(_onClose);
|
|
131
|
+
tryOnMounted(() => onDeactivated(_onClose));
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
134
|
PresetComponent,
|
package/libs/dayjs.ts
CHANGED
|
@@ -12,7 +12,7 @@ import advancedFormat from 'dayjs/esm/plugin/advancedFormat';
|
|
|
12
12
|
import customParseFormat from 'dayjs/esm/plugin/customParseFormat';
|
|
13
13
|
import updateLocale from 'dayjs/esm/plugin/updateLocale';
|
|
14
14
|
import isBetween from 'dayjs/esm/plugin/isBetween';
|
|
15
|
-
import 'dayjs/esm/locale/zh';
|
|
15
|
+
import 'dayjs/esm/locale/zh-cn';
|
|
16
16
|
import 'dayjs/esm/locale/en';
|
|
17
17
|
|
|
18
18
|
export type { Dayjs, PluginFunc, UnitType, UnitTypeLong, UnitTypeLongPlural, UnitTypeShort, QUnitType, ConfigType, ConfigTypeMap, OpUnitType, OptionType, ManipulateType } from 'dayjs';
|
|
@@ -30,4 +30,4 @@ dayjs.extend(advancedFormat);
|
|
|
30
30
|
dayjs.extend(customParseFormat);
|
|
31
31
|
dayjs.extend(updateLocale);
|
|
32
32
|
dayjs.extend(isBetween);
|
|
33
|
-
dayjs.locale('zh');
|
|
33
|
+
dayjs.locale('zh-cn');
|
package/package.json
CHANGED
package/utils/index.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { Utf8 as cryptUtf8 } from 'crypto-es
|
|
2
|
-
import { AES as cryptoAES } from 'crypto-es/lib/aes';
|
|
3
|
-
import { ECB as cryptoModeECB } from 'crypto-es/lib/mode-ecb';
|
|
4
|
-
import { Pkcs7 as cryptoPkcs7 } from 'crypto-es/lib/cipher-core';
|
|
1
|
+
import { Utf8 as cryptUtf8, AES as cryptoAES, ECB as cryptoModeECB, Pkcs7 as cryptoPkcs7 } from 'crypto-es';
|
|
5
2
|
import { at as objAt } from 'lodash-es';
|
|
6
3
|
|
|
7
4
|
export { desensitize, randomString } from './string';
|
package/utils/string.ts
CHANGED