dockSelect.vue 609 Bytes
Newer Older
huhaiqing's avatar
huhaiqing committed
1 2 3 4 5 6 7 8 9 10 11 12
<template>
  <el-select filterable :value="value" @change="change" v-bind="$attrs">
    <el-option v-for="dock in getDock" :key="dock.id" :label="dock.titleZh" :value="dock.id"></el-option>
  </el-select>
</template>

<script>
/**
 * 码头
 */
export default {
  name: "dockSelect",
huhaiqing's avatar
huhaiqing committed
13
  inheritAttrs: false,
huhaiqing's avatar
huhaiqing committed
14 15
  props: {
    value: Number,
huhaiqing's avatar
huhaiqing committed
16
    allDocks: Array,
huhaiqing's avatar
huhaiqing committed
17 18 19 20 21 22
  },
  model: {
    prop: "value",
    event: "change",
  },
  data() {
huhaiqing's avatar
huhaiqing committed
23
    return {};
huhaiqing's avatar
huhaiqing committed
24 25 26
  },
  computed: {
    getDock() {
huhaiqing's avatar
huhaiqing committed
27
      return this.allDocks;
huhaiqing's avatar
huhaiqing committed
28 29 30 31 32 33 34 35 36
    },
  },
  methods: {
    change(val) {
      this.$emit("change", val);
    },
  },
};
</script>