12 lines
536 B
JavaScript
12 lines
536 B
JavaScript
export default {
|
|
install(app, options) {
|
|
// 将整个 myFileMethod 实例挂载到全局属性 $fileUtils
|
|
app.config.globalProperties.$fileUtils = myFileMethod;
|
|
// 将 isElectron 函数也挂载到全局属性 $isElectron
|
|
app.config.globalProperties.$isElectron = isElectron;
|
|
// 如果还有其他全局组件、指令等,也可以在这里注册
|
|
// app.component('MyGlobalComponent', MyGlobalComponent);
|
|
// app.directive('my-directive', myDirective);
|
|
console.log('fileUtilsPlugin 已安装');
|
|
}
|
|
}; |