From b30b98e61ca42ec74095c231a399d10eb30b3e33 Mon Sep 17 00:00:00 2001 From: niunai Date: Thu, 2 Mar 2017 15:53:29 +0800 Subject: [PATCH] when to modifier --- docs/index.js | 1 - package.json | 2 +- packages/button/src/button.js | 6 +++--- packages/zanui-css/src/button.css | 4 ++-- packages/zanui-css/src/button_group.css | 1 + 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.js b/docs/index.js index 8ee82377f..979a0b949 100644 --- a/docs/index.js +++ b/docs/index.js @@ -42,7 +42,6 @@ router.afterEach(route => { Vue.nextTick(() => { document.body.scrollTop = indexScrollTop; }); - } }); diff --git a/package.json b/package.json index 84dff4387..18959a77b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "scripts": { "bootstrap": "npm i --registry=http://registry.npm.qima-inc.com", - "dev": "npm run bootstrap && npm run build:file && webpack-dev-server --inline --hot --config build/webpack.config.js", + "dev": "npm run build:file && webpack-dev-server --inline --hot --config build/webpack.config.js", "build:file": "node build/bin/build-entry.js", "build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js", "build:zanui-css": "gulp build --gulpfile packages/zanui-css/gulpfile.js && cp-cli packages/zanui-css/lib lib/zanui-css", diff --git a/packages/button/src/button.js b/packages/button/src/button.js index fa62244c4..1369db91b 100644 --- a/packages/button/src/button.js +++ b/packages/button/src/button.js @@ -61,9 +61,9 @@ export default { 'z-button--' + type, 'z-button--' + size, { - 'is-disabled': disabled, - 'is-loading': loading, - 'is-block': block + 'z-button--disabled': disabled, + 'z-button--loading': loading, + 'z-button--block': block } ]} onClick={this.handleClick} diff --git a/packages/zanui-css/src/button.css b/packages/zanui-css/src/button.css index 80a471c1f..34b6106f1 100644 --- a/packages/zanui-css/src/button.css +++ b/packages/zanui-css/src/button.css @@ -75,13 +75,13 @@ font-size: 10px; } - @when disabled { + @m disabled { color: $button-disabled-color; background-color: $button-disabled-background-color; border: 1px solid $button-disabled-border-color; } - @when block { + @m block { display: block; } } diff --git a/packages/zanui-css/src/button_group.css b/packages/zanui-css/src/button_group.css index f061727d3..931264330 100644 --- a/packages/zanui-css/src/button_group.css +++ b/packages/zanui-css/src/button_group.css @@ -2,6 +2,7 @@ display: inline-block; box-sizing: border-box; padding-right: 10px; + vertical-align: middle; &:last-child { padding-right: 0; }