perf: add truthProp util (#8522)

* perf: add TruthyProp util

* chore: rename

* chore: upd
This commit is contained in:
neverland
2021-04-14 10:26:21 +08:00
committed by GitHub
parent 9381640d2e
commit bd609e1df0
59 changed files with 226 additions and 460 deletions
+11 -8
View File
@@ -1,7 +1,13 @@
import { PropType, CSSProperties, defineComponent } from 'vue';
// Utils
import { createNamespace, extend, isDef, UnknownProp } from '../utils';
import {
createNamespace,
extend,
isDef,
truthProp,
unknownProp,
} from '../utils';
// Composables
import { useRoute, routeProps } from '../composables/use-route';
@@ -21,17 +27,14 @@ export const cellProps = {
label: [Number, String],
center: Boolean,
isLink: Boolean,
border: truthProp,
required: Boolean,
iconPrefix: String,
valueClass: UnknownProp,
labelClass: UnknownProp,
titleClass: UnknownProp,
valueClass: unknownProp,
labelClass: unknownProp,
titleClass: unknownProp,
titleStyle: (null as unknown) as PropType<string | CSSProperties>,
arrowDirection: String as PropType<CellArrowDirection>,
border: {
type: Boolean,
default: true,
},
clickable: {
type: Boolean as PropType<boolean | null>,
default: null,