Skip to content

Commit 7ecd02d

Browse files
committed
Merge remote-tracking branch 'origin/v2'
2 parents 51bd828 + 0fdecb2 commit 7ecd02d

File tree

175 files changed

+3233
-1723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+3233
-1723
lines changed

.postcssrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module.exports = {
22
plugins: {
33
'postcss-import': {},
44
'postcss-url': {},
5-
autoprefixer: {}
5+
autoprefixer: {
6+
overrideBrowserslist: ['last 20 versions']
7+
}
68
}
79
};

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## 2.2.7
2+
3+
`2020-07-09`
4+
5+
* :sparkles: feat(FixedNav):新增悬浮导航组件 @richard1015
6+
* :sparkles: feat(Notify):新增通知组件 @shenqistart
7+
* :sparkles: feat(CountUp):新增数字滚动组件 @Ymm0008
8+
* :sparkles: upd(Elevator):优化电梯组件 @zhenyulei
9+
* :sparkles: upd(NoticeBar):重构优化内部代码 @shenqistart
10+
* :bug: fix(Rate):修复props 数据监听问题 @yushuang
11+
* :bug: fix(TextBox): 修复文本域初始化字数展示问题 @guoxiao158
12+
* :bug: fix(Dialog):滚动模式bug修复、新增close关闭事件 @guoxiao158
13+
* :bug: fix(Stepper):判断max小于min的情况 @yangxiaolu1993
14+
* :bug: fix(Address): 地址组件点击左上角返回问题,支持自定义图标 @yangxiaolu1993
15+
* :bug: fix(Drag):优化拖拽组件demo显示问题 @zy19940510 @richard1015
16+
* :bug: fix(Switch):修复内嵌文字居中 @zjyau
17+
* :bug: fix(Datepicker)修复设置起止范围,如月份是个位数(1-9月),天数的开始条件无效问题 @zjyau
18+
119
## 2.2.6
220

321
`2020-06-19`

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nutui/nutui",
3-
"version": "2.2.6",
3+
"version": "2.2.7",
44
"description": "一套轻量级移动端Vue组件库",
55
"typings": "dist/types/index.d.ts",
66
"main": "dist/nutui.js",
@@ -20,7 +20,7 @@
2020
"test": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config node_modules/@nutui/cli/dist_cli/webpack/test.config.js --require node_modules/@nutui/cli/dist_cli/test/setup.js src/packages/*/__test__/**.spec.js",
2121
"coveralls": "cat ./coverage/lcov.info | coveralls",
2222
"test:watch": "npm run test --watch",
23-
"prettier:fix": "prettier --write src/**/*.{js,vue,scss}"
23+
"prettier:fix": "prettier --write src/**/*.{ts,js,vue,scss}"
2424
},
2525
"husky": {
2626
"hooks": {
@@ -38,7 +38,8 @@
3838
"webpack",
3939
"vue component",
4040
"jdc",
41-
"jdcfe"
41+
"jdcfe",
42+
"jdl"
4243
],
4344
"author": "jdcfe",
4445
"license": "MIT",
@@ -48,9 +49,10 @@
4849
"@babel/plugin-transform-runtime": "^7.9.6",
4950
"@commitlint/cli": "^8.0.0",
5051
"@commitlint/config-conventional": "^8.0.0",
51-
"@nutui/cli": "^0.2.2",
52+
"autoprefixer": "^9.8.4",
5253
"babel-plugin-istanbul": "^6.0.0",
5354
"gsap": "^3.2.6",
55+
"hammerjs": "^2.0.8",
5456
"husky": "^3.0.0",
5557
"vue-lazyload": "^1.3.3",
5658
"vue-qr": "^2.2.1"
@@ -59,6 +61,7 @@
5961
"vue": "^2.6.10"
6062
},
6163
"devDependencies": {
64+
"@nutui/cli": "^0.3.3",
6265
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
6366
"@babel/plugin-transform-object-assign": "^7.8.3",
6467
"@typescript-eslint/eslint-plugin": "^2.16.0",

src/assets/svg/back.svg

Lines changed: 13 additions & 0 deletions
Loading

src/assets/svg/close.svg

Lines changed: 15 additions & 0 deletions
Loading

src/assets/svg/notice.svg

Lines changed: 1 addition & 0 deletions
Loading

src/config.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
{
2-
"sorts": [
3-
"数据展示",
4-
"数据录入",
5-
"操作反馈",
6-
"导航组件",
7-
"布局组件",
8-
"基础组件",
9-
"业务组件"
10-
],
2+
"sorts": ["数据展示", "数据录入", "操作反馈", "导航组件", "布局组件", "基础组件", "业务组件"],
113
"packages": [
124
{
135
"name": "Cell",
@@ -635,13 +627,31 @@
635627
},
636628
{
637629
"version": "1.0.0",
630+
"name": "Notify",
631+
"type": "method",
632+
"chnName": "展示消息提示",
633+
"desc": "在页面顶部展示消息提示,支持函数调用和组件调用两种方式",
634+
"sort": "2",
635+
"showDemo": true,
636+
"author": "wangyue217"
637+
},
638+
{
638639
"name": "CountUp",
639640
"type": "component",
640641
"chnName": "数字滚动",
641642
"desc": "用于数据展示",
642643
"sort": "0",
643644
"showDemo": true,
644645
"author": "yumingming"
646+
},
647+
{
648+
"name": "FixedNav",
649+
"type": "component",
650+
"chnName": "悬浮导航",
651+
"desc": "拖拽导航",
652+
"sort": "3",
653+
"showDemo": true,
654+
"author": "richard1015"
645655
}
646656
]
647-
}
657+
}

