@airpower/web 1.11.1 → 1.11.3
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/dist/components/datetime/DateTime.vue.d.ts +8 -22
- package/dist/main.js +18 -26
- package/dist/router/RouterUtil.d.ts +5 -1
- package/dist/web.css +2 -2
- package/package.json +1 -1
|
@@ -1,17 +1,11 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { DateTimeFormatter } from '@airpower/util';
|
|
2
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
4
|
/**
|
|
4
|
-
* ###
|
|
5
|
+
* ### 时间日期对象或毫秒时间戳
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
type:
|
|
8
|
-
default: undefined;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* ### 时间日期对象
|
|
12
|
-
*/
|
|
13
|
-
date: {
|
|
14
|
-
type: DateConstructor;
|
|
7
|
+
time: {
|
|
8
|
+
type: PropType<Date | number>;
|
|
15
9
|
default: undefined;
|
|
16
10
|
};
|
|
17
11
|
/**
|
|
@@ -30,17 +24,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
24
|
};
|
|
31
25
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
26
|
/**
|
|
33
|
-
* ###
|
|
34
|
-
*/
|
|
35
|
-
milliSecond: {
|
|
36
|
-
type: NumberConstructor;
|
|
37
|
-
default: undefined;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* ### 时间日期对象
|
|
27
|
+
* ### 时间日期对象或毫秒时间戳
|
|
41
28
|
*/
|
|
42
|
-
|
|
43
|
-
type:
|
|
29
|
+
time: {
|
|
30
|
+
type: PropType<Date | number>;
|
|
44
31
|
default: undefined;
|
|
45
32
|
};
|
|
46
33
|
/**
|
|
@@ -59,8 +46,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
59
46
|
};
|
|
60
47
|
}>> & Readonly<{}>, {
|
|
61
48
|
formatter: DateTimeFormatter;
|
|
62
|
-
|
|
63
|
-
date: Date;
|
|
49
|
+
time: number | Date;
|
|
64
50
|
isFriendly: boolean;
|
|
65
51
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
66
52
|
export default _default;
|
package/dist/main.js
CHANGED
|
@@ -9866,17 +9866,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9866
9866
|
__name: "DateTime",
|
|
9867
9867
|
props: {
|
|
9868
9868
|
/**
|
|
9869
|
-
* ###
|
|
9869
|
+
* ### 时间日期对象或毫秒时间戳
|
|
9870
9870
|
*/
|
|
9871
|
-
|
|
9872
|
-
type:
|
|
9873
|
-
default: void 0
|
|
9874
|
-
},
|
|
9875
|
-
/**
|
|
9876
|
-
* ### 时间日期对象
|
|
9877
|
-
*/
|
|
9878
|
-
date: {
|
|
9879
|
-
type: Date,
|
|
9871
|
+
time: {
|
|
9872
|
+
type: Object,
|
|
9880
9873
|
default: void 0
|
|
9881
9874
|
},
|
|
9882
9875
|
/**
|
|
@@ -9898,25 +9891,19 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9898
9891
|
const props = __props;
|
|
9899
9892
|
const friendly = ref(props.isFriendly);
|
|
9900
9893
|
const getDateTimeString = computed(() => {
|
|
9901
|
-
if (!props.
|
|
9894
|
+
if (!props.time) {
|
|
9902
9895
|
return "-";
|
|
9903
9896
|
}
|
|
9904
9897
|
if (friendly.value) {
|
|
9905
|
-
if (props.
|
|
9906
|
-
return DateTimeUtil.getFriendlyDateTime(props.
|
|
9898
|
+
if (props.time instanceof Date) {
|
|
9899
|
+
return DateTimeUtil.getFriendlyDateTime(props.time);
|
|
9907
9900
|
}
|
|
9908
|
-
|
|
9909
|
-
return DateTimeUtil.getFriendlyDateTime(props.date);
|
|
9910
|
-
}
|
|
9911
|
-
return "未知时间";
|
|
9912
|
-
}
|
|
9913
|
-
if (props.milliSecond) {
|
|
9914
|
-
return props.formatter.formatMilliSecond(props.milliSecond);
|
|
9901
|
+
return DateTimeUtil.getFriendlyDateTime(props.time);
|
|
9915
9902
|
}
|
|
9916
|
-
if (props.
|
|
9917
|
-
return props.formatter.formatDate(props.
|
|
9903
|
+
if (props.time instanceof Date) {
|
|
9904
|
+
return props.formatter.formatDate(props.time);
|
|
9918
9905
|
}
|
|
9919
|
-
return
|
|
9906
|
+
return props.formatter.formatMilliSecond(props.time);
|
|
9920
9907
|
});
|
|
9921
9908
|
return (_ctx, _cache) => {
|
|
9922
9909
|
const _component_ElLink = resolveComponent("ElLink");
|
|
@@ -9932,7 +9919,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9932
9919
|
};
|
|
9933
9920
|
}
|
|
9934
9921
|
});
|
|
9935
|
-
const ADateTime = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-
|
|
9922
|
+
const ADateTime = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-d97a8cd1"]]);
|
|
9936
9923
|
const _hoisted_1$h = { class: "a-desensitize" };
|
|
9937
9924
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
9938
9925
|
__name: "Desensitize",
|
|
@@ -19276,14 +19263,19 @@ class RouterUtil {
|
|
|
19276
19263
|
* @param componentsDirectory `可选` 组件目录 默认 `/src/view`
|
|
19277
19264
|
* @param parentRouter `可选` 父级路由 默认 `admin`
|
|
19278
19265
|
*/
|
|
19279
|
-
static
|
|
19266
|
+
static initVueRouter(menuList, components = {}, componentsDirectory = "/src/view", parentRouter = "admin") {
|
|
19280
19267
|
this.components = components;
|
|
19281
19268
|
this.componentsDirectory = componentsDirectory;
|
|
19282
19269
|
if (!WebConfig.isTimeout) {
|
|
19283
19270
|
this.registerRoute(menuList, parentRouter);
|
|
19284
|
-
await this.router.replace(this.router.currentRoute.value.fullPath);
|
|
19285
19271
|
}
|
|
19286
19272
|
}
|
|
19273
|
+
/**
|
|
19274
|
+
* ### 刷新当前路由
|
|
19275
|
+
*/
|
|
19276
|
+
static async reloadCurrentRoute() {
|
|
19277
|
+
await this.router.replace(this.router.currentRoute.value.fullPath);
|
|
19278
|
+
}
|
|
19287
19279
|
/**
|
|
19288
19280
|
* ### 创建 `Vue` 路由实例
|
|
19289
19281
|
* @param routes 路由配置文件
|
|
@@ -25,7 +25,11 @@ export declare class RouterUtil {
|
|
|
25
25
|
* @param componentsDirectory `可选` 组件目录 默认 `/src/view`
|
|
26
26
|
* @param parentRouter `可选` 父级路由 默认 `admin`
|
|
27
27
|
*/
|
|
28
|
-
static initVueRouter(menuList: Array<IMenu & RootEntity>, components?: Record<string, () => Promise<unknown>>, componentsDirectory?: string, parentRouter?: string):
|
|
28
|
+
static initVueRouter(menuList: Array<IMenu & RootEntity>, components?: Record<string, () => Promise<unknown>>, componentsDirectory?: string, parentRouter?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* ### 刷新当前路由
|
|
31
|
+
*/
|
|
32
|
+
static reloadCurrentRoute(): Promise<void>;
|
|
29
33
|
/**
|
|
30
34
|
* ### 创建 `Vue` 路由实例
|
|
31
35
|
* @param routes 路由配置文件
|
package/dist/web.css
CHANGED
|
@@ -452,8 +452,8 @@ textarea {
|
|
|
452
452
|
.a-copy[data-v-c29001d4] .el-link {
|
|
453
453
|
overflow: hidden;
|
|
454
454
|
text-overflow: ellipsis;
|
|
455
|
-
}.a-friend-datetime[data-v-
|
|
456
|
-
.a-friend-datetime[data-v-
|
|
455
|
+
}.a-friend-datetime[data-v-d97a8cd1],
|
|
456
|
+
.a-friend-datetime[data-v-d97a8cd1] * {
|
|
457
457
|
user-select: none !important;
|
|
458
458
|
}.a-desensitize[data-v-8bc9a38b] {
|
|
459
459
|
display: flex !important;
|