当前位置:网站首页>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>
边栏推荐
- QML add gradient animation during state transition
- 求esp32C3板子连接mssql方法
- AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
- Delete all elements with a value of Y. The values of array elements and y are entered by the main function through the keyboard.
- 2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
- CLP information - how does the digital transformation of credit business change from star to finger?
- Decompile and modify the non source exe or DLL with dnspy
- Development of user-defined navigation bar in uniapp
- Summary of JWT related knowledge
- The force deduction method summarizes the single elements in the 540 ordered array
猜你喜欢
Unity Shader入门精要读书笔记 第三章 Unity Shader基础
Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
A malware detection method for checking PLC system using satisfiability modulus theoretical model
中电资讯-信贷业务数字化转型如何从星空到指尖?
CLP information - how does the digital transformation of credit business change from star to finger?
Print diamond pattern
Huawei BFD and NQA
LeetCode226. Flip binary tree
0 basic learning C language - nixie tube dynamic scanning display
Introduction to superresolution
随机推荐
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
Is Shengang securities company as safe as other securities companies
Special copy UML notes
Remember a lazy query error
LeetCode226. Flip binary tree
7.1 learning content
Writeup (real questions and analysis of ciscn over the years) of the preliminary competition of national college students' information security competition
Msp32c3 board connection MSSQL method
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
Douban scoring applet Part-3
Flutter local database sqflite
Ka! Why does the seat belt suddenly fail to pull? After reading these pictures, I can't stop wearing them
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
How to view the computing power of GPU?
Maximum entropy model
机器学习基础:用 Lasso 做特征选择
Lightweight Pyramid Networks for Image Deraining
C library function int fprintf (file *stream, const char *format,...) Send formatted output to stream
Force deduction solution summary 1189- maximum number of "balloons"
0 basic learning C language - nixie tube dynamic scanning display