knt-shared 1.10.0 → 1.10.1
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,6 +1,12 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
2
|
/** 是否启用版本检测 */
|
|
3
3
|
enabled?: boolean;
|
|
4
|
+
/** version.json 的请求路径 */
|
|
5
|
+
versionUrl?: string;
|
|
6
|
+
/** 定时轮询间隔(毫秒) */
|
|
7
|
+
checkInterval?: number;
|
|
8
|
+
/** sessionStorage 存储 key */
|
|
9
|
+
sessionKey?: string;
|
|
4
10
|
/** 弹窗标题 */
|
|
5
11
|
title?: string;
|
|
6
12
|
/** 弹窗内容 */
|
|
@@ -18,6 +24,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
18
24
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
19
25
|
/** 是否启用版本检测 */
|
|
20
26
|
enabled?: boolean;
|
|
27
|
+
/** version.json 的请求路径 */
|
|
28
|
+
versionUrl?: string;
|
|
29
|
+
/** 定时轮询间隔(毫秒) */
|
|
30
|
+
checkInterval?: number;
|
|
31
|
+
/** sessionStorage 存储 key */
|
|
32
|
+
sessionKey?: string;
|
|
21
33
|
/** 弹窗标题 */
|
|
22
34
|
title?: string;
|
|
23
35
|
/** 弹窗内容 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CheckUpdate/index.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CheckUpdate/index.vue"],"names":[],"mappings":";IAqI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AAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -10648,6 +10648,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
10648
10648
|
__name: "index",
|
|
10649
10649
|
props: {
|
|
10650
10650
|
enabled: { type: Boolean, default: true },
|
|
10651
|
+
versionUrl: {},
|
|
10652
|
+
checkInterval: {},
|
|
10653
|
+
sessionKey: {},
|
|
10651
10654
|
title: { default: "页面超时" },
|
|
10652
10655
|
content: { default: "页面已超时,请刷新后正常使用" },
|
|
10653
10656
|
okText: { default: "立即刷新" },
|
|
@@ -10656,7 +10659,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
10656
10659
|
setup(__props) {
|
|
10657
10660
|
const props = __props;
|
|
10658
10661
|
const { hasNewVersion, start, stop, applyUpdate, dismissUpdate } = useVersionCheck({
|
|
10659
|
-
enabled: props.enabled
|
|
10662
|
+
enabled: props.enabled,
|
|
10663
|
+
versionUrl: props.versionUrl,
|
|
10664
|
+
checkInterval: props.checkInterval,
|
|
10665
|
+
sessionKey: props.sessionKey
|
|
10660
10666
|
});
|
|
10661
10667
|
vue.onMounted(() => start());
|
|
10662
10668
|
vue.onUnmounted(() => stop());
|