Skip to content

Commit

Permalink
fix(tab-nav): add missing component dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhc committed Jan 11, 2025
1 parent 1b7ddb9 commit 9aa925c
Show file tree
Hide file tree
Showing 11 changed files with 411 additions and 295 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @type {import('@commitlint/types').UserConfig}
*/
export default {
extends: ['@vexip-ui/commitlint-config']
}
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,5 @@ jobs:
- name: Build common packages
run: pnpm run build:common

- name: Test BEM
run: pnpm -C common/bem-helper test

- name: Test utils
run: pnpm -C common/utils test

- name: Test plugins
run: pnpm -C common/plugins test

- name: Test
run: pnpm run test
8 changes: 4 additions & 4 deletions components/avatar/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const props = useProps('avatar', _props, {
slots: () => ({})
})
defineSlots<{
default: () => any,
icon: () => any
const slots = defineSlots<{
default?: () => any,
icon?: () => any
}>()
const groupState = inject(GROUP_STATE, null)
Expand Down Expand Up @@ -156,7 +156,7 @@ function handleClick(event: MouseEvent) {
:alt="props.alt"
@error="fallbackFail = true"
/>
<template v-else-if="icon || $slots.icon">
<template v-else-if="icon || slots.icon">
<slot name="icon">
<Renderer :renderer="props.slots.icon">
<Icon :class="nh.be('icon')" :icon="icon" :scale="props.iconScale"></Icon>
Expand Down
12 changes: 6 additions & 6 deletions components/form/form-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ const props = useProps('formItem', _props, {
})
const slots = defineSlots<{
default: () => any,
help: () => any,
label: () => any,
error: (params: { tip: string }) => any
default?: () => any,
help?: () => any,
label?: () => any,
error?: (params: { tip: string }) => any
}>()
const formProps = inject(FORM_PROPS, {})
Expand Down Expand Up @@ -130,7 +130,7 @@ const allRules = computed(() => {
})
const currentValue = computed(getValue)
const isValidateAll = computed(() => {
return isNull(props.validateAll) ? formProps.validateAll ?? false : props.validateAll
return isNull(props.validateAll) ? (formProps.validateAll ?? false) : props.validateAll
})
const useAsterisk = computed(() => {
if (props.hideAsterisk === true || formProps.hideAsterisk) {
Expand Down Expand Up @@ -400,7 +400,7 @@ const isNative = computed(() => !!(formProps.action && formProps.method))
:for="props.htmlFor || props.prop"
@click="handleLabelClick"
>
<Tooltip v-if="props.help || $slots.help" transfer>
<Tooltip v-if="props.help || slots.help" transfer>
<template #trigger>
<Icon v-bind="icons.help" :class="nh.be('help')"></Icon>
</template>
Expand Down
12 changes: 6 additions & 6 deletions components/form/form-reset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const props = useProps('formReset', _props, {
}
})
defineSlots<{
default: () => any,
icon: () => any,
loading: () => any
const slots = defineSlots<{
default?: () => any,
icon?: () => any,
loading?: () => any
}>()
const actions = inject(FORM_ACTIONS, null)
Expand Down Expand Up @@ -94,10 +94,10 @@ async function handleReset() {
<slot>
{{ props.label || locale.reset }}
</slot>
<template v-if="$slots.icon" #icon>
<template v-if="slots.icon" #icon>
<slot name="icon"></slot>
</template>
<template v-if="$slots.loading" #loading>
<template v-if="slots.loading" #loading>
<slot name="loading"></slot>
</template>
</Button>
Expand Down
12 changes: 6 additions & 6 deletions components/form/form-submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ const props = useProps('form-submit', _props, {
}
})
defineSlots<{
default: () => any,
icon: () => any,
loading: () => any
const slots = defineSlots<{
default?: () => any,
icon?: () => any,
loading?: () => any
}>()
const fieldActions = inject(FIELD_OPTIONS, null)
Expand Down Expand Up @@ -125,10 +125,10 @@ async function handleSubmit() {
<slot>
{{ props.label || locale.submit }}
</slot>
<template v-if="$slots.icon" #icon>
<template v-if="slots.icon" #icon>
<slot name="icon"></slot>
</template>
<template v-if="$slots.loading" #loading>
<template v-if="slots.loading" #loading>
<slot name="loading"></slot>
</template>
<button
Expand Down
1 change: 1 addition & 0 deletions components/tab-nav/tab-nav.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { Icon } from '@/components/icon'
import { Renderer } from '@/components/renderer'
import { ResizeObserver } from '@/components/resize-observer'
import { Scroll } from '@/components/scroll'
import { TabNavItem } from '@/components/tab-nav-item'
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
"@vexip-ui/utils": "workspace:*"
},
"devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/cli": "^19.6.1",
"@commitlint/types": "^19.5.0",
"@juggle/resize-observer": "^3.4.0",
"@types/eslint": "^8.56.7",
"@types/fs-extra": "^11.0.4",
Expand Down Expand Up @@ -200,7 +201,7 @@
"tsx": "^4.7.2",
"typescript": "5.4.4",
"vite": "^5.4.6",
"vite-plugin-dts": "^4.1.0",
"vite-plugin-dts": "^4.5.0",
"vitest": "^2.1.5",
"vue": "^3.4.38",
"vue-router": "^4.4.3"
Expand Down
Loading

0 comments on commit 9aa925c

Please sign in to comment.