<template>
  <div class="snapUpActivityContainer">
    <Select v-model="activityInfoId">
        <Option v-for="item in list" :value="item.id" :key="item.id">{{ `id ${item.id} - ${item.title}` }}</Option>
    </Select>
    <!-- <Button type="primary" @click="save">保存</Button> -->
  </div>
</template>
<script>
import operationApi from '@api/operation.api';
export default {
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  watch: {
    activityInfoId(val) {
      this.$emit('input', val);  
    }
  },
  components: {
  },
  data() {
    return {
      list: [],
      activityInfoId: ''
    }
  },
  created() {
    this.activityInfoId = this.value;
    this.getActivityList();
    console.log(this.value)
  },
  methods: {
    async getActivityList() {
      const res = await operationApi.getActivityList({
        templateType: 11
      });
      this.list = res;
    }
  }
}
</script>
<style scoped lang="less">
</style>
