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)
- In development mode, there may be an issue where shapeFlag cannot be read HOT 2
- Unable to clear html elements from dom nodes. HOT 5
- 3.3+ defineEmits syntax does not support TS enums HOT 1
- Using v-bind to bind the background url property in css does not work HOT 2
- defineCustomElement - no way to provide props declaration
- v-model.number not casting string to number HOT 6
- V-model casts wrong type HOT 2
- Maximum recursive updates exceeded in component in 3.4.27 HOT 9
- Unresolvable type reference or unsupported built-in utility type 以及热更新失败 HOT 1
- defineModel is triggering update event, even if its value didn't actually change HOT 4
- Failed to add a reactive to the instance object HOT 5
- Invalid prop: type check failed, Expected Object when using keyof on type intersection
- 属性穿透失败 HOT 7
- A value is not reactive when it is created by `toRef` with an plain object. HOT 3
- defineAsyncComponent意外报错 HOT 3
- significant increase in size of `@vue/server-renderer`
- defineModel push array doesnt trigger the value HOT 5
- KeepAlive: `activated`/`deactivated` hooks not always run for descendants HOT 2
- Regarding the use of ref HOT 2
- A breakpoint ("debugger") inside a computed causes to "Maximum call stack size exceeded" error HOT 1
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.