1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

laravel8 + vue.js2.6の.nativeの使い方

Posted at

###この本を書いたきっかけは?何についての記事?
「これから始める、Vue.js実践入門」(山田祥寛/著、SBクリエイティブ株式会社/発行)のリスト4-15~16あたりをlaravel8のプロジェクト内でやりたかったので、コードを少し改変してみた。
###参考にしたリンク
https://qiita.com/b1san/items/6bc0be17cd6ed687520c

MyComponent3.vue
<template>
  <div>
    <mycomponent4 v-on:focus.native="onfocus"></mycomponent4>
  </div>
</template>

<script>
import mycomponent4 from './MyComponent4.vue';
export default {
components: {mycomponent4},
 data: function () {
    return {
        current: 0,
    }
 },
  methods: {
    onfocus: function (e) {
      console.log(e);
    }
  },
};
</script>
MyComponent4.vue
<template>
<input type="text" />
</template>
<script>
export default {
 data: function () {
    return {
        // current: 0,
    }
 },

    // props: ['step'],
    methods: {
    }
};
</script>
app.js
require('./bootstrap');
import Vue from 'vue'
import App3 from './components/MyComponent3.vue'
const app3 = new Vue({
    el: '#app3',
    components: {
         App3
    },
});
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?