mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat: 添加loading
This commit is contained in:
parent
4589081506
commit
50f173e875
@ -9,5 +9,6 @@
|
||||
"popup": "./packages/popup/index.js",
|
||||
"dialog": "./packages/dialog/index.js",
|
||||
"picker": "./packages/picker/index.js",
|
||||
"radio-group": "./packages/radio-group/index.js"
|
||||
"radio-group": "./packages/radio-group/index.js",
|
||||
"loading": "./packages/loading/index.js"
|
||||
}
|
||||
|
@ -25,6 +25,10 @@
|
||||
{
|
||||
"path": "/card",
|
||||
"title": "Card"
|
||||
},
|
||||
{
|
||||
"path": "/loading",
|
||||
"title": "Loading"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
8
packages/loading/CHANGELOG.md
Normal file
8
packages/loading/CHANGELOG.md
Normal file
@ -0,0 +1,8 @@
|
||||
## 0.0.2 (2017-01-20)
|
||||
|
||||
* 改了bug A
|
||||
* 加了功能B
|
||||
|
||||
## 0.0.1 (2017-01-10)
|
||||
|
||||
* 第一版
|
26
packages/loading/README.md
Normal file
26
packages/loading/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# @youzan/<%= name %>
|
||||
|
||||
!!! 请在此处填写你的文档最简单描述 !!!
|
||||
|
||||
[![version][version-image]][download-url]
|
||||
[![download][download-image]][download-url]
|
||||
|
||||
[version-image]: http://npm.qima-inc.com/badge/v/@youzan/<%= name %>.svg?style=flat-square
|
||||
[download-image]: http://npm.qima-inc.com/badge/d/@youzan/<%= name %>.svg?style=flat-square
|
||||
[download-url]: http://npm.qima-inc.com/package/@youzan/<%= name %>
|
||||
|
||||
## Demo
|
||||
|
||||
## Usage
|
||||
|
||||
## API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| className | 自定义额外类名 | string | '' | '' |
|
||||
|
||||
|
||||
|
||||
|
||||
## License
|
||||
[MIT](https://opensource.org/licenses/MIT)
|
3
packages/loading/index.js
Normal file
3
packages/loading/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
import Loading from './src/loading';
|
||||
|
||||
export default Loading;
|
10
packages/loading/package.json
Normal file
10
packages/loading/package.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@youzan/z-loading",
|
||||
"version": "0.0.1",
|
||||
"description": "loading component",
|
||||
"main": "./lib/index.js",
|
||||
"author": "jiangruowei",
|
||||
"license": "MIT",
|
||||
"devDependencies": {},
|
||||
"dependencies": {}
|
||||
}
|
9
packages/loading/src/loading.vue
Normal file
9
packages/loading/src/loading.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div class="z-loading"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'z-loading'
|
||||
};
|
||||
</script>
|
33
packages/zanui-css/src/loading.pcss
Normal file
33
packages/zanui-css/src/loading.pcss
Normal file
@ -0,0 +1,33 @@
|
||||
@-webkit-keyframes loading {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes loading {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@component-namespace z {
|
||||
@component loading {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAADitJREFUaAXNmmuMVVcVx++9M8PMMAwMj5GCpJjGtKVIfQxIpcGGtwylwQ+iND4iJI1GTU2jjZqmYvzQVNLY1JiaftPU1mjSftBAeA4FQagQSCoYq0EUeU55zTCvO/fh77/uWZtzh7kzd17ATvZde6+99t7rv9baj3POT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AyG1Dq0xEYeyOC0nbjkoKISXEB1U3HAEPZn7IKTVE7doRFYwg4/XXummcBk4anY8k8TN+M6syrM/rytGnT/tPfOYvcgGlYgH1E7rkPosQ6FNAuLlBaz1qnUsxeGwkA4ORxAZeyAqJ12CNZeAZQ7RpDVMBF1c7aNsAYSTu7duBTPOoNuBMjUzKNCLCPynXwAYDplelD6GreRnn3sIAbgMgovqZLAgasMBtgQAvzB6zdU9yPr/mcw6WjAtgnP3To0ER28yYUnkdIfhh+Up4WABlAgLWmVYdvgCibR70dw4mvW9Ul2s6xWf+vnL/2uw6D0VEFHJ9M/6bnce0jeGcmik8lN9A+HsCaU99yBUzrtpOQ74CvnfY6ZXmzFW/GLyfxoUdU/j+IDynLAWtddgAAAABJRU5ErkJggg==') no-repeat center;
|
||||
background-size: contain;
|
||||
-webkit-animation: loading 0.8s linear;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
animation: loading 0.8s linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ import Popup from '../packages/popup/index.js';
|
||||
import Dialog from '../packages/dialog/index.js';
|
||||
import Picker from '../packages/picker/index.js';
|
||||
import RadioGroup from '../packages/radio-group/index.js';
|
||||
import Loading from '../packages/loading/index.js';
|
||||
// zanui
|
||||
import '../packages/zanui-css/src/index.pcss';
|
||||
|
||||
@ -25,6 +26,7 @@ const install = function(Vue) {
|
||||
Vue.component(Popup.name, Popup);
|
||||
Vue.component(Picker.name, Picker);
|
||||
Vue.component(RadioGroup.name, RadioGroup);
|
||||
Vue.component(Loading.name, Loading);
|
||||
};
|
||||
|
||||
// auto install
|
||||
@ -45,5 +47,6 @@ module.exports = {
|
||||
Popup,
|
||||
Dialog,
|
||||
Picker,
|
||||
RadioGroup
|
||||
RadioGroup,
|
||||
Loading
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user