The frontend of the module provides various types of objects to the system through the entry file
, and the system will automatically load these objects
Specification of Entry File
EggBornJS adopts the specification of Vue Plugin
to implement the entry file
of the frontend of the module
Entry File
src/suite-vendor/test-party/modules/test-party/front/src/main.js
let Vue;
import './assets/css/module.css';
// install
function install(_Vue, cb) {
if (Vue) return console.error('already installed.');
Vue = _Vue;
return cb({
routes: require('./routes.js').default,
store: require('./store.js').default(Vue),
config: require('./config/config.js').default,
locales: require('./config/locales.js').default,
components: require('./components.js').default,
});
}
// export
export default {
install,
};
Name | Description |
---|---|
routes | Page Component Route List |
store | Module State Management |
config | Configuration |
locales | I18n Resources |
components | Component List |
Comments: