sadais-piui 1.2.7-beta188 → 1.2.7-beta189

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 (54) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +166 -166
  3. package/components/pi-cascader/index.vue +25 -20
  4. package/components/pi-count-down/index.vue +245 -245
  5. package/components/pi-gap/index.vue +72 -72
  6. package/components/pi-line/index.vue +78 -78
  7. package/components/pi-marquee-item/index.vue +47 -47
  8. package/config/bottomBar.js +11 -11
  9. package/config/button.js +29 -29
  10. package/config/calendar.js +19 -19
  11. package/config/card.js +8 -8
  12. package/config/countDown.js +12 -12
  13. package/config/countUp.js +13 -13
  14. package/config/divider.js +10 -10
  15. package/config/dropdownItem.js +26 -26
  16. package/config/gap.js +8 -8
  17. package/config/grid.js +9 -9
  18. package/config/gridItem.js +12 -12
  19. package/config/icon.js +11 -11
  20. package/config/img.js +21 -21
  21. package/config/imgCropper.js +26 -26
  22. package/config/index.js +28 -28
  23. package/config/line.js +8 -8
  24. package/config/lineProgress.js +14 -14
  25. package/config/list.js +12 -12
  26. package/config/listItem.js +25 -25
  27. package/config/loading.js +10 -10
  28. package/config/mask.js +12 -12
  29. package/config/modal.js +36 -36
  30. package/config/navbar.js +32 -32
  31. package/config/notify.js +13 -13
  32. package/config/numberKeyboard.js +21 -21
  33. package/config/pagination.js +10 -10
  34. package/config/picker.js +19 -19
  35. package/config/popup.js +23 -23
  36. package/config/popupSelect.js +35 -35
  37. package/config/rate.js +15 -15
  38. package/config/regionsData.js +58 -58
  39. package/config/search.js +27 -27
  40. package/config/section.js +23 -23
  41. package/config/skeleton.js +13 -13
  42. package/config/statusBar.js +5 -5
  43. package/config/stepper.js +19 -19
  44. package/config/swiper.js +22 -22
  45. package/config/switch.js +13 -13
  46. package/config/tabs.js +23 -23
  47. package/config/waterfall.js +6 -6
  48. package/mixin/component-custom.js +24 -24
  49. package/mixin/props-sync.js +65 -65
  50. package/mixin/wx-code.js +30 -30
  51. package/package.json +2 -2
  52. package/plugins/async-validator.js +1511 -1511
  53. package/scss/animation.scss +260 -260
  54. package/scss/index.scss +5 -5
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 www.uviewui.com
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2020 www.uviewui.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,166 +1,166 @@
1
- # PiUI
2
-
3
- [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
- [![stars](https://img.shields.io/github/stars/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui)
5
- [![forks](https://img.shields.io/github/forks/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui)
6
- [![issues](https://img.shields.io/github/issues/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui/issues)
7
- [![release](https://img.shields.io/github/v/release/sadais-org/piui?style=flat-square)](https://gitee.com/xuqu/uView/releases)
8
- [![license](https://img.shields.io/github/license/sadais-org/piui?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
9
-
10
-
11
- PiUI是基于uniapp,高质量UI移动组件库,基于 `vue.js` 语法,可编译到不同的平台
12
-
13
- * 高效开发
14
- * 灵活扩展,丰富的属性配置
15
- * 提供 50+ 高质量组件,覆盖移动端各类场景
16
- * 高性能
17
- * 完善的文档和示例
18
- * 按需引入
19
- * 支持主题定制
20
-
21
- ## Website 网站
22
-
23
- [官方文档:https://piui.sadais.com/](https://piui.sadais.com/)
24
-
25
- [GITHUB仓库:https://github.com/sadais-org/piui](https://github.com/sadais-org/piui)
26
-
27
- [GITEE仓库:https://gitee.com/org-sadais/piui](https://gitee.com/org-sadais/piui)
28
-
29
- `欢迎大家star和fork,你的支持是我们持续更新的动力!`
30
-
31
- `扫码体验[piui]小程序`
32
-
33
- ![](https://sadais-oss.oss-cn-hangzhou.aliyuncs.com/piui/qrcode.jpeg)
34
-
35
- ## Background 背景
36
-
37
- uniapp提供的vue语法(不完全支持),能比原生的写法(小程序原生语法作为对比)提高30%的效率。
38
-
39
- 但是仅仅使用uniapp提供的基础组件,是远远支撑不了现代移动端的业务复杂度。
40
-
41
- 借助`piui`的能力,可以让您基于uniapp,再增加至少50%的效率提升。
42
-
43
- ## Install 安装
44
-
45
- ### 使用脚手架【推荐】
46
- 基于`vue-cli`脚手架创建,更加通用的`vue`项目配置,接入更加快捷,可以做到零配置直接运行,其中引入了`sadais-core`
47
-
48
- #### 步骤1: vue-cli安装(如果安装了可以跳过)
49
- 可以使用下列任一命令安装最新的`vue-cli`包:
50
-
51
-
52
- ```bash
53
- npm install -g @vue/cli
54
- # OR
55
- yarn global add @vue/cli
56
- ```
57
- 安装之后,你就可以在命令行中访问 `vue` 命令。你可以通过简单运行 `vue`,看看是否展示出了一份所有可用命令的帮助信息,来验证它是否安装成功。
58
-
59
-
60
- 你还可以用这个命令来检查其版本是否正确:
61
- ```bash
62
- vue --version
63
- ```
64
-
65
- #### 步骤2:文件生成
66
- 项目初始化我们通过vue-cli进行生成,以下项目名我使用my-project做示例,名字可以自定义
67
- ```bash
68
- vue create -p sadais-org/uni-preset-vue my-project
69
- ```
70
- 命令输入后,选择默认模板,回车
71
-
72
- #### 步骤3:项目启动
73
- 在本地启动服务器来开发你的应用
74
- ```bash
75
- cd my-project && npm run dev
76
- ```
77
-
78
- ### 非脚手架项目引入(HbuilderX / Uniapp Vue-Cli工程)
79
-
80
- > 已初始化的项目,可以通过以下方式接入piui
81
-
82
- `piui` `@sadais/piui-tool` 源码都以[es6](https://es6.ruanyifeng.com/) 语法编写,如果是 `vue-cli` 工程,必须在`vue.config.js`中声明其[显式转译](https://cli.vuejs.org/zh/config/#transpiledependencies)
83
-
84
- ```js
85
- // vue.config.js
86
- module.exports = {
87
- transpileDependencies: ['@sadais/piui-tool', 'sadais-piui']
88
- }
89
- ```
90
-
91
- #### 步骤1:安装piui
92
- 安装`piui`,以及`piui工具库`
93
- ```bash
94
- yarn add sadais-piui @sadais/piui-tool
95
- ```
96
-
97
- #### 步骤2:引入piui
98
- ```js
99
- import Vue from 'vue';
100
- import piui from "sadais-piui";
101
-
102
- // 全局属性配置
103
- const piuiConfig = {}
104
-
105
- Vue.use(piui, piuiConfig);
106
- ```
107
- #### 步骤3:引入piui样式文件
108
- 在App.vue文件中引入
109
- ```css
110
- @import 'sadais-piui/scss/index.scss';
111
- ```
112
- 在uni.css文件中引入
113
- ```css
114
- @import 'sadais-piui/scss/variable.scss';
115
- ```
116
-
117
- #### 步骤4:通过easycom模式全局按需引入
118
- 修改uniapp的pages.json文件,增加配置
119
-
120
- ```json
121
- "easycom": {
122
- "^pi-(.*)": "sadais-piui/components/pi-$1/index.vue"
123
- }
124
- ```
125
-
126
- ## Usage 使用方法
127
-
128
- 配置easycom规则后,自动按需引入
129
-
130
- ## Maintainers 成员
131
-
132
- [@zhangzhenfei](https://github.com/zhangzhenfei)
133
-
134
- ## Contributing 贡献
135
-
136
- PRs accepted.
137
-
138
- Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
139
-
140
- ## Issue 规范
141
- issue 仅用于提交 Bug 或 Feature 相关的内容,其它内容可能会被直接关闭。
142
-
143
- 在提交 issue 之前,请搜索相关内容是否已被提出。
144
-
145
- 请说明 PiUI 和 Vue 的版本号,并提供操作系统和浏览器信息。推荐使用 生成在线 demo,这能够更直观地重现问题。
146
-
147
- ## Pull Request 规范
148
- 请先 fork 一份到自己的项目下,不要直接在仓库下建分支。
149
-
150
- commit 信息要以[组件名]: 描述信息 的形式填写,例如 [Navbar]: fix xxx bug。
151
-
152
- 执行 npm run build 后可以正确打包文件。
153
-
154
- 提交 PR 前请 rebase,确保 commit 记录的整洁。
155
-
156
- 如果是修复 bug,请在 PR 中给出描述信息。
157
-
158
- ## License
159
-
160
- MIT © 2021 zhangzhenfei
161
-
162
- ## 微信群
163
-
164
- 请扫码进群
165
-
166
- ![](https://m.sadais.com/piui/WechatIMG411.jpeg)
1
+ # PiUI
2
+
3
+ [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
+ [![stars](https://img.shields.io/github/stars/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui)
5
+ [![forks](https://img.shields.io/github/forks/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui)
6
+ [![issues](https://img.shields.io/github/issues/sadais-org/piui?style=flat-square&logo=GitHub)](https://github.com/sadais-org/piui/issues)
7
+ [![release](https://img.shields.io/github/v/release/sadais-org/piui?style=flat-square)](https://gitee.com/xuqu/uView/releases)
8
+ [![license](https://img.shields.io/github/license/sadais-org/piui?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
9
+
10
+
11
+ PiUI是基于uniapp,高质量UI移动组件库,基于 `vue.js` 语法,可编译到不同的平台
12
+
13
+ * 高效开发
14
+ * 灵活扩展,丰富的属性配置
15
+ * 提供 50+ 高质量组件,覆盖移动端各类场景
16
+ * 高性能
17
+ * 完善的文档和示例
18
+ * 按需引入
19
+ * 支持主题定制
20
+
21
+ ## Website 网站
22
+
23
+ [官方文档:https://piui.sadais.com/](https://piui.sadais.com/)
24
+
25
+ [GITHUB仓库:https://github.com/sadais-org/piui](https://github.com/sadais-org/piui)
26
+
27
+ [GITEE仓库:https://gitee.com/org-sadais/piui](https://gitee.com/org-sadais/piui)
28
+
29
+ `欢迎大家star和fork,你的支持是我们持续更新的动力!`
30
+
31
+ `扫码体验[piui]小程序`
32
+
33
+ ![](https://sadais-oss.oss-cn-hangzhou.aliyuncs.com/piui/qrcode.jpeg)
34
+
35
+ ## Background 背景
36
+
37
+ uniapp提供的vue语法(不完全支持),能比原生的写法(小程序原生语法作为对比)提高30%的效率。
38
+
39
+ 但是仅仅使用uniapp提供的基础组件,是远远支撑不了现代移动端的业务复杂度。
40
+
41
+ 借助`piui`的能力,可以让您基于uniapp,再增加至少50%的效率提升。
42
+
43
+ ## Install 安装
44
+
45
+ ### 使用脚手架【推荐】
46
+ 基于`vue-cli`脚手架创建,更加通用的`vue`项目配置,接入更加快捷,可以做到零配置直接运行,其中引入了`sadais-core`
47
+
48
+ #### 步骤1: vue-cli安装(如果安装了可以跳过)
49
+ 可以使用下列任一命令安装最新的`vue-cli`包:
50
+
51
+
52
+ ```bash
53
+ npm install -g @vue/cli
54
+ # OR
55
+ yarn global add @vue/cli
56
+ ```
57
+ 安装之后,你就可以在命令行中访问 `vue` 命令。你可以通过简单运行 `vue`,看看是否展示出了一份所有可用命令的帮助信息,来验证它是否安装成功。
58
+
59
+
60
+ 你还可以用这个命令来检查其版本是否正确:
61
+ ```bash
62
+ vue --version
63
+ ```
64
+
65
+ #### 步骤2:文件生成
66
+ 项目初始化我们通过vue-cli进行生成,以下项目名我使用my-project做示例,名字可以自定义
67
+ ```bash
68
+ vue create -p sadais-org/uni-preset-vue my-project
69
+ ```
70
+ 命令输入后,选择默认模板,回车
71
+
72
+ #### 步骤3:项目启动
73
+ 在本地启动服务器来开发你的应用
74
+ ```bash
75
+ cd my-project && npm run dev
76
+ ```
77
+
78
+ ### 非脚手架项目引入(HbuilderX / Uniapp Vue-Cli工程)
79
+
80
+ > 已初始化的项目,可以通过以下方式接入piui
81
+
82
+ `piui` `@sadais/piui-tool` 源码都以[es6](https://es6.ruanyifeng.com/) 语法编写,如果是 `vue-cli` 工程,必须在`vue.config.js`中声明其[显式转译](https://cli.vuejs.org/zh/config/#transpiledependencies)
83
+
84
+ ```js
85
+ // vue.config.js
86
+ module.exports = {
87
+ transpileDependencies: ['@sadais/piui-tool', 'sadais-piui']
88
+ }
89
+ ```
90
+
91
+ #### 步骤1:安装piui
92
+ 安装`piui`,以及`piui工具库`
93
+ ```bash
94
+ yarn add sadais-piui @sadais/piui-tool
95
+ ```
96
+
97
+ #### 步骤2:引入piui
98
+ ```js
99
+ import Vue from 'vue';
100
+ import piui from "sadais-piui";
101
+
102
+ // 全局属性配置
103
+ const piuiConfig = {}
104
+
105
+ Vue.use(piui, piuiConfig);
106
+ ```
107
+ #### 步骤3:引入piui样式文件
108
+ 在App.vue文件中引入
109
+ ```css
110
+ @import 'sadais-piui/scss/index.scss';
111
+ ```
112
+ 在uni.css文件中引入
113
+ ```css
114
+ @import 'sadais-piui/scss/variable.scss';
115
+ ```
116
+
117
+ #### 步骤4:通过easycom模式全局按需引入
118
+ 修改uniapp的pages.json文件,增加配置
119
+
120
+ ```json
121
+ "easycom": {
122
+ "^pi-(.*)": "sadais-piui/components/pi-$1/index.vue"
123
+ }
124
+ ```
125
+
126
+ ## Usage 使用方法
127
+
128
+ 配置easycom规则后,自动按需引入
129
+
130
+ ## Maintainers 成员
131
+
132
+ [@zhangzhenfei](https://github.com/zhangzhenfei)
133
+
134
+ ## Contributing 贡献
135
+
136
+ PRs accepted.
137
+
138
+ Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
139
+
140
+ ## Issue 规范
141
+ issue 仅用于提交 Bug 或 Feature 相关的内容,其它内容可能会被直接关闭。
142
+
143
+ 在提交 issue 之前,请搜索相关内容是否已被提出。
144
+
145
+ 请说明 PiUI 和 Vue 的版本号,并提供操作系统和浏览器信息。推荐使用 生成在线 demo,这能够更直观地重现问题。
146
+
147
+ ## Pull Request 规范
148
+ 请先 fork 一份到自己的项目下,不要直接在仓库下建分支。
149
+
150
+ commit 信息要以[组件名]: 描述信息 的形式填写,例如 [Navbar]: fix xxx bug。
151
+
152
+ 执行 npm run build 后可以正确打包文件。
153
+
154
+ 提交 PR 前请 rebase,确保 commit 记录的整洁。
155
+
156
+ 如果是修复 bug,请在 PR 中给出描述信息。
157
+
158
+ ## License
159
+
160
+ MIT © 2021 zhangzhenfei
161
+
162
+ ## 微信群
163
+
164
+ 请扫码进群
165
+
166
+ ![](https://m.sadais.com/piui/WechatIMG411.jpeg)
@@ -80,7 +80,9 @@
80
80
  shape="round"
81
81
  active-mode="fill-circle"
82
82
  class="pi-mg-right-16"
83
- @change="handleChangeParentSelect(item, $event)"
83
+ @change="
84
+ handleChangeParentSelect({ item, isSelected: $event })
85
+ "
84
86
  />
85
87
  <view
86
88
  class="pi-align-center pi-lh-36 pi-flex-sub column-item-inner"
@@ -126,7 +128,7 @@
126
128
  <scroll-view
127
129
  class="node-breadcrumb pi-solid-bottom-1"
128
130
  scroll-x
129
- style="flex: 1;padding-left: 0;overflow: hidden;"
131
+ style="flex: 1; padding-left: 0; overflow: hidden;"
130
132
  >
131
133
  <view
132
134
  v-for="(item, index) in currentPathItems"
@@ -473,9 +475,12 @@ export default {
473
475
  }
474
476
  }
475
477
  },
476
- handleChangeParentSelect(item, selected) {
477
- if (this.selectedIds.includes(item[this.keyField])) {
478
+ handleChangeParentSelect(options) {
479
+ const { item, isSelected } = options
480
+ if (!isSelected) {
478
481
  this.handleRemoveItem(item[this.keyField])
482
+ } else if (this.isSingle) {
483
+ this.selectedIds = [item[this.keyField]]
479
484
  } else {
480
485
  // 选中
481
486
  this.selectedIds.push(item[this.keyField])
@@ -550,27 +555,27 @@ export default {
550
555
  background: #f4f2f6;
551
556
  }
552
557
  .scroll-view {
553
- width: 100%;
554
558
  flex: 1;
555
- white-space: nowrap;
559
+ width: 100%;
556
560
  overflow: auto hidden;
561
+ white-space: nowrap;
557
562
  .column {
558
563
  display: inline-block;
559
- height: 100%;
560
564
  width: 50%;
565
+ height: 100%;
561
566
  overflow: hidden auto;
562
567
  &:last-child {
563
568
  background: #ffffff;
564
569
  }
565
570
  .column-item {
566
571
  position: relative;
567
- min-height: 100rpx;
568
572
  width: 100%;
569
- white-space: initial;
573
+ min-height: 100rpx;
570
574
  padding: 16rpx 32rpx;
575
+ overflow: hidden;
571
576
  font-size: 28rpx;
572
577
  color: #333333;
573
- overflow: hidden;
578
+ white-space: initial;
574
579
  .column-item-inner {
575
580
  min-height: 100rpx;
576
581
  }
@@ -593,15 +598,15 @@ export default {
593
598
 
594
599
  .node-breadcrumb {
595
600
  width: 100%;
596
- padding-left: 32rpx;
597
601
  padding-right: 32rpx;
598
- background: #ffffff;
602
+ padding-left: 32rpx;
599
603
  white-space: nowrap;
604
+ background: #ffffff;
600
605
  .breadcrumb-item {
601
606
  display: inline-flex;
602
607
  align-items: center;
603
- font-size: 14px;
604
608
  padding: 32rpx 0;
609
+ font-size: 14px;
605
610
 
606
611
  .breadcrumb-item-title.active {
607
612
  color: $pi-primary-color;
@@ -610,26 +615,26 @@ export default {
610
615
  }
611
616
 
612
617
  .cascader-area {
613
- background: #ffffff;
614
- padding: 22rpx 24rpx;
615
- color: #333333;
616
618
  display: flex;
617
619
  align-items: center;
620
+ padding: 22rpx 24rpx;
621
+ color: #333333;
618
622
  white-space: nowrap;
623
+ background: #ffffff;
619
624
 
620
625
  .scroll-area {
621
- width: calc(100% - 128rpx);
622
626
  flex: 1;
627
+ width: calc(100% - 128rpx);
623
628
  white-space: nowrap;
624
629
  }
625
630
  .cascader-item {
626
631
  display: inline-flex;
627
- padding: 14rpx 24rpx;
628
- background: rgba($pi-primary-color, 0.1);
629
632
  align-items: center;
633
+ padding: 14rpx 24rpx;
630
634
  margin-left: 16rpx;
631
- border-radius: 8rpx;
632
635
  color: $pi-primary-color;
636
+ background: rgba($pi-primary-color, 0.1);
637
+ border-radius: 8rpx;
633
638
  }
634
639
  }
635
640
  </style>