src/locales/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import znCH from './lang/zn-CH';
44
let defaultMessages = {};
55

66
let merged = false;
7-
const vueI18nHandler = function () {
7+
const vueI18nHandler = function() {
88
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
99
if (typeof vuei18n === 'function' && !!Vue.locale) {
1010
if (!merged) {
@@ -57,7 +57,7 @@ function getArgType(arg) {
5757
function simpleTemplate(templ, conf) {
5858
let pars = templ && templ.match(/{.+?}/g);
5959
if (pars && conf) {
60-
pars = pars.map((p) => p.replace(/\{\s*(\w+|\d+).*?\}/, '$1'));
60+
pars = pars.map(p => p.replace(/\{\s*(\w+|\d+).*?\}/, '$1'));
6161
pars.forEach((c, i) => {
6262
let reg = new RegExp('{\\s*' + c + '\\s*(?:=\\s*(\\S*?))?\\s*?}', 'g');
6363
templ = templ.replace(reg, (a, b) => {

src/mixins/touch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const TouchMixin = Vue.extend({
4141
this.deltaY = 0;
4242
this.offsetX = 0;
4343
this.offsetY = 0;
44-
},
45-
},
44+
}
45+
}
4646
});
4747
export default TouchMixin;

src/nutui.js

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,20 @@ import './packages/subsidenavbar/subsidenavbar.scss';
119119
import SideNavBarItem from './packages/sidenavbaritem/index.js';
120120
import './packages/sidenavbaritem/sidenavbaritem.scss';
121121
import Drag from './packages/drag/index.js';
122-
import './packages/drag/drag.scss'; // import VueQr from "./packages/qart/index.js";
122+
import './packages/drag/drag.scss';
123+
// import VueQr from "./packages/qart/index.js";
123124
// import "./packages/qart/qart.scss";
124125

125126
import Address from './packages/address/index.js';
126127
import './packages/address/address.scss';
127-
import CountUp from "./packages/countup/index.js";
128-
import "./packages/countup/countup.scss";
128+
import Notify from './packages/notify/index.js';
129+
import './packages/notify/notify.scss';
130+
import CountUp from './packages/countup/index.js';
131+
import './packages/countup/countup.scss';
132+
import FixedNav from './packages/fixednav/index.js';
133+
import './packages/fixednav/fixednav.scss';
134+
// import Gesture from './packages/gesture/index.js';
135+
// import './packages/gesture/gesture.scss';
129136

130137
const packages = {
131138
Cell,
@@ -176,19 +183,22 @@ const packages = {
176183
Elevator,
177184
Popup,
178185
LeftSlip,
179-
TabSelect: TabSelect,
180-
LuckDraw: LuckDraw,
181-
Video: Video,
182-
Signature: Signature,
183-
CircleProgress: CircleProgress,
184-
TimeLine: TimeLine,
185-
TimeLineItem: TimeLineItem,
186-
SideNavBar: SideNavBar,
187-
SubSideNavBar: SubSideNavBar,
188-
SideNavBarItem: SideNavBarItem,
189-
Drag: Drag,
190-
Address: Address,
191-
CountUp: CountUp
186+
TabSelect,
187+
LuckDraw,
188+
Video,
189+
Signature,
190+
CircleProgress,
191+
TimeLine,
192+
TimeLineItem,
193+
SideNavBar,
194+
SubSideNavBar,
195+
SideNavBarItem,
196+
Drag,
197+
Address,
198+
Notify,
199+
CountUp,
200+
FixedNav,
201+
// Gesture: Gesture
192202
};
193203

194204
const components = {};
@@ -216,7 +226,7 @@ pkgList.map(item => {
216226
}
217227
});
218228

219-
const install = function (Vue, opts = {}) {
229+
const install = function(Vue, opts = {}) {
220230
if (install.installed) return;
221231

222232
if (opts.locale) {
@@ -272,4 +282,4 @@ export default {
272282
...filters,
273283
...directives,
274284
...methods
275-
};
285+
};

src/packages/actionsheet/actionsheet.vue

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,44 +33,44 @@ export default {
3333
props: {
3434
isAnimation: {
3535
type: Boolean,
36-
default: true,
36+
default: true
3737
},
3838
isLockBgScroll: {
3939
type: Boolean,
40-
default: false,
40+
default: false
4141
},
4242
isVisible: {
4343
type: Boolean,
44-
default: false,
44+
default: false
4545
},
4646
isShowMask: {
4747
type: Boolean,
48-
default: true,
48+
default: true
4949
},
5050
isClickChooseClose: {
5151
type: Boolean,
52-
default: true,
52+
default: true
5353
},
5454
isClickCloseMask: {
5555
type: Boolean,
56-
default: true,
56+
default: true
5757
},
5858
cancelTxt: {
5959
type: String,
60-
default: '',
60+
default: ''
6161
},
6262
optionTag: {
6363
type: String,
64-
default: 'name',
64+
default: 'name'
6565
},
6666
chooseTagValue: {
6767
type: String,
68-
default: '',
68+
default: ''
6969
},
7070
menuItems: {
7171
type: Array,
72-
default: () => [],
73-
},
72+
default: () => []
73+
}
7474
},
7575
data() {
7676
return {};
@@ -82,12 +82,21 @@ export default {
8282
if (value) {
8383
document.body.classList.add('nut-overflow-hidden');
8484
} else {
85-
document.body.classList.remove('nut-overflow-hidden');
85+
this.remolveLockScrool();
8686
}
8787
}
88-
},
88+
}
89+
},
90+
deactivated() {
91+
this.remolveLockScroll();
92+
},
93+
destroyed() {
94+
this.remolveLockScroll();
8995
},
9096
methods: {
97+
remolveLockScroll() {
98+
document.body.classList.remove('nut-overflow-hidden');
99+
},
91100
isHighlight(item) {
92101
return (this.chooseTagValue && this.chooseTagValue == item[this.optionTag]) || this.chooseTagValue === 0;
93102
},
@@ -112,7 +121,7 @@ export default {
112121
}
113122
this.$emit('choose', item, index);
114123
}
115-
},
116-
},
124+
}
125+
}
117126
};
118127
</script>

0 commit comments

Comments
 (0)