修复VueTypes.extend is deprecated.
This commit is contained in:
parent
6c86aa42fd
commit
3e64487c60
@ -1,4 +1,5 @@
|
||||
import { CSSProperties } from 'vue';
|
||||
import VueTypes, { toType, toValidableType } from 'vue-types'
|
||||
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
|
||||
|
||||
type PropTypes = VueTypesInterface & {
|
||||
@ -14,12 +15,13 @@ const propTypes = createTypes({
|
||||
integer: undefined
|
||||
}) as PropTypes;
|
||||
|
||||
propTypes.extend([
|
||||
{
|
||||
name: 'style',
|
||||
getter: true,
|
||||
type: [String, Object],
|
||||
default: undefined
|
||||
export default class ProjectTypes extends VueTypes {
|
||||
static get style() {
|
||||
return toValidableType('style', {
|
||||
type: [String, Object],
|
||||
default: undefined
|
||||
|
||||
})
|
||||
}
|
||||
]);
|
||||
}
|
||||
export { propTypes };
|
||||
|
Loading…
x
Reference in New Issue
Block a user