دنبال کننده ها

۱۳۹۶ اسفند ۱۱, جمعه

vue.js - Why the iViewUI `` template do not shows up in my project

[ad_1]



The Slider do not shows up.



I install the iview in npm:



npm install iview --save-dev


in the main.js:



import iView from 'iview'
Vue.use(iView)


in my Reommend.vue component:



<template>
<div>
<Test01></Test01>
</div>
</template>

<script>

import Test01 from '../test/test01'

export default

components:
Test01,
,

</script>

<style scoped>

</style>


in my test/test01.vue:



<template>

<div>
<Slider v-model="value" range></Slider>
123
</div>

</template>

<script>

export default

data()
return
value: [2, 22]



</script>

<style scoped>

</style>


when I npm run dev, there do not shows the Slider, only shows the 123:



enter image description here






If I comment the Vue.use(iView) in main.js, there will report Error:



vue.esm.js?efeb:578 [Vue warn]: Unknown custom element: <Slider> - did you register the component correctly? For recursive components, make sure to provide the "name" option.


So, why the <Slider> template do not shows up in my project.



The official document is: https://www.iviewui.com/docs/guide/introduce




[ad_2]

لینک منبع