Skip to content

Commit

Permalink
releases 4.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Sep 24, 2024
1 parent d091be9 commit 8955819
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ body:
id: issue_vxe_ui_version
attributes:
label: "vxe-pc-ui 版本:"
placeholder: "例如:4.0.49"
placeholder: "例如:4.2.2"
validations:
required: true
- type: input
id: issue_vxe_table_version
attributes:
label: "vxe-table 版本:"
placeholder: "例如:4.7.45"
placeholder: "例如:4.7.81"
validations:
required: true
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion examples/views/pulldown/PulldownTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>
</vxe-pulldown>

<vxe-pulldown ref="xDown2">
<vxe-pulldown ref="xDown2" destroyOnClose>
<template #default>
<vxe-input v-model="demo2.value2" placeholder="可搜索的大数据下拉框" @focus="focusEvent2" @keyup="keyupEvent2"></vxe-input>
</template>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "4.2.2",
"version": "4.2.4",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
18 changes: 9 additions & 9 deletions packages/button/src/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default defineComponent({
const reactData = reactive<ButtonReactData>({
initialized: false,
visiblePanel: false,
visibleAnimate: false,
isAniVisible: false,
isActivated: false,
panelIndex: 0,
panelStyle: {},
Expand Down Expand Up @@ -316,7 +316,7 @@ export default defineComponent({
reactData.visiblePanel = false
setTimeout(() => {
if (!panelElem || panelElem.dataset.active !== 'Y') {
reactData.visibleAnimate = false
reactData.isAniVisible = false
}
}, 350)
dispatchEvent('dropdown-click', { name: targetElem.getAttribute('name'), $event: evnt }, evnt)
Expand All @@ -327,7 +327,7 @@ export default defineComponent({
const panelElem = refBtnPanel.value
if (panelElem) {
panelElem.dataset.active = 'Y'
reactData.visibleAnimate = true
reactData.isAniVisible = true
setTimeout(() => {
if (panelElem.dataset.active === 'Y') {
reactData.visiblePanel = true
Expand Down Expand Up @@ -385,7 +385,7 @@ export default defineComponent({
if (panelElem.dataset.active === 'Y') {
mouseenterDropdownEvent()
} else {
reactData.visibleAnimate = false
reactData.isAniVisible = false
}
}, trigger === 'click' ? 50 : 250)
}
Expand All @@ -402,13 +402,13 @@ export default defineComponent({
reactData.visiblePanel = false
setTimeout(() => {
if (panelElem.dataset.active !== 'Y') {
reactData.visibleAnimate = false
reactData.isAniVisible = false
}
}, 350)
}
}, 100)
} else {
reactData.visibleAnimate = false
reactData.isAniVisible = false
reactData.visiblePanel = false
}
return nextTick()
Expand Down Expand Up @@ -506,7 +506,7 @@ export default defineComponent({

const renderVN = () => {
const { className, popupClassName, align, trigger, title, routerLink, type, destroyOnClose, name, loading } = props
const { initialized, visiblePanel } = reactData
const { initialized, isAniVisible, visiblePanel } = reactData
const isFormBtn = computeIsFormBtn.value
const btnMode = computeBtnMode.value
const btnStatus = computeBtnStatus.value
Expand Down Expand Up @@ -595,13 +595,13 @@ export default defineComponent({
ref: refBtnPanel,
class: ['vxe-button--dropdown-panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $button: $xeButton }) : popupClassName) : '', {
[`size--${vSize}`]: vSize,
'ani--leave': reactData.visibleAnimate,
'ani--leave': isAniVisible,
'ani--enter': visiblePanel
}],
placement: reactData.panelPlacement,
style: reactData.panelStyle,
...panelOns
}, initialized
}, initialized && (visiblePanel || isAniVisible)
? [
h('div', {
class: 'vxe-button--dropdown-wrapper',
Expand Down
2 changes: 1 addition & 1 deletion packages/date-picker/src/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ export default defineComponent({
}],
placement: panelPlacement,
style: panelStyle
}, renders)
}, initialized && (visiblePanel || isAniVisible) ? renders : [])
])
}
return createCommentVNode()
Expand Down
6 changes: 3 additions & 3 deletions packages/icon-picker/src/icon-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export default defineComponent({

const renderVN = () => {
const { className, popupClassName, clearable } = props
const { initialized, isActivated, visiblePanel, selectIcon } = reactData
const { initialized, isActivated, isAniVisible, visiblePanel, selectIcon } = reactData
const vSize = computeSize.value
const isDisabled = computeIsDisabled.value
const btnTransfer = computeBtnTransfer.value
Expand Down Expand Up @@ -552,13 +552,13 @@ export default defineComponent({
class: ['vxe-table--ignore-clear vxe-ico-picker--panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $iconPicker: $xeIconPicker }) : popupClassName) : '', {
[`size--${vSize}`]: vSize,
'is--transfer': btnTransfer,
'ani--leave': reactData.isAniVisible,
'ani--leave': isAniVisible,
'ani--enter': visiblePanel
}],
placement: reactData.panelPlacement,
style: reactData.panelStyle
}, [
initialized
initialized && (visiblePanel || isAniVisible)
? h('div', {
class: 'vxe-ico-picker--panel-wrapper'
}, [
Expand Down
2 changes: 1 addition & 1 deletion packages/input/src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,7 @@ export default defineComponent({
}],
placement: panelPlacement,
style: panelStyle
}, renders)
}, visiblePanel || isAniVisible ? renders : [])
])
}
return createCommentVNode()
Expand Down
20 changes: 10 additions & 10 deletions packages/pulldown/src/pulldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default defineComponent({
panelStyle: {},
panelPlacement: null,
visiblePanel: false,
visibleAnimate: false,
isAniVisible: false,
isActivated: false
})

Expand Down Expand Up @@ -197,7 +197,7 @@ export default defineComponent({
clearTimeout(internalData.hpTimeout)
}
reactData.isActivated = true
reactData.visibleAnimate = true
reactData.isAniVisible = true
setTimeout(() => {
reactData.visiblePanel = true
emit('update:modelValue', true)
Expand All @@ -222,9 +222,9 @@ export default defineComponent({
reactData.visiblePanel = false
emit('update:modelValue', false)
return new Promise<void>(resolve => {
if (reactData.visibleAnimate) {
if (reactData.isAniVisible) {
internalData.hpTimeout = window.setTimeout(() => {
reactData.visibleAnimate = false
reactData.isAniVisible = false
nextTick(() => {
resolve()
})
Expand Down Expand Up @@ -357,7 +357,7 @@ export default defineComponent({

const renderVN = () => {
const { className, options, popupClassName, showPopupShadow, destroyOnClose, disabled } = props
const { initialized, isActivated, visibleAnimate, visiblePanel, panelStyle, panelPlacement } = reactData
const { initialized, isActivated, isAniVisible, visiblePanel, panelStyle, panelPlacement } = reactData
const btnTransfer = computeBtnTransfer.value
const vSize = computeSize.value
const defaultSlot = slots.default
Expand Down Expand Up @@ -389,17 +389,16 @@ export default defineComponent({
[`size--${vSize}`]: vSize,
'is--shadow': showPopupShadow,
'is--transfer': btnTransfer,
'ani--leave': visibleAnimate,
'ani--leave': isAniVisible,
'ani--enter': visiblePanel
}],
placement: panelPlacement,
style: panelStyle
}, [
h('div', {
class: 'vxe-pulldown--panel-wrapper'
}, !initialized || (destroyOnClose && !visiblePanel && !visibleAnimate)
? []
: [
}, initialized && (destroyOnClose ? (visiblePanel || isAniVisible) : true)
? [
headerSlot
? h('div', {
class: 'vxe-pulldown--panel-header'
Expand All @@ -417,7 +416,8 @@ export default defineComponent({
class: 'vxe-pulldown--panel-footer'
}, footerSlot({ $pulldown: $xePulldown }))
: createCommentVNode()
])
]
: [])
])
])
])
Expand Down
6 changes: 3 additions & 3 deletions packages/select/src/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ export default defineComponent({

const renderVN = () => {
const { className, popupClassName, loading, filterable } = props
const { initialized, isActivated, visiblePanel } = reactData
const { initialized, isActivated, isAniVisible, visiblePanel } = reactData
const vSize = computeSize.value
const isDisabled = computeIsDisabled.value
const selectLabel = computeSelectLabel.value
Expand Down Expand Up @@ -1052,12 +1052,12 @@ export default defineComponent({
class: ['vxe-table--ignore-clear vxe-select--panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $select: $xeSelect }) : popupClassName) : '', {
[`size--${vSize}`]: vSize,
'is--transfer': btnTransfer,
'ani--leave': !loading && reactData.isAniVisible,
'ani--leave': !loading && isAniVisible,
'ani--enter': !loading && visiblePanel
}],
placement: reactData.panelPlacement,
style: reactData.panelStyle
}, initialized
}, initialized && (visiblePanel || isAniVisible)
? [
filterable
? h('div', {
Expand Down
12 changes: 6 additions & 6 deletions packages/tree-select/src/tree-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default defineComponent({
panelPlacement: null,
triggerFocusPanel: false,
visiblePanel: false,
visibleAnimate: false,
isAniVisible: false,
isActivated: false
})

Expand Down Expand Up @@ -343,7 +343,7 @@ export default defineComponent({
reactData.initialized = true
}
reactData.isActivated = true
reactData.visibleAnimate = true
reactData.isAniVisible = true
setTimeout(() => {
reactData.visiblePanel = true
}, 10)
Expand All @@ -355,7 +355,7 @@ export default defineComponent({
const hideOptionPanel = () => {
reactData.visiblePanel = false
internalData.hpTimeout = window.setTimeout(() => {
reactData.visibleAnimate = false
reactData.isAniVisible = false
}, 350)
}

Expand Down Expand Up @@ -475,7 +475,7 @@ export default defineComponent({

const renderVN = () => {
const { className, modelValue, multiple, options, popupClassName, loading } = props
const { initialized, isActivated, visiblePanel } = reactData
const { initialized, isActivated, isAniVisible, visiblePanel } = reactData
const vSize = computeSize.value
const isDisabled = computeIsDisabled.value
const selectLabel = computeSelectLabel.value
Expand Down Expand Up @@ -548,12 +548,12 @@ export default defineComponent({
class: ['vxe-table--ignore-clear vxe-tree-select--panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $treeSelect: $xeTreeSelect }) : popupClassName) : '', {
[`size--${vSize}`]: vSize,
'is--transfer': btnTransfer,
'ani--leave': !loading && reactData.visibleAnimate,
'ani--leave': !loading && isAniVisible,
'ani--enter': !loading && visiblePanel
}],
placement: reactData.panelPlacement,
style: reactData.panelStyle
}, initialized
}, initialized && (visiblePanel || isAniVisible)
? [
h('div', {
class: 'vxe-tree-select--panel-wrapper'
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ setConfig({
controls: true
},
printPageBreak: {},
pulldown: {},
pulldown: {
destroyOnClose: true
},
radio: {
strict: true
},
Expand Down
1 change: 1 addition & 0 deletions styles/components/col.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ $colSpanList: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 3
.vxe-col--inner {
display: flex;
flex-direction: column;
width: 100%;
}
2 changes: 1 addition & 1 deletion types/components/button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export interface VxeButtonPrivateComputed extends ButtonPrivateComputed { }
export interface ButtonReactData {
initialized: boolean
visiblePanel: boolean
visibleAnimate: boolean
isAniVisible: boolean
isActivated: boolean
panelIndex: number
panelStyle: VxeComponentStyleType
Expand Down
2 changes: 1 addition & 1 deletion types/components/form-view.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export namespace VxeFormViewPropTypes {
export type ViewRender = {
name?: string
}
export type FormOptions = Omit<VxeFormProps<D>, 'data' | 'items'>
export type FormOptions<D = any> = Omit<VxeFormProps<D>, 'data' | 'items'>
export type CreateFormConfig = (params: VxeFormViewDefines.CreateFormConfigParams) => VxeFormProps
export type Size = VxeComponentSizeType
}
Expand Down
2 changes: 1 addition & 1 deletion types/components/pulldown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface PulldownReactData {
panelStyle: VxeComponentStyleType
panelPlacement: string | null
visiblePanel: boolean
visibleAnimate: boolean
isAniVisible: boolean
isActivated: boolean
}

Expand Down
6 changes: 5 additions & 1 deletion types/components/table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export namespace VxeTablePropTypes {
export type Resizable = boolean
export type Stripe = boolean
export type Round = boolean
export type Padding = boolean
export type Border = boolean | 'default' | 'full' | 'outer' | 'inner' | 'none' | ''
export type Loading = boolean
export type Align = 'left' | 'center' | 'right' | '' | null
Expand Down Expand Up @@ -1729,6 +1730,10 @@ export interface VxeTableProps<D = any> {
* 是否带有斑马纹(需要注意的是,在可编辑表格场景下,临时插入的数据不会有斑马纹样式)
*/
stripe?: VxeTablePropTypes.Stripe
/**
* 单元格是否有边距
*/
padding?: VxeTablePropTypes.Padding
/**
* 是否为圆角边框
*/
Expand Down Expand Up @@ -4055,7 +4060,6 @@ export interface VxeTableListeners<D = any> {
* 当表格被激活且键盘被按下开始时会触发的事件
*/
keydownStart?: VxeTableEvents.KeydownStart<D>
keydownStart?: VxeTableEvents.KeydownStart<D>
/**
* 当表格被激活且键盘被按下时会触发的事件
*/
Expand Down
2 changes: 1 addition & 1 deletion types/components/tree-select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export interface TreeSelectReactData {
panelPlacement: any
triggerFocusPanel: boolean
visiblePanel: boolean
visibleAnimate: boolean
isAniVisible: boolean
isActivated: boolean
}

Expand Down

0 comments on commit 8955819

Please sign in to comment.