Config.vue 2.1 KB
Newer Older
1
<template>
2
  <div class="visual-dl-page-config-com">
3

4 5 6 7 8 9
    <v-text-field
      label="Search"
      hint="Search by label"
      v-model="config.searchText"
      dark
    />
10 11


12 13 14 15 16
    <v-checkbox
      class="visual-dl-page-config-checkbox"
      label="Display All Labels"
      v-model="config.displayWordLabel"
      dark/>
17

18 19 20 21 22 23 24 25 26 27 28
    <v-radio-group
      label="Dimension"
      v-model="config.dimension"
      dark>
      <v-radio
        label="2D"
        value="2"/>
      <v-radio
        label="3D"
        value="3"/>
    </v-radio-group>
29

30 31 32 33 34 35 36
    <v-radio-group
      label="Reduction Method"
      v-model="config.reduction"
      dark>
      <v-radio
        label="PCA"
        value="pca"/>
J
Jeff Wang 已提交
37 38 39 40
      <v-radio
        label="T-SNE"
        value="tsne"/>

41
    </v-radio-group>
42

J
Jeff Wang 已提交
43 44 45 46 47 48 49 50 51 52 53
    <v-radio-group
      label="Run"
      v-model="config.selectedRun"
      dark>
      <v-radio
        v-for="item in runsItems"
        :key="item.name"
        :label="item.name"
        :value="item.value" />
    </v-radio-group>

54 55 56 57 58 59 60 61 62 63 64
    <v-btn
      :color="config.running ? 'primary' : 'error'"
      v-model="config.running"
      @click="toggleAllRuns"
      class="visual-dl-page-run-toggle"
      dark
      block
    >
      {{ config.running ? 'Running' : 'Stopped' }}
    </v-btn>
  </div>
65 66 67 68
</template>
<script>

export default {
J
Jeff Wang 已提交
69
  props: {
J
Jeff Wang 已提交
70 71 72 73
    runsItems: {
      type: Array,
      required: true,
    },
J
Jeff Wang 已提交
74 75 76 77
    config: {
      type: Object,
      required: true,
    },
J
Jeff Wang 已提交
78 79 80 81 82 83 84 85
  },
  data() {
    return {
    };
  },
  methods: {
    toggleAllRuns() {
      this.config.running = !this.config.running;
86
    },
J
Jeff Wang 已提交
87
  },
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
};

</script>
<style lang="stylus">
+prefix-classes('visual-dl-page-')
    .config-com
        padding 20px
        .slider-block
            display flex
            align-items center
        .smoothing-slider
            display inline
        .slider-span
            width 40px
        .run-toggle
            margin-top 20px
        .config-selector
            margin-top 12px
            margin-bottom 20px
        .checkbox-group-label
            display flex
            margin-top 20px
            margin-bottom 10px

</style>