Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
c0b78350
N
nutui
项目概览
京东前端
/
nutui
通知
37
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c0b78350
编写于
5月 23, 2019
作者:
F
Frans
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upd(Switch): 优化了快速点击场景下的问题
上级
5aac968b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
64 deletion
+51
-64
CHANGELOG.md
CHANGELOG.md
+14
-0
build/webpack.prod.cmn.conf.js
build/webpack.prod.cmn.conf.js
+0
-46
package.json
package.json
+6
-7
src/packages/button/button.scss
src/packages/button/button.scss
+20
-3
src/packages/buttongroup/doc.md
src/packages/buttongroup/doc.md
+6
-6
src/packages/switch/switch.vue
src/packages/switch/switch.vue
+5
-2
未找到文件。
CHANGELOG.md
浏览文件 @
c0b78350
## 2.1.2
`2019-5-23`
*
:sparkles: upd(Slider): 优化了拖动性能
*
:sparkles: upd(Range): 优化了拖动性能
*
:sparkles: upd(Switch): 优化了快速点击场景下的问题
*
:sparkles: upd(CountDown): 优化了diffTime/restTime & 新增了一些事件
*
:bug: fix(Calendar极值问题): 修复了极值问题
*
:zap: chore: 优化了MD文档编译缓存机制
*
:zap: chore: 不再单独构建commonjs包
*
:zap: doc: 文档内容修改完善
## 2.1.1
`2019-4-22`
...
...
build/webpack.prod.cmn.conf.js
已删除
100644 → 0
浏览文件 @
5aac968b
const
webpack
=
require
(
'
webpack
'
);
const
path
=
require
(
'
path
'
);
const
MiniCssExtractPlugin
=
require
(
"
mini-css-extract-plugin
"
);
const
webpackBaseConf
=
require
(
'
./webpack.base.conf.js
'
);
const
rimraf
=
require
(
'
rimraf
'
);
const
merge
=
require
(
'
webpack-merge
'
);
rimraf
(
'
./dist/nutui.common.js
'
,
function
(
err
)
{
if
(
err
)
console
.
log
(
err
);
});
module
.
exports
=
merge
(
webpackBaseConf
,
{
mode
:
'
production
'
,
devtool
:
'
source-map
'
,
entry
:
{
nutui
:
'
./src/nutui.js
'
,
},
externals
:
{
'
vue
'
:
{
root
:
'
Vue
'
,
commonjs
:
'
vue
'
,
commonjs2
:
'
vue
'
,
amd
:
'
vue
'
}
},
output
:
{
path
:
path
.
resolve
(
__dirname
,
'
../dist/
'
),
filename
:
'
nutui.common.js
'
,
library
:
'
nutui
'
,
libraryTarget
:
'
commonjs2
'
,
umdNamedDefine
:
true
},
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
'
[name].css
'
}),
new
webpack
.
DefinePlugin
({
'
process.env
'
:
{
NODE_ENV
:
'
"production"
'
}
})
],
optimization
:
{
minimize
:
false
}
});
\ No newline at end of file
package.json
浏览文件 @
c0b78350
{
"name"
:
"@nutui/nutui"
,
"version"
:
"2.1.
1
"
,
"version"
:
"2.1.
2
"
,
"description"
:
"一套轻量级移动端Vue组件库"
,
"typings"
:
"dist/types/index.d.ts"
,
"main"
:
"dist/nutui.js"
,
...
...
@@ -12,19 +12,18 @@
"CHANGELOG.md"
],
"scripts"
:
{
"dev:demo"
:
"cross-env NODE_ENV=development webpack-dev-server -d --open --progress --config build/webpack.demo.dev.conf.js"
,
"build:demo"
:
"cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.demo.build.conf.js"
,
"dev:doc"
:
"cross-env NODE_ENV=development DOC_TYPE=true webpack-dev-server -d --open -w --progress --config build/webpack.doc.dev.conf.js"
,
"clear"
:
"node scripts/clearCache.js"
,
"dev"
:
"npm run dev:demo"
,
"dev:carefree"
:
"cross-env NODE_ENV=carefree carefree_env=dev webpack -w --colors --progress --config build/webpack.demo.dev.conf.js"
,
"dev:demo"
:
"cross-env NODE_ENV=development webpack-dev-server -d --open --progress --config build/webpack.demo.dev.conf.js"
,
"dev:doc"
:
"cross-env NODE_ENV=development DOC_TYPE=true webpack-dev-server -d --open -w --progress --config build/webpack.doc.dev.conf.js"
,
"build:demo"
:
"cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.demo.build.conf.js"
,
"build:doc"
:
"cross-env NODE_ENV=production DOC_TYPE=true webpack --hide-modules --progress --config build/webpack.doc.build.conf.js"
,
"build:site"
:
"npm run build:demo && npm run build:doc"
,
"build:prod"
:
"cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.prod.conf.js && node scripts/createIndexScss.js"
,
"build:prodmin"
:
"cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.prod.mini.conf.js"
,
"build:disp"
:
"cross-env NODE_ENV=production PROD_TYPE=disp webpack --hide-modules --progress --config build/webpack.prod.disperse.conf.js"
,
"build
:cmn"
:
"cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.prod.cmn.conf.js
"
,
"
build"
:
"npm run build:prod && npm run build:prodmin && npm run build:cmn && npm run build:disp
"
,
"build
"
:
"npm run build:prod && npm run build:prodmin && npm run build:disp
"
,
"
clear"
:
"node scripts/clearCache.js
"
,
"eslint"
:
"eslint src/packages/**/*.{js,vue}"
,
"add"
:
"node scripts/createCptTpl.js"
,
"test"
:
"cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha-webpack --webpack-config build/webpack.test.conf.js --require test/setup.js src/packages/*/__test__/**.spec.js"
,
...
...
src/packages/button/button.scss
浏览文件 @
c0b78350
...
...
@@ -3,7 +3,8 @@
padding
:
0
$btn-height-small
/
2
;
font-size
:
$font-size-small
;
}
.nut-button
{
.nut-button
{
cursor
:
pointer
;
height
:
$btn-height-big
;
padding
:
0
$btn-height-big
;
...
...
@@ -13,11 +14,13 @@
background
:
$btn-gradient-bg
;
border
:
none
;
box-sizing
:
border-box
;
&
[
disabled
]
{
cursor
:
not
-
allowed
;
background
:
$btn-disable-bg
;
color
:
$btn-disable-color
;
}
// type-label
.txt-icon
{
vertical-align
:
text-top
;
...
...
@@ -26,65 +29,79 @@
margin-right
:
$btn-icon-margin
;
color
:
$primary-color
;
}
&
.red
{
background
:
$btn-default-bg
;
border
:
$border-width-base
solid
$primary-color
;
color
:
$primary-color
;
}
&
.gray
{
background
:
$light-color
;
color
:
$title-color
;
}
&
.light
{
color
:
$title-color
;
background
:
$btn-default-bg
;
border
:
$border-width-base
solid
$dark-color
;
}
&
.lightred
{
background
:
$btn-label-light-bg
;
color
:
$title-color
;
border
:
none
;
border
:
none
;
}
&
.primary
{
background
:
$primary-color
;
color
:
$btn-primary-color
;
}
&
.default
{
background
:
$btn-default-bg
;
color
:
$title-color
;
border
:
$border-width-base
solid
$btn-default-border
;
}
&
.actived
{
background
:
$btn-label-light-bg
;
color
:
$primary-color
;
border
:
$border-width-base
solid
$primary-color
;
}
&
.dashed
{
&
.dashed
{
background
:
$btn-default-bg
;
color
:
$title-color
;
border
:
$border-width-base
dashed
$dark-color
;
}
// 通栏样式
&
.block
{
width
:
100%
;
border-radius
:
0
;
}
// size-小号
&
.small
{
height
:
$btn-height-small
;
padding
:
0
$btn-height-small
/
2
;
font-size
:
$font-size-small
;
}
&
.no-txt-small
{
width
:
$btn-height-small
;
padding
:
0
;
.txt-icon
{
margin
:
0
;
}
}
&
.no-txt
{
width
:
$btn-height-big
;
padding
:
0
;
.txt-icon
{
margin
:
0
;
}
...
...
src/packages/buttongroup/doc.md
浏览文件 @
c0b78350
...
...
@@ -5,7 +5,7 @@
常规按钮组
```
html
<nut-button
-
group>
<nut-buttongroup>
<nut-button
type=
"light"
>
...
...
@@ -14,13 +14,13 @@
<nut-button>
确定
</nut-button>
</nut-button
-
group>
</nut-buttongroup>
```
圆角按钮组
```
html
<nut-button
-
group
<nut-buttongroup
shape=
"circle"
>
<nut-button
...
...
@@ -31,13 +31,13 @@
<nut-button>
确定
</nut-button>
</nut-button
-
group>
</nut-buttongroup>
```
页面底部功能,配合Badge使用
```
html
<nut-button
-
group
<nut-buttongroup
type=
"menu"
>
<nut-button
...
...
@@ -81,7 +81,7 @@
>
成功
</nut-button>
</nut-button
-
group>
</nut-buttongroup>
```
## Prop
...
...
src/packages/switch/switch.vue
浏览文件 @
c0b78350
...
...
@@ -26,7 +26,8 @@ export default {
},
data
()
{
return
{
isActive
:
false
isActive
:
false
,
isAnimating
:
false
};
},
created
()
{
...
...
@@ -39,14 +40,16 @@ export default {
},
methods
:
{
toggle
()
{
if
(
this
.
isAnimating
)
return
;
const
status
=
this
.
isActive
;
if
(
!
this
.
disabled
)
{
this
.
isActive
=
!
status
;
}
this
.
isAnimating
=
true
;
setTimeout
(()
=>
{
this
.
$emit
(
"
change
"
,
this
.
isActive
);
this
.
$emit
(
"
update:active
"
,
this
.
isActive
);
this
.
isAnimating
=
false
;
},
300
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录