Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 59 additions & 43 deletions docs/en-US/component/form.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions packages/components/backtop/__tests__/backtop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ describe('Backtop.vue', () => {
await wrapper.trigger('click')
expect(wrapper.emitted()).toBeDefined()
})
test('render when visibilityHeight is zero', async () => {
const wrapper = _mount(() => (
<Backtop visibilityHeight={0} right={100} bottom={200} />
))
await nextTick()

expect(wrapper.find('.el-backtop').exists()).toBe(true)
})
})
2 changes: 2 additions & 0 deletions packages/components/backtop/src/use-backtop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const useBackTop = (
}
container.value = el.value
}
// Give visible an initial value, fix #13066
handleScroll()
})

return {
Expand Down
5 changes: 1 addition & 4 deletions packages/components/form/src/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ export const formProps = buildProps({
/**
* @description Whether to hide required fields should have a red asterisk (star) beside their labels.
*/
hideRequiredAsterisk: {
type: Boolean,
default: false,
},
hideRequiredAsterisk: Boolean,
/**
* @description When validation fails, scroll to the first error form entry.
*/
Expand Down
1 change: 1 addition & 0 deletions packages/components/table/src/table/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface TableRefs {
fixedBodyWrapper: HTMLElement
rightFixedBodyWrapper: HTMLElement
bodyWrapper: HTMLElement
appendWrapper: HTMLElement
[key: string]: any
}

Expand Down
5 changes: 4 additions & 1 deletion packages/components/table/src/table/style-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function useStyle<T>(
const bodyScrollHeight = ref(0)
const headerScrollHeight = ref(0)
const footerScrollHeight = ref(0)
const appendScrollHeight = ref(0)

watchEffect(() => {
layout.setHeight(props.height)
Expand Down Expand Up @@ -243,10 +244,12 @@ function useStyle<T>(
tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0
headerScrollHeight.value = tableHeader?.scrollHeight || 0
footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0
appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0
bodyScrollHeight.value =
tableScrollHeight.value -
headerScrollHeight.value -
footerScrollHeight.value
footerScrollHeight.value -
appendScrollHeight.value

if (shouldUpdateLayout) {
resizeState.value = {
Expand Down