-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在v2中使用slot-scope可以获取到值 在v3使用#default获取不到值 #61
Comments
|
我在您的评论的issues里 下载了^3.0.0-alpha.2 这个版本 |
import * as Tinder from "vue-tinder"; |
可能因为我这不是 ts 的原因😂 |
|
` <script setup> import { defineComponent, ref, getCurrentInstance } from "vue"; import * as Tinder from "vue-tinder"; import source from "../bind"; defineComponent({ components: { Tinder, }, }); const queue = ref([]); const offset = ref(0); const history = ref([]); const mock = (count = 5, append = true) => { const list = []; for (let i = 0; i < count; i++) { list.push({ id: source[offset.value] }); offset.value++; } if (append) { queue.value = queue.value.concat(list); } else { queue.value.unshift(...list); } }; const onSubmit = ({ item }) => { if (queue.value.length < 3) { mock(); } history.value.push(item); }; mock(); </script>` 我这是按照您的例子写v3 一个简单的demo 但是没办法正常展现效果 |
方便的话在 https://codesandbox.io/ 上复现下 |
感觉这 setup 表现不正常,用普通的 <script> 是可以的 |
不使用v3的语法糖 引入是正常了 但是设置样式又消失了 |
https://codesandbox.io/s/smoosh-sun-evdv0j?file=/src/App.vue 如果您有空的话 请帮忙看一下沙盒代码 |
V3 你还要引入样式: |
Hello I have the same problem, if you can make it work with composition api please help. |
It's support Composition API,But not "<script setup>", |
Got it, So I need to do options api for this. I need to refactor my code. |
No description provided.
The text was updated successfully, but these errors were encountered: