Comments (4)
Yep. This is a small typo in the docs due to the nature of how the styles are added. The styles in the docs don't actually effect the demos. I have to maintain those as a separate stylesheet. As a result, I have to maintain the same styles in both places. I got it right in the stylesheet here, but not in the docs.
Vue transitions changed how they handle class naming a while back. To fix your issue, replace .slide-right-enter
with .slide-right-enter-from
.
Thanks for catching this. I want these demos to be easy, copy/paste options. I'll fix it right now.
from vuetensils.
Actually, there was also a problem introduced with Vue's transition changes that makes coordinating transitions kind of weird and makes your desired effect kind of weird. It works, but I want to find a better solution. Here's what will get you where you want to be
<template>
<VDrawer
bg-transition="slide-right"
:classes="{ bg: 'bg-black-alpha', content: 'bg-white' }"
>
<template #toggle="{ bind, on }">
<button v-bind="bind" v-on="on">
Toggle Drawer
</button>
</template>
My drawer content
</VDrawer>
</template>
<script>
import { VDrawer } from 'vuetensils/src/components';
export default {
name: "App",
components: {
VDrawer,
},
};
</script>
<style>
.vts-drawer__content {
padding: 20px;
color: #FFF;
background: #222;
}
.slide-right-enter-active,
.slide-right-leave-active {
transition: transform 0.5s ease;
}
.slide-right-enter-from,
.slide-right-leave-to {
transform: translateX(-100%);
}
</style>
from vuetensils.
Thank you for the fast answer, it seems to work!
I've updated the demo: https://codesandbox.io/s/crimson-lake-16dhk3?file=/src/App.vue
I just wonder how we can make it work with a fading black background in combination under the sliding panel, I'm not sure to understand it from the documentation.
It works for slideIn but not slideOut https://codesandbox.io/s/hungry-sinoussi-hd5bny?file=/src/App.vue
from vuetensils.
Yeah, that's exactly the issue I ran into when Vue changed how things worked. The example I have you slides the whole component in. To have a fading background, you'd have to only slide in the panel.
The component right now uses two transitions, one nested in the other. I think that may be the problem. If I switch it to one transition, it would make things possible with a slightly more complicated transition CSS, but definitely doable. But that would also introduce a breaking change :/
If you want to try cloning the component into your project and playing around with it to make it work then submitting a PR, I'd really appreciate it :)
from vuetensils.
Related Issues (20)
- Intersect question: how to observe many child elements in v-for loop HOT 3
- [feature] - add complementary role to VAlert HOT 7
- Feature request? tree component? HOT 2
- Error "export 'version' was not found in 'vue' HOT 6
- Feature: Focusout HOT 2
- Import errors in Vue2 with Vite HOT 7
- [Vue warn]: Error in render: "TypeError: errors.get is not a function" HOT 5
- [Feature Request] allow localization of the buttons of the datepicker HOT 5
- [Feature Request] i18n HOT 1
- [Feature Request] VDate: allow inline usage HOT 3
- vue 3 support ? HOT 2
- Website docs don't show any examples anymore HOT 5
- VAlert dismissible doesn't work with scoped css HOT 5
- Vuetensils: TypeError: Object(...) is not a function HOT 5
- Browser compatibility HOT 7
- [Feature Request] Support Vue 2.7 by upgrading vue-demi to ^0.13 HOT 6
- Failed to resolve entry for package "vuetensils" HOT 3
- Input still has error styling after changing error conditions HOT 9
- Enable class customisation for individual notifications HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetensils.