[TOC] ## 默认模块 在`src/store.js` ``` const STOREGE_KEY = 'todo-vuejs' export default{ fetch(){ alert(STOREGE_KEY); }, save(items){ alert(items); } } ``` 在`src/App.vue` ``` import store from './store'; //引入 export default { methods: { enterFun: function () { store.save(this.tiems); } } } ``` ## 非默认模块 `src/common/js/date.js` ```js export function formatDate (date) { return "1212" } // =========// //调用 import { formatDate } from '@/common/js/date.js' ```