<template>
  <div id="inputs">
    <el-form-item :label="label" v-bind="$attrs">
      <el-input v-bind="$attrs" v-on="$listeners" :value="value" @input="$emit('input', $event)" :placeholder="`请填写${label}`"></el-input>
    </el-form-item>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'inputs',
  props: {
    label: String,
    value: { type: String },
  },
  components: {},
  data: function() {
    return {};
  },
  created() {},
  methods: {
    toInput(data) {
      console.log(data);
      this.$emit('input', data);
    },
  },
  computed: {
    ...mapState(['user', 'menuParams']),
    pageTitle() {
      return `${this.$route.meta.title}`;
    },
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
};
</script>

<style lang="less" scoped></style>
