frontend/teacher/src/components/CourseSelect/index.vue

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<template>
  <div class='course-select'>
    <el-select v-model="Course"
               :loading="loading"
               placeholder="请选择课程"
               filterable
               clearable>
      <el-option v-for="item in items"
                 :key="item.id"
                 :value="item.id"
                 :label="item.courseName"></el-option>
      <div style="bottom: 0;width: 100%;background: #fff">
        <pagination v-show="totalCount>0"
                    :total="totalCount"
                    :page.sync="queryParam.pageIndex"
                    :limit.sync="queryParam.pageSize"
                    layout="prev, pager,next,total"
                    @pagination="search" />
      </div>
    </el-select>
  </div>
</template>

<script>
import courseApi from '@/api/course'
import Pagination from '@/components/Pagination'

export default {
  name: 'CourseSelect',
  components: { Pagination },
  props: {
    courseId: {
      type: Number,
      default: 0,
    },
    courseLabel: {
      type: String,
      default: '',
    },
  },
  watch: {
    courseLabel: {
      handler(val) {
        this.courseName = val
      },
      deep: true,
    },
  },
  computed: {
    Course: {
      get() {
        return this.courseName
      },
      set(val) {
        if (val) {
          var item = this.getItem(this.items, val)
          this.courseName = item.courseName
          this.$emit('update:courseId', item.id)
        } else {
          this.courseName = ''
后面还有 54 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。