UNPKG
@relaxed/vue-directives
Version:
latest (2.0.34)
2.0.34
2.0.32
2.0.29
2.0.28
2.0.27
2.0.24
2.0.22
2.0.20
2.0.18
2.0.17
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.5
2.0.3
2.0.2
2.0.1
1.1.2
1.0.11
1.0.9
1.0.8
1.0.6
vue 兼容2 3 工具库 函数库
github.com/ErKeLost/relaxed
ErKeLost/relaxed
@relaxed/vue-directives
/
src
/
utils
/
format
/
index.ts
10 lines
(9 loc)
•
258 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ isVue3 }
from
'../../compatible/isVue3'
import
{ formatUtc }
from
'./src/formatUtc'
export
default
function
(
app: any
) {
if
(
isVue3
(app)) { app.
config
.
globalProperties
.
$format
= formatUtc }
else
{ app.
prototype
.
$format
= formatUtc } }