Comments (2)
The problem seems to be related to the function syntax used.
A workaround to the issue is to define your default function that way default: () => { return ''; }
from core.
When I comment out the data
function, it works
const Comp = defineComponent({
// data() {
// this.$props.propTwo
// return {
// dataOne1: 'Hello World From Data',
// }
// },
props: {
propOne: String,
propTwo: {
default() {
return 'foo'
},
},
},
})
new Comp().$props.propOne
Or when my data
function is written after props
, it will also work.
const Comp = defineComponent({
props: {
propOne: String,
propTwo: {
default() {
return 'foo'
}
}
},
data() {
this.$props.propTwo
return {
dataOne1: 'Hello World From Data'
}
}
})
new Comp().$props.propOne
from core.
Related Issues (20)
- provide & inject is not work in one of defineComponent signature `DefineSetupFnComponent ` HOT 1
- [@vue/compiler-sfc] Failed to resolve index type into finite keys HOT 4
- [vite] Internal server error: Maximum call stack size exceeded HOT 3
- Teleport 怎么样动态插入到定义的to的类里面 HOT 2
- Build error on Windows
- Scoped slot problem - 作用域插槽问题 HOT 5
- cannot set parent VNode using createVNode api HOT 3
- Setup script generic type problem HOT 4
- KeepAlive 缓存中组件在卸载时没有自动清理 'effect' (Components in KeepAlive cache did not automatically clear 'effect' during uninstallation) HOT 3
- cannot call Set#intersection for set with Proxy HOT 4
- throw TypeError when using Teleport HOT 7
- 3.4.32 v-html prints undefined
- <Teleport> content not be removed on onDeactivated & not re-insert on onActivated HOT 2
- `defineModel` does not trigger update for nested values HOT 4
- The dead loop of Vue SFC Playground HOT 2
- v-for中的ref问题 HOT 2
- The Chinese official website of vue3 is having problems opening in some areas HOT 1
- When the number of unresolved async component caches exceeds `max` set to KeepAlive, nothing is rendered HOT 4
- v-model value is not updated correctly, when changing the value multiple times in the child component HOT 2
- Vue crashes when function name is similar to imported component HOT 2
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 core.