宇天 2020-09-27 19:33:57 +08:00
parent 8e09ca3493
commit 9b00dc971f
1 changed files with 16 additions and 1 deletions

View File

@ -9,6 +9,21 @@ import Smarty from 'smartyx'
export default { export default {
name: 'views', name: 'views',
install() { install() {
// var eng = new Smarty()
var conf = this.get('views')
if (conf.enabled) {
if (conf.dir) {
eng.config('path', conf.dir)
if (conf.ext) {
eng.config('ext', conf.ext)
}
return eng
} else {
throw new Error('views.dir is empty')
}
}
return Object.create(null)
} }
} }