提交 | 用户 | 时间
|
314507
|
1 |
import { VueTypeValidableDef, VueTypesInterface, createTypes, toValidableType } from 'vue-types' |
H |
2 |
import { CSSProperties } from 'vue' |
|
3 |
|
|
4 |
type PropTypes = VueTypesInterface & { |
|
5 |
readonly style: VueTypeValidableDef<CSSProperties> |
|
6 |
} |
|
7 |
const newPropTypes = createTypes({ |
|
8 |
func: undefined, |
|
9 |
bool: undefined, |
|
10 |
string: undefined, |
|
11 |
number: undefined, |
|
12 |
object: undefined, |
|
13 |
integer: undefined |
|
14 |
}) as PropTypes |
|
15 |
|
|
16 |
class propTypes extends newPropTypes { |
|
17 |
static get style() { |
|
18 |
return toValidableType('style', { |
|
19 |
type: [String, Object] |
|
20 |
}) |
|
21 |
} |
|
22 |
} |
|
23 |
|
|
24 |
export { propTypes } |