用vue写组件(一)
注册组件并在页面中使用
1.在component文件夹下增加:
2.在src/component/index.js中增加:
import ActivityInfo from ‘./activityInfo’
Vue.component(“activity-Info”, ActivityInfo);
3.增加引用页面:
4.在router/admin/index.js中增加:
ActivityInfo: {
path: “/activityInfoTest”,
layout: “empty”,
原创
2020-07-10 07:46:22 ·
576 阅读 ·
0 评论