Comparing version 0.5.1 to 0.5.2
@@ -190,3 +190,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
gutter: function gutter() { | ||
return Number(this.$parent.gutter); | ||
if (!this.$parent) return 0; | ||
return Number(this.$parent.gutter) || 0; | ||
}, | ||
@@ -193,0 +194,0 @@ style: function style() { |
@@ -1910,3 +1910,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
type: String, | ||
default: 'yyyy.mm.dd hh时 mm分' | ||
default: 'YYYY.MM.DD HH时 mm分' | ||
}, | ||
@@ -1913,0 +1913,0 @@ visibleItemCount: { |
@@ -2191,2 +2191,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* istanbul ignore if */ | ||
if (this.closing) return; | ||
@@ -2198,5 +2199,6 @@ | ||
/* istanbul ignore else */ | ||
if (this.lockOnScroll) { | ||
setTimeout(function () { | ||
if (_this.modal && _this.bodyOverflow !== 'hidden') { | ||
if (_this.overlay && _this.bodyOverflow !== 'hidden') { | ||
document.body.style.overflow = _this.bodyOverflow; | ||
@@ -2203,0 +2205,0 @@ } |
@@ -179,3 +179,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
}, | ||
gutter: [Number, String] | ||
gutter: { | ||
type: [Number, String], | ||
default: 0 | ||
} | ||
}, | ||
@@ -182,0 +185,0 @@ computed: { |
@@ -180,4 +180,13 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
}, | ||
beforeCreate: function beforeCreate() { | ||
this.$parent.tabs.push(this); | ||
data: function data() { | ||
var nextIndex = this.$parent.tabs.length; | ||
this.$parent.tabs.push({ | ||
title: this.title, | ||
disabled: this.disabled, | ||
index: nextIndex | ||
}); | ||
return { | ||
key: nextIndex | ||
}; | ||
}, | ||
@@ -187,3 +196,3 @@ | ||
classNames: function classNames() { | ||
return { 'van-tab__pane--select': this.$parent.tabs.indexOf(this) === this.$parent.curActive }; | ||
return { 'van-tab__pane--select': this.key === this.$parent.curActive }; | ||
} | ||
@@ -190,0 +199,0 @@ } |
@@ -168,2 +168,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var removeDom = function removeDom(event) { | ||
/* istanbul ignore else */ | ||
if (event.target.parentNode) { | ||
@@ -226,2 +227,3 @@ event.target.parentNode.removeChild(event.target); | ||
Toast.clear = function () { | ||
/* istanbul ignore else */ | ||
if (instance) instance.clear(); | ||
@@ -228,0 +230,0 @@ }; |
{ | ||
"name": "vant", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "有赞vue wap组件库", | ||
"main": "lib/vant.js", | ||
"style": "lib/vant-css/index.css", | ||
"unpkg": "lib/index.js", | ||
"files": [ | ||
@@ -13,4 +14,4 @@ "lib", | ||
"scripts": { | ||
"bootstrap": "yarn || npm i --registry=http://registry.npm.qima-inc.com", | ||
"dev": "npm run build:file && webpack-dev-server --inline --hot --config build/webpack.config.js --content-base ./", | ||
"bootstrap": "yarn || npm i", | ||
"dev": "npm run build:file && webpack-dev-server --inline --hot --config build/webpack.config.dev.js --content-base ./", | ||
"build:file": "node build/bin/build-entry.js", | ||
@@ -23,3 +24,3 @@ "build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js", | ||
"deploy": "npm run deploy:docs && gh-pages -d docs/dist --remote youzan && rimraf docs/dist", | ||
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js", | ||
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.prod.js", | ||
"dist": "npm run clean && npm run build:file && npm run lint && npm run build:vant && npm run build:components && npm run build:utils && npm run build:vant-css", | ||
@@ -29,3 +30,3 @@ "clean": "rimraf lib && rimraf packages/*/lib", | ||
"test": "karma start test/unit/karma.conf.js --single-run", | ||
"test:coverage": "find test/unit/coverage/lcov-report -name 'index.html' | sed -n 1,1p | xargs -I {} open {} ", | ||
"test:coverage": "open test/unit/coverage/lcov-report/index.html", | ||
"test:watch": "karma start test/unit/karma.conf.js", | ||
@@ -53,3 +54,2 @@ "release": "npm run bootstrap && sh build/release.sh" | ||
"devDependencies": { | ||
"2webpack2": "^1.2.1", | ||
"autoprefixer": "^6.7.5", | ||
@@ -72,2 +72,3 @@ "avoriaz": "^1.11.1", | ||
"cheerio": "^0.22.0", | ||
"codecov": "^2.1.0", | ||
"copy-webpack-plugin": "^4.0.1", | ||
@@ -81,3 +82,2 @@ "cp-cli": "^1.0.2", | ||
"extract-text-webpack-plugin": "^2.0.0-beta.5", | ||
"favicons-webpack-plugin": "0.0.7", | ||
"felint": "^0.5.0-alpha.3", | ||
@@ -84,0 +84,0 @@ "file-loader": "^0.9.0", |
@@ -12,9 +12,4 @@ import Vue from 'vue'; | ||
const defaultCallback = action => { | ||
/* istanbul ignore else */ | ||
if (currentDialog) { | ||
const callback = currentDialog.callback; | ||
if (typeof callback === 'function') { | ||
callback(action); | ||
} | ||
if (currentDialog.resolve && action === 'confirm') { | ||
@@ -47,2 +42,3 @@ currentDialog.resolve(action); | ||
for (const prop in options) { | ||
/* istanbul ignore else */ | ||
if (options.hasOwnProperty(prop)) { | ||
@@ -49,0 +45,0 @@ instance[prop] = options[prop]; |
@@ -17,2 +17,3 @@ import Vue from 'vue'; | ||
const removeDom = event => { | ||
/* istanbul ignore else */ | ||
if (event.target.parentNode) { | ||
@@ -73,2 +74,3 @@ event.target.parentNode.removeChild(event.target); | ||
Toast.clear = () => { | ||
/* istanbul ignore else */ | ||
if (instance) instance.clear(); | ||
@@ -75,0 +77,0 @@ }; |
{ | ||
"name": "vant-css", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "vant css.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.css", |
@@ -10,3 +10,3 @@ <p> | ||
[![Build Status](https://travis-ci.org/youzan/vant.svg?branch=master)](https://travis-ci.org/youzan/vant) [![npm version](https://img.shields.io/npm/v/vant.svg?style=flat)](https://www.npmjs.com/package/vant) [![downloads](https://img.shields.io/npm/dt/vant.svg)](https://www.npmjs.com/package/vant) | ||
[![Build Status](https://travis-ci.org/youzan/vant.svg?branch=master)](https://travis-ci.org/youzan/vant) [![Coverage Status](https://img.shields.io/codecov/c/github/youzan/vant/dev.svg)](https://codecov.io/github/youzan/vant?branch=dev) [![npm version](https://img.shields.io/npm/v/vant.svg?style=flat)](https://www.npmjs.com/package/vant) [![downloads](https://img.shields.io/npm/dt/vant.svg)](https://www.npmjs.com/package/vant) | ||
@@ -62,5 +62,11 @@ ## 一、安装 | ||
浏览器访问[http://localhost:8080](http://localhost:8080)就可以看到所有组件的示例了。 | ||
## 四、手机预览 | ||
可以手机扫码以下二维码访问手机端demo: | ||
![zanui_vue_mobile_qrcode](https://img.yzcdn.cn/v2/image/youzanyun/zanui/pc/zanui_vue_mobile_preview_03.png) | ||
## 四、开源协议 | ||
## 五、开源协议 | ||
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。 |
@@ -40,2 +40,3 @@ import Button from '../packages/button/index.js'; | ||
const install = function(Vue) { | ||
/* istanbul ignore if */ | ||
if (install.installed) return; | ||
@@ -77,3 +78,3 @@ | ||
// auto install | ||
/* istanbul ignore if */ | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
@@ -85,3 +86,3 @@ install(window.Vue); | ||
install, | ||
version: '0.5.1', | ||
version: '0.5.2', | ||
Button, | ||
@@ -88,0 +89,0 @@ Switch, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1267301
85
317
28910
71
3
8