one click to add requires an input, and can bind data. How to implement
one click to add requires an input, and can bind data. How to implement
vue
is not to generate elements dynamically, but to change the view by changing the data.
take a chestnut. At first, your data structure is that the medical history array under the disease is empty, the length of the medical history array is 1 after clicking, and then through the v-for
loop to find out how many input
you have.
<div v-for="item in items">
<input />
</div>
where items is the component list.
you can push a component to this.items every time you click
onClick() {
this.items.push(1)
}
Previous: Some of the problems of position changing lines?
Next: Mini Program reported an error in Can't find variable: result;at api request fail callback
css webpackconfig module: { preLoaders: [ {test: .(js|jsx)$ , loader: "eslint-loader", exclude: node_modules } ], loaders: [ { test: .(js|jsx)$ , exclude...
normal web pages such as a.html : <body> <div>< div> < body> when the height of the div is higher than the screen display, a scroll bar appears on the right side, and the body will be pushed open to the same height as the...
< H2 > question < H2 > css,js files are stored in Tencent Cloud s cos (object Cloud Storage), where font.css has a request to obtain fonts, icons and other files in the same directory. Some of the code is as follows. @font-face { font-family: So...
does vue-quill-editor have the function of adding attachments ...
none of the content in my project can be copied manually with the mouse none of the elements on my page can be copied manually with the mouse content like this cannot be copied manually ...
Mini Program can see the circle on the developer tool, but not on the preview on the phone! You can only see the coordinate points picture description ...
...
how do I customize a bottom control bar? The original style and location do not meet the requirements of the design. ...
the h5 page written in vue is embedded in app (android). Using the Upload upload component in the iview UI framework, you can activate the camera function and upload pictures on the browser, but you can t turn on the camera function in app. Excuse me, w...
...
getData(){ let customer_id = localStorage.getItem( customer_id ) let param = new URLSearchParams(); param.append( customer_id , customer_id); this.$http({ method: post , url: ...
in template <li v-for="item in items"> <p class="time"><span>{{ item.timer }}< span> <div class="main self"> <img class="...
developed a very simple activity page. In the developer tool of chrome, capture screenshot (is the green camera button in the screenshot under the network tab.) record the changes of each frame during the rendering of the page. observed a very strange...
<li style="background-image: url(.. .. assets images indexbg1.png);">< li> li{ width: 258px; height: 100px; background-size: 100%; } this code should be okay, right? But the picture (development environment) cannot be...