File tree Expand file tree Collapse file tree 6 files changed +26
-11
lines changed Expand file tree Collapse file tree 6 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 77 <VueLive :code =" codeTemplate" :layout =" CustomLayout" />
88 <h2 >Pure JavaScript code</h2 >
99 <VueLive :code =" codeJs" :layout =" CustomLayout" />
10- <h2 >and even a weird hybrid format</h2 >
10+ <h2 >With imported components</h2 >
11+ <VueLive :code =" `<date-picker />`" :layout =" CustomLayout" :components =" registeredComponents" />
1112 </main >
1213</template >
1314<script >
1415import VueLive from " ../src/VueLive" ;
1516import CustomLayout from " ./CustomLayout" ;
17+ import DatePicker from " vuejs-datepicker" ;
1618// eslint-disable-next-line import/no-webpack-loader-syntax
1719import codeSfc from " !!raw-loader!./assets/Button.vue" ;
1820import codeJs from " !!raw-loader!./assets/input.js" ;
@@ -23,6 +25,7 @@ export default {
2325 components: { VueLive },
2426 data () {
2527 return {
28+ registeredComponents: { DatePicker },
2629 codeSfc,
2730 codeTemplate,
2831 codeJs,
Original file line number Diff line number Diff line change 1515 margin : 30px auto ;
1616 border-radius : 10px ;
1717 border : 1px solid #ccc ;
18- overflow : hidden ;
1918}
2019
2120.preview-code > div {
2221 width : 100% ;
2322}
23+
24+ .preview-code > div :first-child {
25+ border-radius : 10px 0 0 10px ;
26+ overflow : hidden ;
27+ }
28+
29+ .preview-code > div :last-child {
30+ padding : 30px ;
31+ }
2432 </style >
Original file line number Diff line number Diff line change 1- < div style ="text-align:center; ">
2- < h1 > pure template</ h1 >
3- < h2 > pure template</ h2 >
4- < h3 > pure template</ h3 >
5- < h4 > pure template</ h4 >
6- </ div >
1+ < h1 > pure template</ h1 >
2+ < h2 > pure template</ h2 >
3+ < h3 > pure template</ h3 >
4+ < h4 > pure template</ h4 >
Original file line number Diff line number Diff line change 11new Vue ( {
22 template : `
3- <div style="padding:30px" >
3+ <div>
44 <input v-model="value" type="checkbox" :name="cname">
55 <h1 v-if="value">I am checked</h1>
6- </div>`,
6+ </div>` ,
77 data ( ) {
88 return {
99 cname : "myCheck" ,
Original file line number Diff line number Diff line change 3434 "babel-jest" : " ^23.6.0" ,
3535 "eslint" : " ^5.16.0" ,
3636 "eslint-plugin-vue" : " ^5.0.0" ,
37- "raw-loader" : " ^2.0.0"
37+ "raw-loader" : " ^2.0.0" ,
38+ "vuejs-datepicker" : " ^1.5.4"
3839 },
3940 "eslintConfig" : {
4041 "root" : true ,
Original file line number Diff line number Diff line change @@ -9484,6 +9484,11 @@ vue@^2.6.10:
94849484 resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
94859485 integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
94869486
9487+ vuejs-datepicker@^1.5.4 :
9488+ version "1.5.4"
9489+ resolved "https://registry.yarnpkg.com/vuejs-datepicker/-/vuejs-datepicker-1.5.4.tgz#dacdb5eb5ef44342c67cb59b93a0d5da9c1809b3"
9490+ integrity sha512-AVzgu3pb/fF/Sj3qu8YPnp7KhtsXkm8TSnBEcyYsWb1bMJr5FdPCxuIzISgw5kq0It7HkVJUGXQ4CiCwq9hhww==
9491+
94879492w3c-hr-time@^1.0.1 :
94889493 version "1.0.1"
94899494 resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
You can’t perform that action at this time.
0 commit comments