質問編集履歴
7
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,10 +34,10 @@
|
|
34
34
|
|
35
35
|
methods: {
|
36
36
|
initialModal(id) {
|
37
|
+
// 実際はBootstrap5でmodalを開いています。(Bootstrap5のためjqueryは不要)
|
38
|
+
|
37
39
|
// componentでfocusできない
|
38
|
-
this.$refs.focusModal.focus();
|
40
|
+
this.$refs.focusModal.focus();
|
39
|
-
|
40
|
-
// 実際はBootstrap5でmodalを開いています。(Bootstrap5のためjqueryは不要)
|
41
41
|
},
|
42
42
|
}
|
43
43
|
};
|
6
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
componentでは実行してくれなくて困っています。
|
6
6
|
|
7
|
-
デバック実行すると、this.$refsには focusModal は見れるのですが
|
7
|
+
デバック実行すると、this.$refsには focusModal は見れるのですが。
|
8
8
|
|
9
9
|
どなたかご存知であれば教えて下さい。
|
10
10
|
|
5
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Vue.jsで子componentで、x-templateを使用したhtml
|
1
|
+
Vue.jsで子componentで、x-templateを使用したhtmlのinputにfocusができなくて困っています。
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Vue.jsで子componentで、x-templateを使用したhtml
|
1
|
+
Vue.jsで子componentで、x-templateを使用したhtmlのinputにfocusができなくて困っています。
|
2
2
|
|
3
3
|
componentを使用する前は、htmlに、ref="focusModal" を記載し、javascriptでthis.$refs.focusModal.focus(); を実行するとfocusできていたのですが、
|
4
4
|
|
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
// componentでfocusできない
|
38
38
|
this.$refs.focusModal.focus();
|
39
39
|
|
40
|
-
// 実際は
|
40
|
+
// 実際はBootstrap5でmodalを開いています。(Bootstrap5のためjqueryは不要)
|
41
41
|
},
|
42
42
|
}
|
43
43
|
};
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<div id="app">
|
14
14
|
<button type="button" v-on:click="testAction()">TestAction</button>
|
15
15
|
|
16
|
-
<modal-component ref="child1"
|
16
|
+
<modal-component ref="child1"></modal-component>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<script type="text/x-template" id="modal-component-id">
|
@@ -36,6 +36,8 @@
|
|
36
36
|
initialModal(id) {
|
37
37
|
// componentでfocusできない
|
38
38
|
this.$refs.focusModal.focus();
|
39
|
+
|
40
|
+
// 実際はbootstrapでmodalを開いています。
|
39
41
|
},
|
40
42
|
}
|
41
43
|
};
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<div id="app">
|
14
14
|
<button type="button" v-on:click="testAction()">TestAction</button>
|
15
15
|
|
16
|
-
<modal-component ref="child1"
|
16
|
+
<modal-component ref="child1" ></modal-component>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<script type="text/x-template" id="modal-component-id">
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Vue.jsで子componentで、x-templateを使用したhtmlでfocusを実行する方法がわからなくて困っています。
|
2
2
|
|
3
|
-
componentを使用する前は、htmlに、ref="focusModal" を記載し、avascriptでthis.$refs.focusModal.focus(); を実行するとfocusできていたのですが、
|
3
|
+
componentを使用する前は、htmlに、ref="focusModal" を記載し、javascriptでthis.$refs.focusModal.focus(); を実行するとfocusできていたのですが、
|
4
4
|
|
5
5
|
componentでは実行してくれなくて困っています。
|
6
6
|
|