Vue(Vue CLI)で他ファイルをインポート
<script>
import "./components/Component.vue"
export default {
el: '#app',
data() {
return{
now: "",
wakachiko:"uhouho"
}
},
methods:{
onClick(){
// alert("onClick!");
this.now =new Date().toLocaleString();
}
}
}
</script>
こんな感じでimport+"ファイル場所"
って書けばOKです。
Author And Source
この問題について(Vue(Vue CLI)で他ファイルをインポート), 我々は、より多くの情報をここで見つけました https://qiita.com/YuERA/items/e99e65928a54f8555e49著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .