Skip to content

Commit

Permalink
fix(grid): 修复表格筛选面板样式错误问题,修复ResizeObserver,api在webpack本地环境报警告问题 (open…
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr authored Jul 7, 2023
1 parent d20f9f7 commit a0df193
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions packages/vue/src/grid/src/radio/src/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
* SOFTWARE.
*
*/
import { h, $prefix } from '@opentiny/vue-common'
import { h, $prefix, defineComponent } from '@opentiny/vue-common'
import { iconRadio, iconRadioselected } from '@opentiny/vue-icon'

export default {
export default defineComponent({
name: $prefix + 'GridRadio',
emits: ['update:modelValue', 'change'],
props: {
Expand Down Expand Up @@ -77,9 +78,12 @@ export default {
}
}
}),
h('span', { class: 'tiny-grid-radio__icon' }),
h('span', { class: 'tiny-grid-radio__icon' }, [
h(iconRadio(), { class: ['tiny-svg-size', 'icon-radio'] }),
h(iconRadioselected(), { class: ['tiny-svg-size', 'icon-radio-selected'] })
]),
$slots.default ? h('span', { class: 'tiny-grid-radio__label' }, $slots.default()) : null
]
)
}
}
})
6 changes: 3 additions & 3 deletions packages/vue/src/grid/src/resize/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
*
*/
import Resize from '@opentiny/vue-renderless/grid/plugins/resize'
import GlobalConfig from '../../config'
import debounce from '@opentiny/vue-renderless/common/deps/debounce'

export default {
bindResize() {
const resizeObserver = new Resize(() => {
const resizeObserver = new Resize(debounce(16, () => {
this.updateParentHeight()
this.updateTableBodyHeight()
this.recalculate()
}, GlobalConfig.resizeInterval)
}))

resizeObserver.observe(this.getParentElem())
this.$resize = resizeObserver
Expand Down

0 comments on commit a0df193

Please sign in to comment.