@nutui/nutui 3.1.12 → 3.1.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +148 -37
  2. package/dist/nutui.d.ts +4 -1
  3. package/dist/nutui.es.js +1348 -560
  4. package/dist/nutui.umd.js +1356 -565
  5. package/dist/packages/_es/ActionSheet.js +1 -1
  6. package/dist/packages/_es/Address.js +3 -1
  7. package/dist/packages/_es/Avatar.js +1 -1
  8. package/dist/packages/_es/BackTop.js +1 -1
  9. package/dist/packages/_es/Badge.js +1 -1
  10. package/dist/packages/_es/Barrage.js +1 -1
  11. package/dist/packages/_es/Button.js +1 -1
  12. package/dist/packages/_es/Calendar.js +1 -1
  13. package/dist/packages/_es/Card.js +1 -1
  14. package/dist/packages/_es/Cascader.js +547 -0
  15. package/dist/packages/_es/Cell.js +1 -1
  16. package/dist/packages/_es/CellGroup.js +1 -1
  17. package/dist/packages/_es/Checkbox.js +1 -1
  18. package/dist/packages/_es/CheckboxGroup.js +1 -1
  19. package/dist/packages/_es/CircleProgress.js +1 -1
  20. package/dist/packages/_es/Col.js +1 -1
  21. package/dist/packages/_es/Collapse.js +1 -1
  22. package/dist/packages/_es/CollapseItem.js +1 -1
  23. package/dist/packages/_es/CountDown.js +2 -2
  24. package/dist/packages/_es/CountUp.js +3 -1
  25. package/dist/packages/_es/DatePicker.js +1 -1
  26. package/dist/packages/_es/Dialog.js +1 -1
  27. package/dist/packages/_es/Divider.js +1 -1
  28. package/dist/packages/_es/Drag.js +1 -1
  29. package/dist/packages/_es/Elevator.js +3 -2
  30. package/dist/packages/_es/FixedNav.js +1 -1
  31. package/dist/packages/_es/Form.js +1 -1
  32. package/dist/packages/_es/FormItem.js +1 -1
  33. package/dist/packages/_es/Grid.js +12 -0
  34. package/dist/packages/_es/GridItem.js +149 -0
  35. package/dist/packages/_es/Icon.js +1 -1
  36. package/dist/packages/_es/ImagePreview.js +1 -1
  37. package/dist/packages/_es/InfiniteLoading.js +1 -1
  38. package/dist/packages/_es/Input.js +1 -1
  39. package/dist/packages/_es/InputNumber.js +1 -1
  40. package/dist/packages/_es/Layout.js +1 -1
  41. package/dist/packages/_es/Menu.js +1 -1
  42. package/dist/packages/_es/MenuItem.js +1 -1
  43. package/dist/packages/_es/Navbar.js +1 -1
  44. package/dist/packages/_es/NoticeBar.js +6 -8
  45. package/dist/packages/_es/Notify.js +1 -1
  46. package/dist/packages/_es/NumberKeyboard.js +1 -1
  47. package/dist/packages/_es/OverLay.js +1 -1
  48. package/dist/packages/_es/Pagination.js +1 -1
  49. package/dist/packages/_es/Picker.js +1 -1
  50. package/dist/packages/_es/Popover.js +1 -1
  51. package/dist/packages/_es/Popup.js +1 -1
  52. package/dist/packages/_es/Price.js +1 -1
  53. package/dist/packages/_es/Progress.js +1 -1
  54. package/dist/packages/_es/Radio.js +1 -1
  55. package/dist/packages/_es/RadioGroup.js +1 -1
  56. package/dist/packages/_es/Range.js +1 -1
  57. package/dist/packages/_es/Rate.js +1 -1
  58. package/dist/packages/_es/Row.js +1 -1
  59. package/dist/packages/_es/SearchBar.js +1 -1
  60. package/dist/packages/_es/ShortPassword.js +1 -1
  61. package/dist/packages/_es/Signature.js +1 -1
  62. package/dist/packages/_es/Sku.js +1 -1
  63. package/dist/packages/_es/Step.js +1 -1
  64. package/dist/packages/_es/Steps.js +1 -1
  65. package/dist/packages/_es/Swipe.js +1 -1
  66. package/dist/packages/_es/Swiper.js +1 -1
  67. package/dist/packages/_es/SwiperItem.js +1 -1
  68. package/dist/packages/_es/Switch.js +1 -1
  69. package/dist/packages/_es/TabPane.js +1 -1
  70. package/dist/packages/_es/Tabbar.js +1 -1
  71. package/dist/packages/_es/TabbarItem.js +1 -1
  72. package/dist/packages/_es/Tabs.js +6 -2
  73. package/dist/packages/_es/Tag.js +1 -1
  74. package/dist/packages/_es/TextArea.js +1 -1
  75. package/dist/packages/_es/TimeDetail.js +1 -1
  76. package/dist/packages/_es/TimePannel.js +1 -1
  77. package/dist/packages/_es/TimeSelect.js +1 -1
  78. package/dist/packages/_es/Toast.js +1 -1
  79. package/dist/packages/_es/Uploader.js +1 -1
  80. package/dist/packages/_es/Video.js +1 -1
  81. package/dist/packages/_es/common.js +136 -0
  82. package/dist/packages/_es/component.js +1 -1
  83. package/dist/packages/_es/index.js +1 -1
  84. package/dist/packages/_es/index2.js +1 -1
  85. package/dist/packages/_es/index3.js +1 -1
  86. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  87. package/dist/packages/_es/pxCheck.js +1 -1
  88. package/dist/packages/_es/raf.js +1 -1
  89. package/dist/packages/_es/util.js +1 -1
  90. package/dist/packages/cascader/index.scss +81 -0
  91. package/dist/packages/grid/index.scss +10 -0
  92. package/dist/packages/griditem/index.scss +92 -0
  93. package/dist/packages/tabs/index.scss +16 -0
  94. package/dist/style.css +1 -1
  95. package/dist/styles/themes/default.scss +41 -38
  96. package/dist/styles/variables.scss +26 -0
  97. package/package.json +2 -3
