chore: update dependencies and vue-types has breakchange

This commit is contained in:
xiaoxian521
2023-03-01 19:20:44 +08:00
parent fe8e84ec9f
commit 30eddc1373
7 changed files with 414 additions and 339 deletions

View File

@@ -1,5 +1,5 @@
import { PropType } from "vue";
import { propTypes } from "@/utils/propTypes";
import propTypes from "@/utils/propTypes";
export const countToProps = {
startVal: propTypes.number.def(0),
endVal: propTypes.number.def(2020),

View File

@@ -1,5 +1,5 @@
import { PropType } from "vue";
import { propTypes } from "@/utils/propTypes";
import propTypes from "@/utils/propTypes";
export const reboundProps = {
delay: propTypes.number.def(1),
blur: propTypes.number.def(2),

View File

@@ -1,5 +1,5 @@
import { defineComponent, ref } from "vue";
import { propTypes } from "@/utils/propTypes";
import propTypes from "@/utils/propTypes";
import "./filpper.css";
const props = {

View File

@@ -8,7 +8,7 @@ import {
defineComponent
} from "vue";
import "./index.scss";
import { propTypes } from "@/utils/propTypes";
import propTypes from "@/utils/propTypes";
import { isString, cloneDeep } from "@pureadmin/utils";
import QRCode, { QRCodeRenderersOptions } from "qrcode";
import RefreshRight from "@iconify-icons/ep/refresh-right";

View File

@@ -1,5 +1,10 @@
import { CSSProperties, VNodeChild } from "vue";
import { createTypes, VueTypeValidableDef, VueTypesInterface } from "vue-types";
import type { CSSProperties, VNodeChild } from "vue";
import {
createTypes,
toValidableType,
VueTypesInterface,
VueTypeValidableDef
} from "vue-types";
export type VueNode = VNodeChild | JSX.Element;
@@ -8,7 +13,7 @@ type PropTypes = VueTypesInterface & {
readonly VNodeChild: VueTypeValidableDef<VueNode>;
};
const propTypes = createTypes({
const newPropTypes = createTypes({
func: undefined,
bool: undefined,
string: undefined,
@@ -17,18 +22,18 @@ const propTypes = createTypes({
integer: undefined
}) as PropTypes;
propTypes.extend([
{
name: "style",
getter: true,
type: [String, Object],
default: undefined
},
{
name: "VNodeChild",
getter: true,
type: undefined
// 从 vue-types v5.0 开始extend()方法已经废弃当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
export default class propTypes extends newPropTypes {
// a native-like validator that supports the `.validable` method
static get style() {
return toValidableType("style", {
type: [String, Object]
});
}
]);
export { propTypes };
static get VNodeChild() {
return toValidableType("VNodeChild", {
type: undefined
});
}
}