feat(Forms): add transition to card-header-action btn-close

This commit is contained in:
xidedix
2018-05-23 18:44:02 +02:00
parent 81839ee3f6
commit 11aebe2189
2 changed files with 96 additions and 79 deletions
+4 -1
View File
@@ -1,7 +1,7 @@
## [vue](./README.md) version `changelog` ## [vue](./README.md) version `changelog`
##### `v2.0.0-alpha.0` ##### `v2.0.0-alpha.0`
- refactor: separation of concerns - (CoreUI template vs CoreUI components) prepare to use CoreUI as dependency - refactor: separation of concerns - (CoreUI template/components) for use CoreUI as npm module
- refactor: project structure change - refactor: project structure change
- refactor: moved to [vuejs-templates](http://vuejs-templates.github.io/webpack/) - refactor: moved to [vuejs-templates](http://vuejs-templates.github.io/webpack/)
- chore: moved to [Semantic Versioning](https://semver.org/) - chore: moved to [Semantic Versioning](https://semver.org/)
@@ -9,6 +9,9 @@
- refactor: rename containers - refactor: rename containers
- refactor(Colors): view layout, sub-components - refactor(Colors): view layout, sub-components
- refactor(Switches): move to `Switch component v2` - refactor(Switches): move to `Switch component v2`
- refactor(Cards): add transition to card-header-action `btn-close`
- refactor(Cards): add collapse to card-header-action `btn-minimize`
- refactor(Forms): add transition to card-header-action `btn-close`
other: other:
+18 -4
View File
@@ -555,7 +555,8 @@
<strong>Validation feedback</strong> Form <strong>Validation feedback</strong> Form
</div> </div>
<b-card-body> <b-card-body>
<b-form-group> <b-form>
<b-form-group validated>
<label class="col-form-label" for="inputIsValid">Input is valid</label> <label class="col-form-label" for="inputIsValid">Input is valid</label>
<input type="text" class="form-control is-valid" id="inputIsValid"> <input type="text" class="form-control is-valid" id="inputIsValid">
<b-form-valid-feedback> <b-form-valid-feedback>
@@ -569,6 +570,7 @@
Please provide a valid information. Please provide a valid information.
</b-form-invalid-feedback> </b-form-invalid-feedback>
</b-form-group> </b-form-group>
</b-form>
</b-card-body> </b-card-body>
</b-card> </b-card>
</b-col> </b-col>
@@ -948,7 +950,8 @@
</b-row> </b-row>
<b-row> <b-row>
<b-col lg="12"> <b-col lg="12">
<b-card no-body> <transition name="fade">
<b-card no-body v-if="show">
<div slot="header"> <div slot="header">
<i class="fa fa-edit"></i> Form Elements <i class="fa fa-edit"></i> Form Elements
<div class="card-header-actions"> <div class="card-header-actions">
@@ -958,7 +961,7 @@
<b-link class="card-header-action btn-minimize" v-b-toggle.collapse1> <b-link class="card-header-action btn-minimize" v-b-toggle.collapse1>
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</b-link> </b-link>
<b-link href="#" class="card-header-action btn-close"> <b-link href="#" class="card-header-action btn-close" v-on:click="show = !show">
<i class="icon-close"></i> <i class="icon-close"></i>
</b-link> </b-link>
</div> </div>
@@ -1012,6 +1015,7 @@
</b-card-body> </b-card-body>
</b-collapse> </b-collapse>
</b-card> </b-card>
</transition>
</b-col> </b-col>
</b-row> </b-row>
</div> </div>
@@ -1022,7 +1026,8 @@ export default {
name: 'forms', name: 'forms',
data () { data () {
return { return {
selected: [] // Must be an array reference! selected: [], // Must be an array reference!
show: true
} }
}, },
methods: { methods: {
@@ -1032,3 +1037,12 @@ export default {
} }
} }
</script> </script>
<style scoped>
.fade-enter-active, .fade-leave-active {
transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
</style>