回答編集履歴
1
試したHTMLも追記
answer
CHANGED
@@ -15,4 +15,83 @@
|
|
15
15
|
};
|
16
16
|
```
|
17
17
|
|
18
|
-
にしてできませんか?
|
18
|
+
にしてできませんか?
|
19
|
+
|
20
|
+
※試したHTML載せておきます
|
21
|
+
```html
|
22
|
+
<!doctype html>
|
23
|
+
<html lang="en">
|
24
|
+
<head>
|
25
|
+
<meta charset="utf-8">
|
26
|
+
<!--
|
27
|
+
-->
|
28
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/onsen/2.4.2/css/onsenui.min.css" />
|
29
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/onsen/2.4.2/css/onsen-css-components.min.css" />
|
30
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/onsen/2.4.2/js/onsenui.js"></script>
|
31
|
+
<script src="https://unpkg.com/vue"></script>
|
32
|
+
<script src="https://unpkg.com/vue-onsenui@2.0.2"></script>
|
33
|
+
<!--
|
34
|
+
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
|
35
|
+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
|
36
|
+
-->
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
<ons-navigator id="myNavigator" page="sample.html"></ons-navigator>
|
40
|
+
|
41
|
+
<ons-template id="sample.html">
|
42
|
+
<ons-page>
|
43
|
+
<ons-toolbar>
|
44
|
+
<div class="right">
|
45
|
+
<ons-toolbar-button onclick="showdlg1()">
|
46
|
+
<ons-icon icon="ion-plus"></ons-icon>
|
47
|
+
</ons-toolbar-button>
|
48
|
+
</div>
|
49
|
+
</ons-toolbar>
|
50
|
+
</ons-page>
|
51
|
+
</ons-template>
|
52
|
+
|
53
|
+
<ons-template id="dialog1.html">
|
54
|
+
<ons-dialog id="dialog1" cancelable>
|
55
|
+
<ons-toolbar inline>
|
56
|
+
<label class="center">追加</label>
|
57
|
+
<div class="right">
|
58
|
+
<ons-toolbar-button modifier="quiet" onclick="hidedlg1()">
|
59
|
+
完了
|
60
|
+
</ons-toolbar-button>
|
61
|
+
</div>
|
62
|
+
</ons-toolbar>
|
63
|
+
<div style="text-align: center">
|
64
|
+
<p>
|
65
|
+
<ons-input modifier="underbar" placeholder="hoge"></ons-input>
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
</ons-dialog>
|
69
|
+
</ons-template>
|
70
|
+
|
71
|
+
<!--
|
72
|
+
<div id="app">
|
73
|
+
</div>
|
74
|
+
-->
|
75
|
+
|
76
|
+
</body>
|
77
|
+
<script>
|
78
|
+
ons.ready(function() {
|
79
|
+
});
|
80
|
+
function showdlg1() {
|
81
|
+
var dialog1 = document.getElementById('dialog1')
|
82
|
+
if(dialog1) {
|
83
|
+
dialog1.show();
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
ons.createDialog('dialog1.html').then(function(dialog1) {
|
87
|
+
dialog1.show();
|
88
|
+
});
|
89
|
+
}
|
90
|
+
};
|
91
|
+
function hidedlg1() {
|
92
|
+
dialog1.hide();
|
93
|
+
};
|
94
|
+
|
95
|
+
</script>
|
96
|
+
</html>
|
97
|
+
```
|