fix: 去除控制台警告
This commit is contained in:
parent
de04c93278
commit
4d14246de5
|
@ -1,11 +1,22 @@
|
||||||
import VueTypes, { toType } from 'vue-types'
|
import { VueTypeValidableDef, VueTypesInterface, createTypes, toValidableType } from 'vue-types'
|
||||||
import { CSSProperties, PropType } from 'vue'
|
import { CSSProperties } from 'vue'
|
||||||
|
|
||||||
class propTypes extends VueTypes {
|
type PropTypes = VueTypesInterface & {
|
||||||
|
readonly style: VueTypeValidableDef<CSSProperties>
|
||||||
|
}
|
||||||
|
const newPropTypes = createTypes({
|
||||||
|
func: undefined,
|
||||||
|
bool: undefined,
|
||||||
|
string: undefined,
|
||||||
|
number: undefined,
|
||||||
|
object: undefined,
|
||||||
|
integer: undefined
|
||||||
|
}) as PropTypes
|
||||||
|
|
||||||
|
class propTypes extends newPropTypes {
|
||||||
static get style() {
|
static get style() {
|
||||||
return toType('style', {
|
return toValidableType('style', {
|
||||||
type: [String, Object] as PropType<[string | CSSProperties]>,
|
type: [String, Object]
|
||||||
default: undefined
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue