File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed
Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 11<template >
2- <div >
3- <div >
4- <h3 >Dynamically update code:</h3 >
5- <textarea v-model =" dynamicCode" ></textarea >
6- <code-highlight >
7- {{dynamicCode}}
8- </code-highlight >
9- </div >
10-
11- <hr />
12-
132 <code-highlight >
143 let isPalindrome = (word) => {
154 let [length, result] = [word.length, true];
2211
2312 module.exports = isPalindrome;
2413 </code-highlight >
25- </div >
2614</template >
2715
2816<script >
@@ -36,7 +24,7 @@ export default {
3624 },
3725 data () {
3826 return {
39- dynamicCode: ' <div>Type here to see me change below</div>'
27+ dynamicCode: ' <div>Type here to see me change below</div>' ,
4028 };
4129 },
4230};
@@ -50,10 +38,6 @@ body {
5038 justify-content : center ;
5139 align-items : center ;
5240}
53- textarea {
54- width :400px ;
55- height :200px ;
56- }
57- @import ' ../themes/duotone-sea.css' ;
58- @import ' ../themes/window.css' ;
41+ @import " ../themes/duotone-sea.css" ;
42+ @import " ../themes/window.css" ;
5943 </style >
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ export default {
2424 Prism .highlightAllUnder (this .$refs .codeBlock );
2525 },
2626
27- beforeUpdate () {
28- const newText = this .$slots .default [0 ].text .replace (/ ^ [\r\n\s ] * | [\r\n\s ] * $ / g , " " );
27+ beforeUpdate () {
28+ const newText = this .$slots .default [0 ].text .replace (/ ^ [\r\n\s ] * | [\r\n\s ] * $ / g , ' ' );
2929 this .$el .querySelector (' code' ).textContent = newText;
3030 Prism .highlightAllUnder (this .$refs .codeBlock );
31- }
31+ },
3232};
3333 </script >
You can’t perform that action at this time.
0 commit comments