mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
25 lines
497 B
JavaScript
25 lines
497 B
JavaScript
'use strict'
|
|
|
|
let Node = require('./node')
|
|
|
|
class Declaration extends Node {
|
|
constructor (defaults) {
|
|
if (
|
|
defaults &&
|
|
typeof defaults.value !== 'undefined' &&
|
|
typeof defaults.value !== 'string'
|
|
) {
|
|
defaults = { ...defaults, value: String(defaults.value) }
|
|
}
|
|
super(defaults)
|
|
this.type = 'decl'
|
|
}
|
|
|
|
get variable () {
|
|
return this.prop.startsWith('--') || this.prop[0] === '$'
|
|
}
|
|
}
|
|
|
|
module.exports = Declaration
|
|
Declaration.default = Declaration
|