当前位置:网站首页>Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
2022-07-04 01:37:00 【hamimelon2020】
<template>
<div>
<div id="v-model-example" class="demo">
<p>First name: {
{
firstName }}</p>
<p>Last name: {
{
lastName }}</p>
<user-name
v-model:first-name="firstName"
v-model:last-name="lastName"
></user-name>
</div>
</div>
</template>
<script>
export default {
name: 'item',
props: {
firstName: String,
lastName: String
},
template: ` <input type="text" :value="firstName" @input="$emit('update:firstName', $event.target.value)"> <input type="text" :value="lastName" @input="$emit('update:lastName', $event.target.value)"> `
};
const HelloVueApp = {
components: {
UserName,
},
data() {
return {
firstName: 'John',
lastName: 'Doe',
};
},
};
}
</script>
Missing a double quote
<!DOCTYPE html>
<div id="v-model-example" class="demo">
<p>First name: {
{
firstName }}</p>
<p>Last name: {
{
lastName }}</p>
<user-name
v-model:first-name="firstName"
v-model:last-name="lastName">
</user-name>
</div>
<script src="https://unpkg.com/[email protected]"></script>
<script>
const app = Vue.createApp({
});
const UserName = {
props: {
firstName: String,
lastName: String
},
emits: ['update:firstName', 'update:lastName'],
template: ` <input type="text" :value="firstName" @input="$emit('update:firstName', $event.target.value)"> </br> <input type="text" :value="lastName" @input="$emit('update:lastName', $event.target.value)"> `
}
const HelloVueApp = {
components: {
UserName,
},
data() {
return {
firstName: 'John',
lastName: 'Doe',
};
},
}
Vue.createApp(HelloVueApp).mount('#v-model-example')
</script>
边栏推荐
- About uintptr_ T and IntPtr_ T type
- Design of database table foreign key
- 【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
- 机器学习基础:用 Lasso 做特征选择
- Msp32c3 board connection MSSQL method
- How programmers find girlfriends through blind dates
- Fundamentals of machine learning: feature selection with lasso
- 在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
- Conditional statements of shell programming
- Long article review: entropy, free energy, symmetry and dynamics in the brain
猜你喜欢

长文综述:大脑中的熵、自由能、对称性和动力学

Introduction to unity shader essentials reading notes Chapter III unity shader Foundation

Technical practice online fault analysis and solutions (Part 1)

Huawei cloud micro certification Huawei cloud computing service practice has been stable

be based on. NETCORE development blog project starblog - (14) realize theme switching function

Print diamond pattern

0 basic learning C language - nixie tube dynamic scanning display

Lightweight Pyramid Networks for Image Deraining

Solution of cursor thickening

Who moved my code!
随机推荐
机器学习基础:用 Lasso 做特征选择
Should enterprises start building progressive web applications?
In the process of seeking human intelligent AI, meta bet on self supervised learning
Solution to the problem that jsp language cannot be recognized in idea
Functions and arrays of shell scripts
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
C import Xls data method summary IV (upload file de duplication and database data De duplication)
Future source code view -juc series
Difference between value and placeholder
Sequence sorting of basic exercises of test questions
Which insurance products can the elderly buy?
Pyrethroid pesticide intermediates - market status and future development trend
求esp32C3板子连接mssql方法
Characteristics of ginger
Function: write function fun to find s=1^k+2^k +3^k ++ The value of n^k, (the cumulative sum of the K power of 1 to the K power of n).
Hbuilder link Xiaoyao simulator
技术实践|线上故障分析及解决方法(上)
Openbionics robot project introduction | bciduino community finishing
C import Xls data method summary V (complete code)