forked from ElemeFE/vue-swipe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
177 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ecmaFeatures: | ||
modules: true | ||
|
||
rules: | ||
indent: [ 1, 2, SwitchCase: 1 ] | ||
quotes: [ 1, single ] | ||
linebreak-style: [ 1, unix ] | ||
semi: [ 1, always ] | ||
no-undef: [ 1 ] | ||
no-console: [ 0 ] | ||
no-unused-vars: [ 1 ] | ||
space-infix-ops: [ 1 ] | ||
no-multi-spaces: [ 1 ] | ||
no-fallthrough: [ 0 ] | ||
|
||
env: | ||
es6: true | ||
browser: true | ||
|
||
extends: 'eslint:recommended' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui, maximum-scale=1.0, minimum-scale=1.0"> | ||
<title>vue-swipe examples</title> | ||
<link rel="stylesheet" href="/lib/vue-swipe.css" charset="utf-8"> | ||
<style> | ||
.swipe { | ||
height: 200px; | ||
color: #fff; | ||
} | ||
.page1 { | ||
background-color: blue; | ||
} | ||
.page2 { | ||
background-color: yellow; | ||
color: #000; | ||
} | ||
.page3 { | ||
background-color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<swipe> | ||
<swipe-item class="page1">SUPER BLUE!!</swipe-item> | ||
<swipe-item class="page2">SUPER YELLOW!!</swipe-item> | ||
<swipe-item class="page3">SUPER RED!!</swipe-item> | ||
</swipe> | ||
<swipe :speed="900" :auto="0" :show-indicators="false"> | ||
<swipe-item class="page1">SUPER BLUE!!</swipe-item> | ||
<swipe-item class="page2">SUPER YELLOW!!</swipe-item> | ||
<swipe-item class="page3">SUPER RED!!</swipe-item> | ||
</swipe> | ||
<script src="../node_modules/vue/dist/vue.js"></script> | ||
<script src="/lib/vue-swipe.js"></script> | ||
<script type="text/javascript" src="/example/dist/build.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const vueSwipe = VueSwipe.Swipe; | ||
const vueSwipeItem = VueSwipe.SwipeItem; | ||
// import { Swipe as vueSwipe, SwipeItem as vueSwipeItem } from '../src'; | ||
|
||
new Vue({ | ||
el: 'body', | ||
components: { | ||
'swipe': vueSwipe, | ||
'swipe-item': vueSwipeItem | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import Vue from 'vue'; | ||
import Swipe from './swipe.vue'; | ||
import SwipeItem from './swipe-item.vue'; | ||
|
||
Vue.component('Swipe', require('./swipe.vue')); | ||
Vue.component('SwipeItem', require('./swipe-item.vue')); | ||
export { Swipe, SwipeItem }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ | |
pages: [], | ||
timer: null, | ||
reInitTimer: null | ||
} | ||
}; | ||
}, | ||
props: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*eslint-env node */ | ||
module.exports = { | ||
module: { | ||
loaders: [ | ||
{ test: /\.vue$/, loader: 'vue' }, | ||
{ test: /\.js$/, loader: 'babel' } | ||
] | ||
}, | ||
vue: { | ||
loaders: { | ||
js: 'babel!eslint' | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*eslint-env node */ | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
var options = require('./webpack.base.js'); | ||
options.entry = './src'; | ||
options.output = { | ||
library: 'VueSwipe', | ||
libraryTarget: 'umd', | ||
filename: 'vue-swipe.js', | ||
path: './lib' | ||
}; | ||
options.externals = { | ||
vue: 'Vue' | ||
}; | ||
options.plugins = [new ExtractTextPlugin('vue-swipe.css')]; | ||
options.vue.loaders.css = ExtractTextPlugin.extract('style', 'css'); | ||
module.exports = options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/*eslint-env node */ | ||
var options = require('./webpack.base.js'); | ||
options.entry = './example'; | ||
options.output = { | ||
filename: './example/dist/build.js', | ||
publicPath: '/' | ||
}; | ||
module.exports = options; |