Skip to content

BasicForm自定义组件,如何触发子组件事件。 #2169

Answered by RSS1102
RSS1102 asked this question in Q&A
Discussion options

You must be logged in to vote
componentProps: ({ formModel, formActionType }) => {
      return {
        api: uploadUrl,
        //获取触发onChange事件,取得值(value)
        onChange: (value, options) => {
          nextTick(() => {
            if (value.file.response?.code === 0) {
        // 通过formModel更新本表单对应字段
              formModel.banner = value.file.response?.data;
            }
          });
        },
        getPopupContainer: () => document.body,
      };
    },

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RSS1102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant