chore: 更新依赖

This commit is contained in:
kailong321200875
2023-09-25 15:41:35 +08:00
parent e8ed912096
commit 9bcc176d16
2 changed files with 44 additions and 60 deletions

View File

@@ -1,29 +1,13 @@
import { createTypes, VueTypesInterface, VueTypeValidableDef } from 'vue-types'
import { CSSProperties } from 'vue'
import VueTypes, { toType } from 'vue-types'
import { CSSProperties, PropType } from 'vue'
// 自定义扩展vue-types
type PropTypes = VueTypesInterface & {
readonly style: VueTypeValidableDef<CSSProperties>
class propTypes extends VueTypes {
static get style() {
return toType('style', {
type: [String, Object] as PropType<[string | CSSProperties]>,
default: undefined
})
}
}
const propTypes = createTypes({
func: undefined,
bool: undefined,
string: undefined,
number: undefined,
object: undefined,
integer: undefined
}) as PropTypes
// 需要自定义扩展的类型
// see: https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
propTypes.extend([
{
name: 'style',
getter: true,
type: [String, Object],
default: undefined
}
])
export { propTypes }