import langTagDialog from "@base/views/user/lang_tag/dialog.vue";

let modules = {};
modules = {
  name: "langTagView",
  components: {langTagDialog},
  props: {
    value: {
      type: Array,
      default: () => []
    },
    readonly: {
      type: Boolean,
    }
  },
  created() {
  },
  mounted() {
  },
  data() {
    return {
      showLangTagDialog: false,
      checkRows: []
    }
  },
  methods: {
    openLangTagDialog() {
      this.checkRows = this.value ? this.value.map(item => {
        return {
          tagCode: item.tagCode,
          tagName: item.tagName,
        }
      }) : []
      this.showLangTagDialog = true;
    },
    confirmLangTagDialog(rows) {
      let value = rows.map(item => {
        return {
          tagCode: item.tagCode,
          tagName: item.tagName
        }
      })
      this.$emit("input", value)
    },
  }
}
export default modules
