25 lines
470 B
JavaScript
25 lines
470 B
JavaScript
// plugins/prettyBytes.js
|
|
export default {
|
|
install: (app, options) => {
|
|
app.config.globalProperties.$prettyBytes = (value) => {
|
|
return value + 'Mb'
|
|
}
|
|
|
|
app.provide('prettyBytes', options)
|
|
|
|
// app.directive('my-directive', {
|
|
// mounted (el, binding, vnode, oldVnode) {
|
|
// // some logic ...
|
|
// }
|
|
// ...
|
|
// })
|
|
|
|
// app.mixin({
|
|
// created() {
|
|
// // some logic ...
|
|
// }
|
|
// ...
|
|
// })
|
|
}
|
|
}
|