mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
8068148d3a
@ -19,7 +19,6 @@ module.exports = {
|
|||||||
globals: {
|
globals: {
|
||||||
expect: true,
|
expect: true,
|
||||||
sinon: true,
|
sinon: true,
|
||||||
zanui: true,
|
|
||||||
document: false,
|
document: false,
|
||||||
navigator: false,
|
navigator: false,
|
||||||
window: false,
|
window: false,
|
||||||
|
86
README.md
86
README.md
@ -7,10 +7,26 @@
|
|||||||
</p>
|
</p>
|
||||||
<p align="center">A Vue.js 2.0 Mobile UI at YouZan</p>
|
<p align="center">A Vue.js 2.0 Mobile UI at YouZan</p>
|
||||||
|
|
||||||
[](https://travis-ci.org/youzan/vant) [](https://codecov.io/github/youzan/vant?branch=dev) [](https://www.npmjs.com/package/vant) [](https://www.npmjs.com/package/vant)
|
[](https://travis-ci.org/youzan/vant)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
[](https://codecov.io/github/youzan/vant?branch=dev)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
|
||||||
[访问中文版](./README.zh-CN.md)
|
[访问中文版](./README.zh-CN.md)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Components come from wechat mall business of [YouZan](https://youzan.com)
|
||||||
|
- Extensive documentation and demos.
|
||||||
|
- Support [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
|
||||||
|
- Unit test coverage over 90%
|
||||||
|
- Not only have the basic components, but also have a lot of business components
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img alt="feature demo" src="https://img.yzcdn.cn/public_files/2017/09/21/34974ceef63f380373bf3d68ec7907f8.gif">
|
||||||
|
</p >
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -18,17 +34,75 @@ npm i -S vant
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
See [Quickstart](https://www.youzanyun.com/zanui/vue#/en-US/component/quickstart).
|
|
||||||
|
|
||||||
## How to contribute
|
|
||||||
|
|
||||||
|
#### 1. Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
|
||||||
|
```bash
|
||||||
|
# Install babel-plugin-import
|
||||||
|
npm i babel-plugin-import -D
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
// set babel config in .babelrc or babel-loader
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
["import", { "libraryName": "vant", "style": true }]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can import components from vant, equivalent to import manually below.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Button } from 'vant';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. Manually import
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Button } from 'vant/lib/button';
|
||||||
|
import 'vant/lib/vant-css/base.css';
|
||||||
|
import 'vant/lib/vant-css/button.css';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. Import all components
|
||||||
|
|
||||||
|
```js
|
||||||
|
import Vue from 'vue';
|
||||||
|
import Vant from 'vant';
|
||||||
|
import 'vant/lib/vant-css/index.css';
|
||||||
|
|
||||||
|
Vue.use(Vant);
|
||||||
|
```
|
||||||
|
|
||||||
|
### CDN
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- import style -->
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/vant/lib/vant-css/index.css" />
|
||||||
|
|
||||||
|
<!-- import script --><script></script>
|
||||||
|
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
See more in [Quickstart](https://www.youzanyun.com/zanui/vant#/en-US/component/quickstart).
|
||||||
|
|
||||||
|
## Contribution
|
||||||
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
|
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
|
||||||
|
|
||||||
## Preview
|
## Browser Support
|
||||||
|
Modern browsers and Android 4.0+, iOS 6+.
|
||||||
|
|
||||||
|
## Links
|
||||||
|
- [Documentation](https://www.youzanyun.com/zanui/vant)
|
||||||
|
- [Change log](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
|
||||||
|
- [React UI Zent](https://www.youzanyun.com/zanui/zent)
|
||||||
|
- [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
|
||||||
|
- [vant-demo](https://github.com/chenjiahan/vant-demo)
|
||||||
|
|
||||||
|
## Preview
|
||||||
You can scan the following QR code to access the demo:
|
You can scan the following QR code to access the demo:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
|
|
||||||
|
@ -7,29 +7,105 @@
|
|||||||
</p>
|
</p>
|
||||||
<p align="center">A Vue.js 2.0 Mobile UI at YouZan</p>
|
<p align="center">A Vue.js 2.0 Mobile UI at YouZan</p>
|
||||||
|
|
||||||
[](https://travis-ci.org/youzan/vant) [](https://codecov.io/github/youzan/vant?branch=dev) [](https://www.npmjs.com/package/vant) [](https://www.npmjs.com/package/vant)
|
[](https://travis-ci.org/youzan/vant)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
[](https://codecov.io/github/youzan/vant?branch=dev)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
[](https://www.npmjs.com/package/vant)
|
||||||
|
|
||||||
## 一、安装
|
## 特性
|
||||||
|
|
||||||
|
- 组件都是来源于有赞的微商城业务,并且经过有赞业务的检验,更靠谱
|
||||||
|
- 丰富的文档和Demo
|
||||||
|
- 支持 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
|
||||||
|
- 单元测试覆盖率超过90%
|
||||||
|
- 不仅仅有丰富的基础组件,还有许多的业务组件
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img alt="feature demo" src="https://img.yzcdn.cn/public_files/2017/09/21/34974ceef63f380373bf3d68ec7907f8.gif">
|
||||||
|
</p >
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm i -S vant
|
npm i -S vant
|
||||||
```
|
```
|
||||||
|
|
||||||
## 二、快速上手
|
## 快速上手
|
||||||
参考 [Quickstart](https://www.youzanyun.com/zanui/vue#/zh-CN/component/quickstart).
|
|
||||||
|
|
||||||
## 三、贡献代码
|
#### 方式一. 使用 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (推荐)
|
||||||
|
```bash
|
||||||
|
# 安装 babel-plugin-import 插件
|
||||||
|
npm i babel-plugin-import -D
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
// 在 .babelrc 或 babel-loader 中添加插件配置
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
["import", { "libraryName": "vant", "style": true }]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
接着你可以在代码中直接引入 Vant 组件,插件会自动将代码转化为方式二中的按需引入形式。
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Button } from 'vant';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 方式二. 按需引入组件
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Button } from 'vant/lib/button';
|
||||||
|
import 'vant/lib/vant-css/base.css';
|
||||||
|
import 'vant/lib/vant-css/button.css';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 方式三. 导入所有组件
|
||||||
|
|
||||||
|
```js
|
||||||
|
import Vue from 'vue';
|
||||||
|
import Vant from 'vant';
|
||||||
|
import 'vant/lib/vant-css/index.css';
|
||||||
|
|
||||||
|
Vue.use(Vant);
|
||||||
|
```
|
||||||
|
|
||||||
|
### CDN
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- 引入样式 -->
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/vant/lib/vant-css/index.css">
|
||||||
|
|
||||||
|
<!-- 引入组件 --><script></script>
|
||||||
|
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
更多内容请参考 [快速上手](https://www.youzanyun.com/zanui/vant#/zh-CN/component/quickstart).
|
||||||
|
|
||||||
|
## 贡献代码
|
||||||
|
|
||||||
修改代码请阅读我们的 [开发指南](./.github/CONTRIBUTING.zh-CN.md)。
|
修改代码请阅读我们的 [开发指南](./.github/CONTRIBUTING.zh-CN.md)。
|
||||||
|
|
||||||
使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。
|
使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。
|
||||||
|
|
||||||
## 四、手机预览
|
## 浏览器支持
|
||||||
|
现代浏览器以及 Android 4.0+, iOS 6+.
|
||||||
|
|
||||||
|
## 手机预览
|
||||||
|
|
||||||
可以手机扫码以下二维码访问手机端demo:
|
可以手机扫码以下二维码访问手机端demo:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 链接
|
||||||
|
- [详细文档](https://www.youzanyun.com/zanui/vant)
|
||||||
|
- [更新日志](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
|
||||||
|
- [React 组件库 Zent](https://www.youzanyun.com/zanui/zent)
|
||||||
|
- [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
|
||||||
|
- [vant-demo](https://github.com/chenjiahan/vant-demo)
|
||||||
|
|
||||||
## 五、开源协议
|
## 开源协议
|
||||||
|
|
||||||
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
|
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
|
||||||
|
@ -9,28 +9,25 @@ const dependencyTree = require('dependency-tree');
|
|||||||
|
|
||||||
components.forEach(componentName => {
|
components.forEach(componentName => {
|
||||||
const libDir = path.resolve(__dirname, '../../lib');
|
const libDir = path.resolve(__dirname, '../../lib');
|
||||||
const dependencies = analyzeDependencies(componentName, libDir);
|
const content = analyzeDependencies(componentName, libDir).map(component => `require('../../vant-css/${component}.css');`);
|
||||||
const styleDir = path.join(libDir, componentName, '/style');
|
fs.outputFileSync(path.join(libDir, componentName, './style/index.js'), content.join('\n'));
|
||||||
const content = dependencies.map(component => `require('../../vant-css/${component}.css');`);
|
|
||||||
fs.outputFileSync(path.join(styleDir, './index.js'), content.join('\n'));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Analyze component dependencies
|
// Analyze component dependencies
|
||||||
function analyzeDependencies(componentName, libDir) {
|
function analyzeDependencies(componentName, libDir) {
|
||||||
const dependencies = dependencyTree({
|
const checkList = ['base'];
|
||||||
|
search(dependencyTree({
|
||||||
directory: libDir,
|
directory: libDir,
|
||||||
filename: path.resolve(libDir, componentName, 'index.js'),
|
filename: path.resolve(libDir, componentName, 'index.js'),
|
||||||
filter: path => path.indexOf('vant/lib/') !== -1
|
filter: path => path.indexOf('vant/lib/') !== -1
|
||||||
})
|
}), checkList);
|
||||||
const checkList = ['base'];
|
|
||||||
search(dependencies, checkList);
|
|
||||||
return checkList.filter(component => checkComponentHasStyle(component));
|
return checkList.filter(component => checkComponentHasStyle(component));
|
||||||
}
|
}
|
||||||
|
|
||||||
function search(tree, checkList) {
|
function search(tree, checkList) {
|
||||||
tree && Object.keys(tree).forEach(key => {
|
tree && Object.keys(tree).forEach(key => {
|
||||||
search(tree[key], checkList);
|
search(tree[key], checkList);
|
||||||
const component = key.split('/vant/lib/')[1].replace('/index.js', '');
|
const component = key.split('/vant/lib/')[1].replace('/index.js', '').replace('mixins/', '');
|
||||||
if (checkList.indexOf(component) === -1) {
|
if (checkList.indexOf(component) === -1) {
|
||||||
checkList.push(component);
|
checkList.push(component);
|
||||||
}
|
}
|
||||||
@ -38,10 +35,5 @@ function search(tree, checkList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkComponentHasStyle(componentName) {
|
function checkComponentHasStyle(componentName) {
|
||||||
const cssPath = path.join(__dirname, '../../lib/vant-css/', `${componentName}.css`);
|
return fs.existsSync(path.join(__dirname, '../../lib/vant-css/', `${componentName}.css`));
|
||||||
return fs.existsSync(cssPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
function toPascal(str) {
|
|
||||||
return ('_' + str).replace(/[_.-](\w|$)/g, (_, x) => x.toUpperCase());
|
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@ module.exports = {
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
historyApiFallback: {
|
historyApiFallback: {
|
||||||
rewrites: [
|
rewrites: [
|
||||||
{ from: /^\/zanui\/vue\/examples/, to: '/examples.html' },
|
{ from: /^\/zanui\/vant\/examples/, to: '/examples.html' },
|
||||||
{ from: /^\/zanui\/vue/, to: '/index.html' }
|
{ from: /^\/zanui\/vant/, to: '/index.html' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
stats: 'errors-only'
|
stats: 'errors-only'
|
||||||
|
@ -6,7 +6,7 @@ const devConfig = require('./webpack.config.dev.js');
|
|||||||
module.exports = merge(devConfig, {
|
module.exports = merge(devConfig, {
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, '../docs/dist'),
|
path: path.join(__dirname, '../docs/dist'),
|
||||||
publicPath: 'https://b.yzcdn.cn/zanui/vue/',
|
publicPath: 'https://b.yzcdn.cn/zanui/vant/',
|
||||||
filename: '[name].[hash:8].js',
|
filename: '[name].[hash:8].js',
|
||||||
umdNamedDefine: true,
|
umdNamedDefine: true,
|
||||||
chunkFilename: 'async_[name].[chunkhash:8].js'
|
chunkFilename: 'async_[name].[chunkhash:8].js'
|
||||||
|
@ -1,33 +1,23 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show1: false,
|
show1: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
show3: false,
|
show3: false,
|
||||||
actions1: [
|
actions: [
|
||||||
{
|
{ name: 'Option1', callback: this.onClick },
|
||||||
name: '微信安全支付',
|
{ name: 'Option2' },
|
||||||
className: 'actionsheet-wx',
|
{ name: 'Option3', loading: true }
|
||||||
callback: this.handleActionClick
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '支付宝支付',
|
|
||||||
loading: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '信用卡支付'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '其他支付方式'
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleActionClick(item) {
|
onClick(item) {
|
||||||
console.log(item);
|
Toast(item.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,14 +35,12 @@ Vue.component(Actionsheet.name, Actionsheet);
|
|||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
#### Basic Usage
|
#### Basic Usage
|
||||||
|
Use `actions` prop to set options of actionsheet.
|
||||||
需要传入一个`actions`的属性,该属性为一个数组,数组的每一项是一个对象,可以根据下面的[action对象](#actions)设置你想要的信息。
|
|
||||||
|
|
||||||
:::demo Basic Usage
|
:::demo Basic Usage
|
||||||
```html
|
```html
|
||||||
<van-button @click="show1 = true">弹出actionsheet</van-button>
|
<van-button @click="show1 = true">Show Actionsheet</van-button>
|
||||||
<van-actionsheet v-model="show1" :actions="actions1">
|
<van-actionsheet v-model="show1" :actions="actions" />
|
||||||
</van-actionsheet>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -60,83 +48,40 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show1: false,
|
show1: false,
|
||||||
actions1: [
|
actions: [
|
||||||
{
|
{ name: 'Option1', callback: this.onClick },
|
||||||
name: '微信安全支付',
|
{ name: 'Option2' },
|
||||||
className: 'actionsheet-wx',
|
{ name: 'Option3', loading: true }
|
||||||
callback: this.handleActionClick
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '支付宝支付',
|
|
||||||
loading: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '信用卡支付'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '其他支付方式'
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleActionClick(item) {
|
onClick(item) {
|
||||||
console.log(item);
|
Toast(item.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 带取消按钮的 Actionsheet
|
#### Actionsheet with cancel button
|
||||||
|
|
||||||
如果传入了`cancelText`属性,且不为空,则会在下方显示一个取消按钮,点击会将当前`Actionsheet`关闭。
|
:::demo Actionsheet with cancel button
|
||||||
|
|
||||||
:::demo 带取消按钮的 Actionsheet
|
|
||||||
```html
|
```html
|
||||||
<van-button @click="show2 = true">弹出带取消按钮的actionsheet</van-button>
|
<van-button @click="show2 = true">Show Actionsheet with cancel button</van-button>
|
||||||
<van-actionsheet v-model="show2" :actions="actions1" cancel-text="取消">
|
<van-actionsheet v-model="show2" :actions="actions" cancel-text="Cancel" />
|
||||||
</van-actionsheet>
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show2: false,
|
|
||||||
actions1: [
|
|
||||||
{
|
|
||||||
name: '微信安全支付',
|
|
||||||
className: 'actionsheet-wx',
|
|
||||||
callback: this.handleActionClick
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '支付宝支付',
|
|
||||||
loading: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '信用卡支付'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '其他支付方式'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 带标题的 Actionsheet
|
#### Actionsheet with title
|
||||||
|
Actionsheet will get another style if there is a `title` prop.
|
||||||
|
|
||||||
如果传入了`title`属性,且不为空,则另外一种样式的`Actionsheet`,里面内容需要自定义。
|
:::demo Actionsheet with title
|
||||||
|
|
||||||
:::demo 带标题的 Actionsheet
|
|
||||||
```html
|
```html
|
||||||
<van-button @click="show3 = true">弹出带标题的actionsheet</van-button>
|
<van-button @click="show3 = true">Show Actionsheet with title</van-button>
|
||||||
<van-actionsheet v-model="show3" title="支持以下配送方式" class="title-actionsheet">
|
<van-actionsheet v-model="show3" title="Title">
|
||||||
<p>一些内容</p>
|
<p>Content</p>
|
||||||
</van-actionsheet>
|
</van-actionsheet>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
@ -145,21 +90,18 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| actions | 行动按钮数组 | `Array` | `[]` | - |
|
| actions | Options | `Array` | `[]` | - |
|
||||||
| title | 标题 | `String` | - | - |
|
| title | Title | `String` | - | - |
|
||||||
| cancelText | 取消按钮文案 | `String` | - | - |
|
| cancelText | Text of cancel button | `String` | - | - |
|
||||||
| overlay | 是否显示遮罩 | `Boolean` | - | - |
|
| overlay | Whether to show overlay | `Boolean` | - | - |
|
||||||
| closeOnClickOverlay | 点击遮罩是否关闭`Actionsheet` | `Boolean` | - | - |
|
| closeOnClickOverlay | Whether to close when click overlay | `Boolean` | - | - |
|
||||||
|
|
||||||
### actions
|
### Data struct of actions
|
||||||
|
|
||||||
|
|
||||||
`API`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`:
|
|
||||||
|
|
||||||
| key | Description |
|
| key | Description |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| name | 标题 |
|
| name | Title |
|
||||||
| subname | 二级标题 |
|
| subname | Subtitle |
|
||||||
| className | 为对应列添加特殊的`class` |
|
| className | className for the option |
|
||||||
| loading | 是否是`loading`状态 |
|
| loading | Whether to be loading status |
|
||||||
| callback | 点击时的回调。该回调接受一个参数,参数为当前点击`action`的对象信息 |
|
| callback | Triggered when click option |
|
||||||
|
@ -14,11 +14,11 @@ Vue.component(CellSwipe.name, CellSwipe);
|
|||||||
:::demo Basic Usage
|
:::demo Basic Usage
|
||||||
```html
|
```html
|
||||||
<van-cell-swipe :right-width="65" :left-width="65">
|
<van-cell-swipe :right-width="65" :left-width="65">
|
||||||
<span slot="left">选择</span>
|
<span slot="left">Select</span>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-cell title="单元格1" value="单元格1内容"></van-cell>
|
<van-cell title="Cell" value="Cell Content"></van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<span slot="right">删除</span>
|
<span slot="right">Delete</span>
|
||||||
</van-cell-swipe>
|
</van-cell-swipe>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
@ -27,13 +27,13 @@ Vue.component(CellSwipe.name, CellSwipe);
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| left-width | 左侧滑动区域宽度 | `Number` | `0` | - |
|
| left-width | Width of the left scrollable area | `Number` | `0` | - |
|
||||||
| right-width | 右侧滑动区域宽度 | `Number` | `0` | - |
|
| right-width | Width of the right scrollable area | `Number` | `0` | - |
|
||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | Description |
|
| name | Description |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义显示内容 |
|
| - | custom content |
|
||||||
| left | 左侧滑动内容 |
|
| left | content of left scrollable area |
|
||||||
| right | 右侧滑动内容 |
|
| right | content of right scrollabe area |
|
||||||
|
@ -67,7 +67,7 @@ Vue.component(CellGroup.name, CellGroup);
|
|||||||
:::demo Advanced Usage
|
:::demo Advanced Usage
|
||||||
```html
|
```html
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-cell value="Text" icon="home" is-link>
|
<van-cell value="Text" icon="shop" is-link>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<span class="van-cell-text">Title</span>
|
<span class="van-cell-text">Title</span>
|
||||||
<van-tag type="danger">Tag</van-tag>
|
<van-tag type="danger">Tag</van-tag>
|
||||||
@ -92,6 +92,8 @@ Vue.component(CellGroup.name, CellGroup);
|
|||||||
| value | Right text | `String` | - | - |
|
| value | Right text | `String` | - | - |
|
||||||
| label | Description below the title | `String` | - | - |
|
| label | Description below the title | `String` | - | - |
|
||||||
| url | Link | `String` | - | - |
|
| url | Link | `String` | - | - |
|
||||||
|
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - | - |
|
||||||
|
| replace | If true, the navigation will not leave a history record | `String` | `false` | - |
|
||||||
| isLink | Whether to show link icon | `Boolean` | `false` | - |
|
| isLink | Whether to show link icon | `Boolean` | `false` | - |
|
||||||
| required | Whether to show required mark | `Boolean` | `false` | - |
|
| required | Whether to show required mark | `Boolean` | `false` | - |
|
||||||
|
|
||||||
|
@ -1,5 +1,65 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### [0.10.6](https://github.com/youzan/vant/tree/v0.10.6)
|
||||||
|
`2017-11-06`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- add Swipe initialSwipe prop [\#279](https://github.com/youzan/vant/pull/279) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- fix Dialog button text not reset when showed [\#278](https://github.com/youzan/vant/pull/278) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- fix Tab dynamic generate bug [\#284](https://github.com/youzan/vant/pull/284) [@cookfront](https://github.com/cookfront)
|
||||||
|
- fix NoticeBar text disappeared when page back [\#280](https://github.com/youzan/vant/pull/280) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
### [0.10.5](https://github.com/youzan/vant/tree/v0.10.5)
|
||||||
|
`2017-10-30`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- Cell support vue-router target route [\#268](https://github.com/youzan/vant/pull/268) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- fix Tabbar info display when use icon slot [\#269](https://github.com/youzan/vant/pull/269) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- fix Uploader input type [\#265](https://github.com/youzan/vant/pull/265) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
### [0.10.4](https://github.com/youzan/vant/tree/v0.10.4)
|
||||||
|
`2017-10-26`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- add more icons [\#253](https://github.com/youzan/vant/pull/253) [@pangxie1991](https://github.com/pangxie1991)
|
||||||
|
- add document of custom theme [\#251](https://github.com/youzan/vant/pull/251) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- add click feedback of buttons in components [\#248](https://github.com/youzan/vant/pull/248) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- add more props of NoticeBar [\#254](https://github.com/youzan/vant/pull/254) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- fix Swipe width calc error [\#258](https://github.com/youzan/vant/pull/258) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- fix PullRefreash scroll bug when parent is scrollable [\#247](https://github.com/youzan/vant/pull/247) [@GeoffZhu](https://github.com/GeoffZhu)
|
||||||
|
- fix CouponList empty info display bug [\#246](https://github.com/youzan/vant/pull/246) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
### [0.10.3](https://github.com/youzan/vant/tree/v0.10.3)
|
||||||
|
`2017-10-25`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- add Tabbar info prop [\#245](https://github.com/youzan/vant/pull/245) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- add Toast position prop [\#244](https://github.com/youzan/vant/pull/244) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- add Coupon showExchangeBar prop [\#243](https://github.com/youzan/vant/pull/243) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- add Advanced components english document [\#236](https://github.com/youzan/vant/pull/236) [@Tinysymphony](https://github.com/Tinysymphony)
|
||||||
|
- add demo pages in document [\#237](https://github.com/youzan/vant/pull/237) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- fix Address & Contact list style error [\#230](https://github.com/youzan/vant/pull/230) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- fix popup style missing when build style entry [\#231](https://github.com/youzan/vant/pull/231) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- fix PullRefresh touchcancel event [\#239](https://github.com/youzan/vant/pull/239) [@GeoffZhu](https://github.com/GeoffZhu)
|
||||||
|
|
||||||
|
### [0.10.2](https://github.com/youzan/vant/tree/v0.10.2)
|
||||||
|
`2017-10-20`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- Sku: sku-group slot add event bus [\#226](https://github.com/youzan/vant/pull/226) [@w91](https://github.com/w91)
|
||||||
|
- add English documents [\#220](https://github.com/youzan/vant/pull/220) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- Optimize component dependency analyze when build style entry [\#224](https://github.com/youzan/vant/pull/224) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
### [0.10.1](https://github.com/youzan/vant/tree/v0.10.1)
|
### [0.10.1](https://github.com/youzan/vant/tree/v0.10.1)
|
||||||
`2017-10-18`
|
`2017-10-18`
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -10,18 +12,6 @@ export default {
|
|||||||
currentDate2: null,
|
currentDate2: null,
|
||||||
currentDate3: null
|
currentDate3: null
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
handlePickerChange(picker) {
|
|
||||||
console.log(picker);
|
|
||||||
},
|
|
||||||
handlePickerCancel() {
|
|
||||||
console.log('picker cancel');
|
|
||||||
},
|
|
||||||
handlePickerConfirm() {
|
|
||||||
console.log('picker confirm');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -48,8 +38,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
|
|||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
:max-date="maxDate"
|
:max-date="maxDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -62,20 +51,14 @@ export default {
|
|||||||
maxDate: new Date(2019, 10, 1),
|
maxDate: new Date(2019, 10, 1),
|
||||||
currentDate: new Date(2018, 0, 1)
|
currentDate: new Date(2018, 0, 1)
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
handlePickerChange(picker) {
|
|
||||||
console.log(picker);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 选择日期
|
#### Date Picker
|
||||||
|
|
||||||
:::demo 选择日期
|
:::demo Date Picker
|
||||||
```html
|
```html
|
||||||
<van-datetime-picker
|
<van-datetime-picker
|
||||||
v-model="currentDate2"
|
v-model="currentDate2"
|
||||||
@ -83,14 +66,13 @@ export default {
|
|||||||
:min-hour="minHour"
|
:min-hour="minHour"
|
||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 选择时间
|
#### Time Picker
|
||||||
|
|
||||||
:::demo 选择时间
|
:::demo Time Picker
|
||||||
```html
|
```html
|
||||||
<van-datetime-picker
|
<van-datetime-picker
|
||||||
v-model="currentDate3"
|
v-model="currentDate3"
|
||||||
@ -98,8 +80,7 @@ export default {
|
|||||||
:min-hour="minHour"
|
:min-hour="minHour"
|
||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -108,30 +89,17 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| visibileColumnCount | 每一列可见备选元素的个数 | Number | 5 | - |
|
| type | Picker type | `String` | 'datetime' | 'date', 'time' |
|
||||||
| type | 组件类型 | String | 'datetime' | 'datetime', 'date', 'time' |
|
| minDate | Min date | `Date` | Ten years ago on January 1 | - |
|
||||||
| minDate | 可选的最小日期 | Date | 十年前的 1 月 1 日 | - |
|
| maxDate | Max date | `Date` | Ten years later on December 31 | - |
|
||||||
| maxDate | 可选的最大日期 | Date | 十年后的 12 月 31 日 | - |
|
| minHour | Min hour | `Number` | `0` | - |
|
||||||
| minHour | 可选的最小小时 | Number | 0 | - |
|
| maxHour | Max hour | `Number` | `23` | - |
|
||||||
| maxHour | 可选的最大小时 | Number | 23 | - |
|
| visibileColumnCount | Count of columns to show | `Number` | `5` | - |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| change | 当值变化时触发的事件 | picker 实例 |
|
| change | Triggered when value changed | picker: picker instance |
|
||||||
| confirm | 点击完成按钮时触发的事件 | 当前 value |
|
| confirm | Triggered when click confirm button | value: current value |
|
||||||
| cancel | 点击取消按钮时触发的事件 | - |
|
| cancel | Triggered when click cancel button | - |
|
||||||
|
|
||||||
### change事件
|
|
||||||
|
|
||||||
在`change`事件中,可以获取到`picker`实例,对`picker`进行相应的更新等操作:
|
|
||||||
|
|
||||||
| 函数 | Description |
|
|
||||||
|-----------|-----------|
|
|
||||||
| getColumnValue(index) | 获取对应列中选中的值 |
|
|
||||||
| setColumnValue(index, value) | 设置对应列中选中的值 |
|
|
||||||
| getColumnValues(index) | 获取对应列中所有的备选值 |
|
|
||||||
| setColumnValues(index, values) | 设置对应列中所有的备选值 |
|
|
||||||
| getValues() | 获取所有列中被选中的值,返回一个数组 |
|
|
||||||
| setValues(values) | `values`为一个数组,设置所有列中被选中的值 |
|
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Dialog } from 'packages';
|
import { Dialog } from 'packages';
|
||||||
|
|
||||||
const message = '弹窗内容';
|
const message = 'Content';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
onClickAlert() {
|
onClickAlert() {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
title: '标题',
|
message,
|
||||||
message
|
title: 'Title',
|
||||||
|
confirmButtonText: 'ok'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onClickAlert2() {
|
onClickAlert2() {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
message
|
message,
|
||||||
|
confirmButtonText: 'ok'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onClickConfirm() {
|
onClickConfirm() {
|
||||||
Dialog.confirm({
|
Dialog.confirm({
|
||||||
title: '标题',
|
title: 'Title',
|
||||||
message
|
message,
|
||||||
|
confirmButtonText: 'ok',
|
||||||
|
cancelButtonText: 'cancel'
|
||||||
}).catch(action => {
|
}).catch(action => {
|
||||||
console.log(action);
|
console.log(action);
|
||||||
});
|
});
|
||||||
@ -40,14 +44,13 @@ import { Dialog } from 'vant';
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
#### 消息提示
|
#### Alert dialog
|
||||||
|
Used to prompt for some messages, only including one confirm button
|
||||||
|
|
||||||
用于提示一些消息,只包含一个确认按钮
|
:::demo Alert dialog
|
||||||
|
|
||||||
:::demo 消息提示
|
|
||||||
```html
|
```html
|
||||||
<van-button @click="onClickAlert">Alert</van-button>
|
<van-button @click="onClickAlert">Alert</van-button>
|
||||||
<van-button @click="onClickAlert2">无标题 Alert</van-button>
|
<van-button @click="onClickAlert2">Alert without title</van-button>
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -55,8 +58,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
onClickAlert() {
|
onClickAlert() {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
title: '标题',
|
title: 'Title',
|
||||||
message: '弹窗内容'
|
message: 'Content'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// on close
|
// on close
|
||||||
});
|
});
|
||||||
@ -64,7 +67,7 @@ export default {
|
|||||||
|
|
||||||
onClickAlert2() {
|
onClickAlert2() {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
message: '弹窗内容'
|
message: 'Content'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// on close
|
// on close
|
||||||
});
|
});
|
||||||
@ -74,11 +77,10 @@ export default {
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 消息确认
|
#### Confirm dialog
|
||||||
|
Used to confirm some messages, including a confirm button and a cancel button
|
||||||
|
|
||||||
用于确认消息,包含取消和确认按钮
|
:::demo Confirm dialog
|
||||||
|
|
||||||
:::demo 消息确认
|
|
||||||
```html
|
```html
|
||||||
<van-button @click="onClickConfirm">Confirm</van-button>
|
<van-button @click="onClickConfirm">Confirm</van-button>
|
||||||
```
|
```
|
||||||
@ -88,8 +90,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
onClickConfirm() {
|
onClickConfirm() {
|
||||||
Dialog.confirm({
|
Dialog.confirm({
|
||||||
title: '标题',
|
title: 'Title',
|
||||||
message: '弹窗内容'
|
message: 'Content'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// on confirm
|
// on confirm
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -101,24 +103,24 @@ export default {
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### 方法
|
### Methods
|
||||||
|
|
||||||
| 方法名 | Attribute | 返回值 | 介绍 |
|
| Name | Attribute | Return value | Description |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
| Dialog.alert | options | `Promise` | 展示消息提示弹窗 |
|
| Dialog.alert | options | `Promise` | Show alert dialog |
|
||||||
| Dialog.confirm | options | `Promise` | 展示消息确认弹窗 |
|
| Dialog.confirm | options | `Promise` | Show confim dialog |
|
||||||
| Dialog.close | - | `void` | 关闭弹窗 |
|
| Dialog.close | - | `void` | Close dialog |
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| title | 标题 | `String` | - | - |
|
| title | Title | `String` | - | - |
|
||||||
| message | 内容 | `String` | - | - |
|
| message | Message | `String` | - | - |
|
||||||
| showConfirmButton | 是否展示确认按钮 | `Boolean` | `true` | - |
|
| showConfirmButton | Whether to show confirm button | `Boolean` | `true` | - |
|
||||||
| showCancelButton | 是否展示取消按钮 | `Boolean` | `false` | - |
|
| showCancelButton | Whether to show cancel button | `Boolean` | `false` | - |
|
||||||
| confirmButtonText | 确认按钮的文案 | `String` | `确认` | - |
|
| confirmButtonText | Confirm button text | `String` | `确认` | - |
|
||||||
| cancelButtonText | 取消按钮的文案 | `String` | `取消` | - |
|
| cancelButtonText | Cancel button test | `String` | `取消` | - |
|
||||||
| overlay | 是否展示蒙层 | `Boolean` | `true` | - |
|
| overlay | Whether to show overlay | `Boolean` | `true` | - |
|
||||||
| closeOnClickOverlay | 点击蒙层时是否关闭弹窗 | `Boolean` | `false` | - |
|
| closeOnClickOverlay | Whether to close when click overlay | `Boolean` | `false` | - |
|
||||||
| lockOnScroll | 是否禁用背景滚动 | `Boolean` | `true` | - |
|
| lockOnScroll | Whether to lock body scroll | `Boolean` | `true` | - |
|
||||||
|
@ -46,7 +46,7 @@ const icons = [
|
|||||||
'credit-pay',
|
'credit-pay',
|
||||||
'debit-pay',
|
'debit-pay',
|
||||||
'other-pay',
|
'other-pay',
|
||||||
'cart',
|
'shopping-cart',
|
||||||
'browsing-history',
|
'browsing-history',
|
||||||
'goods-collect',
|
'goods-collect',
|
||||||
'shop-collect',
|
'shop-collect',
|
||||||
@ -78,7 +78,12 @@ const icons = [
|
|||||||
'gift-card',
|
'gift-card',
|
||||||
'coupon',
|
'coupon',
|
||||||
'completed',
|
'completed',
|
||||||
'value-card'
|
'value-card',
|
||||||
|
'certificate',
|
||||||
|
'tosend',
|
||||||
|
'sign',
|
||||||
|
'home',
|
||||||
|
'phone'
|
||||||
];
|
];
|
||||||
|
|
||||||
const IconListConstructor = Vue.extend({
|
const IconListConstructor = Vue.extend({
|
||||||
|
@ -13,7 +13,10 @@ Vue.component(NoticeBar.name, NoticeBar);
|
|||||||
|
|
||||||
:::demo Basic Usage
|
:::demo Basic Usage
|
||||||
```html
|
```html
|
||||||
<van-notice-bar text="Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily." />
|
<van-notice-bar
|
||||||
|
text="Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily."
|
||||||
|
left-icon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
|
||||||
|
/>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -47,8 +50,12 @@ Vue.component(NoticeBar.name, NoticeBar);
|
|||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| mode | Mode | String | `''` | `closeable` `link` |
|
| mode | Mode | String | `''` | `closeable` `link` |
|
||||||
| delay | Animation delay (s) | Number | `1` | - |
|
| delay | Animation delay (s) | Number | `1` | - |
|
||||||
| speed | Scroll speed (px) | Number | `40` | - |
|
| speed | Scroll speed (px) | Number | `50` | - |
|
||||||
| scrollable | Whether to scroll content | Boolean | `true` | - |
|
| scrollable | Whether to scroll content | Boolean | `true` | - |
|
||||||
|
| leftIcon | Image url of left icon | String | - | - |
|
||||||
|
| color | Text color | String | `#f60` | - |
|
||||||
|
| background | Background color | String | `#fff7cc` | - |
|
||||||
|
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
<script>
|
<script>
|
||||||
const citys = {
|
import { Toast } from 'packages/index';
|
||||||
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
|
||||||
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
const states = {
|
||||||
'湖南': ['长沙', '株洲', '湘潭', '衡阳', '邵阳', '岳阳', '常德', '张家界', '益阳', '郴州', '永州', '怀化', '娄底', '湘西土家族苗族自治州']
|
'Group1': ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
|
||||||
|
'Group2': ['Alabama', 'Kansas', 'Louisiana', 'Texas']
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '地区选择',
|
title: 'Title',
|
||||||
pickerColumns: [
|
pickerColumns: [
|
||||||
{
|
{
|
||||||
values: Object.keys(citys),
|
values: Object.keys(states),
|
||||||
className: 'column1'
|
className: 'column1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
values: ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
values: states.Group1,
|
||||||
className: 'column2'
|
className: 'column2'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -24,13 +25,13 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handlePickerChange(picker, values) {
|
handlePickerChange(picker, values) {
|
||||||
picker.setColumnValues(1, citys[values[0]]);
|
picker.setColumnValues(1, states[values[0]]);
|
||||||
},
|
},
|
||||||
handlePickerCancel() {
|
handlePickerCancel() {
|
||||||
alert('picker cancel');
|
Toast('Cancel');
|
||||||
},
|
},
|
||||||
handlePickerConfirm() {
|
handlePickerConfirm() {
|
||||||
alert('picker confirm');
|
Toast('Confirm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -55,10 +56,9 @@ Vue.component(Picker.name, Picker);
|
|||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const citys = {
|
const states = {
|
||||||
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
'Group1': ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
|
||||||
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
'Group2': ['Alabama', 'Kansas', 'Louisiana', 'Texas']
|
||||||
'湖南': ['长沙', '株洲', '湘潭', '衡阳', '邵阳', '岳阳', '常德', '张家界', '益阳', '郴州', '永州', '怀化', '娄底', '湘西土家族苗族自治州']
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -66,11 +66,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
pickerColumns: [
|
pickerColumns: [
|
||||||
{
|
{
|
||||||
values: Object.keys(citys),
|
values: Object.keys(states),
|
||||||
className: 'column1'
|
className: 'column1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
values: ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
values: states.Group1,
|
||||||
className: 'column2'
|
className: 'column2'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -86,14 +86,14 @@ export default {
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 带toolbar的Picker
|
#### Picker with toolbar
|
||||||
|
|
||||||
:::demo 带toolbar的Picker
|
:::demo Picker with toolbar
|
||||||
```html
|
```html
|
||||||
<van-picker
|
<van-picker
|
||||||
|
show-toolbar
|
||||||
:title="title"
|
:title="title"
|
||||||
:columns="pickerColumns"
|
:columns="pickerColumns"
|
||||||
show-toolbar
|
|
||||||
@change="handlePickerChange"
|
@change="handlePickerChange"
|
||||||
@cancel="handlePickerCancel"
|
@cancel="handlePickerCancel"
|
||||||
@confirm="handlePickerConfirm"
|
@confirm="handlePickerConfirm"
|
||||||
@ -101,23 +101,22 @@ export default {
|
|||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const citys = {
|
const states = {
|
||||||
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
'Group1': ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
|
||||||
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
'Group2': ['Alabama', 'Kansas', 'Louisiana', 'Texas']
|
||||||
'湖南': ['长沙', '株洲', '湘潭', '衡阳', '邵阳', '岳阳', '常德', '张家界', '益阳', '郴州', '永州', '怀化', '娄底', '湘西土家族苗族自治州']
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '地区选择',
|
title: 'Title',
|
||||||
pickerColumns: [
|
pickerColumns: [
|
||||||
{
|
{
|
||||||
values: Object.keys(citys),
|
values: Object.keys(states),
|
||||||
className: 'column1'
|
className: 'column1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
values: ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
values: states.Group1,
|
||||||
className: 'column2'
|
className: 'column2'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -129,10 +128,10 @@ export default {
|
|||||||
picker.setColumnValues(1, citys[values[0]]);
|
picker.setColumnValues(1, citys[values[0]]);
|
||||||
},
|
},
|
||||||
handlePickerCancel() {
|
handlePickerCancel() {
|
||||||
alert('picker cancel');
|
Toast('Cancel');
|
||||||
},
|
},
|
||||||
handlePickerConfirm() {
|
handlePickerConfirm() {
|
||||||
alert('picker confirm');
|
Toast('Confirm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -143,31 +142,28 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| visibileColumnCount | 每一列可见备选元素的个数 | `Number` | `5` | - |
|
| visibileColumnCount | Count of columns to show | `Number` | `5` | - |
|
||||||
| itemHeight | 选中元素区高度 | `Number` | `44` | - |
|
| itemHeight | Item height | `Number` | `44` | - |
|
||||||
| columns | 对象数组,配置每一列显示的数据 | `Array` | - | - |
|
| columns | Columns data | `Array` | - | - |
|
||||||
| showToolbar | 是否在组件顶部显示一个toolbar | `Boolean` | `true` | - |
|
| showToolbar | Whether to show toolbar | `Boolean` | `true` | - |
|
||||||
| title | 在toolbar上显示的标题文字 | `String` | - | - |
|
| title | Toolbar title | `String` | - | - |
|
||||||
|
|
||||||
### columns
|
### Data struct of columns
|
||||||
|
|
||||||
`API`中的`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`:
|
|
||||||
|
|
||||||
| key | Description |
|
| key | Description |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| values | 列中对应的备选值 |
|
| values | Value of column |
|
||||||
| defaultIndex | 初始选中值的索引,默认为0 |
|
| defaultIndex | Default value index |
|
||||||
| className | 为对应列添加特殊的`class` |
|
| className | ClassName for this column |
|
||||||
|
|
||||||
### change事件
|
### Picker instance
|
||||||
|
The first argument of change event's callback function is a picker instance with some methods
|
||||||
|
|
||||||
在`change`事件中,可以获取到`picker`实例,对`picker`进行相应的更新等操作:
|
| Method | Description |
|
||||||
|
|
||||||
| 函数 | Description |
|
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| getColumnValue(index) | 获取对应列中选中的值 |
|
| getColumnValue(index) | get current value of the column |
|
||||||
| setColumnValue(index, value) | 设置对应列中选中的值 |
|
| setColumnValue(index, value) | set current value of the column |
|
||||||
| getColumnValues(index) | 获取对应列中所有的备选值 |
|
| getColumnValues(index) | get all values of the column |
|
||||||
| setColumnValues(index, values) | 设置对应列中所有的备选值 |
|
| setColumnValues(index, values) | set all values of the column |
|
||||||
| getValues() | 获取所有列中被选中的值,返回一个数组 |
|
| getValues() | get current values of all columns |
|
||||||
| setValues(values) | `values`为一个数组,设置所有列中被选中的值 |
|
| setValues(values) | set current values of all columns |
|
||||||
|
@ -13,7 +13,7 @@ export default {
|
|||||||
isLoading() {
|
isLoading() {
|
||||||
if (this.isLoading) {
|
if (this.isLoading) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Toast('刷新成功');
|
Toast('Refresh Success');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.count++;
|
this.count++;
|
||||||
}, 500);
|
}, 500);
|
||||||
@ -23,7 +23,7 @@ export default {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const head = document.querySelector('.van-pull-refresh__head');
|
const head = document.querySelector('.van-pull-refresh__head');
|
||||||
head.insertAdjacentHTML('afterend', '<h1 class="zan-doc-demo-block__title">PullRefresh 下拉刷新</h1>');
|
head.insertAdjacentHTML('afterend', '<h1 class="zan-doc-demo-block__title">PullRefresh</h1>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -41,9 +41,14 @@ Vue.component(PullRefresh.name, PullRefresh);
|
|||||||
|
|
||||||
:::demo
|
:::demo
|
||||||
```html
|
```html
|
||||||
<!-- 通过 v-model 控制加载状态 -->
|
<!-- use v-model to control loading status -->
|
||||||
<van-pull-refresh v-model="isLoading">
|
<van-pull-refresh
|
||||||
<p>刷新次数: {{ count }}</p>
|
v-model="isLoading"
|
||||||
|
pulling-text="Pull to refresh..."
|
||||||
|
loosing-text="Loose to refresh..."
|
||||||
|
loading-text="Loading..."
|
||||||
|
>
|
||||||
|
<p>Refresh Count: {{ count }}</p>
|
||||||
</van-pull-refresh>
|
</van-pull-refresh>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -60,7 +65,7 @@ export default {
|
|||||||
isLoading() {
|
isLoading() {
|
||||||
if (this.isLoading) {
|
if (this.isLoading) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Toast('刷新成功');
|
Toast('Refresh Success');
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.count++;
|
this.count++;
|
||||||
}, 500);
|
}, 500);
|
||||||
@ -75,19 +80,19 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| v-model | 是否在加载中 | `Boolean` | - | - |
|
| v-model | Loading status | `Boolean` | - | - |
|
||||||
| pullingText | 下拉过程中顶部文案 | `String` | `下拉即可刷新...` | - |
|
| pullingText | Text to show when pulling | `String` | `下拉即可刷新...` | - |
|
||||||
| loosingText | 释放过程中顶部文案 | `String` | `释放即可刷新...` | - |
|
| loosingText | Text to show when loosing | `String` | `释放即可刷新...` | - |
|
||||||
| loadingText | 加载过程中顶部文案 | `String` | `加载中...` | - |
|
| loadingText | Text to show when loading | `String` | `加载中...` | - |
|
||||||
| animationDuration | 动画时长 | `Number` | `300` | - |
|
| animationDuration | Animation duration | `Number` | `300` | - |
|
||||||
| headHeight | 顶部内容高度 | `Number` | `50` | - |
|
| headHeight | Height of head | `Number` | `50` | - |
|
||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | Description |
|
| name | Description |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义内容 |
|
| - | Default slot |
|
||||||
| normal | 非下拉状态时顶部内容 |
|
| normal | Content of head when at normal status |
|
||||||
| pulling | 下拉过程中顶部内容 |
|
| pulling | Content of head when at pulling |
|
||||||
| loosing | 释放过程中顶部内容 |
|
| loosing | Content of head when at loosing |
|
||||||
| loading | 加载过程中顶部内容 |
|
| loading | Content of head when at loading |
|
||||||
|
@ -72,6 +72,7 @@ export default {
|
|||||||
| autoplay | Autoplay interval (ms) | `Number` | - | - |
|
| autoplay | Autoplay interval (ms) | `Number` | - | - |
|
||||||
| duration | Animation duration (ms) | `Number` | `500` | - |
|
| duration | Animation duration (ms) | `Number` | `500` | - |
|
||||||
| showIndicators | Whether to show indocators | `Boolean` | `true` | - |
|
| showIndicators | Whether to show indocators | `Boolean` | `true` | - |
|
||||||
|
| initialSwipe | Index of initial swipe, start from 0 | `Number` | `0` | - |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## SwitchCell
|
## SwitchCell
|
||||||
|
|
||||||
`SwitchCell`组件是对`Switch`和`Cell`组件的封装
|
`SwitchCell` component is an encapsulation of `Switch` and `Cell`.
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
@ -42,9 +42,9 @@ export default {
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
#### Disabled
|
#### Disabled
|
||||||
通过`disabled`属性可以将组件设置为禁用状态
|
use `disabled` property to disable the component
|
||||||
|
|
||||||
:::demo 禁用状态
|
:::demo Disabled component
|
||||||
```html
|
```html
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-switch-cell v-model="checked" :disabled="true" title="标题" />
|
<van-switch-cell v-model="checked" :disabled="true" title="标题" />
|
||||||
@ -53,9 +53,9 @@ export default {
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
#### Loading
|
#### Loading
|
||||||
通过`loading`属性可以将组件设置为加载状态
|
use `loading` property to keep component in loading state
|
||||||
|
|
||||||
:::demo 加载状态
|
:::demo Component in loading
|
||||||
```html
|
```html
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-switch-cell v-model="checked" :loading="true" title="标题" />
|
<van-switch-cell v-model="checked" :loading="true" title="标题" />
|
||||||
@ -67,13 +67,13 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| v-model | 开关状态 | `Boolean` | - | - |
|
| v-model | on-off state of the switch | `Boolean` | - | - |
|
||||||
| title | 左侧标题 | `String` | `''` | - |
|
| title | the leftside title | `String` | `''` | - |
|
||||||
| loading | 是否为加载状态 | `Boolean` | `false` | - |
|
| loading | whether the component is in loading state | `Boolean` | `false` | - |
|
||||||
| disabled | 是否为禁用状态 | `Boolean` | `false` | - |
|
| disabled | whether to disable the component | `Boolean` | `false` | - |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
| Event | Description | Attribute |
|
| Event | Description | Attribute |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| change | 开关状态切换回调 | checked: 是否选中开关 |
|
| change | triggered when the on-off state is changed | checked: switch is on or not |
|
@ -32,8 +32,8 @@ Vue.component(TabbarItem.name, TabbarItem);
|
|||||||
<van-tabbar v-model="active">
|
<van-tabbar v-model="active">
|
||||||
<van-tabbar-item icon="shop">Tab</van-tabbar-item>
|
<van-tabbar-item icon="shop">Tab</van-tabbar-item>
|
||||||
<van-tabbar-item icon="chat" dot>Tab</van-tabbar-item>
|
<van-tabbar-item icon="chat" dot>Tab</van-tabbar-item>
|
||||||
<van-tabbar-item icon="records">Tab</van-tabbar-item>
|
<van-tabbar-item icon="records" info="5">Tab</van-tabbar-item>
|
||||||
<van-tabbar-item icon="gold-coin">Tab</van-tabbar-item>
|
<van-tabbar-item icon="gold-coin" info="20">Tab</van-tabbar-item>
|
||||||
</van-tabbar>
|
</van-tabbar>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -96,3 +96,4 @@ export default {
|
|||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| icon | Icon name | `String` | - | Names from Icon Component |
|
| icon | Icon name | `String` | - | Names from Icon Component |
|
||||||
| dot | Whether to show red dot | `Boolean` | - | - |
|
| dot | Whether to show red dot | `Boolean` | - | - |
|
||||||
|
| info | Info message | `String` | - | - |
|
||||||
|
@ -4,57 +4,57 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: [{
|
items: [{
|
||||||
text: '所有城市',
|
text: 'All Cities',
|
||||||
children: [{
|
children: [{
|
||||||
text: '杭州',
|
text: 'Hang Zhou',
|
||||||
id: 1001
|
id: 1001
|
||||||
}, {
|
}, {
|
||||||
text: '温州',
|
text: 'Wen Zhou',
|
||||||
id: 1002
|
id: 1002
|
||||||
}, {
|
}, {
|
||||||
text: '海南',
|
text: 'Hai Nan',
|
||||||
id: 1100
|
id: 1100
|
||||||
}, {
|
}, {
|
||||||
text: '宁波',
|
text: 'Ning Bo',
|
||||||
id: 1003
|
id: 1003
|
||||||
}, {
|
}, {
|
||||||
text: '义乌',
|
text: 'Yi Wu',
|
||||||
id: 1004
|
id: 1004
|
||||||
}, {
|
}, {
|
||||||
text: '无锡',
|
text: 'Wu Xi',
|
||||||
id: 1011
|
id: 1011
|
||||||
}, {
|
}, {
|
||||||
text: '常州',
|
text: 'Chang Zhou',
|
||||||
id: 1012
|
id: 1012
|
||||||
}, {
|
}, {
|
||||||
text: '大连',
|
text: 'Da Lian',
|
||||||
id: 1031
|
id: 1031
|
||||||
}, {
|
}, {
|
||||||
text: '诸暨',
|
text: 'Zhu Ji',
|
||||||
id: 1005
|
id: 1005
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
text: '浙江',
|
text: 'Zhe Jiang',
|
||||||
children: [{
|
children: [{
|
||||||
text: '杭州',
|
text: 'Hang Zhou',
|
||||||
id: 1001
|
id: 1001
|
||||||
}, {
|
}, {
|
||||||
text: '温州',
|
text: 'Wen Zhou',
|
||||||
id: 1002
|
id: 1002
|
||||||
}, {
|
}, {
|
||||||
text: '宁波',
|
text: 'Ning Bo',
|
||||||
id: 1003
|
id: 1003
|
||||||
}, {
|
}, {
|
||||||
text: '义乌',
|
text: 'Yi Wu',
|
||||||
id: 1004
|
id: 1004
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
text: '江苏',
|
text: 'Jiang Su',
|
||||||
children: [{
|
children: [{
|
||||||
text: '无锡',
|
text: 'Wu Xi',
|
||||||
id: 1011
|
id: 1011
|
||||||
}, {
|
}, {
|
||||||
text: '常州',
|
text: 'Chang Zhou',
|
||||||
id: 1012
|
id: 1012
|
||||||
}]
|
}]
|
||||||
}],
|
}],
|
||||||
@ -103,9 +103,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: items,
|
items: items,
|
||||||
// 左侧高亮元素的index
|
// the index of parent item
|
||||||
mainActiveIndex: 0,
|
mainActiveIndex: 0,
|
||||||
// 被选中元素的id
|
// the id of selected item
|
||||||
activeId: 1001
|
activeId: 1001
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -124,42 +124,42 @@ export default {
|
|||||||
|
|
||||||
### API
|
### API
|
||||||
|
|
||||||
#### 传入参数
|
#### Properties
|
||||||
|
|
||||||
| Attribute | Description | Type | Default | 必须 |
|
| Attribute | Description | Type | Default | 必须 |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| items | 分类显示所需的数据,具体数据结构可看 数据结构 | Array | [] | - |
|
| items | Required datasets for the component, see Data Structure for detail. | Array | [] | - |
|
||||||
| mainActiveIndex | 左侧导航高亮的索引 | Number | 0 | - |
|
| mainActiveIndex | The index of selected parent node | Number | 0 | - |
|
||||||
| activeId | 右侧选择项,高亮的数据id | Number | 0 | - |
|
| activeId | Id of selected item | Number | 0 | - |
|
||||||
|
|
||||||
#### Event
|
#### Event
|
||||||
| Event | Description | Attribute |
|
| Event | Description | Attribute |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| navclick | 左侧导航点击时,触发的事件 | index:被点击的导航的索引 |
|
| navclick | triggered when parent node is selected | index: index of selected parent |
|
||||||
| itemclick | 右侧选择项被点击时,会触发的事件 | data: 该点击项的数据 |
|
| itemclick | triggered when item is selected | data: selected item |
|
||||||
|
|
||||||
### Data Structure
|
### Data Structure
|
||||||
#### items 分类显示所需数据的数据结构
|
`items` should be an array contains specified tree objects.
|
||||||
`items` 整体为一个数组,数组内包含一系列描述分类的 object。
|
|
||||||
|
In every tree object, `text` property defines the name, `id` stands for the unique key while the `children` contains sub-tree objects.
|
||||||
|
|
||||||
每个分类里,text表示当前分类的名称。children 表示分类里的可选项,为数组结构,id被用来唯一标识每个选项
|
|
||||||
```javascript
|
```javascript
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
// 导航名称
|
// name of the parent node
|
||||||
text: '所有城市',
|
text: 'All Cities',
|
||||||
// 该导航下所有的可选项
|
// leaves of this parent node
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
// 可选项的名称
|
// name of the leaf node
|
||||||
text: '温州',
|
text: 'Washington',
|
||||||
// 可选项的id,高亮的时候是根据id是否和选中的id是否相同进行判断的
|
// id of the leaf node, component highlights leaf node by comparing the activeId with this.
|
||||||
id: 1002
|
id: 1002
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 可选项的名称
|
// name of the leaf node
|
||||||
text: '杭州',
|
text: 'Baltimore',
|
||||||
// 可选项的id,高亮的时候是根据id是否和选中的id是否相同进行判断的
|
// id of the leaf node, component highlights leaf node by comparing the activeId with this.
|
||||||
id: 1001
|
id: 1001
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -8,24 +8,26 @@
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-actionsheet p {
|
p {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show1: false,
|
show1: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
show3: false,
|
show3: false,
|
||||||
actions1: [
|
actions: [
|
||||||
{
|
{
|
||||||
name: '微信安全支付',
|
name: '微信安全支付',
|
||||||
className: 'actionsheet-wx',
|
className: 'actionsheet-wx',
|
||||||
callback: this.handleActionClick
|
callback: this.onClick
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '支付宝支付',
|
name: '支付宝支付',
|
||||||
@ -42,8 +44,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleActionClick(item) {
|
onClick(item) {
|
||||||
console.log(item);
|
Toast(item.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,14 +63,12 @@ Vue.component(Actionsheet.name, Actionsheet);
|
|||||||
### 代码演示
|
### 代码演示
|
||||||
|
|
||||||
#### 基础用法
|
#### 基础用法
|
||||||
|
需要传入一个`actions`的数组,数组的每一项是一个对象,对象属性见文档下方表格。
|
||||||
需要传入一个`actions`的属性,该属性为一个数组,数组的每一项是一个对象,可以根据下面的[action对象](#actions)设置你想要的信息。
|
|
||||||
|
|
||||||
:::demo 基础用法
|
:::demo 基础用法
|
||||||
```html
|
```html
|
||||||
<van-button @click="show1 = true">弹出actionsheet</van-button>
|
<van-button @click="show1 = true">弹出 Actionsheet</van-button>
|
||||||
<van-actionsheet v-model="show1" :actions="actions1">
|
<van-actionsheet v-model="show1" :actions="actions" />
|
||||||
</van-actionsheet>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -76,11 +76,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show1: false,
|
show1: false,
|
||||||
actions1: [
|
actions: [
|
||||||
{
|
{
|
||||||
name: '微信安全支付',
|
name: '微信安全支付',
|
||||||
className: 'actionsheet-wx',
|
className: 'actionsheet-wx',
|
||||||
callback: this.handleActionClick
|
callback: this.onClick
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '支付宝支付',
|
name: '支付宝支付',
|
||||||
@ -97,8 +97,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleActionClick(item) {
|
onClick(item) {
|
||||||
console.log(item);
|
Toast(item.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,8 +111,8 @@ export default {
|
|||||||
|
|
||||||
:::demo 带取消按钮的 Actionsheet
|
:::demo 带取消按钮的 Actionsheet
|
||||||
```html
|
```html
|
||||||
<van-button @click="show2 = true">弹出带取消按钮的actionsheet</van-button>
|
<van-button @click="show2 = true">弹出带取消按钮的 Actionsheet</van-button>
|
||||||
<van-actionsheet v-model="show2" :actions="actions1" cancel-text="取消">
|
<van-actionsheet v-model="show2" :actions="actions" cancel-text="取消">
|
||||||
</van-actionsheet>
|
</van-actionsheet>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -121,11 +121,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show2: false,
|
show2: false,
|
||||||
actions1: [
|
actions: [
|
||||||
{
|
{
|
||||||
name: '微信安全支付',
|
name: '微信安全支付',
|
||||||
className: 'actionsheet-wx',
|
className: 'actionsheet-wx',
|
||||||
callback: this.handleActionClick
|
callback: this.onClick
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '支付宝支付',
|
name: '支付宝支付',
|
||||||
@ -150,8 +150,8 @@ export default {
|
|||||||
|
|
||||||
:::demo 带标题的 Actionsheet
|
:::demo 带标题的 Actionsheet
|
||||||
```html
|
```html
|
||||||
<van-button @click="show3 = true">弹出带标题的actionsheet</van-button>
|
<van-button @click="show3 = true">弹出带标题的 Actionsheet</van-button>
|
||||||
<van-actionsheet v-model="show3" title="支持以下配送方式" class="title-actionsheet">
|
<van-actionsheet v-model="show3" title="支持以下配送方式">
|
||||||
<p>一些内容</p>
|
<p>一些内容</p>
|
||||||
</van-actionsheet>
|
</van-actionsheet>
|
||||||
```
|
```
|
||||||
|
@ -87,7 +87,7 @@ Vue.component(CellGroup.name, CellGroup);
|
|||||||
:::demo 高级用法
|
:::demo 高级用法
|
||||||
```html
|
```html
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-cell value="进入店铺" icon="home" is-link>
|
<van-cell value="进入店铺" icon="shop" is-link>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<span class="van-cell-text">起码运动馆</span>
|
<span class="van-cell-text">起码运动馆</span>
|
||||||
<van-tag type="danger">官方</van-tag>
|
<van-tag type="danger">官方</van-tag>
|
||||||
@ -112,6 +112,8 @@ Vue.component(CellGroup.name, CellGroup);
|
|||||||
| value | 右侧内容 | `String` | - | - |
|
| value | 右侧内容 | `String` | - | - |
|
||||||
| label | 标题下方的描述信息 | `String` | - | - |
|
| label | 标题下方的描述信息 | `String` | - | - |
|
||||||
| url | 跳转链接 | `String` | - | - |
|
| url | 跳转链接 | `String` | - | - |
|
||||||
|
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
|
||||||
|
| replace | 跳转时是否替换当前 history | `String` | `false` | - |
|
||||||
| isLink | 是否展示右侧箭头 | `Boolean` | `false` | - |
|
| isLink | 是否展示右侧箭头 | `Boolean` | `false` | - |
|
||||||
| required | 是否显示表单必填符号 | `Boolean` | `false` | - |
|
| required | 是否显示表单必填符号 | `Boolean` | `false` | - |
|
||||||
|
|
||||||
|
@ -1,5 +1,132 @@
|
|||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
## [v0.10.6](https://github.com/youzan/vant/tree/v0.10.6) (2017-11-06)
|
||||||
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.5...v0.10.6)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
|
||||||
|
- tabbar自定义的情况下 无法生成info 是否考虑添加这个功能 [\#249](https://github.com/youzan/vant/issues/249)
|
||||||
|
|
||||||
|
**Issue**
|
||||||
|
|
||||||
|
- waterfall滚动到底部时无限触发加载 [\#283](https://github.com/youzan/vant/issues/283)
|
||||||
|
- swipe [\#282](https://github.com/youzan/vant/issues/282)
|
||||||
|
- waterfall瀑布流拉到最底之后无限触发事件 [\#281](https://github.com/youzan/vant/issues/281)
|
||||||
|
- Card点击事件无法触发 [\#276](https://github.com/youzan/vant/issues/276)
|
||||||
|
- Vant 下载 [\#275](https://github.com/youzan/vant/issues/275)
|
||||||
|
- 使用steps步骤条出现最后一个离得很远的问题 [\#273](https://github.com/youzan/vant/issues/273)
|
||||||
|
- 请问有DEMO首页的手风琴组件吗? [\#272](https://github.com/youzan/vant/issues/272)
|
||||||
|
- van-swipe组件添加了一个class就无法触摸滚动了 [\#270](https://github.com/youzan/vant/issues/270)
|
||||||
|
- Cell的url 只支持 mode: history的形式 [\#266](https://github.com/youzan/vant/issues/266)
|
||||||
|
- tabs组件文档有误 [\#264](https://github.com/youzan/vant/issues/264)
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
|
||||||
|
- \[bug fix\]: tabs dynamic generate bug [\#284](https://github.com/youzan/vant/pull/284) ([cookfront](https://github.com/cookfront))
|
||||||
|
- \[bugfix\] NoticeBar text disappeared when page back [\#280](https://github.com/youzan/vant/pull/280) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Swipe add 'initialSwipe' prop [\#279](https://github.com/youzan/vant/pull/279) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bugfix\] Dialog should reset button text when showed [\#278](https://github.com/youzan/vant/pull/278) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] update document site title [\#274](https://github.com/youzan/vant/pull/274) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
|
||||||
|
## [v0.10.5](https://github.com/youzan/vant/tree/v0.10.5) (2017-10-30)
|
||||||
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.4...v0.10.5)
|
||||||
|
|
||||||
|
**Breaking changes**
|
||||||
|
|
||||||
|
- Please give an english translation for the API [\#156](https://github.com/youzan/vant/issues/156)
|
||||||
|
- 以前的产品 橱窗组件怎么没有了? [\#119](https://github.com/youzan/vant/issues/119)
|
||||||
|
|
||||||
|
**Issue**
|
||||||
|
|
||||||
|
- van-col里嵌套动态img问题 [\#261](https://github.com/youzan/vant/issues/261)
|
||||||
|
- 这是一条咨询, 非技术issues [\#259](https://github.com/youzan/vant/issues/259)
|
||||||
|
- 图标库不方便管理,建议开源字体图标库 [\#255](https://github.com/youzan/vant/issues/255)
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
|
||||||
|
- \[bugfix\] Tabbar cann't display info when use icon slot [\#269](https://github.com/youzan/vant/pull/269) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Cell support vue-router target route [\#268](https://github.com/youzan/vant/pull/268) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bugfix\] uploader style error [\#265](https://github.com/youzan/vant/pull/265) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] change document site path to /zanui/vant [\#262](https://github.com/youzan/vant/pull/262) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] english document of all action components [\#260](https://github.com/youzan/vant/pull/260) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
|
||||||
|
## [v0.10.4](https://github.com/youzan/vant/tree/v0.10.4) (2017-10-26)
|
||||||
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.3...v0.10.4)
|
||||||
|
|
||||||
|
**Breaking changes**
|
||||||
|
|
||||||
|
- 业务组件 - 购物车组件 [\#209](https://github.com/youzan/vant/issues/209)
|
||||||
|
|
||||||
|
**Issue**
|
||||||
|
|
||||||
|
- 希望直接支持按需引入组件 [\#257](https://github.com/youzan/vant/issues/257)
|
||||||
|
- 请问支持自定义主题色或者有支持计划么? [\#256](https://github.com/youzan/vant/issues/256)
|
||||||
|
- 希望能隐藏地址列表组件的checkbox [\#250](https://github.com/youzan/vant/issues/250)
|
||||||
|
- Coupon 优惠券选择器 顶部兑换模块的 显隐开关 [\#241](https://github.com/youzan/vant/issues/241)
|
||||||
|
- Tabbar 是否能增加Badge。 [\#240](https://github.com/youzan/vant/issues/240)
|
||||||
|
- Toast 轻提示建议增加上中下位置的配置 [\#233](https://github.com/youzan/vant/issues/233)
|
||||||
|
- van-search 的@search事件无法捕获value ,老版本以前是可以的 [\#232](https://github.com/youzan/vant/issues/232)
|
||||||
|
- Dialog蒙层样式没能正常加载 [\#229](https://github.com/youzan/vant/issues/229)
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
|
||||||
|
- \[bugfix\] Swipe width calc error [\#258](https://github.com/youzan/vant/pull/258) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Notice bar support more props [\#254](https://github.com/youzan/vant/pull/254) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Icon: 增加新 icon 图标 [\#253](https://github.com/youzan/vant/pull/253) ([pangxie1991](https://github.com/pangxie1991))
|
||||||
|
- \[bug fix\] Doc: Update waterfall.md [\#252](https://github.com/youzan/vant/pull/252) ([liangxiaoxin](https://github.com/liangxiaoxin))
|
||||||
|
- \[Doc\] add custom theme document [\#251](https://github.com/youzan/vant/pull/251) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bugfix\] add click feedback of buttons in components [\#248](https://github.com/youzan/vant/pull/248) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bug fix\] PullRefreash: when $parents.$el scrollable, pull refreash trigger error [\#247](https://github.com/youzan/vant/pull/247) ([GeoffZhu](https://github.com/GeoffZhu))
|
||||||
|
- \[bugfix\] CouponList always show empty info [\#246](https://github.com/youzan/vant/pull/246) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
|
||||||
|
## [v0.10.3](https://github.com/youzan/vant/tree/v0.10.3) (2017-10-25)
|
||||||
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.2...v0.10.3)
|
||||||
|
|
||||||
|
**Issue**
|
||||||
|
|
||||||
|
- 能否把DEMO示例的代码全部放出? [\#235](https://github.com/youzan/vant/issues/235)
|
||||||
|
- 能否增加一个下拉菜单及上拉加载更多 [\#234](https://github.com/youzan/vant/issues/234)
|
||||||
|
- ImagePreview 图片预览 组件使用后,点击图片无法显示大图 [\#225](https://github.com/youzan/vant/issues/225)
|
||||||
|
- 能否提供cdn方式呢 [\#223](https://github.com/youzan/vant/issues/223)
|
||||||
|
- 请问如何跟手淘lib-flexible rem布局结合 [\#222](https://github.com/youzan/vant/issues/222)
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
|
||||||
|
- \[new feature\] Tabbar add 'info' prop [\#245](https://github.com/youzan/vant/pull/245) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Toast support `position` prop [\#244](https://github.com/youzan/vant/pull/244) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[new feature\] Coupon add 'showExchangeBar' prop && add empty style [\#243](https://github.com/youzan/vant/pull/243) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] add goods demo [\#242](https://github.com/youzan/vant/pull/242) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bug fix\] Pull-refresh: 'touchcancel '拼写问题 [\#239](https://github.com/youzan/vant/pull/239) ([GeoffZhu](https://github.com/GeoffZhu))
|
||||||
|
- \[bug fix\]: 高阶组件英文文档修改 [\#238](https://github.com/youzan/vant/pull/238) ([Tinysymphony](https://github.com/Tinysymphony))
|
||||||
|
- \[Doc\] add demo pages [\#237](https://github.com/youzan/vant/pull/237) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] add Advanced components english document [\#236](https://github.com/youzan/vant/pull/236) ([Tinysymphony](https://github.com/Tinysymphony))
|
||||||
|
- \[bugfix\] popup style missing when build style entry [\#231](https://github.com/youzan/vant/pull/231) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[bugfix\] Address & Contact list style [\#230](https://github.com/youzan/vant/pull/230) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] add more badges in README.md [\#228](https://github.com/youzan/vant/pull/228) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- update README.md [\#227](https://github.com/youzan/vant/pull/227) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
|
||||||
|
## [v0.10.2](https://github.com/youzan/vant/tree/v0.10.2) (2017-10-20)
|
||||||
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.1...v0.10.2)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
|
||||||
|
- 引入TreeSelect组件后报icon没找到 [\#215](https://github.com/youzan/vant/issues/215)
|
||||||
|
- Checkbox 复选框组件bug [\#213](https://github.com/youzan/vant/issues/213)
|
||||||
|
|
||||||
|
**Issue**
|
||||||
|
|
||||||
|
- 如何动态赋值 [\#221](https://github.com/youzan/vant/issues/221)
|
||||||
|
- 省市区的json文件能放出来吗? [\#219](https://github.com/youzan/vant/issues/219)
|
||||||
|
- 标签页 能提供纵向布局吗?现在只有横向布局 能灵活配置就好了 [\#207](https://github.com/youzan/vant/issues/207)
|
||||||
|
- 能不能考虑增加一个 “选择图片” 的功能 [\#186](https://github.com/youzan/vant/issues/186)
|
||||||
|
- Please open source examples code [\#169](https://github.com/youzan/vant/issues/169)
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
|
||||||
|
- \[new feature\] Sku: sku-group slot add event bus [\#226](https://github.com/youzan/vant/pull/226) ([w91](https://github.com/w91))
|
||||||
|
- \[bugfix\] Optimize component dependency analyze when build style entry [\#224](https://github.com/youzan/vant/pull/224) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
- \[Doc\] add some english documents [\#220](https://github.com/youzan/vant/pull/220) ([chenjiahan](https://github.com/chenjiahan))
|
||||||
|
|
||||||
## [v0.10.1](https://github.com/youzan/vant/tree/v0.10.1) (2017-10-18)
|
## [v0.10.1](https://github.com/youzan/vant/tree/v0.10.1) (2017-10-18)
|
||||||
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.0...v0.10.1)
|
[Full Changelog](https://github.com/youzan/vant/compare/v0.10.0...v0.10.1)
|
||||||
|
|
||||||
|
@ -1,5 +1,66 @@
|
|||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
### [0.10.6](https://github.com/youzan/vant/tree/v0.10.6)
|
||||||
|
`2017-11-06`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- 新增 Swipe initialSwipe 属性 [\#279](https://github.com/youzan/vant/pull/279) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- 修复 Dialog 按钮文字未重置的问题 [\#278](https://github.com/youzan/vant/pull/278) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 修复 Tab 动态生成问题 [\#284](https://github.com/youzan/vant/pull/284) [@cookfront](https://github.com/cookfront)
|
||||||
|
- 修复 NoticeBar 在页面返回时文字消失的问题 [\#280](https://github.com/youzan/vant/pull/280) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
### [0.10.5](https://github.com/youzan/vant/tree/v0.10.5)
|
||||||
|
`2017-10-30`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- Cell 支持 vue-router 路由跳转 [\#268](https://github.com/youzan/vant/pull/268) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- 修复 Tabbar 使用 icon slot 时 info prop 失效的问题 [\#269](https://github.com/youzan/vant/pull/269) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 修复 Uploader input 类型错误 [\#265](https://github.com/youzan/vant/pull/265) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
### [0.10.4](https://github.com/youzan/vant/tree/v0.10.4)
|
||||||
|
`2017-10-26`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- 新增多个图标 [\#253](https://github.com/youzan/vant/pull/253) [@pangxie1991](https://github.com/pangxie1991)
|
||||||
|
- 新增定制主题文档 [\#251](https://github.com/youzan/vant/pull/251) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 新增多个组件的按钮点击态提示 [\#248](https://github.com/youzan/vant/pull/248) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- NoticeBar:增加多个 props [\#254](https://github.com/youzan/vant/pull/254) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- 修复 Swipe 在某些情况下宽度计算错误的问题 [\#258](https://github.com/youzan/vant/pull/258) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 修复 PullRefreash 父元素可滚动时无法正常运行的问题 [\#247](https://github.com/youzan/vant/pull/247) [@GeoffZhu](https://github.com/GeoffZhu)
|
||||||
|
- 修复 CouponList 空列表样式一直存在的问题 [\#246](https://github.com/youzan/vant/pull/246) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
|
||||||
|
### [0.10.3](https://github.com/youzan/vant/tree/v0.10.3)
|
||||||
|
`2017-10-25`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- 新增 Tabbar info 属性 [\#245](https://github.com/youzan/vant/pull/245) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 新增 Toast position 属性 [\#244](https://github.com/youzan/vant/pull/244) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 新增 Coupon showExchangeBar 属性 [\#243](https://github.com/youzan/vant/pull/243) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 新增高阶组件英文文档 [\#236](https://github.com/youzan/vant/pull/236) [@Tinysymphony](https://github.com/Tinysymphony)
|
||||||
|
- 新增示例页面文档 [\#237](https://github.com/youzan/vant/pull/237) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- 修复 Address & Contact 列表底部遮挡问题 [\#230](https://github.com/youzan/vant/pull/230) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 修复 popup 被依赖时未自动引入样式的问题 [\#231](https://github.com/youzan/vant/pull/231) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
- 修复 PullRefresh touchcancel 事件名拼写错误 [\#239](https://github.com/youzan/vant/pull/239) [@GeoffZhu](https://github.com/GeoffZhu)
|
||||||
|
|
||||||
|
### [0.10.2](https://github.com/youzan/vant/tree/v0.10.2)
|
||||||
|
`2017-10-20`
|
||||||
|
|
||||||
|
**Improvements**
|
||||||
|
- Sku: sku-group slot 增加 event bus [\#226](https://github.com/youzan/vant/pull/226) [@w91](https://github.com/w91)
|
||||||
|
- 新增基础英文文档 [\#220](https://github.com/youzan/vant/pull/220) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
|
**Bug Fixes**
|
||||||
|
- 修复组件间样式依赖分析遗漏的问题 [\#224](https://github.com/youzan/vant/pull/224) [@chenjiahan](https://github.com/chenjiahan)
|
||||||
|
|
||||||
### [0.10.1](https://github.com/youzan/vant/tree/v0.10.1)
|
### [0.10.1](https://github.com/youzan/vant/tree/v0.10.1)
|
||||||
`2017-10-18`
|
`2017-10-18`
|
||||||
|
|
||||||
|
@ -157,9 +157,11 @@ export default {
|
|||||||
| exchangeButtonText | 兑换按钮文字 | `String` | `兑换` | - |
|
| exchangeButtonText | 兑换按钮文字 | `String` | `兑换` | - |
|
||||||
| exchangeButtonDisabled | 是否禁用兑换按钮 | `Boolean` | `false` | - |
|
| exchangeButtonDisabled | 是否禁用兑换按钮 | `Boolean` | `false` | - |
|
||||||
| displayedCouponIndex | 滚动至特定优惠券位置 | `Number` | - | - |
|
| displayedCouponIndex | 滚动至特定优惠券位置 | `Number` | - | - |
|
||||||
|
| showCloseButton | 是否显示列表底部按钮 | `Boolean` | `true` | - |
|
||||||
| closeButtonText | 列表底部按钮文字 | `String` | 不使用优惠 | - |
|
| closeButtonText | 列表底部按钮文字 | `String` | 不使用优惠 | - |
|
||||||
| disabledListTitle | 不可用券列表标题 | `String` | 不可用优惠 | - |
|
| disabledListTitle | 不可用券列表标题 | `String` | 不可用优惠 | - |
|
||||||
| inputPlaceholder | 输入框文字提示 | `String` | 请输入优惠码 | - |
|
| inputPlaceholder | 输入框文字提示 | `String` | 请输入优惠码 | - |
|
||||||
|
| showExchangeBar | 是否展示兑换栏 | `Boolean` | `true` | - |
|
||||||
|
|
||||||
### CouponList Event
|
### CouponList Event
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -10,18 +12,6 @@ export default {
|
|||||||
currentDate2: null,
|
currentDate2: null,
|
||||||
currentDate3: null
|
currentDate3: null
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
handlePickerChange(picker) {
|
|
||||||
console.log(picker);
|
|
||||||
},
|
|
||||||
handlePickerCancel() {
|
|
||||||
console.log('picker cancel');
|
|
||||||
},
|
|
||||||
handlePickerConfirm() {
|
|
||||||
console.log('picker confirm');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -48,8 +38,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
|
|||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
:max-date="maxDate"
|
:max-date="maxDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -62,12 +51,6 @@ export default {
|
|||||||
maxDate: new Date(2019, 10, 1),
|
maxDate: new Date(2019, 10, 1),
|
||||||
currentDate: new Date(2018, 0, 1)
|
currentDate: new Date(2018, 0, 1)
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
handlePickerChange(picker) {
|
|
||||||
console.log(picker);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@ -83,8 +66,7 @@ export default {
|
|||||||
:min-hour="minHour"
|
:min-hour="minHour"
|
||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -98,8 +80,7 @@ export default {
|
|||||||
:min-hour="minHour"
|
:min-hour="minHour"
|
||||||
:max-hour="maxHour"
|
:max-hour="maxHour"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
@change="handlePickerChange">
|
/>
|
||||||
</van-datetime-picker>
|
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -108,12 +89,12 @@ export default {
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| visibileColumnCount | 每一列可见备选元素的个数 | Number | 5 | - |
|
| type | 组件类型 | `String` | 'datetime' | 'date', 'time' |
|
||||||
| type | 组件类型 | String | 'datetime' | 'datetime', 'date', 'time' |
|
| minDate | 可选的最小日期 | `Date` | 十年前的 1 月 1 日 | - |
|
||||||
| minDate | 可选的最小日期 | Date | 十年前的 1 月 1 日 | - |
|
| maxDate | 可选的最大日期 | `Date` | 十年后的 12 月 31 日 | - |
|
||||||
| maxDate | 可选的最大日期 | Date | 十年后的 12 月 31 日 | - |
|
| minHour | 可选的最小小时 | `Number` | `0` | - |
|
||||||
| minHour | 可选的最小小时 | Number | 0 | - |
|
| maxHour | 可选的最大小时 | `Number` | `23` | - |
|
||||||
| maxHour | 可选的最大小时 | Number | 23 | - |
|
| visibileColumnCount | 每一列可见备选元素的个数 | `Number` | `5` | - |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ const icons = [
|
|||||||
'credit-pay',
|
'credit-pay',
|
||||||
'debit-pay',
|
'debit-pay',
|
||||||
'other-pay',
|
'other-pay',
|
||||||
'cart',
|
'shopping-cart',
|
||||||
'browsing-history',
|
'browsing-history',
|
||||||
'goods-collect',
|
'goods-collect',
|
||||||
'shop-collect',
|
'shop-collect',
|
||||||
@ -110,7 +110,12 @@ const icons = [
|
|||||||
'gift-card',
|
'gift-card',
|
||||||
'coupon',
|
'coupon',
|
||||||
'completed',
|
'completed',
|
||||||
'value-card'
|
'value-card',
|
||||||
|
'certificate',
|
||||||
|
'tosend',
|
||||||
|
'sign',
|
||||||
|
'home',
|
||||||
|
'phone'
|
||||||
];
|
];
|
||||||
|
|
||||||
const IconListConstructor = Vue.extend({
|
const IconListConstructor = Vue.extend({
|
||||||
|
@ -16,12 +16,12 @@ import { ImagePreview } from 'packages';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
showImagePreview() {
|
showImagePreview(position) {
|
||||||
ImagePreview([
|
ImagePreview([
|
||||||
'https://img.yzcdn.cn/upload_files/2017/03/15/FkubrzN7AgGwLlTeb1E89-T_ZjBg.png',
|
'https://img.yzcdn.cn/upload_files/2017/03/15/FkubrzN7AgGwLlTeb1E89-T_ZjBg.png',
|
||||||
'https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg',
|
'https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg',
|
||||||
'https://img.yzcdn.cn/upload_files/2017/03/15/FvexrWlG_WxtCE9Omo5l27n_mAG_.jpeg'
|
'https://img.yzcdn.cn/upload_files/2017/03/15/FvexrWlG_WxtCE9Omo5l27n_mAG_.jpeg'
|
||||||
]);
|
], typeof position === 'number' ? position : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -60,8 +60,30 @@ export default {
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
#### 指定初始位置
|
||||||
|
|
||||||
|
:::demo 指定初始位置
|
||||||
|
```html
|
||||||
|
<van-button @click="showImagePreview(1)">指定初始位置</van-button>
|
||||||
|
```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
showImagePreview(startPosition) {
|
||||||
|
ImagePreview([
|
||||||
|
'https://img.yzcdn.cn/1.jpg',
|
||||||
|
'https://img.yzcdn.cn/2.jpg'
|
||||||
|
], startPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
### 方法参数
|
### 方法参数
|
||||||
|
|
||||||
| 参数名 | 说明 | 类型 |
|
| 参数名 | 说明 | 类型 |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| imageUrls | 需要预览的图片 | `Array` |
|
| imageUrls | 需要预览的图片 | `Array` |
|
||||||
|
| startPosition | 图片预览起始位置索引 | `Number` |
|
||||||
|
@ -21,7 +21,11 @@ Vue.component(NoticeBar.name, NoticeBar);
|
|||||||
|
|
||||||
:::demo 基础用法
|
:::demo 基础用法
|
||||||
```html
|
```html
|
||||||
<van-notice-bar text="足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。" />
|
<van-notice-bar text="测试测试。"></van-notice-bar>
|
||||||
|
<van-notice-bar
|
||||||
|
text="足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。"
|
||||||
|
left-icon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
|
||||||
|
/>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -59,8 +63,11 @@ Vue.component(NoticeBar.name, NoticeBar);
|
|||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| mode | 通告栏模式 | String | `''` | `closeable` `link` |
|
| mode | 通告栏模式 | String | `''` | `closeable` `link` |
|
||||||
| delay | 动画延迟时间,单位秒 | Number | `1` | - |
|
| delay | 动画延迟时间,单位秒 | Number | `1` | - |
|
||||||
| speed | 滚动速率,单位px | Number | `40` | - |
|
| speed | 滚动速率,单位px | Number | `50` | - |
|
||||||
| scrollable | 是否滚动 | Boolean | `true` | - |
|
| scrollable | 是否滚动 | Boolean | `true` | - |
|
||||||
|
| leftIcon | 左侧图标图片链接 | String | - | - |
|
||||||
|
| color | 文本颜色 | String | `#f60` | - |
|
||||||
|
| background | 滚动条背景 | String | `#fff7cc` | - |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
const citys = {
|
const citys = {
|
||||||
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
||||||
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
||||||
@ -27,10 +29,10 @@ export default {
|
|||||||
picker.setColumnValues(1, citys[values[0]]);
|
picker.setColumnValues(1, citys[values[0]]);
|
||||||
},
|
},
|
||||||
handlePickerCancel() {
|
handlePickerCancel() {
|
||||||
alert('picker cancel');
|
Toast('picker cancel');
|
||||||
},
|
},
|
||||||
handlePickerConfirm() {
|
handlePickerConfirm() {
|
||||||
alert('picker confirm');
|
Toast('picker confirm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -91,9 +93,9 @@ export default {
|
|||||||
:::demo 带toolbar的Picker
|
:::demo 带toolbar的Picker
|
||||||
```html
|
```html
|
||||||
<van-picker
|
<van-picker
|
||||||
|
show-toolbar
|
||||||
:title="title"
|
:title="title"
|
||||||
:columns="pickerColumns"
|
:columns="pickerColumns"
|
||||||
show-toolbar
|
|
||||||
@change="handlePickerChange"
|
@change="handlePickerChange"
|
||||||
@cancel="handlePickerCancel"
|
@cancel="handlePickerCancel"
|
||||||
@confirm="handlePickerConfirm"
|
@confirm="handlePickerConfirm"
|
||||||
|
@ -59,27 +59,6 @@ Vue.use(Vant);
|
|||||||
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 自定义主题
|
|
||||||
|
|
||||||
`Vant`提供了一套默认主题,CSS 命名采用 BEM 的风格,方便使用者覆盖样式。如果你想完全替换主题色或者部分样式,可以使用下面的方法:
|
|
||||||
|
|
||||||
#### 下载主题
|
|
||||||
|
|
||||||
可以通过 Github 或 npm 来下载主题:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm i vant-css -D
|
|
||||||
|
|
||||||
# github
|
|
||||||
git clone git@github.com:youzan/vant.git
|
|
||||||
cd packages/vant-css
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 修改主题
|
|
||||||
|
|
||||||
修改你下载主题对应的样式即可,然后引入你修改后的主题。
|
|
||||||
|
|
||||||
### vue-cli 模板
|
### vue-cli 模板
|
||||||
可以使用`vue-cli`来初始化`Vant`的通用模板:
|
可以使用`vue-cli`来初始化`Vant`的通用模板:
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -41,7 +43,7 @@ Vue.component(Search.name, Search);
|
|||||||
|
|
||||||
:::demo 基础用法
|
:::demo 基础用法
|
||||||
```html
|
```html
|
||||||
<van-search placeholder="搜索框基础用法" v-model="basicSearch" />
|
<van-search placeholder="搜索框基础用法" v-model="value" />
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -73,7 +75,7 @@ Tips: 在 `van-search` 外层增加 form 标签,并且 action 不为空,即
|
|||||||
v-model="value"
|
v-model="value"
|
||||||
:show-action="true"
|
:show-action="true"
|
||||||
@search="onSearch">
|
@search="onSearch">
|
||||||
<div slot="action" @click="goSlotSearch">搜索</div>
|
<div slot="action" @click="onSearch">搜索</div>
|
||||||
</van-search>
|
</van-search>
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
@ -80,7 +80,7 @@ Vue.component(SwipeItem.name, SwipeItem);
|
|||||||
|
|
||||||
:::demo 图片懒加载
|
:::demo 图片懒加载
|
||||||
```html
|
```html
|
||||||
<van-swipe>
|
<van-swipe :autoplay="3000">
|
||||||
<van-swipe-item v-for="(image, index) in images" :key="index">
|
<van-swipe-item v-for="(image, index) in images" :key="index">
|
||||||
<img v-lazy="image" />
|
<img v-lazy="image" />
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
@ -108,6 +108,7 @@ export default {
|
|||||||
| autoplay | 自动轮播间隔,单位为 ms | `Number` | - | - |
|
| autoplay | 自动轮播间隔,单位为 ms | `Number` | - | - |
|
||||||
| duration | 动画时长,单位为 ms | `Number` | `500` | - |
|
| duration | 动画时长,单位为 ms | `Number` | `500` | - |
|
||||||
| showIndicators | 是否显示指示器 | `Boolean` | `true` | - |
|
| showIndicators | 是否显示指示器 | `Boolean` | `true` | - |
|
||||||
|
| initialSwipe | 初始位置,从 0 开始算 | `Number` | `0` | - |
|
||||||
|
|
||||||
### 事件
|
### 事件
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Toast } from 'packages/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -36,8 +38,8 @@ export default {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
popalert() {
|
onClickDisabled() {
|
||||||
alert('haha')
|
Toast('Disabled!')
|
||||||
},
|
},
|
||||||
|
|
||||||
handleTabClick(index) {
|
handleTabClick(index) {
|
||||||
@ -128,9 +130,9 @@ Vue.component(Tabs.name, Tabs);
|
|||||||
|
|
||||||
:::demo 禁用tab
|
:::demo 禁用tab
|
||||||
```html
|
```html
|
||||||
<van-tabs>
|
<van-tabs @disabled="onClickDisabled">
|
||||||
<van-tab title="选项一">内容一</van-tab>
|
<van-tab title="选项一">内容一</van-tab>
|
||||||
<van-tab title="选项二" disabled @disabled="popalert">内容二</van-tab>
|
<van-tab title="选项二" disabled>内容二</van-tab>
|
||||||
<van-tab title="选项三">内容三</van-tab>
|
<van-tab title="选项三">内容三</van-tab>
|
||||||
<van-tab title="选项四">内容四</van-tab>
|
<van-tab title="选项四">内容四</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
@ -139,8 +141,8 @@ Vue.component(Tabs.name, Tabs);
|
|||||||
```javascript
|
```javascript
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
popalert() {
|
onClickDisabled() {
|
||||||
alert('haha')
|
Toast('Disabled!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -44,8 +44,8 @@ Vue.component(TabbarItem.name, TabbarItem);
|
|||||||
<van-tabbar v-model="active">
|
<van-tabbar v-model="active">
|
||||||
<van-tabbar-item icon="shop">标签</van-tabbar-item>
|
<van-tabbar-item icon="shop">标签</van-tabbar-item>
|
||||||
<van-tabbar-item icon="chat" dot>标签</van-tabbar-item>
|
<van-tabbar-item icon="chat" dot>标签</van-tabbar-item>
|
||||||
<van-tabbar-item icon="records">标签</van-tabbar-item>
|
<van-tabbar-item icon="records" info="5">标签</van-tabbar-item>
|
||||||
<van-tabbar-item icon="gold-coin">标签</van-tabbar-item>
|
<van-tabbar-item icon="gold-coin" info="20">标签</van-tabbar-item>
|
||||||
</van-tabbar>
|
</van-tabbar>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -108,3 +108,4 @@ export default {
|
|||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| icon | 图标名称 | `String` | - | Icon 组件中可用的类型 |
|
| icon | 图标名称 | `String` | - | Icon 组件中可用的类型 |
|
||||||
| dot | 是否显示小红点 | `Boolean` | - | - |
|
| dot | 是否显示小红点 | `Boolean` | - | - |
|
||||||
|
| info | 图标右上角提示信息 | `String` | - | - |
|
||||||
|
55
docs/examples-docs/zh-CN/theme.md
Normal file
55
docs/examples-docs/zh-CN/theme.md
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
## 定制主题
|
||||||
|
|
||||||
|
`Vant`提供了一套默认主题,CSS 命名采用 BEM 的风格,方便使用者覆盖样式。如果你想完全替换主题色或者其他样式,可以使用下面的方法:
|
||||||
|
|
||||||
|
### 方案一. PostCSS 插件
|
||||||
|
在项目中直接引入组件对应的 postcss 源代码,并通过 postcss 插件 [postcss-theme-variables](https://www.npmjs.com/package/postcss-theme-variables) 替换颜色变量,步骤如下:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// 引入基础样式
|
||||||
|
import 'vant/packages/vant-css/src/base.css';
|
||||||
|
|
||||||
|
// 引入组价对应的样式
|
||||||
|
import 'vant/packages/vant-css/src/button.css';
|
||||||
|
import 'vant/packages/vant-css/src/checkbox.css';
|
||||||
|
```
|
||||||
|
|
||||||
|
接着在 postcss.config.js 中引入所需的 postcss 插件,并根据项目需求配置颜色变量,所有可用的颜色变量请参考 [配置文件](https://github.com/youzan/vant/blob/dev/packages/vant-css/src/common/var.css)
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('postcss-easy-import')({
|
||||||
|
extensions: ['pcss', 'css']
|
||||||
|
}),
|
||||||
|
require('postcss-theme-variables')({
|
||||||
|
vars: {
|
||||||
|
red: '#F60',
|
||||||
|
gray: '#CCC',
|
||||||
|
blue: '#03A9F4'
|
||||||
|
},
|
||||||
|
prefix: '$'
|
||||||
|
}),
|
||||||
|
require('precss')(),
|
||||||
|
require('postcss-calc')(),
|
||||||
|
require('autoprefixer')({
|
||||||
|
browsers: ['Android >= 4.0', 'iOS >= 7']
|
||||||
|
})
|
||||||
|
]
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 方案二. 本地构建
|
||||||
|
可以通过在本地构建 vant-css 的方式生成所需的主题
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 克隆仓库
|
||||||
|
git clone git@github.com:youzan/vant.git
|
||||||
|
cd packages/vant-css
|
||||||
|
```
|
||||||
|
|
||||||
|
在本地 vant-css 仓库中,修改 src/common/var.css 中的颜色变量,然后执行以下构建命令,即可生成对应的样式文件
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
@ -162,5 +162,6 @@ export default {
|
|||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| type | 提示类型 | `String` | `text` | `loading` `success` `fail` `html` |
|
| type | 提示类型 | `String` | `text` | `loading` `success` `fail` `html` |
|
||||||
| message | 内容 | `String` | `''` | - |
|
| message | 内容 | `String` | `''` | - |
|
||||||
|
| position | 位置 | `String` | `middle` | `top` `bottom` |
|
||||||
| forbidClick | 禁止背景点击 | `Boolean` | `false` | - |
|
| forbidClick | 禁止背景点击 | `Boolean` | `false` | - |
|
||||||
| duration | 时长(ms) | `Number` | `3000` | 值为 0 时,toast 不会消失 |
|
| duration | 时长(ms) | `Number` | `3000` | 值为 0 时,toast 不会消失 |
|
||||||
|
@ -81,7 +81,7 @@ export default {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
#### 基础用法
|
#### 基础用法
|
||||||
使用 `v-waterfall-lower` 监听滚动到达底部,并执行相应函数。若是函数执行中需要异步加载数据,可以将 `waterfall-disabled` 指定的值置为 false,禁止 `v-waterfall-lower` 监听滚动事件
|
使用 `v-waterfall-lower` 监听滚动到达底部,并执行相应函数。若是函数执行中需要异步加载数据,可以将 `waterfall-disabled` 指定的值置为 true,禁止 `v-waterfall-lower` 监听滚动事件
|
||||||
|
|
||||||
注意:`waterfall-disabled` 传入的是 vue 对象中表示是否禁止瀑布流触发 key 值,类型是字符串
|
注意:`waterfall-disabled` 传入的是 vue 对象中表示是否禁止瀑布流触发 key 值,类型是字符串
|
||||||
:::demo 基础用法
|
:::demo 基础用法
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app">
|
<div class="app">
|
||||||
<zan-doc :simulator="simulator" :config="config" :base="base">
|
<zan-doc :simulators="simulators" :currentSimulator="currentSimulator" :config="config" :base="base">
|
||||||
<router-view></router-view>
|
<router-view @changeDemoURL="onChangeDemoURL"></router-view>
|
||||||
</zan-doc>
|
</zan-doc>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -17,10 +17,9 @@ export default {
|
|||||||
group.list = group.list.filter(item => item.title !== '业务组件');
|
group.list = group.list.filter(item => item.title !== '业务组件');
|
||||||
}
|
}
|
||||||
|
|
||||||
const hash = window.location.hash;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
simulator: `/zanui/vue/examples${hash}`,
|
simulators: [`/zanui/vant/examples${location.hash}`],
|
||||||
|
demoURL: '',
|
||||||
lang: getLang()
|
lang: getLang()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -32,6 +31,10 @@ export default {
|
|||||||
|
|
||||||
config() {
|
config() {
|
||||||
return docConfig[this.lang];
|
return docConfig[this.lang];
|
||||||
|
},
|
||||||
|
|
||||||
|
currentSimulator() {
|
||||||
|
return this.$route.name === 'zh-CN/demo' ? 1 : 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -39,6 +42,12 @@ export default {
|
|||||||
'$route'(to) {
|
'$route'(to) {
|
||||||
this.lang = to.meta.lang;
|
this.lang = to.meta.lang;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChangeDemoURL(url) {
|
||||||
|
this.simulators = [this.simulators[0], url];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="side-nav">
|
<div class="side-nav">
|
||||||
<h1 class="zanui-title">Zan UI</h1>
|
<h1 class="zanui-title">
|
||||||
<h2 class="zanui-desc">有赞移动端 Vue 组件库</h2>
|
<img src="https://img.yzcdn.cn/public_files/2017/10/25/c2e074cd97d4d9e9b14a87b2fcb29430.png" />
|
||||||
|
<span>Vant</span>
|
||||||
|
</h1>
|
||||||
|
<h2 class="zanui-desc">{{ description }}</h2>
|
||||||
<div class="mobile-navs">
|
<div class="mobile-navs">
|
||||||
<div class="mobile-nav-item" v-for="(item, index) in navList" v-if="item.showInMobile" :key="index">
|
<div class="mobile-nav-item" v-for="(item, index) in navList" v-if="item.showInMobile" :key="index">
|
||||||
<mobile-nav v-for="(group, index) in item.groups" :group="group" :base="base" :nav-key="index" :key="index" />
|
<mobile-nav v-for="(group, index) in item.groups" :group="group" :base="base" :nav-key="index" :key="index" />
|
||||||
@ -42,6 +45,10 @@ export default {
|
|||||||
|
|
||||||
navList() {
|
navList() {
|
||||||
return this.docConfig[this.lang].nav || [];
|
return this.docConfig[this.lang].nav || [];
|
||||||
|
},
|
||||||
|
|
||||||
|
description() {
|
||||||
|
return this.lang === 'zh-CN' ? '有赞移动端 Vue 组件库' : 'A Vue.js 2.0 Mobile UI at YouZan';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -63,17 +70,28 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.zanui-title {
|
.zanui-title {
|
||||||
padding-top: 40px;
|
margin: 0 0 15px;
|
||||||
height: 0;
|
|
||||||
overflow: hidden;
|
img,
|
||||||
background: url(https://img.yzcdn.cn/upload_files/2017/04/20/FjwR1mraVIqtHWb8YWDW_YzQ_Kh2.png) center center no-repeat;
|
span {
|
||||||
background-size: 156px 40px;
|
display: inline-block;
|
||||||
margin: 0 0 10px;
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 40px;
|
||||||
|
margin-left: 15px;
|
||||||
|
font-family: "Dosis", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.zanui-desc {
|
.zanui-desc {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #455a64;
|
||||||
margin: 0 0 50px;
|
margin: 0 0 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
99
docs/src/components/demo.vue
Normal file
99
docs/src/components/demo.vue
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<section class="zan-doc-demos">
|
||||||
|
<h2>示例</h2>
|
||||||
|
<p>下面是一些使用 Vant 搭建的示例页面,点击图片切换至对应示例。</p>
|
||||||
|
<div class="zan-doc-demos__gallery">
|
||||||
|
<div
|
||||||
|
:class="['zan-doc-demos__item', { 'zan-doc-demos__item--active': index === currentDemo }]"
|
||||||
|
v-for="(demo, index) in demos"
|
||||||
|
>
|
||||||
|
<h4>{{ demo.title }}</h4>
|
||||||
|
<a :href="demo.source" target="_blank">源代码</a>
|
||||||
|
<img :src="demo.preview" @click="onChangeDemo(demo, index)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentDemo: 0,
|
||||||
|
demos: [{
|
||||||
|
title: '商品详情',
|
||||||
|
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/7070a8d1d6504b864c605114d32f2aae.png',
|
||||||
|
url: 'https://chenjiahan.github.io/vant-demo/#/goods',
|
||||||
|
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/goods/index.vue'
|
||||||
|
}, {
|
||||||
|
title: '会员中心',
|
||||||
|
preview: 'https://img.yzcdn.cn/public_files/2017/10/23/e1d70757e3ab88d39a360b704be8f43f.png',
|
||||||
|
url: 'https://chenjiahan.github.io/vant-demo/#/user',
|
||||||
|
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/user/index.vue'
|
||||||
|
}, {
|
||||||
|
title: '购物车',
|
||||||
|
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/06b8b5ed3692314d434db7f6854dcdbe.png',
|
||||||
|
url: 'https://chenjiahan.github.io/vant-demo/#/cart',
|
||||||
|
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/cart/index.vue'
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeMount() {
|
||||||
|
this.$emit('changeDemoURL', this.demos[0].url);
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChangeDemo(demo, index) {
|
||||||
|
this.currentDemo = index;
|
||||||
|
this.$emit('changeDemoURL', demo.url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.zan-doc-demos {
|
||||||
|
&__gallery {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__item {
|
||||||
|
width: 28%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:nth-child(3n+1),
|
||||||
|
&:nth-child(3n+2) {
|
||||||
|
margin-right: 4%;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 4px 0 7px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--active {
|
||||||
|
img {
|
||||||
|
box-shadow: 0 1px 4px rgba(51, 136, 255, .4), 0 0 0 1px rgba(51, 136, 255, .4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -8,11 +8,11 @@ module.exports = {
|
|||||||
footer: {
|
footer: {
|
||||||
github: 'https://github.com/youzan/vant',
|
github: 'https://github.com/youzan/vant',
|
||||||
nav: {
|
nav: {
|
||||||
React: 'https://www.youzanyun.com/zanui/react',
|
'React 组件库': 'https://www.youzanyun.com/zanui/zent',
|
||||||
微信小程序: 'https://github.com/youzan/zanui-weapp',
|
小程序组件库: 'https://github.com/youzan/zanui-weapp',
|
||||||
意见反馈: 'https://github.com/youzan/vant/issues',
|
意见反馈: 'https://github.com/youzan/vant/issues',
|
||||||
开发指南:
|
开发指南: 'https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.zh-CN.md',
|
||||||
'https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.zh-CN.md'
|
加入我们: 'https://job.youzan.com'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
@ -28,12 +28,23 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '业务组件',
|
title: '业务组件',
|
||||||
link: '/zanui/captain/component/quickstart'
|
link: '/zanui/captain'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/changelog',
|
path: '/changelog',
|
||||||
title: '更新日志',
|
title: '更新日志',
|
||||||
noExample: true
|
noExample: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/theme',
|
||||||
|
title: '定制主题',
|
||||||
|
noExample: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/demo',
|
||||||
|
title: '示例页面',
|
||||||
|
noDocument: true,
|
||||||
|
noExample: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -264,8 +275,8 @@ module.exports = {
|
|||||||
footer: {
|
footer: {
|
||||||
github: 'https://github.com/youzan/vant',
|
github: 'https://github.com/youzan/vant',
|
||||||
nav: {
|
nav: {
|
||||||
React: 'https://www.youzanyun.com/zanui/react',
|
'React UI': 'https://www.youzanyun.com/zanui/zent',
|
||||||
Weapp: 'https://github.com/youzan/zanui-weapp',
|
'Weapp UI': 'https://github.com/youzan/zanui-weapp',
|
||||||
Feedback: 'https://github.com/youzan/vant/issues',
|
Feedback: 'https://github.com/youzan/vant/issues',
|
||||||
Contribute:
|
Contribute:
|
||||||
'https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.md'
|
'https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.md'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './ExamplesApp';
|
import App from './WapApp';
|
||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import { setLang } from './utils/lang';
|
import { setLang } from './utils/lang';
|
||||||
import Vant, { Lazyload } from 'packages';
|
import Vant, { Lazyload } from 'packages';
|
||||||
@ -18,7 +18,7 @@ Vue.use(VueRouter);
|
|||||||
const routesConfig = routes(true);
|
const routesConfig = routes(true);
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
mode: 'hash',
|
mode: 'hash',
|
||||||
base: '/zanui/vue/examples',
|
base: '/zanui/vant/examples',
|
||||||
routes: routesConfig
|
routes: routesConfig
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './ExamplesDocsApp';
|
import App from './DocsApp';
|
||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import ZanDoc from 'zan-doc';
|
import ZanDoc from 'zan-doc';
|
||||||
import isMobile from './utils/is-mobile';
|
import isMobile from './utils/is-mobile';
|
||||||
@ -12,13 +12,13 @@ const routesConfig = routes();
|
|||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
mode: 'hash',
|
mode: 'hash',
|
||||||
base: '/zanui/vue/',
|
base: '/zanui/vant/',
|
||||||
routes: routesConfig
|
routes: routesConfig
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((route, redirect, next) => {
|
router.beforeEach((route, redirect, next) => {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
window.location.replace('/zanui/vue/examples');
|
window.location.replace('/zanui/vant/examples');
|
||||||
}
|
}
|
||||||
document.title = route.meta.title || document.title;
|
document.title = route.meta.title || document.title;
|
||||||
next();
|
next();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<link rel="shortcut icon" href="https://b.yzcdn.cn/zanui/icon/zanui.ico">
|
<link rel="shortcut icon" href="https://b.yzcdn.cn/zanui/icon/zanui.ico">
|
||||||
<title>ZanUI - 移动端</title>
|
<title>Vant - 有赞移动端 Vue 组件库</title>
|
||||||
</head>
|
</head>
|
||||||
<body ontouchstart>
|
<body ontouchstart>
|
||||||
|
|
||||||
|
@ -3,19 +3,16 @@ import { getLang } from './utils/lang';
|
|||||||
import DemoList from './components/demo-list';
|
import DemoList from './components/demo-list';
|
||||||
import componentDocs from '../examples-dist/entry-docs';
|
import componentDocs from '../examples-dist/entry-docs';
|
||||||
import componentDemos from '../examples-dist/entry-demos';
|
import componentDemos from '../examples-dist/entry-demos';
|
||||||
|
import Demo from './components/demo';
|
||||||
import './utils/iframe-router';
|
import './utils/iframe-router';
|
||||||
|
|
||||||
const registerRoute = (isExample) => {
|
const registerRoute = (isExample) => {
|
||||||
const route = [{
|
const route = [{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: to => {
|
redirect: to => `/${getLang()}/`
|
||||||
return `/${getLang()}/`;
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
path: '*',
|
path: '*',
|
||||||
redirect: to => {
|
redirect: to => `/${getLang()}/`
|
||||||
return `/${getLang()}/`;
|
|
||||||
}
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
Object.keys(docConfig).forEach((lang, index) => {
|
Object.keys(docConfig).forEach((lang, index) => {
|
||||||
@ -53,9 +50,18 @@ const registerRoute = (isExample) => {
|
|||||||
const { path } = page;
|
const { path } = page;
|
||||||
if (path) {
|
if (path) {
|
||||||
const name = lang + '/' + path.replace('/', '');
|
const name = lang + '/' + path.replace('/', '');
|
||||||
|
let component;
|
||||||
|
|
||||||
|
if (path === '/demo') {
|
||||||
|
component = Demo;
|
||||||
|
} else {
|
||||||
|
component = isExample ? componentDemos[name] : componentDocs[name];
|
||||||
|
}
|
||||||
|
|
||||||
route.push({
|
route.push({
|
||||||
|
name,
|
||||||
|
component,
|
||||||
path: `/${lang}/component${path}`,
|
path: `/${lang}/component${path}`,
|
||||||
component: isExample ? componentDemos[name] : componentDocs[name],
|
|
||||||
meta: { lang }
|
meta: { lang }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
14
package.json
14
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vant",
|
"name": "vant",
|
||||||
"version": "0.10.1",
|
"version": "0.10.6",
|
||||||
"description": "有赞vue wap组件库",
|
"description": "有赞vue wap组件库",
|
||||||
"main": "lib/vant.js",
|
"main": "lib/vant.js",
|
||||||
"style": "lib/vant-css/index.css",
|
"style": "lib/vant-css/index.css",
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"build:style-entry": "VUE_ENV=server node build/bin/build-style-entry.js",
|
"build:style-entry": "VUE_ENV=server node build/bin/build-style-entry.js",
|
||||||
"build:changelog": "sh build/bin/build-changelog.sh",
|
"build:changelog": "sh build/bin/build-changelog.sh",
|
||||||
"deploy": "npm run deploy:docs && npm run deploy:cdn && gh-pages -d docs/dist --remote youzan && rimraf docs/dist",
|
"deploy": "npm run deploy:docs && npm run deploy:cdn && gh-pages -d docs/dist --remote youzan && rimraf docs/dist",
|
||||||
"deploy:cdn": "superman cdn /zanui/vue docs/dist/*.js docs/dist/*.css && superman cdn /zanui/vue/async_en-US docs/dist/async_en-US/*.js && superman cdn /zanui/vue/async_zh-CN docs/dist/async_zh-CN/*.js",
|
"deploy:cdn": "superman cdn /zanui/vant docs/dist/*.js docs/dist/*.css && superman cdn /zanui/vant/async_en-US docs/dist/async_en-US/*.js && superman cdn /zanui/vant/async_zh-CN docs/dist/async_zh-CN/*.js",
|
||||||
"deploy:docs": "rimraf docs/dist && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.prod.js",
|
"deploy:docs": "rimraf docs/dist && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.prod.js",
|
||||||
"dist": "node build/bin/build-lib.js",
|
"dist": "node build/bin/build-lib.js",
|
||||||
"clean": "rimraf lib && rimraf packages/*/lib",
|
"clean": "rimraf lib && rimraf packages/*/lib",
|
||||||
@ -50,7 +50,7 @@
|
|||||||
"vue": ">= 2.4.0"
|
"vue": ">= 2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^7.1.3",
|
"autoprefixer": "^7.1.6",
|
||||||
"avoriaz": "2.0.0",
|
"avoriaz": "2.0.0",
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
@ -65,8 +65,8 @@
|
|||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
"codecov": "^2.3.1",
|
"codecov": "^3.0.0",
|
||||||
"cross-env": "^5.1.0",
|
"cross-env": "^5.1.1",
|
||||||
"css-loader": "^0.28.7",
|
"css-loader": "^0.28.7",
|
||||||
"dependency-tree": "^5.11.1",
|
"dependency-tree": "^5.11.1",
|
||||||
"eslint-plugin-vue": "^2.1.0",
|
"eslint-plugin-vue": "^2.1.0",
|
||||||
@ -112,13 +112,13 @@
|
|||||||
"vue-loader": "^13.3.0",
|
"vue-loader": "^13.3.0",
|
||||||
"vue-markdown-loader": "^2.2.2",
|
"vue-markdown-loader": "^2.2.2",
|
||||||
"vue-router": "^3.0.1",
|
"vue-router": "^3.0.1",
|
||||||
"vue-sfc-compiler": "^0.0.3",
|
"vue-sfc-compiler": "^0.0.4",
|
||||||
"vue-style-loader": "^3.0.0",
|
"vue-style-loader": "^3.0.0",
|
||||||
"vue-template-compiler": "^2.5.2",
|
"vue-template-compiler": "^2.5.2",
|
||||||
"webpack": "^3.8.1",
|
"webpack": "^3.8.1",
|
||||||
"webpack-bundle-analyzer": "^2.9.0",
|
"webpack-bundle-analyzer": "^2.9.0",
|
||||||
"webpack-dev-server": "^2.9.2",
|
"webpack-dev-server": "^2.9.2",
|
||||||
"webpack-merge": "^4.1.0",
|
"webpack-merge": "^4.1.0",
|
||||||
"zan-doc": "^0.3.6"
|
"zan-doc": "^0.3.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<a :class="['van-cell', 'van-hairline', { 'van-cell--required': required }]" :href="url" @click="$emit('click')">
|
<div :class="['van-cell', 'van-hairline', { 'van-cell--required': required }]" @click="onClick">
|
||||||
<div
|
<div class="van-cell__title" v-if="$slots.title || title">
|
||||||
class="van-cell__title"
|
|
||||||
v-if="$slots.title || title"
|
|
||||||
>
|
|
||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
<i v-if="icon" class="van-icon" :class="'van-icon-' + icon"></i>
|
<van-icon v-if="icon" :name="icon" />
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span class="van-cell__text" v-text="title"></span>
|
<span class="van-cell__text" v-text="title" />
|
||||||
<span class="van-cell__label" v-if="label" v-text="label"></span>
|
<span class="van-cell__label" v-if="label" v-text="label" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -21,28 +18,49 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<slot>
|
<slot>
|
||||||
<span v-text="value"></span>
|
<span v-text="value" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<slot name="right-icon">
|
<slot name="right-icon">
|
||||||
<i class="van-cell__right-icon van-icon van-icon-arrow" v-if="isLink"></i>
|
<van-icon name="arrow" class="van-cell__right-icon" v-if="isLink" />
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="extra"></slot>
|
<slot name="extra" />
|
||||||
</a>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Icon from '../icon';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'van-cell',
|
name: 'van-cell',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
[Icon.name]: Icon
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
url: String,
|
||||||
icon: String,
|
icon: String,
|
||||||
title: String,
|
title: String,
|
||||||
value: [String, Number],
|
|
||||||
url: String,
|
|
||||||
label: String,
|
label: String,
|
||||||
isLink: Boolean,
|
isLink: Boolean,
|
||||||
required: Boolean
|
replace: Boolean,
|
||||||
|
required: Boolean,
|
||||||
|
to: [String, Object],
|
||||||
|
value: [String, Number]
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onClick() {
|
||||||
|
this.$emit('click');
|
||||||
|
|
||||||
|
const { to, url, $router, replace } = this;
|
||||||
|
if (to && $router) {
|
||||||
|
$router[replace ? 'replace' : 'push'](to);
|
||||||
|
} else if (url) {
|
||||||
|
replace ? location.replace(url) : location.href = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<template v-else-if="type === 'edit'">
|
<template v-else-if="type === 'edit'">
|
||||||
<van-icon class="van-contact-card__icon" name="contact" />
|
<van-icon class="van-contact-card__icon" name="contact" />
|
||||||
<div class="van-contact-card__text">
|
<div class="van-contact-card__text">
|
||||||
<p>联系人:{{ name }}</p>
|
<div>联系人:{{ name }}</div>
|
||||||
<p>联系电话:{{ tel }}</p>
|
<div>联系电话:{{ tel }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="van-coupon-list">
|
<div class="van-coupon-list">
|
||||||
<van-cell-group class="van-coupon-list__top">
|
<van-cell-group class="van-coupon-list__top" v-if="showExchangeBar">
|
||||||
<van-field v-model="exchangeCode" :placeholder="inputPlaceholder" :maxlength="20" />
|
<van-field class="van-coupon-list__filed van-hairline--surround" v-model="exchangeCode" :placeholder="inputPlaceholder" :maxlength="20" />
|
||||||
<van-button size="small" type="danger" class="van-coupon-list__exchange" :disabled="exchangeButtonDisabled || !exchangeCode.length" @click="onClickExchangeButton">{{ exchangeButtonText }}</van-button>
|
<van-button size="small" type="danger" class="van-coupon-list__exchange" :disabled="exchangeButtonDisabled || !exchangeCode.length" @click="onClickExchangeButton">{{ exchangeButtonText }}</van-button>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div class="van-coupon-list__list" ref="list">
|
<div :class="['van-coupon-list__list', { 'van-coupon-list--with-exchange': showExchangeBar }]" ref="list">
|
||||||
<van-coupon-item
|
<van-coupon-item
|
||||||
ref="card"
|
ref="card"
|
||||||
v-for="(item, index) in coupons"
|
v-for="(item, index) in coupons"
|
||||||
@ -20,8 +20,18 @@
|
|||||||
:key="item.id || item.name"
|
:key="item.id || item.name"
|
||||||
:data="item"
|
:data="item"
|
||||||
/>
|
/>
|
||||||
|
<div class="van-coupon-list__empty" v-if="!coupons.length && !disabledCoupons.length">
|
||||||
|
<img src="https://b.yzcdn.cn/v2/image/wap/trade/new_order/empty@2x.png" >
|
||||||
|
<p>暂无优惠券</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-show="showCloseButton"
|
||||||
|
class="van-coupon-list__close van-hairline--top"
|
||||||
|
@click="onClickNotUse"
|
||||||
|
>
|
||||||
|
{{ closeButtonText }}
|
||||||
</div>
|
</div>
|
||||||
<div class="van-coupon-list__close van-hairline--top" @click="onClickNotUse">{{ closeButtonText }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -81,6 +91,14 @@ export default {
|
|||||||
inputPlaceholder: {
|
inputPlaceholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '请输入优惠码'
|
default: '请输入优惠码'
|
||||||
|
},
|
||||||
|
showExchangeBar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
showCloseButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@ const defaultConfig = {
|
|||||||
value: true,
|
value: true,
|
||||||
title: '',
|
title: '',
|
||||||
message: '',
|
message: '',
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
closeOnClickOverlay: false,
|
closeOnClickOverlay: false,
|
||||||
callback: action => {
|
callback: action => {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<i :class="['van-icon', 'van-icon-' + name]" @click="$emit('click', $event)" />
|
<i :class="['van-icon', 'van-icon-' + name]" @click="$emit('click', $event)">
|
||||||
|
<slot></slot>
|
||||||
|
</i>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
@touchend="onTouchEnd"
|
@touchend="onTouchEnd"
|
||||||
@touchcancel="onTouchEnd"
|
@touchcancel="onTouchEnd"
|
||||||
>
|
>
|
||||||
<van-swipe>
|
<van-swipe :initialSwipe="startPosition">
|
||||||
<van-swipe-item v-for="(item, index) in images" :key="index">
|
<van-swipe-item v-for="(item, index) in images" :key="index">
|
||||||
<img class="van-image-preview__image" :src="item" >
|
<img class="van-image-preview__image" :src="item" >
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
@ -44,7 +44,8 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
images: []
|
images: [],
|
||||||
|
startPosition: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -63,7 +64,8 @@ export default {
|
|||||||
this.deltaY = event.touches[0].clientY - this.touchStartY;
|
this.deltaY = event.touches[0].clientY - this.touchStartY;
|
||||||
},
|
},
|
||||||
|
|
||||||
onTouchEnd() {
|
onTouchEnd(event) {
|
||||||
|
event.preventDefault();
|
||||||
// prevent long tap to close component
|
// prevent long tap to close component
|
||||||
const deltaTime = new Date() - this.touchStartTime;
|
const deltaTime = new Date() - this.touchStartTime;
|
||||||
if (deltaTime < 100 && Math.abs(this.deltaX) < 20 && Math.abs(this.deltaY) < 20) {
|
if (deltaTime < 100 && Math.abs(this.deltaX) < 20 && Math.abs(this.deltaY) < 20) {
|
||||||
|
@ -12,12 +12,13 @@ const initInstance = () => {
|
|||||||
document.body.appendChild(instance.$el);
|
document.body.appendChild(instance.$el);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ImagePreviewBox = images => {
|
const ImagePreviewBox = (images, startPosition = 0) => {
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
initInstance();
|
initInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
instance.images = images;
|
instance.images = images;
|
||||||
|
instance.startPosition = startPosition;
|
||||||
instance.value = true;
|
instance.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ import TreeSelect from './tree-select';
|
|||||||
import Uploader from './uploader';
|
import Uploader from './uploader';
|
||||||
import Waterfall from './waterfall';
|
import Waterfall from './waterfall';
|
||||||
|
|
||||||
const version = '0.10.1';
|
const version = '0.10.6';
|
||||||
const components = [
|
const components = [
|
||||||
Actionsheet,
|
Actionsheet,
|
||||||
AddressEdit,
|
AddressEdit,
|
||||||
|
@ -1,11 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="showNoticeBar" @click="$emit('click')" :class="['van-notice-bar', { 'van-notice-bar--withicon': mode }]">
|
<div
|
||||||
|
v-show="showNoticeBar"
|
||||||
|
:class="['van-notice-bar', { 'van-notice-bar--withicon': mode }]"
|
||||||
|
:style="barStyle"
|
||||||
|
@click="$emit('click')"
|
||||||
|
>
|
||||||
|
<div class="van-notice-bar__left-icon" v-if="leftIcon">
|
||||||
|
<img :src="leftIcon" />
|
||||||
|
</div>
|
||||||
<div class="van-notice-bar__content-wrap" ref="contentWrap">
|
<div class="van-notice-bar__content-wrap" ref="contentWrap">
|
||||||
<div class="van-notice-bar__content" ref="content" :style="contentStyle" @transitionend="onTransitionEnd">
|
<div
|
||||||
|
ref="content"
|
||||||
|
:class="['van-notice-bar__content', animationClass]"
|
||||||
|
:style="contentStyle"
|
||||||
|
@animationend="onAnimationEnd"
|
||||||
|
>
|
||||||
<slot>{{ text }}</slot>
|
<slot>{{ text }}</slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-icon class="van-notice-bar__icon" :name="iconName" v-if="iconName" @click="onClickIcon" />
|
<van-icon class="van-notice-bar__right-icon" :name="iconName" v-if="iconName" @click="onClickIcon" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,6 +36,9 @@ export default {
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
text: String,
|
text: String,
|
||||||
|
leftIcon: String,
|
||||||
|
color: String,
|
||||||
|
background: String,
|
||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
@ -38,16 +54,18 @@ export default {
|
|||||||
},
|
},
|
||||||
speed: {
|
speed: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 40
|
default: 50
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
wrapWidth: 0,
|
||||||
|
firstRound: true,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
offsetWidth: 0,
|
offsetWidth: 0,
|
||||||
showNoticeBar: true,
|
showNoticeBar: true,
|
||||||
diableTransition: false
|
animationClass: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -55,12 +73,17 @@ export default {
|
|||||||
iconName() {
|
iconName() {
|
||||||
return this.mode === 'closeable' ? 'close' : this.mode === 'link' ? 'arrow' : '';
|
return this.mode === 'closeable' ? 'close' : this.mode === 'link' ? 'arrow' : '';
|
||||||
},
|
},
|
||||||
|
barStyle() {
|
||||||
|
return {
|
||||||
|
color: this.color,
|
||||||
|
background: this.background
|
||||||
|
};
|
||||||
|
},
|
||||||
contentStyle() {
|
contentStyle() {
|
||||||
return {
|
return {
|
||||||
transform: `translate3d(${-this.offsetWidth}px, 0, 0)`,
|
paddingLeft: this.firstRound ? 0 : this.wrapWidth + 'px',
|
||||||
transitionDelay: this.delay + 's',
|
animationDelay: (this.firstRound ? this.delay : 0) + 's',
|
||||||
transitionDuration: this.duration + 's',
|
animationDuration: this.duration + 's'
|
||||||
transitionProperty: this.diableTransition ? 'none' : 'all'
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -69,8 +92,10 @@ export default {
|
|||||||
const offsetWidth = this.$refs.content.getBoundingClientRect().width;
|
const offsetWidth = this.$refs.content.getBoundingClientRect().width;
|
||||||
const wrapWidth = this.$refs.contentWrap.getBoundingClientRect().width;
|
const wrapWidth = this.$refs.contentWrap.getBoundingClientRect().width;
|
||||||
if (this.scrollable && offsetWidth > wrapWidth) {
|
if (this.scrollable && offsetWidth > wrapWidth) {
|
||||||
|
this.wrapWidth = wrapWidth;
|
||||||
this.offsetWidth = offsetWidth;
|
this.offsetWidth = offsetWidth;
|
||||||
this.duration = (offsetWidth + wrapWidth) / this.speed;
|
this.duration = offsetWidth / this.speed;
|
||||||
|
this.animationClass = 'van-notice-bar__play';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -78,15 +103,12 @@ export default {
|
|||||||
onClickIcon() {
|
onClickIcon() {
|
||||||
this.showNoticeBar = this.mode !== 'closeable';
|
this.showNoticeBar = this.mode !== 'closeable';
|
||||||
},
|
},
|
||||||
onTransitionEnd() {
|
onAnimationEnd() {
|
||||||
const { offsetWidth } = this;
|
this.firstRound = false;
|
||||||
this.diableTransition = true;
|
this.$nextTick(() => {
|
||||||
this.offsetWidth = 0;
|
this.duration = (this.offsetWidth + this.wrapWidth) / this.speed;
|
||||||
|
this.animationClass = 'van-notice-bar__play--infinite';
|
||||||
setTimeout(() => {
|
});
|
||||||
this.diableTransition = false;
|
|
||||||
this.offsetWidth = offsetWidth;
|
|
||||||
}, 50);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="van-pull-refresh"
|
class="van-pull-refresh"
|
||||||
:style="style"
|
:style="style"
|
||||||
@touchstart="onTouchStart"
|
@touchstart="onTouchStart"
|
||||||
@touchmove="onTouchMove"
|
@touchmove="onTouchMove"
|
||||||
@touchend="onTouchEnd"
|
@touchend="onTouchEnd"
|
||||||
@touchcalcel="onTouchEnd"
|
@touchcancel="onTouchEnd"
|
||||||
>
|
>
|
||||||
<div class="van-pull-refresh__head">
|
<div class="van-pull-refresh__head">
|
||||||
<slot name="normal" v-if="status === 'normal'"></slot>
|
<slot name="normal" v-if="status === 'normal'"></slot>
|
||||||
@ -22,12 +22,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Loading from '../loading';
|
import Loading from '../loading';
|
||||||
|
import scrollUtils from '../utils/scroll';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'van-pull-refresh',
|
name: 'van-pull-refresh',
|
||||||
@ -80,6 +81,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.scrollEl = scrollUtils.getScrollEventTarget(this.$el);
|
||||||
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value(val) {
|
value(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
@ -140,7 +145,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCeiling() {
|
getCeiling() {
|
||||||
this.ceiling = (window.scrollY || window.pageYOffset) === 0;
|
this.ceiling = scrollUtils.getScrollTop(this.scrollEl) === 0;
|
||||||
return this.ceiling;
|
return this.ceiling;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleSearch(e) {
|
handleSearch(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.$emit('search');
|
this.$emit('search', this.value);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</van-sku-header>
|
</van-sku-header>
|
||||||
</slot>
|
</slot>
|
||||||
<div class="van-sku-body scroller" :style="bodyStyle">
|
<div class="van-sku-body scroller" :style="bodyStyle">
|
||||||
<slot name="sku-group" :selectedSku="selectedSku">
|
<slot name="sku-group" :selectedSku="selectedSku" :skuEventBus="skuEventBus">
|
||||||
<div v-if="hasSku" class="van-sku-group-container van-hairline--bottom">
|
<div v-if="hasSku" class="van-sku-group-container van-hairline--bottom">
|
||||||
<div v-for="(skuTreeItem, index) in skuTree"
|
<div v-for="(skuTreeItem, index) in skuTree"
|
||||||
class="van-sku-row-group"
|
class="van-sku-row-group"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="van-steps" :class="stepsClass">
|
<div :class="['van-steps', `van-steps--${direction}`]">
|
||||||
<div class="van-steps__status" v-if="title || description">
|
<div class="van-steps__status" v-if="title || description">
|
||||||
<div class="van-steps__icon" v-if="icon || $slots.icon">
|
<div class="van-steps__icon" v-if="icon || $slots.icon">
|
||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
@ -56,16 +56,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
steps: []
|
steps: []
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
stepsClass() {
|
|
||||||
return [
|
|
||||||
`van-steps--${this.direction}`, {
|
|
||||||
[`van-steps--${this.steps.length}`]: this.direction === 'horizontal'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -30,6 +30,10 @@ export default {
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
autoplay: Number,
|
autoplay: Number,
|
||||||
|
initialSwipe: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
showIndicators: {
|
showIndicators: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
@ -42,6 +46,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
width: 0,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
startX: 0,
|
startX: 0,
|
||||||
startY: 0,
|
startY: 0,
|
||||||
@ -49,8 +54,7 @@ export default {
|
|||||||
deltaX: 0,
|
deltaX: 0,
|
||||||
swipes: [],
|
swipes: [],
|
||||||
direction: '',
|
direction: '',
|
||||||
currentDuration: 0,
|
currentDuration: 0
|
||||||
width: window.innerWidth
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -65,6 +69,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
swipes() {
|
swipes() {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
|
},
|
||||||
|
|
||||||
|
initialSwipe() {
|
||||||
|
this.initialize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -91,9 +99,10 @@ export default {
|
|||||||
initialize() {
|
initialize() {
|
||||||
// reset offset when children changes
|
// reset offset when children changes
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
this.active = 0;
|
this.width = this.$el.getBoundingClientRect().width;
|
||||||
|
this.active = this.initialSwipe;
|
||||||
this.currentDuration = 0;
|
this.currentDuration = 0;
|
||||||
this.offset = this.count > 1 ? -this.width : 0;
|
this.offset = this.count > 1 ? -this.width * (this.active + 1) : 0;
|
||||||
this.swipes.forEach(swipe => {
|
this.swipes.forEach(swipe => {
|
||||||
swipe.offset = 0;
|
swipe.offset = 0;
|
||||||
});
|
});
|
||||||
|
@ -47,6 +47,19 @@ export default {
|
|||||||
index
|
index
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
destroyed() {
|
||||||
|
const key = this.key;
|
||||||
|
const tabs = this.parentGroup.tabs;
|
||||||
|
|
||||||
|
for (let i = 0; i < tabs.length; i++) {
|
||||||
|
/* istanbul ignore else */
|
||||||
|
if (tabs[i].index === key) {
|
||||||
|
this.parentGroup.tabs.splice(i, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
<van-icon v-if="icon" :name="icon" />
|
<van-icon v-if="icon" :name="icon" />
|
||||||
</slot>
|
</slot>
|
||||||
|
<div v-if="info" class="van-tabbar-item__info">{{ info }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="van-tabbar-item__text">
|
<div class="van-tabbar-item__text">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@ -23,7 +24,8 @@ export default {
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
icon: String,
|
icon: String,
|
||||||
dot: Boolean
|
dot: Boolean,
|
||||||
|
info: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -72,9 +72,10 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabs: [],
|
tabs: [],
|
||||||
isReady: false,
|
|
||||||
curActive: +this.active,
|
curActive: +this.active,
|
||||||
isSwiping: false
|
isSwiping: false,
|
||||||
|
isInitEvents: false,
|
||||||
|
navBarStyle: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -84,31 +85,27 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
curActive() {
|
curActive() {
|
||||||
|
this.setNavBarStyle();
|
||||||
/* istanbul ignore else */
|
/* istanbul ignore else */
|
||||||
if (this.tabs.length > this.swipeThreshold) {
|
if (this.tabs.length > this.swipeThreshold) {
|
||||||
this.doOnValueChange();
|
this.doOnValueChange();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
tabs(val) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.setNavBarStyle();
|
||||||
|
if (val.length > this.swipeThreshold) {
|
||||||
|
this.initEvents();
|
||||||
|
this.doOnValueChange();
|
||||||
|
} else {
|
||||||
|
this.isInitEvents = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
/**
|
|
||||||
* `type`为`line`时,tab下方的横线的样式
|
|
||||||
*/
|
|
||||||
navBarStyle() {
|
|
||||||
if (!this.isReady || this.type !== 'line' || !this.$refs.tabkey) return;
|
|
||||||
|
|
||||||
const tabKey = this.curActive;
|
|
||||||
const elem = this.$refs.tabkey[tabKey];
|
|
||||||
const offsetWidth = `${elem.offsetWidth || 0}px`;
|
|
||||||
const offsetLeft = `${elem.offsetLeft || 0}px`;
|
|
||||||
|
|
||||||
return {
|
|
||||||
width: offsetWidth,
|
|
||||||
transform: `translate3d(${offsetLeft}, 0, 0)`,
|
|
||||||
transitionDuration: `${this.duration}s`
|
|
||||||
};
|
|
||||||
},
|
|
||||||
swipeWidth() {
|
swipeWidth() {
|
||||||
return this.$refs.swipe && this.$refs.swipe.getBoundingClientRect().width;
|
return this.$refs.swipe && this.$refs.swipe.getBoundingClientRect().width;
|
||||||
},
|
},
|
||||||
@ -127,17 +124,34 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
// 页面载入完成
|
// 页面载入完成
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 可以开始触发在computed中关于nav-bar的css动画
|
this.setNavBarStyle();
|
||||||
this.isReady = true;
|
|
||||||
this.initEvents();
|
|
||||||
|
|
||||||
if (this.tabs.length > this.swipeThreshold) {
|
if (this.tabs.length > this.swipeThreshold) {
|
||||||
|
this.initEvents();
|
||||||
this.doOnValueChange();
|
this.doOnValueChange();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* `type`为`line`时,tab下方的横线的样式
|
||||||
|
*/
|
||||||
|
setNavBarStyle() {
|
||||||
|
if (this.type !== 'line' || !this.$refs.tabkey) return {};
|
||||||
|
|
||||||
|
const tabKey = this.curActive;
|
||||||
|
const elem = this.$refs.tabkey[tabKey];
|
||||||
|
const offsetWidth = `${elem.offsetWidth || 0}px`;
|
||||||
|
const offsetLeft = `${elem.offsetLeft || 0}px`;
|
||||||
|
|
||||||
|
this.navBarStyle = {
|
||||||
|
width: offsetWidth,
|
||||||
|
transform: `translate3d(${offsetLeft}, 0, 0)`,
|
||||||
|
transitionDuration: `${this.duration}s`
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
handleTabClick(index) {
|
handleTabClick(index) {
|
||||||
if (this.tabs[index].disabled) {
|
if (this.tabs[index].disabled) {
|
||||||
this.$emit('disabled', index);
|
this.$emit('disabled', index);
|
||||||
@ -169,8 +183,9 @@
|
|||||||
|
|
||||||
initEvents() {
|
initEvents() {
|
||||||
const el = this.$refs.swipe;
|
const el = this.$refs.swipe;
|
||||||
if (!el) return;
|
if (!el || this.isInitEvents) return;
|
||||||
|
|
||||||
|
this.isInitEvents = true;
|
||||||
let swipeState = {};
|
let swipeState = {};
|
||||||
|
|
||||||
swipe(el, {
|
swipe(el, {
|
||||||
|
@ -6,6 +6,7 @@ let instance;
|
|||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
visible: true,
|
visible: true,
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
position: 'middle',
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
forbidClick: false,
|
forbidClick: false,
|
||||||
clear: () => {
|
clear: () => {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="van-toast-fade">
|
<transition name="van-toast-fade">
|
||||||
<div class="van-toast-wrapper" v-show="visible">
|
<div class="van-toast-wrapper" v-show="visible">
|
||||||
<div :class="['van-toast', 'van-toast--' + displayStyle]">
|
<div :class="['van-toast', `van-toast--${displayStyle}`, `van-toast--${position}`]">
|
||||||
<!-- text only -->
|
<!-- text only -->
|
||||||
<div v-if="displayStyle === 'text'" class="van-toast__text">{{ message }}</div>
|
<div v-if="displayStyle === 'text'">{{ message }}</div>
|
||||||
<div v-if="displayStyle === 'html'" class="van-toast__text" v-html="message" />
|
<div v-if="displayStyle === 'html'" v-html="message" />
|
||||||
|
|
||||||
<!-- with icon -->
|
<!-- with icon -->
|
||||||
<template v-if="displayStyle === 'default'">
|
<template v-if="displayStyle === 'default'">
|
||||||
@ -46,6 +46,10 @@ export default {
|
|||||||
forbidClick: {
|
forbidClick: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
type: String,
|
||||||
|
default: 'middle'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
# zanui-css
|
|
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vant-css",
|
"name": "vant-css",
|
||||||
"version": "0.10.1",
|
"version": "0.10.6",
|
||||||
"description": "vant css.",
|
"description": "vant css.",
|
||||||
"main": "lib/index.css",
|
"main": "lib/index.css",
|
||||||
"style": "lib/index.css",
|
"style": "lib/index.css",
|
||||||
|
@ -44,11 +44,11 @@ cat > $basepath/../src/icon.css <<EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
.van-icon {
|
.van-icon {
|
||||||
display: inline-block;
|
font-style: normal;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.van-icon::before {
|
.van-icon::before {
|
||||||
font-family: "vant-icon" !important;
|
font-family: "vant-icon" !important;
|
||||||
font-style: normal;
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
speak: none;
|
speak: none;
|
||||||
|
|
||||||
|
@ -214,9 +214,9 @@ module.exports = {
|
|||||||
css: 'other-pay'
|
css: 'other-pay'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
keywords: ['cart'],
|
keywords: ['shopping-cart'],
|
||||||
src: '购物车.svg',
|
src: '购物车2.svg',
|
||||||
css: 'cart'
|
css: 'shopping-cart'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
keywords: ['browsing', 'history'],
|
keywords: ['browsing', 'history'],
|
||||||
@ -403,6 +403,31 @@ module.exports = {
|
|||||||
keywords: ['value-card'],
|
keywords: ['value-card'],
|
||||||
src: '会员余额.svg',
|
src: '会员余额.svg',
|
||||||
css: 'value-card'
|
css: 'value-card'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keywords: ['certificate'],
|
||||||
|
src: '认证.svg',
|
||||||
|
css: 'certificate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keywords: ['tosend'],
|
||||||
|
src: '待发货2.svg',
|
||||||
|
css: 'tosend'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keywords: ['sign'],
|
||||||
|
src: '已完成2.svg',
|
||||||
|
css: 'sign'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keywords: ['home'],
|
||||||
|
src: '首页.svg',
|
||||||
|
css: 'home'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keywords: ['phone'],
|
||||||
|
src: '电话.svg',
|
||||||
|
css: 'phone'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,10 @@
|
|||||||
&__group {
|
&__group {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
box-sizing: border-box;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
background-color: $background-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
.van-card {
|
.van-card {
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
font-size: 16px;
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
|
||||||
.van-icon {
|
.van-icon {
|
||||||
|
font-size: 16px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
$black: #000;
|
$black: #000;
|
||||||
$white: #fff;
|
$white: #fff;
|
||||||
$red: #f44;
|
$red: #f44;
|
||||||
|
$blue: #38f;
|
||||||
|
$orange: #f60;
|
||||||
$green: #06bf04;
|
$green: #06bf04;
|
||||||
$green-wx: #4b0;
|
|
||||||
$gray: #c9c9c9;
|
$gray: #c9c9c9;
|
||||||
$gray-light: #e5e5e5;
|
$gray-light: #e5e5e5;
|
||||||
$gray-darker: #666;
|
$gray-darker: #666;
|
||||||
$gray-dark: #999;
|
$gray-dark: #999;
|
||||||
$yellow: #f09000;
|
|
||||||
$orange: #f60;
|
|
||||||
$blue: #38f;
|
|
||||||
|
|
||||||
/* default colors */
|
/* default colors */
|
||||||
$text-color: #333;
|
$text-color: #333;
|
||||||
@ -20,7 +18,7 @@ $background-color: #f8f8f8;
|
|||||||
|
|
||||||
/* button */
|
/* button */
|
||||||
$button-primary-color: $white;
|
$button-primary-color: $white;
|
||||||
$button-primary-background-color: $green-wx;
|
$button-primary-background-color: #4b0;
|
||||||
$button-primary-border-color: #0a0;
|
$button-primary-border-color: #0a0;
|
||||||
$button-default-color: $text-color;
|
$button-default-color: $text-color;
|
||||||
$button-default-background-color: $white;
|
$button-default-background-color: $white;
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
.van-contact-list {
|
.van-contact-list {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 55px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: $background-color;
|
||||||
|
|
||||||
.van-cell__value {
|
.van-cell__value {
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
@ -55,5 +59,9 @@
|
|||||||
color: $blue;
|
color: $blue;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,20 +13,33 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
padding-right: 85px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__filed {
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 4px 10px;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
border-radius: 6px;
|
||||||
|
border-color: #cacaca;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__exchange {
|
&__exchange {
|
||||||
top: 6px;
|
top: 10px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 30px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__list {
|
&__list {
|
||||||
padding: 60px 0;
|
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
padding: 15px 0 60px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
@ -64,6 +77,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--with-exchange {
|
||||||
|
padding-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
&__close {
|
&__close {
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -73,6 +90,27 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__empty {
|
||||||
|
padding-top: 100px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: $gray-dark;
|
||||||
|
margin: 15px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 80px;
|
||||||
|
height: 84px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'vant-icon';
|
font-family: 'vant-icon';
|
||||||
src: url('https://b.yzcdn.cn/zanui/icon/vant-icon-6b495bd63f.eot');
|
src: url('https://b.yzcdn.cn/zanui/icon/vant-icon-860d24a3c1.eot');
|
||||||
src: url('https://b.yzcdn.cn/zanui/icon/vant-icon-6b495bd63f.eot?#iefix') format('embedded-opentype'),
|
src: url('https://b.yzcdn.cn/zanui/icon/vant-icon-860d24a3c1.eot?#iefix') format('embedded-opentype'),
|
||||||
url('https://b.yzcdn.cn/zanui/icon/vant-icon-6b495bd63f.woff2') format('woff2'),
|
url('https://b.yzcdn.cn/zanui/icon/vant-icon-860d24a3c1.woff2') format('woff2'),
|
||||||
url('https://b.yzcdn.cn/zanui/icon/vant-icon-6b495bd63f.woff') format('woff'),
|
url('https://b.yzcdn.cn/zanui/icon/vant-icon-860d24a3c1.woff') format('woff'),
|
||||||
url('https://b.yzcdn.cn/zanui/icon/vant-icon-6b495bd63f.ttf') format('truetype')
|
url('https://b.yzcdn.cn/zanui/icon/vant-icon-860d24a3c1.ttf') format('truetype')
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-icon {
|
.van-icon {
|
||||||
display: inline-block;
|
font-style: normal;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.van-icon::before {
|
.van-icon::before {
|
||||||
font-family: "vant-icon" !important;
|
font-family: "vant-icon" !important;
|
||||||
font-style: normal;
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
speak: none;
|
speak: none;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@
|
|||||||
.van-icon-credit-pay:before { content: '\e824'; } /* '' */
|
.van-icon-credit-pay:before { content: '\e824'; } /* '' */
|
||||||
.van-icon-debit-pay:before { content: '\e825'; } /* '' */
|
.van-icon-debit-pay:before { content: '\e825'; } /* '' */
|
||||||
.van-icon-other-pay:before { content: '\e826'; } /* '' */
|
.van-icon-other-pay:before { content: '\e826'; } /* '' */
|
||||||
.van-icon-cart:before { content: '\e827'; } /* '' */
|
.van-icon-shopping-cart:before { content: '\e827'; } /* '' */
|
||||||
.van-icon-browsing-history:before { content: '\e828'; } /* '' */
|
.van-icon-browsing-history:before { content: '\e828'; } /* '' */
|
||||||
.van-icon-goods-collect:before { content: '\e829'; } /* '' */
|
.van-icon-goods-collect:before { content: '\e829'; } /* '' */
|
||||||
.van-icon-shop-collect:before { content: '\e82a'; } /* '' */
|
.van-icon-shop-collect:before { content: '\e82a'; } /* '' */
|
||||||
@ -122,4 +122,9 @@
|
|||||||
.van-icon-clock:before { content: '\e849'; } /* '' */
|
.van-icon-clock:before { content: '\e849'; } /* '' */
|
||||||
.van-icon-gold-coin:before { content: '\e84a'; } /* '' */
|
.van-icon-gold-coin:before { content: '\e84a'; } /* '' */
|
||||||
.van-icon-completed:before { content: '\e84b'; } /* '' */
|
.van-icon-completed:before { content: '\e84b'; } /* '' */
|
||||||
.van-icon-value-card:before { content: '\e84c'; } /* '' */
|
.van-icon-value-card:before { content: '\e84c'; } /* '' */
|
||||||
|
.van-icon-certificate:before { content: '\e84d'; } /* '' */
|
||||||
|
.van-icon-tosend:before { content: '\e84e'; } /* '' */
|
||||||
|
.van-icon-sign:before { content: '\e84f'; } /* '' */
|
||||||
|
.van-icon-home:before { content: '\e850'; } /* '' */
|
||||||
|
.van-icon-phone:before { content: '\e851'; } /* '' */
|
@ -1,10 +1,12 @@
|
|||||||
@import './common/var.css';
|
@import './common/var.css';
|
||||||
|
|
||||||
.van-notice-bar {
|
.van-notice-bar {
|
||||||
|
display: flex;
|
||||||
color: $orange;
|
color: $orange;
|
||||||
padding: 9px 10px;
|
padding: 9px 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
position: relative;
|
||||||
background-color: #fff7cc;
|
background-color: #fff7cc;
|
||||||
|
|
||||||
&--withicon {
|
&--withicon {
|
||||||
@ -12,16 +14,28 @@
|
|||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__icon {
|
&__left-icon {
|
||||||
|
height: 18px;
|
||||||
|
min-width: 20px;
|
||||||
|
padding-top: 1px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__right-icon {
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__content-wrap {
|
&__content-wrap {
|
||||||
|
flex: 1;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -30,6 +44,24 @@
|
|||||||
&__content {
|
&__content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition-timing-function: linear;
|
}
|
||||||
|
|
||||||
|
&__play {
|
||||||
|
animation: van-notice-bar-play linear both;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__play--infinite {
|
||||||
|
animation: van-notice-bar-play-infinite linear infinite both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Declare two same keyframes
|
||||||
|
* In case that some mobile browsers can continue animation when className changed
|
||||||
|
*/
|
||||||
|
@keyframes van-notice-bar-play {
|
||||||
|
to { transform: translate3d(-100%, 0, 0) }
|
||||||
|
}
|
||||||
|
@keyframes van-notice-bar-play-infinite {
|
||||||
|
to { transform: translate3d(-100%, 0, 0) }
|
||||||
|
}
|
||||||
|
@ -8,7 +8,15 @@
|
|||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__cancel,
|
||||||
|
&__confirm {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__cancel {
|
&__cancel {
|
||||||
|
@ -51,6 +51,10 @@
|
|||||||
&__action-text {
|
&__action-text {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
color: $green;
|
color: $green;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-icon-search {
|
.van-icon-search {
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: $orange;
|
background: #f85;
|
||||||
color: $white;
|
color: $white;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
|
@ -44,6 +44,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__minus,
|
||||||
|
&__plus {
|
||||||
|
&:active {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--disabled:active {
|
||||||
|
background-color: $background-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__minus {
|
&__minus {
|
||||||
border-radius: 2px 0 0 2px;
|
border-radius: 2px 0 0 2px;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
|
||||||
.van-steps__items {
|
.van-steps__items {
|
||||||
|
display: flex;
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -24,18 +25,6 @@
|
|||||||
padding: 0 0 0 35px;
|
padding: 0 0 0 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--4 {
|
|
||||||
.van-step {
|
|
||||||
width: 33.2%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&--3 {
|
|
||||||
.van-step {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&__icon {
|
&__icon {
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
@ -72,6 +61,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.van-step {
|
.van-step {
|
||||||
|
flex: 1;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: $gray-dark;
|
color: $gray-dark;
|
||||||
|
@ -43,6 +43,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__info {
|
||||||
|
color: #fff;
|
||||||
|
top: -5px;
|
||||||
|
right: -100%;
|
||||||
|
font-size: 12px;
|
||||||
|
transform: scale(.8);
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 3px;
|
||||||
|
text-align: center;
|
||||||
|
min-width: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
border-radius: 9px;
|
||||||
|
background-color: $red;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
color: $blue;
|
color: $blue;
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,15 @@
|
|||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--top {
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--bottom {
|
||||||
|
top: auto;
|
||||||
|
bottom: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-toast-fade-enter, .van-toast-fade-leave-to {
|
.van-toast-fade-enter, .van-toast-fade-leave-to {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="file" i]::-webkit-file-upload-button {
|
input[type="file"]::-webkit-file-upload-button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,4 +49,46 @@ describe('Cell', () => {
|
|||||||
expect(eventStub.calledOnce).to.be.true;
|
expect(eventStub.calledOnce).to.be.true;
|
||||||
expect(eventStub.calledWith('click')).to.be.true;
|
expect(eventStub.calledWith('click')).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('cell with url', () => {
|
||||||
|
wrapper = mount(Cell, {
|
||||||
|
propsData: {
|
||||||
|
url: '#test',
|
||||||
|
replace: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
wrapper.trigger('click');
|
||||||
|
|
||||||
|
expect(window.location.hash).to.equal('#test');
|
||||||
|
window.location.hash = '';
|
||||||
|
|
||||||
|
const length = window.history.length;
|
||||||
|
wrapper.vm.replace = true;
|
||||||
|
wrapper.trigger('click');
|
||||||
|
expect(window.location.hash).to.equal('#test');
|
||||||
|
expect(window.history.length).to.equal(length);
|
||||||
|
window.location.hash = '';
|
||||||
|
});
|
||||||
|
|
||||||
|
it('cell with to', done => {
|
||||||
|
wrapper = mount(Cell, {
|
||||||
|
propsData: {
|
||||||
|
to: '/test',
|
||||||
|
replace: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
wrapper.vm.$router = {
|
||||||
|
push(path) {
|
||||||
|
wrapper.vm.replace = true;
|
||||||
|
wrapper.trigger('click');
|
||||||
|
},
|
||||||
|
replace(path) {
|
||||||
|
expect(path).to.equal('/test');
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
wrapper.trigger('click');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -41,8 +41,8 @@ describe('ContactCard', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(wrapper.hasClass('van-contact-card')).to.be.true;
|
expect(wrapper.hasClass('van-contact-card')).to.be.true;
|
||||||
expect(wrapper.find('.van-contact-card__text p')[0].text()).to.equal('联系人:测试姓名');
|
expect(wrapper.find('.van-contact-card__text div')[0].text()).to.equal('联系人:测试姓名');
|
||||||
expect(wrapper.find('.van-contact-card__text p')[1].text()).to.equal('联系电话:13000000000');
|
expect(wrapper.find('.van-contact-card__text div')[1].text()).to.equal('联系电话:13000000000');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,7 +21,12 @@ describe('ImagePreview', () => {
|
|||||||
ImagePreview(images);
|
ImagePreview(images);
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
expect(document.querySelectorAll('.van-image-preview img').length).to.equal(3);
|
expect(document.querySelectorAll('.van-image-preview img').length).to.equal(3);
|
||||||
done();
|
ImagePreview(images.slice(0, 2));
|
||||||
|
|
||||||
|
Vue.nextTick(() => {
|
||||||
|
expect(document.querySelectorAll('.van-image-preview img').length).to.equal(2);
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ describe('PullRefresh', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
window.scrollY = 100;
|
window.scrollTop = 100;
|
||||||
|
|
||||||
// ignore touch event when not at page top
|
// ignore touch event when not at page top
|
||||||
triggerTouch(wrapper, 'touchstart', 0, 0);
|
triggerTouch(wrapper, 'touchstart', 0, 0);
|
||||||
@ -110,7 +110,7 @@ describe('PullRefresh', () => {
|
|||||||
triggerTouch(wrapper, 'touchend', 0, 100);
|
triggerTouch(wrapper, 'touchend', 0, 100);
|
||||||
expect(wrapper.vm.ceiling).to.be.false;
|
expect(wrapper.vm.ceiling).to.be.false;
|
||||||
|
|
||||||
window.scrollY = 0;
|
window.scrollTop = 0;
|
||||||
triggerTouch(wrapper, 'touchmove', 0, 100);
|
triggerTouch(wrapper, 'touchmove', 0, 100);
|
||||||
expect(wrapper.vm.ceiling).to.be.true;
|
expect(wrapper.vm.ceiling).to.be.true;
|
||||||
});
|
});
|
||||||
|
@ -90,7 +90,7 @@ describe('Sku', (done) => {
|
|||||||
// 未选择完整规格时,弹出toast提示
|
// 未选择完整规格时,弹出toast提示
|
||||||
buyBtn.trigger('click');
|
buyBtn.trigger('click');
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
const toastText = document.querySelector('.van-toast__text');
|
const toastText = document.querySelector('.van-toast div');
|
||||||
expect(toastText.textContent).to.equal('请选择完整的规格');
|
expect(toastText.textContent).to.equal('请选择完整的规格');
|
||||||
expect(buyCallback.calledOnce).to.be.false;
|
expect(buyCallback.calledOnce).to.be.false;
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ describe('Sku', (done) => {
|
|||||||
const minusBtn = wrapper.find('.van-stepper__minus')[0];
|
const minusBtn = wrapper.find('.van-stepper__minus')[0];
|
||||||
minusBtn.trigger('click');
|
minusBtn.trigger('click');
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
const toastText = document.querySelector('.van-toast__text');
|
const toastText = document.querySelector('.van-toast div');
|
||||||
expect(toastText.textContent).to.equal('至少选择一件');
|
expect(toastText.textContent).to.equal('至少选择一件');
|
||||||
|
|
||||||
// 手动修改购买数量
|
// 手动修改购买数量
|
||||||
@ -203,7 +203,7 @@ describe('Sku', (done) => {
|
|||||||
buyBtn.trigger('click');
|
buyBtn.trigger('click');
|
||||||
|
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
const toastText = document.querySelector('.van-toast__text');
|
const toastText = document.querySelector('.van-toast div');
|
||||||
expect(toastText.textContent).to.equal('请填写正确的身份证号码');
|
expect(toastText.textContent).to.equal('请填写正确的身份证号码');
|
||||||
|
|
||||||
inputs[1].element.value = 330101198801012211;
|
inputs[1].element.value = 330101198801012211;
|
||||||
@ -277,7 +277,7 @@ describe('Sku', (done) => {
|
|||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
buyBtn.trigger('click');
|
buyBtn.trigger('click');
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
const toastText = document.querySelector('.van-toast__text');
|
const toastText = document.querySelector('.van-toast div');
|
||||||
expect(toastText.textContent).to.equal('商品已经无法购买啦');
|
expect(toastText.textContent).to.equal('商品已经无法购买啦');
|
||||||
|
|
||||||
const plusBtn = wrapper.find('.van-stepper__plus')[0];
|
const plusBtn = wrapper.find('.van-stepper__plus')[0];
|
||||||
|
196
yarn.lock
196
yarn.lock
@ -59,8 +59,8 @@ acorn@^4.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
||||||
|
|
||||||
acorn@^5.0.0, acorn@^5.1.1:
|
acorn@^5.0.0, acorn@^5.1.1:
|
||||||
version "5.1.2"
|
version "5.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
|
||||||
|
|
||||||
after@0.8.2:
|
after@0.8.2:
|
||||||
version "0.8.2"
|
version "0.8.2"
|
||||||
@ -71,8 +71,8 @@ ajv-keywords@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
|
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
|
||||||
|
|
||||||
ajv-keywords@^2.0.0:
|
ajv-keywords@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0"
|
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
|
||||||
|
|
||||||
ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1:
|
ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1:
|
||||||
version "4.11.8"
|
version "4.11.8"
|
||||||
@ -82,13 +82,13 @@ ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1:
|
|||||||
json-stable-stringify "^1.0.1"
|
json-stable-stringify "^1.0.1"
|
||||||
|
|
||||||
ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5:
|
ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5:
|
||||||
version "5.2.3"
|
version "5.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2"
|
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.3.0.tgz#4414ff74a50879c208ee5fdc826e32c303549eda"
|
||||||
dependencies:
|
dependencies:
|
||||||
co "^4.6.0"
|
co "^4.6.0"
|
||||||
fast-deep-equal "^1.0.0"
|
fast-deep-equal "^1.0.0"
|
||||||
|
fast-json-stable-stringify "^2.0.0"
|
||||||
json-schema-traverse "^0.3.0"
|
json-schema-traverse "^0.3.0"
|
||||||
json-stable-stringify "^1.0.1"
|
|
||||||
|
|
||||||
align-text@^0.1.1, align-text@^0.1.3:
|
align-text@^0.1.1, align-text@^0.1.3:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
@ -341,12 +341,12 @@ autoprefixer@^6.3.1:
|
|||||||
postcss "^5.2.16"
|
postcss "^5.2.16"
|
||||||
postcss-value-parser "^3.2.3"
|
postcss-value-parser "^3.2.3"
|
||||||
|
|
||||||
autoprefixer@^7.1.3:
|
autoprefixer@^7.1.6:
|
||||||
version "7.1.5"
|
version "7.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.5.tgz#d65d14b83c7cd1dd7bc801daa00557addf5a06b2"
|
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7"
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist "^2.5.0"
|
browserslist "^2.5.1"
|
||||||
caniuse-lite "^1.0.30000744"
|
caniuse-lite "^1.0.30000748"
|
||||||
normalize-range "^0.1.2"
|
normalize-range "^0.1.2"
|
||||||
num2fraction "^1.2.2"
|
num2fraction "^1.2.2"
|
||||||
postcss "^6.0.13"
|
postcss "^6.0.13"
|
||||||
@ -1133,12 +1133,12 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
|
|||||||
caniuse-db "^1.0.30000639"
|
caniuse-db "^1.0.30000639"
|
||||||
electron-to-chromium "^1.2.7"
|
electron-to-chromium "^1.2.7"
|
||||||
|
|
||||||
browserslist@^2.1.2, browserslist@^2.5.0:
|
browserslist@^2.1.2, browserslist@^2.5.1:
|
||||||
version "2.5.1"
|
version "2.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.5.1.tgz#68e4bc536bbcc6086d62843a2ffccea8396821c6"
|
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.6.1.tgz#cc65a05ad6131ebda26f076f2822ba1bc826376b"
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite "^1.0.30000744"
|
caniuse-lite "^1.0.30000755"
|
||||||
electron-to-chromium "^1.3.24"
|
electron-to-chromium "^1.3.27"
|
||||||
|
|
||||||
buffer-indexof@^1.0.0:
|
buffer-indexof@^1.0.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
@ -1226,16 +1226,12 @@ caniuse-api@^1.5.2:
|
|||||||
lodash.uniq "^4.5.0"
|
lodash.uniq "^4.5.0"
|
||||||
|
|
||||||
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
||||||
version "1.0.30000748"
|
version "1.0.30000756"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000748.tgz#785d9edfcd645bf795c6ff3ced33c45d580c48a0"
|
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000756.tgz#e938a6b991630f30d2263dd3458beb65d362268b"
|
||||||
|
|
||||||
caniuse-lite@^1.0.30000744:
|
caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000755:
|
||||||
version "1.0.30000748"
|
version "1.0.30000756"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000748.tgz#44c8d6da52ad65a5d7b9dca4efebd0bdd982ba09"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000756.tgz#3da701c1521b9fab87004c6de7c97fa47dbeaad2"
|
||||||
|
|
||||||
caseless@~0.11.0:
|
|
||||||
version "0.11.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
|
|
||||||
|
|
||||||
caseless@~0.12.0:
|
caseless@~0.12.0:
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
@ -1280,8 +1276,8 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
|
|||||||
supports-color "^2.0.0"
|
supports-color "^2.0.0"
|
||||||
|
|
||||||
chalk@^2.1.0:
|
chalk@^2.1.0:
|
||||||
version "2.2.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.0.tgz#477b3bf2f9b8fd5ca9e429747e37f724ee7af240"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-styles "^3.1.0"
|
ansi-styles "^3.1.0"
|
||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
@ -1429,12 +1425,12 @@ code-point-at@^1.0.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
|
|
||||||
codecov@^2.3.1:
|
codecov@^3.0.0:
|
||||||
version "2.3.1"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/codecov/-/codecov-2.3.1.tgz#7dda945cd58a1f6081025b5b03ee01a2ef20f86e"
|
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.0.0.tgz#c273b8c4f12945723e8dc9d25803d89343e5f28e"
|
||||||
dependencies:
|
dependencies:
|
||||||
argv "0.0.2"
|
argv "0.0.2"
|
||||||
request "2.77.0"
|
request "2.81.0"
|
||||||
urlgrey "0.4.4"
|
urlgrey "0.4.4"
|
||||||
|
|
||||||
color-convert@^1.3.0, color-convert@^1.9.0:
|
color-convert@^1.3.0, color-convert@^1.9.0:
|
||||||
@ -1522,10 +1518,10 @@ component-inherit@0.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"
|
resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"
|
||||||
|
|
||||||
compressible@~2.0.11:
|
compressible@~2.0.11:
|
||||||
version "2.0.11"
|
version "2.0.12"
|
||||||
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.11.tgz#16718a75de283ed8e604041625a2064586797d8a"
|
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.12.tgz#c59a5c99db76767e9876500e271ef63b3493bd66"
|
||||||
dependencies:
|
dependencies:
|
||||||
mime-db ">= 1.29.0 < 2"
|
mime-db ">= 1.30.0 < 2"
|
||||||
|
|
||||||
compression@^1.5.2:
|
compression@^1.5.2:
|
||||||
version "1.7.1"
|
version "1.7.1"
|
||||||
@ -1659,9 +1655,9 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
|
|||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
sha.js "^2.4.8"
|
sha.js "^2.4.8"
|
||||||
|
|
||||||
cross-env@^5.1.0:
|
cross-env@^5.1.1:
|
||||||
version "5.1.0"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.0.tgz#1f12d6b3777d5847dcf9cf39fbee3c6a76dd5058"
|
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.1.tgz#b6d8ab97f304c0f71dae7277b75fe424c08dfa74"
|
||||||
dependencies:
|
dependencies:
|
||||||
cross-spawn "^5.1.0"
|
cross-spawn "^5.1.0"
|
||||||
is-windows "^1.0.0"
|
is-windows "^1.0.0"
|
||||||
@ -2210,9 +2206,9 @@ ejs@^2.5.6:
|
|||||||
version "2.5.7"
|
version "2.5.7"
|
||||||
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
|
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
|
||||||
|
|
||||||
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.24:
|
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.27:
|
||||||
version "1.3.26"
|
version "1.3.27"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.26.tgz#996427294861a74d9c7c82b9260ea301e8c02d66"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d"
|
||||||
|
|
||||||
elliptic@^6.0.0:
|
elliptic@^6.0.0:
|
||||||
version "6.4.0"
|
version "6.4.0"
|
||||||
@ -2796,6 +2792,10 @@ fast-deep-equal@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
|
||||||
|
|
||||||
|
fast-json-stable-stringify@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
|
||||||
|
|
||||||
fast-levenshtein@~2.0.4:
|
fast-levenshtein@~2.0.4:
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
||||||
@ -3513,15 +3513,6 @@ har-schema@^2.0.0:
|
|||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
|
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
|
||||||
|
|
||||||
har-validator@~2.0.6:
|
|
||||||
version "2.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
|
|
||||||
dependencies:
|
|
||||||
chalk "^1.1.1"
|
|
||||||
commander "^2.9.0"
|
|
||||||
is-my-json-valid "^2.12.4"
|
|
||||||
pinkie-promise "^2.0.0"
|
|
||||||
|
|
||||||
har-validator@~4.2.1:
|
har-validator@~4.2.1:
|
||||||
version "4.2.1"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
|
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
|
||||||
@ -3819,8 +3810,8 @@ ieee754@^1.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
|
||||||
|
|
||||||
ignore@^3.2.0:
|
ignore@^3.2.0:
|
||||||
version "3.3.5"
|
version "3.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6"
|
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
|
||||||
|
|
||||||
import-local@^0.1.1:
|
import-local@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
@ -3938,8 +3929,8 @@ is-binary-path@^1.0.0:
|
|||||||
binary-extensions "^1.0.0"
|
binary-extensions "^1.0.0"
|
||||||
|
|
||||||
is-buffer@^1.1.5:
|
is-buffer@^1.1.5:
|
||||||
version "1.1.5"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
|
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
|
||||||
|
|
||||||
is-builtin-module@^1.0.0:
|
is-builtin-module@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
@ -4015,7 +4006,7 @@ is-glob@^4.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^2.1.1"
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4:
|
is-my-json-valid@^2.10.0:
|
||||||
version "2.16.1"
|
version "2.16.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11"
|
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -4384,8 +4375,8 @@ karma-phantomjs-launcher@^1.0.4:
|
|||||||
phantomjs-prebuilt "^2.1.7"
|
phantomjs-prebuilt "^2.1.7"
|
||||||
|
|
||||||
karma-sinon-chai@^1.3.2:
|
karma-sinon-chai@^1.3.2:
|
||||||
version "1.3.2"
|
version "1.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/karma-sinon-chai/-/karma-sinon-chai-1.3.2.tgz#ea4d97b16433e64813aaddddded7f7bb4338215e"
|
resolved "https://registry.yarnpkg.com/karma-sinon-chai/-/karma-sinon-chai-1.3.3.tgz#a597e5b4a1369fe7b3d7d76c09ed2061a38e747f"
|
||||||
dependencies:
|
dependencies:
|
||||||
lolex "^1.6.0"
|
lolex "^1.6.0"
|
||||||
|
|
||||||
@ -4904,10 +4895,10 @@ macaddress@^0.2.8:
|
|||||||
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
|
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
|
||||||
|
|
||||||
make-dir@^1.0.0:
|
make-dir@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978"
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51"
|
||||||
dependencies:
|
dependencies:
|
||||||
pify "^2.3.0"
|
pify "^3.0.0"
|
||||||
|
|
||||||
map-cache@^0.2.0:
|
map-cache@^0.2.0:
|
||||||
version "0.2.2"
|
version "0.2.2"
|
||||||
@ -5029,7 +5020,11 @@ miller-rabin@^4.0.0:
|
|||||||
bn.js "^4.0.0"
|
bn.js "^4.0.0"
|
||||||
brorand "^1.0.1"
|
brorand "^1.0.1"
|
||||||
|
|
||||||
"mime-db@>= 1.29.0 < 2", mime-db@~1.30.0:
|
"mime-db@>= 1.30.0 < 2":
|
||||||
|
version "1.31.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.31.0.tgz#a49cd8f3ebf3ed1a482b60561d9105ad40ca74cb"
|
||||||
|
|
||||||
|
mime-db@~1.30.0:
|
||||||
version "1.30.0"
|
version "1.30.0"
|
||||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
|
||||||
|
|
||||||
@ -5280,10 +5275,6 @@ node-source-walk@^3.0.0, node-source-walk@^3.2.0, node-source-walk@^3.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
babylon "^6.17.0"
|
babylon "^6.17.0"
|
||||||
|
|
||||||
node-uuid@~1.4.7:
|
|
||||||
version "1.4.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
|
|
||||||
|
|
||||||
node-watch@^0.5.5:
|
node-watch@^0.5.5:
|
||||||
version "0.5.5"
|
version "0.5.5"
|
||||||
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.5.5.tgz#34865ba8bc6861ab086acdcc3403e40ed55c3274"
|
resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.5.5.tgz#34865ba8bc6861ab086acdcc3403e40ed55c3274"
|
||||||
@ -6036,11 +6027,11 @@ postcss-minify-selectors@^2.0.4:
|
|||||||
postcss-selector-parser "^2.0.0"
|
postcss-selector-parser "^2.0.0"
|
||||||
|
|
||||||
postcss-mixins@^6.0.1:
|
postcss-mixins@^6.0.1:
|
||||||
version "6.1.1"
|
version "6.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/postcss-mixins/-/postcss-mixins-6.1.1.tgz#d77b9cfeab082d9674770e463757657ff7274d4e"
|
resolved "https://registry.yarnpkg.com/postcss-mixins/-/postcss-mixins-6.2.0.tgz#fa9d2c2166b2ae7745956c727ab9dd2de4b96a40"
|
||||||
dependencies:
|
dependencies:
|
||||||
globby "^6.1.0"
|
globby "^6.1.0"
|
||||||
postcss "^6.0.12"
|
postcss "^6.0.13"
|
||||||
postcss-js "^1.0.1"
|
postcss-js "^1.0.1"
|
||||||
postcss-simple-vars "^4.1.0"
|
postcss-simple-vars "^4.1.0"
|
||||||
sugarss "^1.0.0"
|
sugarss "^1.0.0"
|
||||||
@ -6209,7 +6200,7 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0
|
|||||||
source-map "^0.5.6"
|
source-map "^0.5.6"
|
||||||
supports-color "^3.2.3"
|
supports-color "^3.2.3"
|
||||||
|
|
||||||
postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.10, postcss@^6.0.11, postcss@^6.0.12, postcss@^6.0.13, postcss@^6.0.3, postcss@^6.0.8, postcss@^6.0.9:
|
postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.10, postcss@^6.0.11, postcss@^6.0.13, postcss@^6.0.3, postcss@^6.0.8, postcss@^6.0.9:
|
||||||
version "6.0.13"
|
version "6.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.13.tgz#b9ecab4ee00c89db3ec931145bd9590bbf3f125f"
|
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.13.tgz#b9ecab4ee00c89db3ec931145bd9590bbf3f125f"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -6365,10 +6356,6 @@ qs@6.5.1, qs@~6.5.1:
|
|||||||
version "6.5.1"
|
version "6.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
||||||
|
|
||||||
qs@~6.3.0:
|
|
||||||
version "6.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
|
|
||||||
|
|
||||||
qs@~6.4.0:
|
qs@~6.4.0:
|
||||||
version "6.4.0"
|
version "6.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
||||||
@ -6655,31 +6642,6 @@ request-progress@~2.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
throttleit "^1.0.0"
|
throttleit "^1.0.0"
|
||||||
|
|
||||||
request@2.77.0:
|
|
||||||
version "2.77.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/request/-/request-2.77.0.tgz#2b00d82030ededcc97089ffa5d8810a9c2aa314b"
|
|
||||||
dependencies:
|
|
||||||
aws-sign2 "~0.6.0"
|
|
||||||
aws4 "^1.2.1"
|
|
||||||
caseless "~0.11.0"
|
|
||||||
combined-stream "~1.0.5"
|
|
||||||
extend "~3.0.0"
|
|
||||||
forever-agent "~0.6.1"
|
|
||||||
form-data "~2.1.1"
|
|
||||||
har-validator "~2.0.6"
|
|
||||||
hawk "~3.1.3"
|
|
||||||
http-signature "~1.1.0"
|
|
||||||
is-typedarray "~1.0.0"
|
|
||||||
isstream "~0.1.2"
|
|
||||||
json-stringify-safe "~5.0.1"
|
|
||||||
mime-types "~2.1.7"
|
|
||||||
node-uuid "~1.4.7"
|
|
||||||
oauth-sign "~0.8.1"
|
|
||||||
qs "~6.3.0"
|
|
||||||
stringstream "~0.0.4"
|
|
||||||
tough-cookie "~2.3.0"
|
|
||||||
tunnel-agent "~0.4.1"
|
|
||||||
|
|
||||||
request@2.81.0, request@~2.81.0:
|
request@2.81.0, request@~2.81.0:
|
||||||
version "2.81.0"
|
version "2.81.0"
|
||||||
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
|
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
|
||||||
@ -6799,8 +6761,8 @@ resolve@1.1.x:
|
|||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
|
||||||
|
|
||||||
resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.4.0:
|
resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
@ -7030,8 +6992,8 @@ sntp@1.x.x:
|
|||||||
hoek "2.x.x"
|
hoek "2.x.x"
|
||||||
|
|
||||||
sntp@2.x.x:
|
sntp@2.x.x:
|
||||||
version "2.0.2"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.0.2.tgz#5064110f0af85f7cfdb7d6b67a40028ce52b4b2b"
|
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
|
||||||
dependencies:
|
dependencies:
|
||||||
hoek "4.x.x"
|
hoek "4.x.x"
|
||||||
|
|
||||||
@ -7206,7 +7168,11 @@ stackframe@^1.0.3:
|
|||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b"
|
resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b"
|
||||||
|
|
||||||
"statuses@>= 1.3.1 < 2", statuses@~1.3.1:
|
"statuses@>= 1.3.1 < 2":
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
|
||||||
|
|
||||||
|
statuses@~1.3.1:
|
||||||
version "1.3.1"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e"
|
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e"
|
||||||
|
|
||||||
@ -7406,8 +7372,8 @@ tapable@^0.2.5, tapable@^0.2.7:
|
|||||||
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"
|
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"
|
||||||
|
|
||||||
tar-pack@^3.4.0:
|
tar-pack@^3.4.0:
|
||||||
version "3.4.0"
|
version "3.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984"
|
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^2.2.0"
|
debug "^2.2.0"
|
||||||
fstream "^1.0.10"
|
fstream "^1.0.10"
|
||||||
@ -7568,10 +7534,6 @@ tunnel-agent@^0.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
tunnel-agent@~0.4.1:
|
|
||||||
version "0.4.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
|
|
||||||
|
|
||||||
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
||||||
version "0.14.5"
|
version "0.14.5"
|
||||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||||
@ -7621,8 +7583,8 @@ uc.micro@^1.0.1, uc.micro@^1.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
|
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
|
||||||
|
|
||||||
uglify-js@3.1.x:
|
uglify-js@3.1.x:
|
||||||
version "3.1.4"
|
version "3.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.4.tgz#8e1efa1244b207588e525c9c1835a33458b90aee"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.6.tgz#918832602036e95d2318e11f27ee8461a8592c5d"
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.11.0"
|
commander "~2.11.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
@ -7910,9 +7872,9 @@ vue-router@^3.0.1:
|
|||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.1.tgz#d9b05ad9c7420ba0f626d6500d693e60092cc1e9"
|
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.1.tgz#d9b05ad9c7420ba0f626d6500d693e60092cc1e9"
|
||||||
|
|
||||||
vue-sfc-compiler@^0.0.3:
|
vue-sfc-compiler@^0.0.4:
|
||||||
version "0.0.3"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/vue-sfc-compiler/-/vue-sfc-compiler-0.0.3.tgz#3fe3d34393f91ef1bb2bf6d2b00a8c70fd413be0"
|
resolved "https://registry.yarnpkg.com/vue-sfc-compiler/-/vue-sfc-compiler-0.0.4.tgz#fb2158a87b19e2116fb7cff6e5ff688bcff8b545"
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-template-compiler ">=2.5.0"
|
vue-template-compiler ">=2.5.0"
|
||||||
vue-template-es2015-compiler ">=1.6.0"
|
vue-template-es2015-compiler ">=1.6.0"
|
||||||
@ -8258,9 +8220,9 @@ yeast@0.1.2:
|
|||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
|
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
|
||||||
|
|
||||||
zan-doc@^0.3.6:
|
zan-doc@^0.3.9:
|
||||||
version "0.3.6"
|
version "0.3.9"
|
||||||
resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.3.6.tgz#fd21ebde256898c5e057c9d169c848666bf41420"
|
resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.3.9.tgz#4a666408569aee6481590aba281cf40c98ce89b7"
|
||||||
dependencies:
|
dependencies:
|
||||||
cheerio "0.22.0"
|
cheerio "0.22.0"
|
||||||
decamelize "^1.2.0"
|
decamelize "^1.2.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user