Browse Source

Delete BaseTextArea component

pull/341/head
Hironsan 5 years ago
parent
commit
ebffa66770
3 changed files with 15 additions and 33 deletions
  1. 18
      frontend/components/containers/TextClassification.vue
  2. 10
      frontend/components/molecules/BaseTextArea.vue
  3. 20
      frontend/pages/demo/sentiment-analysis/index.vue

18
frontend/components/containers/TextClassification.vue

@ -1,6 +1,6 @@
<template>
<base-text-area>
<template #title>
<v-card>
<v-card-title>
<multi-class-classification
v-if="currentDoc"
:labels="items"
@ -8,23 +8,19 @@
:add-label="addLabel"
:delete-label="removeLabel"
/>
</template>
<template #content>
<div v-if="currentDoc" class="title">
{{ currentDoc.text }}<!-- {{currentDoc}}-->
</div>
</template>
</base-text-area>
</v-card-title>
<v-card-text v-if="currentDoc" class="title">
{{ currentDoc.text }}
</v-card-text>
</v-card>
</template>
<script>
import { mapActions, mapGetters, mapState } from 'vuex'
import BaseTextArea from '@/components/molecules/BaseTextArea'
import MultiClassClassification from '@/components/organisms/MultiClassClassification'
export default {
components: {
BaseTextArea,
MultiClassClassification
},

10
frontend/components/molecules/BaseTextArea.vue

@ -1,10 +0,0 @@
<template>
<v-card>
<v-card-title>
<slot name="title" />
</v-card-title>
<v-card-text>
<slot name="content" />
</v-card-text>
</v-card>
</template>

20
frontend/pages/demo/sentiment-analysis/index.vue

@ -3,21 +3,19 @@
<v-container fluid>
<v-row justify="center">
<v-col cols="12" md="9">
<base-text-area>
<template #title>
<v-card>
<v-card-title>
<multi-class-classification
:labels="items"
:annotations="currentDoc.annotations"
:add-label="addLabel"
:delete-label="removeLabel"
/>
</template>
<template #content>
<div class="title">
{{ currentDoc.text }}
</div>
</template>
</base-text-area>
</v-card-title>
<v-card-text class="title">
{{ currentDoc.text }}
</v-card-text>
</v-card>
</v-col>
<v-col cols="12" md="3">
<metadata-box :metadata="JSON.parse(currentDoc.meta)" />
@ -29,7 +27,6 @@
<script>
import MultiClassClassification from '~/components/organisms/MultiClassClassification'
import BaseTextArea from '@/components/molecules/BaseTextArea'
import MetadataBox from '@/components/organisms/MetadataBox'
export default {
@ -37,8 +34,7 @@ export default {
components: {
MultiClassClassification,
MetadataBox,
BaseTextArea
MetadataBox
},
data() {

Loading…
Cancel
Save