I am writing html using vue.js for studying.
I'm trying to run Shuffle.js after taking data with vue.js, but it doesn't work.
Shuffle.js The current version didn't work, so use the old version We are
In vue.js, it takes the value, but
To run Shuffle.js,
HTML second line
<li groups = '["other", "all"]'>
I want you to get the value like this,
<li groups = "[" other "," all "]">
I got the data by double quotes
Shuffle.js does not work well.
Change the notation of mein.js
<li groups = "['othe', 'all']">
Shuffle.js did not work.
(Same code when writing solid)
"['othe', 'all']" NG
'["other", "all"]' OK
Is it possible to get as above?
For newbies
vue.js
Shuffle.js
I tried to read the file and change it to single coat,
It was difficult to understand and change.
Thanks for your professor.
Applicable source code
<li v-bind: groups = "list.group">
<p>{{list.title}}</p>
<P>{{list.main}}</p>
<p>{{list.date}}</p>
</li>
<script src = "https://cdn.jsdelivr.net/npm/vue"></script>
<script src = "js/main.js"></script>
new Vue ({
el: '#list',
data: {
datalists: [
{
"group": '["other", "all"]',
imgStatic: ("../static/XXX.jpg"),
"title": "title",
"main": "Main",
"date": "date"
},
{
"group": '["other", "all"]',
imgStatic: ("../static/XXX.jpg"),
"title": "title",
"main": "Main",
"date": "date"
},
],
}
});
-
Answer # 1
-
Answer # 2
I got the data with double quotesWhat was the reason for that?
It looks like it's moving normally ...{{list.title}}
{{list.main}}
{{list.date}}
In order to run another JS process, I want to get it in the form of '["other", "all"]'
We heard from you, but you are drunk with "[" other "," all "]".
For example, I will receive it in another js{{list.title}}
{{list.main}}
{{list.date}}
It seems to have been escaped when received in the array, but this is
Development tool display issues
If you take an element, you can determine that the specified one has been inserted
Related articles
- vuejs - i want to implement virtual scrolling using v-virtual-scroller
- javascript - i want to display pdf from url using react-pdf
- javascript - i want to change the process using check in jquery
- javascript - switching image display vuejs
- javascript - addition using ++ is not reflected in js
- javascript - i want to reflect the code written in js on cloud9 to the console of chome's developer tool
- javascript - i want to dynamically rename a variable when using a for statement
- how to switch template using component in vuejs
- javascript - get json data of external api using useeffect of react hooks
- javascript - i want to insert the start tag and end tag of html tags individually using jquery
- javascript - i want to make a copy using a script in a spreadsheet
- javascript - i want to download a file in sjis format using js (jquery)
- javascript - added properties to vuejs associative array
- javascript - the data in the vuejs component is not updated
- javascript - is there a vuejs selector?
- typescript - i want to dynamically change the font size using vuejs
- javascript - i want to control the playback of the video tag in the vuejs component with the mouse wheel
- javascript - can you create a homepage using rails?
- javascript - vuejs backend
- javascript - i want to rewrite the inside of an element using the append method in jquery
- javascript : How to implement an additional block for table rows?
- javascript : Swiper js dynamic pagination
- javascript : Please tell me how to implement this?
- javascript : How to make it wider when clicking on an input, when clicked outside of it becomes small back
- javascript : Why does the main page open instead of opening a modular window
- javascript : Changing the execution delay in a loop
- javascript : Loading an image depending on the width of the screen
- javascript : How to bind a video to a button?
- javascript : How to make an exit block when pressed
- javascript : How to make datalist open only after entering 3 characters
In the first place, Vus.js and JavaScript that directly rewrites the DOM outside the framework of Vue.js are usuallyincompatible.
I think it's appropriate to try something like https://git.hrzg.de/dmstr/vue-shufflejs-plugin or give up either Vue.js or Shuffle.js The