<template>
  <div>
    <a-form-model-item label="反向设值域">
      <a-input v-model="component.attrFD.formItemProps.inputProps.reverseField"></a-input>
    </a-form-model-item>
    <a-form-model-item label="字符长度范围">
      <sd-range-input
        :max.sync="component.attr.maxLength"
        :min.sync="component.attr.minLength"
        disable-negative
        :max-max="2000"
      />
    </a-form-model-item>
  </div>
</template>

<script>
import { Input, Button } from 'ant-design-vue'
import sdRangeInput from '@/form-designer/sd-range-input'
import components from './_import-components/xm-reverse-import'
export const metaInfo = {
  caption: '反向设值',
  component: {
    props: ['designerData'],
    render() {
      return (
        <Div class='xmselinput'>
          <Input></Input>
          <Button>反向</Button>
        </Div>
      )
    },
  },
  icon: 'sd-list',
  order: 990,
}
export const fieldProps = {
  dataType: 'string',
  attrFD: {
    formItemProps: {
      inputProps: {
        reverseField: '',
      },
    },
  },
}
export default {
  name: 'XmReverse',
  components: { sdRangeInput, ...components },
  data() {
    return {}
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
:global(.xmselinput) {
  :global .ant-input {
    width: 60%;
    margin-right: 5px;
  }
  :global .ant-btn {
    padding: 0 5px;
  }
}
</style>
