Ray
Ray
`type Pop = T extends [...infer item, any] ? [...item] : [] `
我正在准备提一个pr,我先考虑下修改方案
```ts // const zIndex = ref(props.zIndex ?? nextZIndex()) ---- 改前 const zIndex = !isUndefined(props.zIndex) ? computed(() => props.zIndex) : ref(nextZIndex()) ``` 我在公司尝试改成如上,是可以解决问题的,具体pr今天下班回家提一个
> > > ```ts > > > // const zIndex = ref(props.zIndex ?? nextZIndex()) ---- 改前 > > > const zIndex = !isUndefined(props.zIndex) > > > ? computed(() => props.zIndex)...
> > ```ts > > // const zIndex = ref(props.zIndex ?? nextZIndex()) ---- 改前 > > const zIndex = !isUndefined(props.zIndex) > > ? computed(() => props.zIndex) > > : ref(nextZIndex())...
> > ```ts > > // const zIndex = ref(props.zIndex ?? nextZIndex()) ---- 改前 > > const zIndex = !isUndefined(props.zIndex) > > ? computed(() => props.zIndex) > > : ref(nextZIndex())...
```typescript type Shift = T extends [T[0], ...infer item] ? [...item] : [] type Flatten = T extends [] ? R : (T[0] extends any[] ? Flatten : Flatten) ```...