This repository was archived by the owner on Jul 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +66
-9
lines changed Expand file tree Collapse file tree 5 files changed +66
-9
lines changed Original file line number Diff line number Diff line change 58
58
"cross-env" : " ^5.2.0" ,
59
59
"express" : " ^4.16.4" ,
60
60
"js-cookie" : " ^2.2.0" ,
61
+ "moment" : " ^2.24.0" ,
61
62
"nuxt" : " ^2.6.2" ,
62
63
"nuxt-client-init-module" : " ^0.1.4" ,
63
64
"nuxt-env" : " ^0.1.0" ,
77
78
"@types/express" : " ^4.16.1" ,
78
79
"@types/jest" : " ^24.0.11" ,
79
80
"@types/js-cookie" : " ^2.2.2" ,
81
+ "@types/moment" : " ^2.13.0" ,
80
82
"@types/prettier" : " 1.16.2" ,
81
83
"@types/storybook__vue" : " ^5.0.1" ,
82
84
"@typescript-eslint/eslint-plugin" : " ^1.6.0" ,
Original file line number Diff line number Diff line change 34
34
opacity : 0 ;
35
35
transform : translate (-30px , 0 );
36
36
}
37
+
38
+ h1 .title {
39
+ font-size : 20px ;
40
+ margin-bottom : 10px ;
41
+ padding-left : 3px ;
42
+ border-left : 2px solid blueviolet ;
43
+ }
Original file line number Diff line number Diff line change 1
1
<template lang="pug">
2
2
section
3
- h1.red
3
+ h1.title
4
4
| example index page
5
- | - nuxtServerInit has been called is {{ isServerInitCalled }}
6
- | - nuxtClientInit has been called is {{ isClientInitCalled }}
5
+ p nuxtServerInit has been called is {{ isServerInitCalled }}
6
+ p nuxtClientInit has been called is {{ isClientInitCalled }}
7
7
hr
8
8
p
9
9
nuxt-link( to ='/example/auth/require-auth' ) require-auth
@@ -47,6 +47,8 @@ section
47
47
nuxt-link( to ='/example/i18n' ) i18n
48
48
p
49
49
nuxt-link( to ='/example/animejs' ) animejs
50
+ p
51
+ nuxt-link( to ='/example/now-utcoffset' ) now-utcoffset
50
52
</template >
51
53
52
54
<script lang="ts">
@@ -65,12 +67,7 @@ export default class extends Vue {
65
67
</script >
66
68
67
69
<style lang="scss" scoped>
68
- .red {
69
- margin : 5px ;
70
- color : red ;
71
- }
72
-
73
70
p {
74
- margin : 5px ;
71
+ margin-bottom : 5px ;
75
72
}
76
73
</style >
Original file line number Diff line number Diff line change
1
+ <template lang="pug">
2
+ section.container
3
+ h1.title
4
+ | now-utcoffset
5
+ p now: {{ now }}
6
+ p from-string: {{ fromString }}
7
+ p now-date: {{ nowDate }}
8
+ </template >
9
+
10
+ <script lang="ts">
11
+ import { Component , Vue } from ' nuxt-property-decorator'
12
+ import moment from ' moment'
13
+
14
+ @Component
15
+ export default class extends Vue {
16
+ public get now(): string {
17
+ const dayWrapper = moment (new Date ()).utcOffset (' +0900' )
18
+ return dayWrapper .format ()
19
+ }
20
+
21
+ public get fromString(): string {
22
+ const dayWrapper = moment (' 2013-03-07T07:00:00+09:00' ).utcOffset (' +0900' )
23
+ return dayWrapper .format ()
24
+ }
25
+
26
+ public get nowDate(): string {
27
+ const dayWrapper = moment (new Date ()).utcOffset (' +0900' )
28
+ return dayWrapper .format (' YYYY-MM-DD' )
29
+ }
30
+
31
+ public head() {
32
+ return {
33
+ title: ' now-utcoffset'
34
+ }
35
+ }
36
+ }
37
+ </script >
38
+
39
+ <style lang="scss"></style >
Original file line number Diff line number Diff line change 2246
2246
version "2.0.1"
2247
2247
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d"
2248
2248
2249
+ " @types/moment@^2.13.0 " :
2250
+ version "2.13.0"
2251
+ resolved "https://registry.yarnpkg.com/@types/moment/-/moment-2.13.0.tgz#604ebd189bc3bc34a1548689404e61a2a4aac896"
2252
+ integrity sha1-YE69GJvDvDShVIaJQE5hoqSqyJY=
2253
+ dependencies :
2254
+ moment "*"
2255
+
2249
2256
" @types/node@* " :
2250
2257
version "11.9.5"
2251
2258
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.9.5.tgz#011eece9d3f839a806b63973e228f85967b79ed3"
8314
8321
dependencies :
8315
8322
minimist "0.0.8"
8316
8323
8324
+ moment@*, moment@^2.24.0 :
8325
+ version "2.24.0"
8326
+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
8327
+ integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
8328
+
8317
8329
move-concurrently@^1.0.1 :
8318
8330
version "1.0.1"
8319
8331
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
You can’t perform that action at this time.
0 commit comments