vue-swipe icon indicating copy to clipboard operation
vue-swipe copied to clipboard

Failed to resolve directive: el (found in component <mt-swipe>)

Open mapleslong opened this issue 8 years ago • 8 comments

`require('vue-swipe/dist/vue-swipe.css')

import { Swipe, SwipeItem } from 'vue-swipe'

export default ({ components: { 'swipe': Swipe, 'swipe-item': SwipeItem } })`

<template> <swipe class="my-swipe"> <swipe-item class="slide1">Slide1</swipe-item> <swipe-item class="slide2">Slide2</swipe-item> <swipe-item class="slide3">Slide3</swipe-item> </swipe> </template>

This code use to work with versions of Vue 2.0

mapleslong avatar Oct 06 '16 05:10 mapleslong

+1

huysh3 avatar Nov 30 '16 10:11 huysh3

+1 _h is not defined

SidFeng avatar Dec 15 '16 16:12 SidFeng

+1

tolerious avatar Dec 16 '16 00:12 tolerious

use [email protected] = =!!

Helloooooooooo avatar Dec 18 '16 12:12 Helloooooooooo

我自己解决了,版本的问题 "vue": "2.1.3", "vue-template-compiler":"2.1.3", "vue-loader": "10.0.0", 固定装这几个版本,就不会出问题了,执行下面的命令

sudo rm -rf node_modules sudo npm cache clean sudo npm install

SidFeng avatar Dec 19 '16 01:12 SidFeng

很纳闷,按照@SidFeng的办法固定版本的确能解决问题。但是一开始我的swipe加载了,只是width的全值太低了被重置了。导致没有宽度无法显现,最后手动写入!important才解决 。不知道为什么 ~

IdenPin avatar Dec 26 '16 16:12 IdenPin

+1 downgrading to [email protected] works, but this should work with latest stable build too

valentinvieriu avatar Dec 27 '16 11:12 valentinvieriu

"vue","vue-template-compiler"这两个库版本一样就行。

judy98taylor avatar Feb 17 '17 01:02 judy98taylor