You've already forked template-MP
24 lines
694 B
JavaScript
24 lines
694 B
JavaScript
import App from './App'
|
|
import uviewPlus from '/uview-plus'
|
|
import globalMixin from './mixins/global'
|
|
import { createSSRApp } from 'vue'
|
|
import { preventReClick, longPress, permission, drag } from './directives/index'
|
|
import './uni.promisify.adaptor'
|
|
uni.$zp = {
|
|
config: {
|
|
'empty-view-text': '空空如也~~',
|
|
'refresher-enabled': true,
|
|
},
|
|
}
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
app.use(uviewPlus)
|
|
app.use(globalMixin)
|
|
// 注册自定义指令
|
|
app.directive('prevent-re-click', preventReClick)
|
|
app.directive('long-press', longPress)
|
|
app.directive('permission', permission)
|
|
app.directive('drag', drag)
|
|
return { app }
|
|
}
|