composition-api
composition-api copied to clipboard
Composition API plugin for Vue 2
I use a wrapper components, which contains a `` element to allow another component rendered inside. Once the slots element was shown after the setup process, I found the content...
Non-existing properties can't be reported as such in the \. Writing a variable that isn't returned by our setup function should trigger an error "Property 'xxx' does not exist..." See...
"Failed to mount component: template or render function not defined." with render inside async setup
## OK-case When i have sync `setup` - all is OK ```jsx import { h } from '@vue/composition-api'; export default { name: 'MyComponent', setup() { return () => h('div', [1234]);...
I learned in this [issuse](https://github.com/vuejs/core/issues/1866) that Mixins for `setup` method is not supported in Vue3, but is supported by default in composition-api to make it work. This may cause an...
It seems like `toRaw()` on a reactive object doesn't expose the original properties like it does in Vue 3: - [Vue 3 example](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHJlZiwgcmVhY3RpdmUsIHRvUmF3LCBpc1JlZiwgaXNSZWFjdGl2ZSB9IGZyb20gJ3Z1ZSdcbiAgXG4gIGNvbnN0IHN0b3JlID0gcmVhY3RpdmUoeyByOiByZWYoMCkgfSlcbiAgXG5cbmNvbnN0IGlzUmVmVmFsID0gaXNSZWYodG9SYXcoc3RvcmUpLnIpXG5jb25zdCBpc1JlYWN0aXZlVmFsID0gaXNSZWFjdGl2ZSh0b1JhdyhzdG9yZSkucilcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxwPlxuICAgIGlzUmVmOiB7eyBpc1JlZlZhbCB9fVxuICAgIGlzUmVhY3RpdmU6IHt7IGlzUmVhY3RpdmVWYWwgfX1cbiAgPC9wPlxuPC90ZW1wbGF0ZT4iLCJpbXBvcnQtbWFwLmpzb24iOiJ7XG4gIFwiaW1wb3J0c1wiOiB7XG4gICAgXCJ2dWVcIjogXCJodHRwczovL3NmYy52dWVqcy5vcmcvdnVlLnJ1bnRpbWUuZXNtLWJyb3dzZXIuanNcIlxuICB9XG59In0=): isRef: true isReactive: false - [Vue 2...
**🐛 The bug** render function works with 2 params h(type, data) or h(type, children), but doesn't work with 3 params: h('div', {}, children) **🛠️ To reproduce** Steps to reproduce the...
```javascript setup(){ const a = reactive({}) // set(a, 'testValue', 1) // worked setTimeout(() => { set(a, 'testValue', 2) // not worked }) return { ...toRefs(a) } } ```
Create projects with Vuecli5 ,When writing a jsx function in setup, h = this.$createElement will be automatically injected, but there is no this in setup, and h has been injected...
复现代码: ```js const count = ref(0) watchEffect((onCleanup) => { const value = unref(count) console.log(value) onCleanup(() => { console.log('clean', value) }) }, {flush: 'sync'}) count.value++ // 期望 onCleanup 被同步执行 ``` 行为和...
Vue version is V2.6.14 @vue/composition-api: 1.7.1 https://codesandbox.io/p/github/yang49519845/vue2-composition-api/draft/romantic-darwin?file=%2Fsrc%2FApp.vue&selection=%5B%7B%22endColumn%22%3A13%2C%22endLineNumber%22%3A19%2C%22startColumn%22%3A13%2C%22startLineNumber%22%3A19%7D%5D In local development, everything is normal. When this component is encapsulated into a global component, the value will not be automatically expanded into...