forked from ElemeFE/element
-
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.
update new.js and init carousel (ElemeFE#1859)
- Loading branch information
1 parent
339dada
commit c20f5e9
Showing
10 changed files
with
83 additions
and
6 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
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 @@ | ||
## carousel |
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 @@ | ||
## 走马灯 |
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,18 @@ | ||
var cooking = require('cooking'); | ||
var path = require('path'); | ||
var config = require('../../build/config'); | ||
|
||
cooking.set({ | ||
entry: { | ||
index: path.join(__dirname, 'index.js') | ||
}, | ||
dist: path.join(__dirname, 'lib'), | ||
template: false, | ||
format: 'umd', | ||
moduleName: 'ElCarousel', | ||
extends: ['vue2'], | ||
alias: config.alias, | ||
externals: { vue: config.vue } | ||
}); | ||
|
||
module.exports = cooking.resolve(); |
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 @@ | ||
import Carousel from './src/main'; | ||
|
||
/* istanbul ignore next */ | ||
Carousel.install = function(Vue) { | ||
Vue.component(Carousel.name, Carousel); | ||
}; | ||
|
||
export default Carousel; |
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,15 @@ | ||
{ | ||
"name": "element-carousel", | ||
"version": "0.0.0", | ||
"description": "A carousel component for Vue.js.", | ||
"keywords": [ | ||
"element", | ||
"vue", | ||
"component" | ||
], | ||
"main": "./lib/index.js", | ||
"repository": "https://github.com/ElemeFE/element/tree/master/packages/carousel", | ||
"author": "elemefe", | ||
"license": "MIT", | ||
"dependencies": {} | ||
} |
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,9 @@ | ||
<template> | ||
<div class="el-carousel"></div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'ElCarousel' | ||
}; | ||
</script> |
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,15 @@ | ||
import { createTest, destroyVM } from '../util'; | ||
import Carousel from 'packages/carousel'; | ||
|
||
describe('Carousel', () => { | ||
let vm; | ||
afterEach(() => { | ||
destroyVM(vm); | ||
}); | ||
|
||
it('create', () => { | ||
vm = createTest(Carousel, true); | ||
expect(vm.$el).to.exist; | ||
}); | ||
}); | ||
|