king
2021-07-23 c7414c3cc93649479119d51b230c4b8e36884ca7
src/components/editor/index.jsx
@@ -23,8 +23,8 @@
class NormalEditor extends Component {
  static propTpyes = {
    Item: PropTypes.object,     // 表单元素
    onChange: PropTypes.func,   // 表单更新
    config: PropTypes.object,
    onChange: PropTypes.func
  }
  state = {
@@ -33,16 +33,17 @@
  }
  UNSAFE_componentWillMount () {
    const { config, defaultValue } = this.props
    let initVal = null
    let encryption = 'false'
    if (this.props['data-__meta']) {
      initVal = this.props['data-__meta'].initialValue || null
    } else if (this.props.defaultValue) {
      initVal = this.props.defaultValue || null
    if (config && config.initval) {
      initVal = config.initval
    } else if (defaultValue) {
      initVal = defaultValue
    }
    if (this.props.Item && this.props.Item.encryption === 'true') {
    if (config && config.encryption === 'true') {
      encryption = 'true'
      if (initVal) {
        try {