Implementation of element document

recently, I have been doing a ui component library of vue, and then writing documents with reference to element. The
page appears fine, but for example, the input component, in the md file:

: demo

</zj-input>
     <script>
         export default {
             data() {
                 return {
                     value: ""
                 }
             }
         }
     </script>

requires a value, for v-model and js is written in the script of md. The configuration components according to vue-markdown-loader and markdown-it are also displayed, but an error value is not defined is reported.

looking at the demo-block box component of element, I can"t see why.

can you explain in detail how element documents use the contents of script?


. Emmm, well, what's in demo is just for display, as long as you write a script tag and put the code in it.

Menu