@peng_kai/kit 0.2.0 → 0.2.1-beta.2
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/libs/dayjs.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
1
|
+
import dayjs from 'dayjs/esm';
|
|
2
2
|
|
|
3
|
-
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
4
|
-
import 'dayjs/locale/zh';
|
|
5
|
-
import 'dayjs/locale/en';
|
|
3
|
+
import relativeTime from 'dayjs/esm/plugin/relativeTime';
|
|
4
|
+
import 'dayjs/esm/locale/zh';
|
|
5
|
+
import 'dayjs/esm/locale/en';
|
|
6
6
|
|
|
7
|
-
export { isDayjs, unix, locale, extend } from 'dayjs';
|
|
8
7
|
export type { Dayjs, PluginFunc, UnitType, UnitTypeLong, UnitTypeLongPlural, UnitTypeShort, QUnitType, ConfigType, ConfigTypeMap, OpUnitType, OptionType, ManipulateType } from 'dayjs';
|
|
9
8
|
export default dayjs;
|
|
10
9
|
|
package/package.json
CHANGED
|
@@ -15,13 +15,16 @@ const echartInst = shallowRef<echarts.ECharts>();
|
|
|
15
15
|
const isDark = useIsDark();
|
|
16
16
|
|
|
17
17
|
watchEffect(() => {
|
|
18
|
-
|
|
18
|
+
const _$chartEle = $chartEle.value;
|
|
19
|
+
|
|
20
|
+
if (!_$chartEle) {
|
|
19
21
|
echartInst.value = undefined;
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
// TODO: [ECharts] Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.
|
|
23
26
|
echartInst.value?.dispose();
|
|
24
|
-
echartInst.value = echarts.init($chartEle
|
|
27
|
+
echartInst.value = echarts.init(_$chartEle, isDark.value ? 'dark' : 'light');
|
|
25
28
|
echartInst.value.setOption(props.echartOption ?? {});
|
|
26
29
|
});
|
|
27
30
|
|
|
@@ -44,5 +47,5 @@ useResizeObserver(toRef(() => $chartEle.value?.parentElement), () => {
|
|
|
44
47
|
</script>
|
|
45
48
|
|
|
46
49
|
<template>
|
|
47
|
-
<div ref="$chartEle" />
|
|
50
|
+
<div ref="$chartEle" class="h-350px w-700px" />
|
|
48
51
|
</template>
|