-
Notifications
You must be signed in to change notification settings - Fork 559
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
0 parents
commit 3d4443e
Showing
131 changed files
with
7,056 additions
and
0 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,5 @@ | ||
{ | ||
"presets": [ | ||
["es2015"] | ||
] | ||
} |
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 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
index_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.js] | ||
index_size = 4 | ||
|
||
[*.less] | ||
index_size = 2 |
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,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
/.idea |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015-2016 YDCSS Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# vue-ydui | ||
|
||
> A Vue.js project | ||
## Build Setup | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
|
||
# build for production with minification | ||
npm run build | ||
``` | ||
|
||
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). |
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,33 @@ | ||
module.exports = { | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue', | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel', | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.less$/, | ||
loader: 'style!css!less', | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.json$/, | ||
loader: 'json', | ||
exclude: /node_modules/ | ||
} | ||
] | ||
}, | ||
vue: { | ||
postcss: [ | ||
require('autoprefixer')({ | ||
browsers: ['Android >= 4', 'Explorer >= 10', 'iOS >= 6'], cascade: false | ||
}) | ||
] | ||
} | ||
}; |
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,19 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
const baseWebpackConfig = require('./base.conf'); | ||
|
||
module.exports = merge(baseWebpackConfig, { | ||
entry: { | ||
main: './example/main.js', | ||
vendors: ['vue', 'vue-router'] | ||
}, | ||
output: { | ||
path: path.join(__dirname, './dist'), | ||
publicPath: '/dist/', | ||
filename: '[name].js' | ||
}, | ||
plugins: [ | ||
new webpack.optimize.CommonsChunkPlugin({name: 'vendor', filename: 'vendor.js'}) | ||
] | ||
}); |
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,33 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
const baseWebpackConfig = require('./base.conf'); | ||
const pkg = require('../package.json'); | ||
|
||
module.exports = merge(baseWebpackConfig, { | ||
entry: { | ||
main: './src/index.js' | ||
}, | ||
output: { | ||
path: path.join(__dirname, '../dist'), | ||
publicPath: '/dist/', | ||
filename: 'ydui.js', | ||
library: 'ydui', | ||
libraryTarget: 'umd' | ||
}, | ||
externals: { | ||
vue: 'Vue' | ||
}, | ||
vue: { | ||
loaders: { | ||
less: ExtractTextPlugin.extract('css!less') | ||
} | ||
}, | ||
plugins: [ | ||
new webpack.BannerPlugin(pkg.name + ' v' + pkg.version + ' by YDCSS (c) ' + new Date().getFullYear() + ' Licensed ' + pkg.license), | ||
new ExtractTextPlugin('ydui.css'), | ||
new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}}), | ||
new webpack.optimize.OccurenceOrderPlugin() | ||
] | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 @@ | ||
<template> | ||
<router-view></router-view> | ||
</template> | ||
|
||
<style lang="less"> | ||
@import "./styles/demo.less"; | ||
</style> |
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,19 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Vue YDUI</title> | ||
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/> | ||
<meta content="yes" name="apple-mobile-web-app-capable"/> | ||
<meta content="black" name="apple-mobile-web-app-status-bar-style"/> | ||
<meta content="telephone=no" name="format-detection"/> | ||
<link rel="shortcut icon" type="image/ico" href="http://static.ydcss.com/ydui/img/favicon.ico"/> | ||
<script src="http://m.ydui.org/js/ydui.flexible.js"></script> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="http://static.ydcss.com/ydui/js/ydui.fastclick.js"></script> | ||
<script src="/dist/vendor.js"></script> | ||
<script src="/dist/main.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,73 @@ | ||
import Vue from 'vue'; | ||
import VueRouter from 'vue-router'; | ||
import Resource from 'vue-resource'; | ||
|
||
import YDUI from '../src/index'; | ||
import Index from './routers/index.vue'; | ||
import Button from './routers/button.vue'; | ||
import Dialog from './routers/dialog.vue'; | ||
import Cell from './routers/cell.vue'; | ||
import Grids from './routers/grids.vue'; | ||
import Icons from './routers/icons.vue'; | ||
import List from './routers/list.vue'; | ||
import ListTheme from './routers/list.theme.vue'; | ||
import ListInfinitescroll from './routers/list.infinitescroll.vue'; | ||
import ListPullRefresh from './routers/list.pullrefresh.vue'; | ||
import Badge from './routers/badge.vue'; | ||
import AsideBar from './routers/asidebar.vue'; | ||
import TabBar from './routers/tabbar.vue'; | ||
import NavBar from './routers/navbar.vue'; | ||
import Tabs from './routers/tabs.vue'; | ||
import Tab from './routers/tab.vue'; | ||
import ScrollTab from './routers/scrolltab.vue'; | ||
import ActionSheet from './routers/actionsheet.vue'; | ||
import SendCode from './routers/sendcode.vue'; | ||
import ProgressBar from './routers/progressbar.vue'; | ||
import KeyBoard from './routers/keyboard.vue'; | ||
import Slider from './routers/slider.vue'; | ||
import Spinner from './routers/spinner.vue'; | ||
import CitySelect from './routers/cityselect.vue'; | ||
|
||
import App from './app.vue'; | ||
|
||
Vue.use(VueRouter); | ||
Vue.use(Resource); | ||
Vue.use(YDUI); | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
typeof FastClick == 'function' && FastClick.attach(document.body); | ||
}, false); | ||
|
||
const router = new VueRouter({ | ||
routes: [ | ||
{path: '/', component: Index}, | ||
{path: '/button', component: Button}, | ||
{path: '/dialog', component: Dialog}, | ||
{path: '/cell', component: Cell}, | ||
{path: '/grids', component: Grids}, | ||
{path: '/icons', component: Icons}, | ||
{path: '/list', component: List}, | ||
{path: '/list.theme/:id', component: ListTheme}, | ||
{path: '/list.infinitescroll', component: ListInfinitescroll}, | ||
{path: '/list.pullrefresh', component: ListPullRefresh}, | ||
{path: '/badge', component: Badge}, | ||
{path: '/asidebar', component: AsideBar}, | ||
{path: '/tabbar', component: TabBar}, | ||
{path: '/navbar', component: NavBar}, | ||
{path: '/tabs', component: Tabs}, | ||
{path: '/tab', component: Tab}, | ||
{path: '/scrolltab', component: ScrollTab}, | ||
{path: '/actionsheet', component: ActionSheet}, | ||
{path: '/sendcode', component: SendCode}, | ||
{path: '/progressbar', component: ProgressBar}, | ||
{path: '/keyboard', component: KeyBoard}, | ||
{path: '/slider', component: Slider}, | ||
{path: '/spinner', component: Spinner}, | ||
{path: '/cityselect', component: CitySelect} | ||
] | ||
}); | ||
|
||
const app = new Vue({ | ||
router: router, | ||
render: v => v(App) | ||
}).$mount('#app'); |
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,57 @@ | ||
<template> | ||
<yd-layout title="ActionSheet"> | ||
|
||
<yd-button-group> | ||
<yd-button @click.native="show1 = true" size="large">带取消</yd-button> | ||
<yd-button @click.native="show2 = true" size="large" type="warning">不带取消</yd-button> | ||
</yd-button-group> | ||
|
||
<yd-actionsheet :items="myItems1" v-model="show1" cancel="取消"></yd-actionsheet> | ||
|
||
<yd-actionsheet :items="myItems2" v-model="show2"></yd-actionsheet> | ||
|
||
</yd-layout> | ||
</template> | ||
|
||
<script type="text/babel"> | ||
export default { | ||
data() { | ||
return { | ||
show1: false, | ||
show2: false, | ||
myItems1: [ | ||
{ | ||
label: '拍照', | ||
method: () => { | ||
this.$dialog.toast({mes: '咔擦,此人太帅!'}); | ||
//注意: method: function() {} 和 method() {} 这样是无法正常使用当前this的 | ||
} | ||
}, | ||
{ | ||
label: '从相册中偷取', | ||
method: () => { | ||
this.$dialog.toast({mes: '看到了不该看到的东西!'}); | ||
} | ||
} | ||
], | ||
myItems2: [ | ||
{ | ||
label: '示例菜单一 - 我是不会关闭的', | ||
method: () => { | ||
this.$dialog.toast({mes: 'Say: 我是不会关闭的!'}); | ||
}, | ||
unclose: true // 不关闭 | ||
}, | ||
{ | ||
label: '示例菜单二 - 自动关闭', | ||
method: () => { | ||
this.$dialog.toast({mes: 'Say: 我关闭啦啦啦!'}); | ||
} | ||
}, | ||
{label: '示例菜单三 - 自动关闭'}, | ||
{label: '示例菜单四 - 自动关闭'} | ||
] | ||
} | ||
} | ||
} | ||
</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,14 @@ | ||
<template> | ||
<yd-layout title="AsideBar"> | ||
|
||
<yd-cell-group> | ||
<yd-cell-item arrow type="link" href="/navbar"> | ||
<span slot="left">NavBar</span> | ||
</yd-cell-item> | ||
<yd-cell-item arrow type="link" href="/tabbar"> | ||
<span slot="left">TabBar</span> | ||
</yd-cell-item> | ||
</yd-cell-group> | ||
|
||
</yd-layout> | ||
</template> |
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,48 @@ | ||
<template> | ||
<yd-layout title="Badge"> | ||
<aside class="demo-tip"> | ||
<p>badge包含默认圆形样式和方形样式</p> | ||
<p>五中颜色:default/primary/danger/warning/hollow</p> | ||
</aside> | ||
|
||
<div class="demo-badege"> | ||
<div class="demo-badege-title">圆形角标:</div> | ||
<div class="demo-small-pitch"> | ||
<yd-badge>1</yd-badge> | ||
<yd-badge type="primary">2</yd-badge> | ||
<yd-badge type="danger">3</yd-badge> | ||
<yd-badge type="warning">4</yd-badge> | ||
<yd-badge type="hollow">5</yd-badge> | ||
</div> | ||
|
||
<div class="demo-small-pitch"> | ||
<yd-badge>123</yd-badge> | ||
<yd-badge type="primary">321</yd-badge> | ||
<yd-badge type="danger">333</yd-badge> | ||
<yd-badge type="warning">4444</yd-badge> | ||
<yd-badge type="hollow">55555</yd-badge> | ||
<yd-badge bgcolor="#000" color="#FFF">custom color</yd-badge> | ||
</div> | ||
|
||
<div class="demo-badege-title">方形角标:</div> | ||
<div class="demo-small-pitch"> | ||
<yd-badge-radius>1</yd-badge-radius> | ||
<yd-badge-radius type="primary">2</yd-badge-radius> | ||
<yd-badge-radius type="danger">3</yd-badge-radius> | ||
<yd-badge-radius type="warning">4</yd-badge-radius> | ||
<yd-badge-radius type="hollow">5</yd-badge-radius> | ||
</div> | ||
|
||
<div class="demo-small-pitch"> | ||
<yd-badge-radius>123</yd-badge-radius> | ||
<yd-badge-radius type="primary">321</yd-badge-radius> | ||
<yd-badge-radius type="danger">333</yd-badge-radius> | ||
<yd-badge-radius type="warning">4444</yd-badge-radius> | ||
<yd-badge-radius type="hollow">55555</yd-badge-radius> | ||
<yd-badge-radius bgcolor="#000" color="#FFF">custom color</yd-badge-radius> | ||
</div> | ||
|
||
</div> | ||
|
||
</yd-layout> | ||
</template> |
Oops, something went wrong.