Skip to content

在声明的全局组件中封装tag、CheckBox标签,表单页面调用组件时用v-decorator校验不通过&&无法向后台传参 #770

@healkerzk

Description

@healkerzk

jDicSelectTag组件声明
import T from './JDictSelectTag.vue'

const JDictSelectTag = {
install: function(Vue) {
Vue.component('JDictSelectTag', T)
}
}

export default JDictSelectTag;

表单页面使用包含 的组件

<j-dict-select-tag component-type="checkbox" v-decorator="['tags', {rules: [{ required: true, message: '请选择标签!' }]}]">

JDictSelectTag.vue文件部分内容:

A B C D E

页面截图:
image

另:将组件直接写在表单页面并添加v-decorator="['tags', {rules: [{ required: true, message: '请选择标签!' }]}]"后可以正常使用

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions