2013-12-25 04:34:22 +08:00
|
|
|
var prefix = 'v',
|
|
|
|
|
specialAttributes = [
|
|
|
|
|
'pre',
|
|
|
|
|
'text',
|
|
|
|
|
'repeat',
|
|
|
|
|
'partial',
|
2014-01-13 04:37:50 +08:00
|
|
|
'with',
|
2013-12-25 04:34:22 +08:00
|
|
|
'component',
|
|
|
|
|
'component-id',
|
|
|
|
|
'transition'
|
|
|
|
|
],
|
|
|
|
|
config = module.exports = {
|
|
|
|
|
|
|
|
|
|
async : true,
|
|
|
|
|
debug : false,
|
|
|
|
|
silent : false,
|
|
|
|
|
enterClass : 'v-enter',
|
|
|
|
|
leaveClass : 'v-leave',
|
|
|
|
|
attrs : {},
|
|
|
|
|
|
|
|
|
|
get prefix () {
|
|
|
|
|
return prefix
|
|
|
|
|
},
|
|
|
|
|
set prefix (val) {
|
|
|
|
|
prefix = val
|
|
|
|
|
updatePrefix()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updatePrefix () {
|
|
|
|
|
specialAttributes.forEach(function (attr) {
|
|
|
|
|
config.attrs[attr] = prefix + '-' + attr
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatePrefix()
|