<template>
  <div class="JNPFInput">
    <div class="JNPFInput-input">
      <el-input style="width: 99% !important" v-model="innerValue" v-bind="$attrs" v-on="$listeners" @change="getChange"></el-input>
    </div>
    <div v-if="$attrs.isScan" class="JNPFInput-scan">
      <svg data-v-217a6391="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(24,144,255,1)">
        <path data-v-217a6391="" d="M15 3H21V8H19V5H15V3ZM9 3V5H5V8H3V3H9ZM15 21V19H19V16H21V21H15ZM9 21H3V16H5V19H9V21ZM3 11H21V13H3V11Z"></path>
      </svg>
    </div>
  </div>
</template>
<script>
import { dyOptionsList } from '@/components/Generator/generator/comConfig'
import { dictDetail } from '@/api/newbi/dict'
import { getAPIData } from '@/components/Dataset-filter/util'

export default {
  model: {
    prop: 'value',
    event: 'change'
  },
  props: ['value'],
  name: 'NewInput',
  data() {
    return {
      innerValue: this.value
    }
  },
  computed: {},
  watch: {
    value(val) {
      this.innerValue = val
    }
  },
  mounted() {},
  methods: {
    getChange(val) {
      console.log(this.$attrs)
      if (this.$attrs.propsUrl) {
        this.$emit('change', val)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.JNPFInput {
  display: flex;

  &-input {
    flex: 1;
    width: 100%;
  }

  &-scan {
    height: 30px;
    width: 30px;
    margin-top: 3px;
  }
}
</style>
