Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复resolveComponent 传值 name为可空 #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function createEditRender (defaultProps?: { [key: string]: any }) {
const { name, attrs } = renderOpts
const cellValue = XEUtils.get(row, column.property)
return [
h(resolveComponent(name), {
h(resolveComponent(name!), {
...attrs,
...getCellEditFilterProps(renderOpts, params, cellValue, defaultProps),
...getEditOns(renderOpts, params)
Expand Down Expand Up @@ -306,7 +306,7 @@ function createFilterRender (defaultProps?: { [key: string]: any }) {
class: 'vxe-table--filter-element-wrapper'
}, column.filters.map((option, oIndex) => {
const optionValue = option.data
return h(resolveComponent(name), {
return h(resolveComponent(name!), {
key: oIndex,
...attrs,
...getCellEditFilterProps(renderOpts, params, optionValue, defaultProps),
Expand Down Expand Up @@ -372,7 +372,7 @@ function createFormItemRender (defaultProps?: { [key: string]: any }) {
const { attrs } = renderOpts
const itemValue = XEUtils.get(data, property)
return [
h(resolveComponent(name), {
h(resolveComponent(name!), {
...attrs,
...getItemProps(renderOpts, params, itemValue, defaultProps),
...getItemOns(renderOpts, params)
Expand Down Expand Up @@ -425,7 +425,7 @@ function createFormItemRadioAndCheckboxRender () {
}, {
default: () => {
return options.map((option, oIndex) => {
return h(resolveComponent(name) as ComponentOptions, {
return h(resolveComponent(name!) as ComponentOptions, {
key: oIndex,
label: option[valueProp],
disabled: option.disabled
Expand Down Expand Up @@ -691,7 +691,7 @@ export const VXETablePluginElement = {
class: 'vxe-table--filter-element-wrapper'
}, column.filters.map((option, oIndex) => {
const optionValue = option.data
return h(resolveComponent(name), {
return h(resolveComponent(name!), {
key: oIndex,
...attrs,
...getCellEditFilterProps(renderOpts, params, optionValue),
Expand Down Expand Up @@ -756,7 +756,7 @@ export const VXETablePluginElement = {
class: 'vxe-table--filter-element-wrapper'
}, column.filters.map((option, oIndex) => {
const optionValue = option.data
return h(resolveComponent(name), {
return h(resolveComponent(name!), {
key: oIndex,
...attrs,
...getCellEditFilterProps(renderOpts, params, optionValue),
Expand Down