質問編集履歴
2
ソースの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,10 +34,142 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
+
axios_http.js
|
38
|
+
|
37
39
|
```ここに言語を入力
|
38
40
|
|
41
|
+
import axios from 'axios';
|
42
|
+
|
43
|
+
const http = axios;
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
export default (Vue) => {
|
48
|
+
|
49
|
+
Vue.http = http;
|
50
|
+
|
51
|
+
Object.defineProperties(Vue.prototype, {
|
52
|
+
|
53
|
+
$http: {
|
54
|
+
|
55
|
+
get () {
|
56
|
+
|
57
|
+
return http;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
});
|
64
|
+
|
65
|
+
};
|
66
|
+
|
67
|
+
```
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
main.js
|
72
|
+
|
73
|
+
```ここに言語を入力
|
74
|
+
|
75
|
+
import Vue from 'vue';
|
76
|
+
|
77
|
+
import VueOnsen from 'vue-onsenui';
|
78
|
+
|
79
|
+
import http from './axios_http.js';
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
import 'onsenui';
|
84
|
+
|
85
|
+
// Onsen UI Styling and Icons
|
86
|
+
|
87
|
+
require('onsenui/css-components-src/src/onsen-css-components.css');
|
88
|
+
|
89
|
+
require('onsenui/css/onsenui.css');
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
import App from './App';
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
Vue.use(http);
|
98
|
+
|
99
|
+
Vue.use(VueOnsen);
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
new Vue({
|
104
|
+
|
105
|
+
el: '#app',
|
106
|
+
|
107
|
+
template: '<app></app>',
|
108
|
+
|
109
|
+
components:{App}
|
110
|
+
|
111
|
+
});
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
App.vue
|
120
|
+
|
121
|
+
```ここに言語を入力
|
122
|
+
|
39
123
|
<template>
|
40
124
|
|
125
|
+
<v-ons-navigator :page-stack="pageStack">
|
126
|
+
|
127
|
+
<component :is="page" v-for="page in pageStack" :page-stack="pageStack"></component>
|
128
|
+
|
129
|
+
</v-ons-navigator>
|
130
|
+
|
131
|
+
</template>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<script>
|
136
|
+
|
137
|
+
import page1 from './Page1';
|
138
|
+
|
139
|
+
import page2 from './Page2';
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
export default {
|
144
|
+
|
145
|
+
data() {
|
146
|
+
|
147
|
+
return {
|
148
|
+
|
149
|
+
pageStack: [page1]
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
</script>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
```
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
Page1.vue
|
168
|
+
|
169
|
+
```ここに言語を入力
|
170
|
+
|
171
|
+
<template>
|
172
|
+
|
41
173
|
<v-ons-page>
|
42
174
|
|
43
175
|
|
1
プログラムコードを編集しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,6 +34,8 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
+
```ここに言語を入力
|
38
|
+
|
37
39
|
<template>
|
38
40
|
|
39
41
|
<v-ons-page>
|
@@ -192,6 +194,8 @@
|
|
192
194
|
|
193
195
|
|
194
196
|
|
197
|
+
```
|
198
|
+
|
195
199
|
|
196
200
|
|
197
201
|
|