@peng_kai/kit 0.2.37 → 0.2.38

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.
@@ -38,15 +38,21 @@ const text = computed(() => {
38
38
 
39
39
  return props.utc ? ts.utc().format(props.template) : ts.format(props.template);
40
40
  });
41
+
42
+ window.dayjs = dayjs;
41
43
  </script>
42
44
 
43
45
  <template>
44
46
  <ATooltip destroyTooltipOnHide>
45
47
  <template v-if="timestamp" #title>
46
48
  <div>{{ dayjs(timestamp).fromNow?.() }}</div>
47
- <div><span class="inline-block w-2em">本地</span> {{ dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss') }}</div>
49
+ <div>
50
+ {{ dayjs(timestamp).format('YYYY-MM-DD HH:mm:ss') }}
51
+ <span class="op-50">本地</span>
52
+ </div>
48
53
  <div v-if="dayjs().utc">
49
- <span class="inline-block w-2em">UTC</span> {{ dayjs(timestamp).utc?.().format('YYYY-MM-DD HH:mm:ss') }}
54
+ {{ dayjs(timestamp).utc?.().format('YYYY-MM-DD HH:mm:ss') }}
55
+ <span class="op-50">UTC</span>
50
56
  </div>
51
57
  </template>
52
58
  <span v-bind="$attrs" class="text">{{ text }}</span>
package/libs/dayjs.ts CHANGED
@@ -8,12 +8,12 @@ import tz from 'dayjs/esm/plugin/timezone';
8
8
  import 'dayjs/esm/locale/zh';
9
9
  import 'dayjs/esm/locale/en';
10
10
 
11
- export type { Dayjs, PluginFunc, UnitType, UnitTypeLong, UnitTypeLongPlural, UnitTypeShort, QUnitType, ConfigType, ConfigTypeMap, OpUnitType, OptionType, ManipulateType } from 'dayjs';
12
- export default dayjs;
13
-
14
11
  dayjs.locale('zh');
15
12
  dayjs.extend(relativeTime);
16
13
  dayjs.extend(weekday);
17
14
  dayjs.extend(localeData);
18
15
  dayjs.extend(utc);
19
16
  dayjs.extend(tz);
17
+
18
+ export type { Dayjs, PluginFunc, UnitType, UnitTypeLong, UnitTypeLongPlural, UnitTypeShort, QUnitType, ConfigType, ConfigTypeMap, OpUnitType, OptionType, ManipulateType } from 'dayjs';
19
+ export default dayjs;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peng_kai/kit",
3
3
  "type": "module",
4
- "version": "0.2.37",
4
+ "version": "0.2.38",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",