File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ networks:
4
4
services :
5
5
local :
6
6
image : vue-docker-nginx:latest
7
- # environment:
8
- # API_URL: http://api.2mx.org/graphql
9
7
ports :
10
8
- 3000:80
11
9
networks :
Original file line number Diff line number Diff line change 2
2
<div id =" app" >
3
3
<img alt =" Vue logo" src =" ./assets/logo.png" >
4
4
<div >
5
- version: <strong ></strong >
5
+ version: <strong >{{appVersion}} </strong >
6
6
</div >
7
7
</div >
8
8
</template >
9
9
10
10
<script >
11
11
export default {
12
- name: ' App'
12
+ name: ' App' ,
13
+ data () {
14
+ return {
15
+ appVersion: this .getVersion ()
16
+ }
17
+ },
18
+ methods: {
19
+ getVersion () {
20
+ console .log (process .env .NODE_ENV );
21
+ if (process .env .NODE_ENV === ' development' ) return ' dev'
22
+ return process .env .APP_VERSION || ' Не определена'
23
+ }
24
+ }
13
25
}
14
26
</script >
15
27
You can’t perform that action at this time.
0 commit comments