forked from luocaodan/teach
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug: mistake link in project panel, close #84
- Loading branch information
Jiyuan-Yang
committed
May 15, 2020
1 parent
8d81842
commit 2cf3a9a
Showing
6 changed files
with
93 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 46 additions & 46 deletions
92
app/javascript/src/auto_tests/components/new_pair_projects_batch_form.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
<template> | ||
<div class="text-content"> | ||
<p v-if="!need_unfold"> | ||
{{text}} | ||
</p> | ||
<template v-if="need_unfold"> | ||
<template v-if="fold"> | ||
<p>{{text.slice(0, 40) + "..."}}</p> | ||
</template> | ||
<template v-else=""> | ||
<p>{{text}}</p> | ||
</template> | ||
<el-button type="text" @click="change_state">{{fold?'展开':'收起'}}</el-button> | ||
</template> | ||
</div> | ||
<div class="text-content"> | ||
<p v-if="!need_unfold"> | ||
{{text}} | ||
</p> | ||
<template v-if="need_unfold"> | ||
<template v-if="fold"> | ||
<p>{{text.slice(0, 40) + "..."}}</p> | ||
</template> | ||
<template v-else=""> | ||
<p>{{text}}</p> | ||
</template> | ||
<el-button type="text" @click="change_state">{{fold?'展开':'收起'}}</el-button> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Vue from 'vue/dist/vue.esm'; | ||
import ElementUI from 'element-ui'; | ||
import 'element-ui/lib/theme-chalk/index.css'; | ||
import Vue from 'vue/dist/vue.esm'; | ||
import ElementUI from 'element-ui'; | ||
import 'element-ui/lib/theme-chalk/index.css'; | ||
export default { | ||
export default { | ||
props: { | ||
text: { | ||
type: String, | ||
required: true | ||
} | ||
text: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
data() { | ||
return { | ||
need_unfold: false, | ||
fold: true | ||
} | ||
return { | ||
need_unfold: false, | ||
fold: true | ||
} | ||
}, | ||
mounted() { | ||
if (this.text.length > 40) { | ||
this.need_unfold = true; | ||
} | ||
if (this.text.length > 40) { | ||
this.need_unfold = true; | ||
} | ||
}, | ||
methods: { | ||
change_state() { | ||
this.fold = !this.fold; | ||
} | ||
change_state() { | ||
this.fold = !this.fold; | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters