vue-swipe
vue-swipe copied to clipboard
组件化时报错?
<template>
<swipe class="my-swipe">
<swipe-item class="slide1"></swipe-item>
<swipe-item class="slide2"></swipe-item>
<swipe-item class="slide3"></swipe-item>
</swipe>
</template>
<script>
require('vue-swipe/dist/vue-swipe.css');
// in ES6 modules
import { Swipe, SwipeItem } from 'vue-swipe';
export default {
components: {
'swipe': Swipe,
'swipe-item': SwipeItem
}
}
</script>
错误代码
[Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in component <mt-swipe>)
遇到相同的问题, 求解
遇到相同的问题, 求解
+1
+1
我也是,最后直接把vue文件拿到项目中直接引用了
+1