package/README.md CHANGED
@@ -1,58 +1,169 @@
1
- # NutUI 3
2
- ![npm version](https://img.shields.io/npm/v/@nutui/nutui.svg) [![Build Status](https://api.travis-ci.org/jdf2e/nutui.svg?branch=master)](https://github.com/jdf2e/nutui/) [![Coverage Status](https://coveralls.io/repos/github/jdf2e/nutui/badge.svg?branch=master)](https://coveralls.io/github/jdf2e/nutui?branch=master) ![license](https://img.shields.io/npm/l/@nutui/nutui.svg)
3
-
4
- 京东风格的轻量级移动端 Vue2、Vue3 组件库(支持多端小程序开发)
5
-
6
- ![NutUI](https://img14.360buyimg.com/imagetools/s200x200_jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png)
7
-
8
-
9
- ## 特性
10
-
11
- * 70+ 高质量组件(3.0 持续开发中)
12
- * 支持小程序开发
13
- * 基于京东APP 10.0 视觉规范
14
- * 支持按需引用
15
- * 详尽的文档和示例
16
- * 支持 TypeScript
17
- * 支持服务端渲染(测试阶段)
18
- * 支持定制主题
19
- * 单元测试覆盖(3.0 开发中)
1
+
2
+ <p align="center">
3
+ <img alt="logo" src="https://img11.360buyimg.com/imagetools/jfs/t1/211965/25/7152/22022/61b16785E433119bb/aa41d7a9f7e823f3.png" width="150" style="margin-bottom: 10px;">
4
+ </p>
5
+
6
+ <p align="center">京东风格的轻量级移动端 Vue2、Vue3 组件库</p>
7
+
8
+ <p align="center">(支持一套代码生成 H5 和小程序)</p>
9
+
10
+ <p align="center">
11
+ <a href="https://github.com/jdf2e/nutui">
12
+ <img src="https://coveralls.io/repos/github/jdf2e/nutui/badge.svg?branch=master" alt="Coverage Status" />
13
+ </a>
14
+ <a href="https://github.com/jdf2e/nutui">
15
+ <img src="https://img.shields.io/npm/l/@nutui/nutui.svg" alt="license"/>
16
+ </a>
17
+ <a href="http://makeapullrequest.com">
18
+ <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome">
19
+ </a>
20
+ <a href="https://www.npmjs.com/package/@nutui/nutui">
21
+ <img src="https://img.shields.io/npm/v/@nutui/nutui.svg?style=flat-square">
22
+ </a>
23
+ <a href="https://www.npmjs.com/package/@nutui/nutui">
24
+ <img src="https://img.shields.io/npm/dt/@nutui/nutui.svg?style=flat-square">
25
+ </a>
26
+ <a href="https://travis-ci.org/jdf2e/nutui">
27
+ <img src="https://img.shields.io/travis/jdf2e/nutui.svg?style=flat-square">
28
+ </a>
29
+ <a href="https://github.com/jdf2e/nutui">
30
+ <img src="https://img.shields.io/github/contributors/jdf2e/nutui" alt="GitHub contributors">
31
+ </a>
32
+ <a href="https://github.com/jdf2e/nutui">
33
+ <img src="https://img.shields.io/github/commit-activity/w/jdf2e/nutui" alt="GitHub commit activity">
34
+ </a>
35
+ <a href="https://github.com/jdf2e/nutui">
36
+ <img src="https://img.shields.io/github/issues-closed/jdf2e/nutui" alt="GitHub closed issues">
37
+ </a>
38
+ <a href="https://github.com/jdf2e/nutui">
39
+ <img src="https://img.shields.io/github/commits-since/jdf2e/nutui/latest/next" alt="GitHub commits since latest release (by date)">
40
+ </a>
41
+ <a href="https://github.com/jdf2e/nutui">
42
+ <img src="https://img.shields.io/github/release-date/jdf2e/nutui" alt="GitHub Release Date">
43
+ </a>
44
+ </p>
45
+
46
+ <!-- <p align="center">
47
+ <a href="https://www.oschina.net/project/top_cn_2021/?id=65&fr=nutui" style="width:600px;height:60px;background:#f00;color:#fff;padding:5px;">
48
+ NutUI 正在参加《2021 年度 OSC 中国开源项目》评选,请为我们投上宝贵的一票吧。 去投票💪
49
+ </a>
50
+ </p> -->
51
+
52
+ <p align="center">
53
+ <a href="https://www.oschina.net/project/top_cn_2021/?id=65&fr=nutui">
54
+ <img src="https://img11.360buyimg.com/imagetools/jfs/t1/139357/25/22692/81953/61b1bd11E7615bca2/f6eec2f25c6b8914.jpg" width="600" alt="license"/>
55
+ </a>
56
+ </p>
57
+
58
+ ---
59
+
60
+
61
+ ## 特性
62
+
63
+ * 🚀 70+ 高质量组件(3.0 持续开发中),覆盖移动端主流场景
64
+ * 💪 支持小程序开发
65
+ * 📖 基于京东APP 10.0 视觉规范
66
+ * 🍭 支持按需引用
67
+ * 📖 详尽的文档和示例
68
+ * 💪 支持 TypeScript
69
+ * 💪 支持服务端渲染(测试阶段)
70
+ * 🍭 支持定制主题
71
+ * 🍭 单元测试覆盖(3.0 开发中),保障稳定性
72
+ * 📖 提供 Sketch 设计资源
20
73
 
21
74
  ## 示例 H5 & 小程序
22
75
 
23
- <img src="https://img12.360buyimg.com/imagetools/jfs/t1/162421/39/13392/9425/6052ea60E592310a9/264bdff23ef5fe95.png" width="200" alt="NutUI" />
24
- <img src="https://storage.360buyimg.com/jdc-article/gh_f2231eb941be_258.jpg" width="200" alt="NutUI" />
76
+ <p>
77
+ <img src="https://img12.360buyimg.com/imagetools/jfs/t1/162421/39/13392/9425/6052ea60E592310a9/264bdff23ef5fe95.png" width="100" alt="NutUI" />
78
+ <span> </span>
79
+ <img src="https://storage.360buyimg.com/jdc-article/gh_f2231eb941be_258.jpg" style="margin-left:40px" width="100" alt="NutUI" />
80
+ </p>
81
+
82
+ ## 版本说明
25
83
 
26
- ## 支持环境
84
+ > @next 和 @nutui-taro 属于并行版本,存在部分的差异化,版本号始终保持一致。如果想要兼容低版本,请使用 @nutui/nutui
27
85
 
28
- * Android 5.0+
29
- * iOS 9.2+
86
+ | 版本 | 支持的框架 | 视觉规范 | 支持的应用类型 | 兼容
87
+ | --- | --- | --- | --- | --- |
88
+ | @nutui/nutui | Vue 2x | 京东 APP 7.0 规范 | H5 | 现代浏览器及 Android >= 4.0、iOS >= 8.0
89
+ | @nutui/nutui-jdl | Vue 2x | [京东物流视觉规范](https://nutui.jd.com/jdl/#/design) | H5 | 现代浏览器及 Android >= 4.0、iOS >= 8.0
90
+ | @nutui/nutui@next | Vue 3x | 京东 [APP 10.0](https://nutui.jd.com/#/resource) 规范 | H5 | 现代浏览器以 Chrome >= 51、iOS >= 10.0(与 Vue3 一致)
91
+ | @nutui/nutui-taro | Vue3 + Taro | 京东 [APP 10.0](https://nutui.jd.com/#/resource) 规范 | H5&小程序,可[开发多端](https://nutui.jd.com/#/starttaro) | 现代浏览器及 Chrome >= 51、iOS >= 10.0(与 Vue3 一致)
30
92
 
31
- > 如果想要兼容低版本,请使用 NutUI2.x
32
93
 
33
94
  ## 构建版本
34
95
 
96
+ > AMD 环境、Webpack、Vite 等构建工具环境、服务端建议使用 es 版,非模块化环境(如通过 `<script>` 标签直接引用)建议使用 umd 压缩版。
97
+
35
98
  * es **nutui.es.js**
99
+
36
100
  * umd **nutui.umd.js**
37
101
 
38
- ## 安装使用
39
102
 
40
- 具体安装使用方法请参考 NutUI 官网 https://nutui.jd.com
103
+ ## 使用案例
104
+
105
+ NutUI 已经投入了我们的生产环境中使用,业界也在广泛地使用 NutUI 开发多端应用。
106
+
107
+ <img src="https://raw.githubusercontent.com/jdf2e/nutui-user-cases/master/user-cases.jpg" width="800" alt="NutUI" />
108
+
109
+ <p><a href="https://nutui.jd.com/#/case">查看等多的案例,请点击</a></p>
110
+ <p><a href="https://get.jd.com/#/survey/index?id=4217247740034539">我们正在征集更多优秀案例,欢迎点击提交</a></p>
111
+
112
+ ## 链接
113
+
114
+ <ul>
115
+ <li>
116
+ <a href="https://github.com/jdf2e/nutui/discussions">
117
+ Discussions (用👍投票)
118
+ </a>
119
+ </li>
120
+ <li>
121
+ <a href="https://github.com/jdf2e/nutui/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22">
122
+ Feature Requests (用👍投票)
123
+ </a>
124
+ </li>
125
+ <li>
126
+ <a href="https://github.com/jdf2e/nutui/labels/bug%203.0">
127
+ Bugs (用👍投票)
128
+ </a>
129
+ </li>
130
+ <li>
131
+ <a href="https://github.com/jdf2e/nutui/issues?q=is%3Aissue+is%3Aopen+label%3Aquestion">
132
+ Question (用👍投票)
133
+ </a>
134
+ </li>
135
+ </ul>
136
+
137
+ ## 开发交流
138
+
139
+ | 版本 | 微信群 |内部咚咚群 |
140
+ | --- | --- |--- |
141
+ | [NutUI Vue](https://github.com/jdf2e/nutui/issues) | <img src="https://nutui.jd.com/3x/3.1.12/vx-code1.png" width="100" /> 关注后回复「NutUI」 | 82957939
142
+ | [NutUI x Taro](https://github.com/jdf2e/nutui/issues) | <img src="https://camo.githubusercontent.com/db4276b4ee4b443158195e943e9e678cb4d2afb7580f70d4d817ef0a90413aec/687474703a2f2f73746f726167652e333630627579696d672e636f6d2f7461726f2d6a642d636f6d2f7374617469632f636f6e746163745f7461726f5f6e757475695f71722e706e67" width="100" /> 关注后回复「NutUI」 | 1022545110 |
143
+ | [NutUI React](https://github.com/jdf2e/nutui-react/issues) | 回复「NutUI」 | 1022619199
144
+
145
+
146
+ ## 贡献者们
147
+
148
+ 感谢以下小伙伴们为 NutUI 发展做出的贡献:
149
+
150
+ <a href="https://github.com/jdf2e/nutui/graphs/contributors">
151
+ <img src="https://opencollective.com/nutui/contributors.svg?width=890&button=false" alt="contributors">
152
+ </a>
153
+
154
+ ## 参与共建
155
+
156
+ 非常欢迎社区开发者为 NutUI 贡献代码,在贡献之前请先阅读 [贡献指南](https://nutui.jd.com/#/contributing),参与共建提 [PR](https://github.com/jdf2e/nutui/pulls)。
41
157
 
42
- ## ⌨️ 本地开发
158
+ 感谢以下所有给 NutUI 贡献过代码的 [开发者](https://github.com/jdf2e/nutui/graphs/contributors)。
43
159
 
44
- 你可以使用 Gitpod 进行在线开发:
160
+ ## 开发计划
45
161
 
46
- [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/jdf2e/nutui.git)
162
+ [Milestones](https://github.com/jdf2e/nutui/projects)
47
163
 
48
- 或者克隆到本地开发:
164
+ ## 更新日志
49
165
 
50
- ```bash
51
- $ git clone https://github.com/jdf2e/nutui.git
52
- $ cd nutui
53
- $ npm install
54
- $ npm run dev
55
- ```
166
+ 本项目遵从 [Angular Style Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153),更新日志请查阅 [Release](https://github.com/jdf2e/nutui/releases)。
56
167
 
57
168
  ## 开源协议
58
169
 
package/dist/nutui.d.ts CHANGED
@@ -46,6 +46,8 @@ declare class Elevator extends UIComponent {}
46
46
  declare class Pagination extends UIComponent {}
47
47
  declare class Tabs extends UIComponent {}
48
48
  declare class TabPane extends UIComponent {}
49
+ declare class Grid extends UIComponent {}
50
+ declare class GridItem extends UIComponent {}
49
51
  declare class Calendar extends UIComponent {}
50
52
  declare class Checkbox extends UIComponent {}
51
53
  declare class CheckboxGroup extends UIComponent {}
@@ -67,6 +69,7 @@ declare class Tag extends UIComponent {}
67
69
  declare class Popover extends UIComponent {}
68
70
  declare class Form extends UIComponent {}
69
71
  declare class FormItem extends UIComponent {}
72
+ declare class Cascader extends UIComponent {}
70
73
  declare class Address extends UIComponent {}
71
74
  declare class Barrage extends UIComponent {}
72
75
  declare class Signature extends UIComponent {}
@@ -81,7 +84,7 @@ export interface InstallationOptions {
81
84
  lang?: any;
82
85
  }
83
86
  declare function install(app: App, options?: InstallationOptions): void;
84
- export { Avatar,Button,Cell,CellGroup,Icon,Price,OverLay,Divider,Layout,Col,Row,ImagePreview,Swipe,ActionSheet,BackTop,Collapse,CollapseItem,Drag,Dialog,InfiniteLoading,Notify,Range,Video,Popup,Steps,Step,Swiper,SwiperItem,Switch,Toast,Progress,CircleProgress,NoticeBar,SearchBar,Navbar,FixedNav,Menu,MenuItem,Tabbar,TabbarItem,Elevator,Pagination,Tabs,TabPane,Calendar,Checkbox,CheckboxGroup,DatePicker,InputNumber,Input,Radio,RadioGroup,Rate,Picker,ShortPassword,TextArea,Uploader,CountUp,NumberKeyboard,CountDown,Badge,Tag,Popover,Form,FormItem,Address,Barrage,Signature,TimeSelect,TimePannel,TimeDetail,Sku,Card,install };
87
+ export { Avatar,Button,Cell,CellGroup,Icon,Price,OverLay,Divider,Layout,Col,Row,ImagePreview,Swipe,ActionSheet,BackTop,Collapse,CollapseItem,Drag,Dialog,InfiniteLoading,Notify,Range,Video,Popup,Steps,Step,Swiper,SwiperItem,Switch,Toast,Progress,CircleProgress,NoticeBar,SearchBar,Navbar,FixedNav,Menu,MenuItem,Tabbar,TabbarItem,Elevator,Pagination,Tabs,TabPane,Grid,GridItem,Calendar,Checkbox,CheckboxGroup,DatePicker,InputNumber,Input,Radio,RadioGroup,Rate,Picker,ShortPassword,TextArea,Uploader,CountUp,NumberKeyboard,CountDown,Badge,Tag,Popover,Form,FormItem,Cascader,Address,Barrage,Signature,TimeSelect,TimePannel,TimeDetail,Sku,Card,install };
85
88
  declare const _default: {
86
89
  install: typeof install;
87
90
  version: string;