UNPKG

vue2-el-bpmn

Version:

Vue2+ElementUI+BPMN2.0整合(基于Bpmn Process Designer)

39 lines (34 loc) 768 B
/** * 文本框组件,继承Base * @module $ui/components/my-switch */ import {Switch} from 'element-ui' import Base from '../Base' export default { name: 'MySwitch', mixins: [Base], components: { ElSwitch: Switch }, props: { value: [Boolean, String, Number] }, methods: { getDefaultValue() { return false } }, render() { const vnode = ( <ElSwitch ref="comp" class="my-switch" {...{props: this.innerProps, on: this.$listeners, attrs: this.innerProps}} vModel={this.fieldValue}> </ElSwitch> ) return this.renderComponent(vnode) }, mounted() { this.extendMethods(this.$refs.comp, ['focus']) } }