2 İşlemeler 79eed8ec34 ... c80768d115

Yazar SHA1 Mesaj Tarih
  fanghuisheng c80768d115 Merge branch '165' of http://47.111.81.118:3000/uskycloud/usky-web-mobile into 165 1 ay önce
  fanghuisheng 5c42611c57 uview-puls依赖包更新 1 ay önce
100 değiştirilmiş dosya ile 1931 ekleme ve 341 silme
  1. 251 0
      src/uni_modules/uview-plus/changelog.md
  2. 3 3
      src/uni_modules/uview-plus/components/u--form/u--form.vue
  3. 3 3
      src/uni_modules/uview-plus/components/u--image/u--image.vue
  4. 3 3
      src/uni_modules/uview-plus/components/u--input/u--input.vue
  5. 3 3
      src/uni_modules/uview-plus/components/u--text/u--text.vue
  6. 3 3
      src/uni_modules/uview-plus/components/u--textarea/u--textarea.vue
  7. 26 0
      src/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js
  8. 11 4
      src/uni_modules/uview-plus/components/u-action-sheet/props.js
  9. 14 13
      src/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue
  10. 27 0
      src/uni_modules/uview-plus/components/u-album/album.js
  11. 24 3
      src/uni_modules/uview-plus/components/u-album/props.js
  12. 43 29
      src/uni_modules/uview-plus/components/u-album/u-album.vue
  13. 22 0
      src/uni_modules/uview-plus/components/u-alert/alert.js
  14. 4 3
      src/uni_modules/uview-plus/components/u-alert/props.js
  15. 3 3
      src/uni_modules/uview-plus/components/u-alert/u-alert.vue
  16. 23 0
      src/uni_modules/uview-plus/components/u-avatar-group/avatarGroup.js
  17. 4 3
      src/uni_modules/uview-plus/components/u-avatar-group/props.js
  18. 3 3
      src/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue
  19. 28 0
      src/uni_modules/uview-plus/components/u-avatar/avatar.js
  20. 4 3
      src/uni_modules/uview-plus/components/u-avatar/props.js
  21. 3 3
      src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue
  22. 27 0
      src/uni_modules/uview-plus/components/u-back-top/backtop.js
  23. 4 3
      src/uni_modules/uview-plus/components/u-back-top/props.js
  24. 3 3
      src/uni_modules/uview-plus/components/u-back-top/u-back-top.vue
  25. 27 0
      src/uni_modules/uview-plus/components/u-badge/badge.js
  26. 4 3
      src/uni_modules/uview-plus/components/u-badge/props.js
  27. 3 3
      src/uni_modules/uview-plus/components/u-badge/u-badge.vue
  28. 27 0
      src/uni_modules/uview-plus/components/u-box/props.js
  29. 92 0
      src/uni_modules/uview-plus/components/u-box/u-box.vue
  30. 42 0
      src/uni_modules/uview-plus/components/u-button/button.js
  31. 4 3
      src/uni_modules/uview-plus/components/u-button/props.js
  32. 6 6
      src/uni_modules/uview-plus/components/u-button/u-button.vue
  33. 42 0
      src/uni_modules/uview-plus/components/u-calendar/calendar.js
  34. 4 2
      src/uni_modules/uview-plus/components/u-calendar/header.vue
  35. 6 4
      src/uni_modules/uview-plus/components/u-calendar/month.vue
  36. 5 3
      src/uni_modules/uview-plus/components/u-calendar/props.js
  37. 3 3
      src/uni_modules/uview-plus/components/u-calendar/u-calendar.vue
  38. 15 0
      src/uni_modules/uview-plus/components/u-car-keyboard/carKeyboard.js
  39. 5 3
      src/uni_modules/uview-plus/components/u-car-keyboard/props.js
  40. 5 5
      src/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue
  41. 140 0
      src/uni_modules/uview-plus/components/u-card/props.js
  42. 186 0
      src/uni_modules/uview-plus/components/u-card/u-card.vue
  43. 17 0
      src/uni_modules/uview-plus/components/u-cell-group/cellGroup.js
  44. 4 3
      src/uni_modules/uview-plus/components/u-cell-group/props.js
  45. 3 3
      src/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue
  46. 35 0
      src/uni_modules/uview-plus/components/u-cell/cell.js
  47. 4 3
      src/uni_modules/uview-plus/components/u-cell/props.js
  48. 25 4
      src/uni_modules/uview-plus/components/u-cell/u-cell.vue
  49. 29 0
      src/uni_modules/uview-plus/components/u-checkbox-group/checkboxGroup.js
  50. 5 4
      src/uni_modules/uview-plus/components/u-checkbox-group/props.js
  51. 3 3
      src/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue
  52. 27 0
      src/uni_modules/uview-plus/components/u-checkbox/checkbox.js
  53. 4 3
      src/uni_modules/uview-plus/components/u-checkbox/props.js
  54. 42 30
      src/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue
  55. 15 0
      src/uni_modules/uview-plus/components/u-circle-progress/circleProgress.js
  56. 4 3
      src/uni_modules/uview-plus/components/u-circle-progress/props.js
  57. 3 3
      src/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue
  58. 29 0
      src/uni_modules/uview-plus/components/u-code-input/codeInput.js
  59. 4 3
      src/uni_modules/uview-plus/components/u-code-input/props.js
  60. 46 12
      src/uni_modules/uview-plus/components/u-code-input/u-code-input.vue
  61. 21 0
      src/uni_modules/uview-plus/components/u-code/code.js
  62. 4 3
      src/uni_modules/uview-plus/components/u-code/props.js
  63. 3 8
      src/uni_modules/uview-plus/components/u-code/u-code.vue
  64. 19 0
      src/uni_modules/uview-plus/components/u-col/col.js
  65. 4 3
      src/uni_modules/uview-plus/components/u-col/props.js
  66. 3 3
      src/uni_modules/uview-plus/components/u-col/u-col.vue
  67. 26 0
      src/uni_modules/uview-plus/components/u-collapse-item/collapseItem.js
  68. 10 4
      src/uni_modules/uview-plus/components/u-collapse-item/props.js
  69. 9 7
      src/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue
  70. 17 0
      src/uni_modules/uview-plus/components/u-collapse/collapse.js
  71. 4 3
      src/uni_modules/uview-plus/components/u-collapse/props.js
  72. 3 3
      src/uni_modules/uview-plus/components/u-collapse/u-collapse.vue
  73. 24 0
      src/uni_modules/uview-plus/components/u-column-notice/columnNotice.js
  74. 4 3
      src/uni_modules/uview-plus/components/u-column-notice/props.js
  75. 3 3
      src/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue
  76. 1 1
      src/uni_modules/uview-plus/components/u-copy/u-copy.vue
  77. 18 0
      src/uni_modules/uview-plus/components/u-count-down/countDown.js
  78. 4 3
      src/uni_modules/uview-plus/components/u-count-down/props.js
  79. 3 8
      src/uni_modules/uview-plus/components/u-count-down/u-count-down.vue
  80. 25 0
      src/uni_modules/uview-plus/components/u-count-to/countTo.js
  81. 4 3
      src/uni_modules/uview-plus/components/u-count-to/props.js
  82. 3 3
      src/uni_modules/uview-plus/components/u-count-to/u-count-to.vue
  83. 37 0
      src/uni_modules/uview-plus/components/u-datetime-picker/datetimePicker.js
  84. 9 3
      src/uni_modules/uview-plus/components/u-datetime-picker/props.js
  85. 55 39
      src/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue
  86. 23 0
      src/uni_modules/uview-plus/components/u-divider/divider.js
  87. 4 3
      src/uni_modules/uview-plus/components/u-divider/props.js
  88. 3 3
      src/uni_modules/uview-plus/components/u-divider/u-divider.vue
  89. 4 3
      src/uni_modules/uview-plus/components/u-dropdown-item/props.js
  90. 5 5
      src/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue
  91. 4 3
      src/uni_modules/uview-plus/components/u-dropdown/props.js
  92. 4 4
      src/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue
  93. 26 0
      src/uni_modules/uview-plus/components/u-empty/empty.js
  94. 4 3
      src/uni_modules/uview-plus/components/u-empty/props.js
  95. 3 3
      src/uni_modules/uview-plus/components/u-empty/u-empty.vue
  96. 24 0
      src/uni_modules/uview-plus/components/u-form-item/formItem.js
  97. 7 6
      src/uni_modules/uview-plus/components/u-form-item/props.js
  98. 27 8
      src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue
  99. 22 0
      src/uni_modules/uview-plus/components/u-form/form.js
  100. 4 3
      src/uni_modules/uview-plus/components/u-form/props.js

+ 251 - 0
src/uni_modules/uview-plus/changelog.md

@@ -1,3 +1,254 @@
+## 3.3.34(2024-09-23)
+feat: 支持toast设置duration值为-1时不自动关闭
+
+## 3.3.33(2024-09-18)
+fix: 修复test.date('008')等验证结果不准确
+
+## 3.3.32(2024-09-09)
+fix: u-keyboard名称冲突warning
+
+## 3.3.31(2024-08-31)
+feat: qrcode初步支持nvue
+
+## 3.3.30(2024-08-30)
+fix: slider兼容step为字符串类型
+
+## 3.3.29(2024-08-30)
+fix: 修复tabs组件current参数为字符串处理逻辑
+
+## 3.3.28(2024-08-26)
+fix: list组件滑动偏移量不一样取绝对值导致iOS下拉偏移量计算错误
+
+## 3.3.27(2024-08-22)
+fix: 修复up-datetime-picker组件toolbarRightSlot定义缺失
+
+fix: 修复FormItem的rules更新错误的问题
+
+## 3.3.26(2024-08-22)
+fix: 批量注册全局组件优化
+
+## 3.3.25(2024-08-21)
+fix: 修复slider在app-vue下样式问题
+
+## 3.3.24(2024-08-19)
+fix: 修复时间选择器hasInput模式小程序不生效
+
+feat: 支持H5导入所有组件
+
+## 3.3.23(2024-08-17)
+feat: swipe-action增加closeAll方法
+
+fix: 兼容tabs在某些场景下index小于0时自动设置为0
+
+add: 通用mixin新增navTo页面跳转方法
+
+## 3.3.21(2024-08-15)
+improvement: 优化二维码组件loading及支持预览与长按事件 #351
+
+fix: 修复swipe-action自动关闭其它功能及组件卸载自动关闭
+
+## 3.3.20(2024-08-15)
+refactor: props默认值文件移至组件文件夹内便于查找
+## 3.3.19(2024-08-14)
+fix: 修复2被rpx兼容处理只在数字值生效
+
+add: 增加swiper自定义插槽示例
+
+## 3.3.18(2024-08-13)
+feat: 新增支持datetime-picker工具栏插槽及picker插槽支持修复
+## 3.3.17(2024-08-12)
+feat: swiper组件增加默认slot便于自定义
+
+feat: grid新增间隔参数
+
+feat: picker新增toolbar-right和toolbar-bottom插槽
+
+## 3.3.16(2024-08-12)
+fix: 解决swiper中title换行后多余的内容未被遮挡问题
+
+fix: 修复迷你导航适配异形屏
+
+## 3.3.15(2024-08-09)
+fix: 修复默认单位设置为rpx时一些组件高度间距异常
+
+fix: 修复日历在rpx单位下布局异常
+
+feat: code-input支持App端展示输入光标
+
+## 3.3.14(2024-08-09)
+add: 增加box组件
+
+add: 增加card卡片组件
+
+
+## 3.3.13(2024-08-08)
+feat: input支持调用原生组件的focus和blur方法
+
+improvement: grid-item条件编译优化
+
+add: 新增迷你导航组件
+
+## 3.3.12(2024-08-06)
+improvement: $u挂载时机调整便于打包分离chunk
+
+fix: steps新增itemStyle属性名称冲突
+
+## 3.3.11(2024-08-05)
+feat: 新增支持upload组件的deletable/maxCount/accept变更监听 #333
+
+feat: 新增支持tabs在swiper中使用
+
+feat: 新增FormItem支持独立设置验证规则rules
+
+fix: 修复index-list未设置$slots.header时索引高亮失效
+
+## 3.3.10(2024-08-02)
+fix: 修复index-list偶发的滑动最后一个索引报错top不存在
+
+fix: 修复gird在QQ、抖音小程序下布局
+
+feat: 优化step支持自定义样式prop
+
+feat: action-sheet组件支持v-model:show双向绑定
+
+fix: 小程序下steps和grid都统一采用grid布局
+
+fix: 修复支付宝小程序下input类型为数字时双向绑定失效
+
+feat : form 表单 validate 校验不通过后 error增加字段prop信息  #304
+
+fix: form组件异步校异常验问题 #393
+
+## 3.3.9(2024-08-01)
+fix: 优化获取nvue元素
+
+feat: modal新增contentTextAlign设置文案对齐方式
+
+fix: 修复NVUE下tabbar文字不显示  #458
+
+feat: loading-page增加zIndex属性
+
+fix: 相册在宽度较小时换行问题
+
+feat: album相册增加自适应自动换行模式
+
+feat: album相册增加图片尺寸单位prop
+
+fix: 修复calendar日历月份居中
+
+## 3.3.8(2024-07-31)
+feat: slider支持进度条任意位置触发按钮拖动
+
+fix: 修复app-vue下modal标题不居中
+
+fix: #459 TS setConfig 声明异常
+
+feat: tabs组件增加longPress长按事件
+
+feat: 新增showRight属性控制collapse右侧图标显隐
+
+fix: 优化nvue下css警告
+
+## 3.3.7(2024-07-29)
+feat: 支持IndexList组件支持在弹窗等场景下使用及联动优化
+
+feat: popup组件支持v-model:show双向绑定
+
+feat: 优化tabs的current双向绑定
+
+fix: checkbox独立使用时checked赋初始值可以,但是手动切换时值没有做双向绑定! #455
+
+feat: slider组件支持区间双滑块
+
+fix: toast 支持自定义图标?可传入了决对路径的 icon也没有用 #409
+
+feat: form-item校验失败时 增加class方便自定义显示错误的展示方式 #394
+
+fix: up-cell的required配置不生效 #395
+
+fix: 横向滚动组件,微信小程序编译后会有警告 #415
+
+fix: u-picker内部对默认值defaultIndex的监听 #425
+
+feat: toast 组件支持遮掩层穿透  #417
+
+fix: 兼容vue的slot编译bug #423
+
+fix: upload 微信小程序 点击预览视频报错 #424
+
+fix: u-number-box 组件修改【integer, decimalLength, min, max 】props时没有触发绑定值更新 #429
+
+feat: Tabs组件能否支持自定义插槽 #439
+
+feat: ActionSheet 可以配置最大高度吗, 我当做select使用了。 #445
+
+fix: cursor-pointer优化
+
+feat: 新版slider组件兼容NVUE改造
+
+feat: 新增slider组件手动实现以支持样式自定义
+
+perf:补充TS声明提示信息
+
+修复:ActionSheet 操作菜单cancelText属性为空DOM节点还存在并且可以点击问题
+
+fix: 去除预留的beforeDestroy兼容容易在某些sdk下不识别条件编译
+
+## 3.3.6(2024-07-23)
+feat: u-album组件添加radius,shape参数,定义参考当前u-image参数
+
+fix: 修复了calendar组件title和日期title未垂直居中的问题
+
+fix: update:modelValue缺失emit定义
+
+## 3.3.5(2024-07-10)
+picker组件支持hasInput模式
+
+## 3.3.4(2024-07-07)
+fix: input组件双向绑定问题 #419
+
+lazy-load完善emit
+
+优化通用小程序分享
+
+## 3.3.2(2024-06-27)
+fix: 在Nvue环境中编译,出现大量警告 #406
+## 3.3.1(2024-06-27)
+u-button组件报错,找不到button mixins #407
+## 3.3.0(2024-06-27)
+feat: checkbox支持label设置slot
+
+feat: modal增加customClass
+
+feat: navbar、popup、tabs、text支持customClass
+
+fix: cell组建缺少flex布局
+
+fix: 修复微信小程序真机调试时快速输入出现文本回退问题
+
+feat: tag增加默认slot
+
+公共mixin改造为按需导入语法
+
+refactor: 组件props混入mixin改造为按需导入语法
+
+fix: u-tabbar 安卓手机点击按钮变蓝问题 #396
+
+feat: upload组建增加extension属性
+
+fix: upload组件参数mode添加left
+
+fix: 修复阴影在非nvue时白色背景色不显示
+
+## 3.2.24(2024-06-11)
+fix: 修复时间选择器confirm事件触发时机导致2次才会触发v-model更新
+## 3.2.23(2024-05-30)
+fix: #378 H5 u-input 在表单中初始值为空也会触发一次 formValidate(this,"change")事件导致进入页面直接校验了一次
+
+fix: #373 搜索组件up-search的@clear事件无效
+
+fix: #372 ActionSheet 组件的取消按钮触发区域太小
+
 ## 3.2.22(2024-05-13)
 上传组件支持微信小程序预览视频
 

+ 3 - 3
src/uni_modules/uview-plus/components/u--form/u--form.vue

@@ -21,9 +21,9 @@
 	 * 所以在nvue下,取名为u--form,内部其实还是u-form.vue,只不过做一层中转
 	 */
 	import uvForm from '../u-form/u-form.vue';
-	import props from '../u-form/props.js';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from '../u-form/props.js';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	export default {
 		// #ifdef MP-WEIXIN
 		name: 'u-form',

+ 3 - 3
src/uni_modules/uview-plus/components/u--image/u--image.vue

@@ -36,9 +36,9 @@
 	 * 所以在nvue下,取名为u--image,内部其实还是u-iamge.vue,只不过做一层中转
 	 */
 	import uvImage from '../u-image/u-image.vue';
-	import props from '../u-image/props.js';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from '../u-image/props.js';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	export default {
 		name: 'u--image',
 		mixins: [mpMixin, props, mixin],

+ 3 - 3
src/uni_modules/uview-plus/components/u--input/u--input.vue

@@ -61,9 +61,9 @@
 	 * 所以在nvue下,取名为u--input,内部其实还是u-input.vue,只不过做一层中转
 	 */
 	import uvInput from '../u-input/u-input.vue';
-	import props from '../u-input/props.js';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from '../u-input/props.js';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	export default {
 		name: 'u--input',
 		mixins: [mpMixin, props, mixin],

+ 3 - 3
src/uni_modules/uview-plus/components/u--text/u--text.vue

@@ -32,9 +32,9 @@
  * 不使用v-bind="$attrs",而是分开独立写传参,是因为微信小程序不支持此写法
  */
 import uvText from "../u-text/u-text.vue";
-import props from "../u-text/props.js";
-import mpMixin from '../../libs/mixin/mpMixin.js'
-import mixin from '../../libs/mixin/mixin.js'
+import { props } from "../u-text/props.js";
+import { mpMixin } from '../../libs/mixin/mpMixin.js'
+import { mixin } from '../../libs/mixin/mixin.js'
 export default {
     name: "u--text",
     mixins: [mpMixin, mixin, props,],

+ 3 - 3
src/uni_modules/uview-plus/components/u--textarea/u--textarea.vue

@@ -34,9 +34,9 @@
 	 * 所以在nvue下,取名为u--textarea,内部其实还是u-textarea.vue,只不过做一层中转
 	 */
 	import uvTextarea from '../u-textarea/u-textarea.vue';
-	import props from '../u-textarea/props.js';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from '../u-textarea/props.js';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	export default {
 		name: 'u--textarea',
 		mixins: [mpMixin, props, mixin],

+ 26 - 0
src/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js

@@ -0,0 +1,26 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:44:35
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/actionSheet.js
+ */
+export default {
+    // action-sheet组件
+    actionSheet: {
+        show: false,
+        title: '',
+        description: '',
+        actions: [],
+        index: '',
+        cancelText: '',
+        closeOnClickAction: true,
+        safeAreaInsetBottom: true,
+        openType: '',
+        closeOnClickOverlay: true,
+        round: 0,
+        wrapMaxHeight: '600px'
+    }
+}

+ 11 - 4
src/uni_modules/uview-plus/components/u-action-sheet/props.js

@@ -1,5 +1,7 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
     props: {
         // 操作菜单是否展示 (默认false)
         show: {
@@ -50,6 +52,11 @@ export default {
         round: {
             type: [Boolean, String, Number],
             default: () => defProps.actionSheet.round
-        }
+        },
+        // 选项区域最大高度
+        wrapMaxHeight: {
+            type: [String],
+            default: () => defProps.actionSheet.wrapMaxHeight
+        },
     }
-}
+})

+ 14 - 13
src/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue

@@ -34,7 +34,7 @@
 			>{{description}}</text>
 			<slot>
 				<u-line v-if="description"></u-line>
-				<view class="u-action-sheet__item-wrap">
+				<scroll-view scroll-y class="u-action-sheet__item-wrap" :style="{maxHeight: wrapMaxHeight}">
 					<view :key="index" v-for="(item, index) in actions">
 						<!-- #ifdef MP -->
 						<button
@@ -85,7 +85,7 @@
 						<!-- #endif -->
 						<u-line v-if="index !== actions.length - 1"></u-line>
 					</view>
-				</view>
+				</scroll-view>
 			</slot>
 			<u-gap
 			    bgColor="#eaeaec"
@@ -93,13 +93,11 @@
 			    v-if="cancelText"
 			></u-gap>
 			<view class="u-action-sheet__item-wrap__item u-action-sheet__cancel"
-				hover-class="u-action-sheet--hover">
+				hover-class="u-action-sheet--hover" @tap="cancel" v-if="cancelText">
 				<text
 				    @touchmove.stop.prevent
 				    :hover-stay-time="150"
-				    v-if="cancelText"
 				    class="u-action-sheet__cancel-text"
-				    @tap="cancel"
 				>{{cancelText}}</text>
 			</view>
 		</view>
@@ -107,11 +105,11 @@
 </template>
 
 <script>
-	import openType from '../../libs/mixin/openType'
-	import button from '../../libs/mixin/button'
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { openType } from '../../libs/mixin/openType'
+	import { buttonMixin } from '../../libs/mixin/button'
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit } from '../../libs/function/index';
 	/**
 	 * ActionSheet 操作菜单
@@ -149,7 +147,7 @@
 	export default {
 		name: "u-action-sheet",
 		// 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
-		mixins: [openType, button, mixin, props],
+		mixins: [openType, buttonMixin, mixin, props],
 		data() {
 			return {
 
@@ -168,16 +166,18 @@
 				}
 			},
 		},
-		emits: ["close", "select"],
+		emits: ["close", "select", "update:show"],
 		methods: {
 			closeHandler() {
 				// 允许点击遮罩关闭时,才发出close事件
 				if(this.closeOnClickOverlay) {
+					this.$emit('update:show')
 					this.$emit('close')
 				}
 			},
 			// 点击取消按钮
 			cancel() {
+				this.$emit('update:show')
 				this.$emit('close')
 			},
 			selectHandler(index) {
@@ -185,6 +185,7 @@
 				if (item && !item.disabled && !item.loading) {
 					this.$emit('select', item)
 					if (this.closeOnClickAction) {
+						this.$emit('update:show')
 						this.$emit('close')
 					}
 				}
@@ -272,7 +273,7 @@
 			font-size: $u-action-sheet-cancel-text-font-size;
 			color: $u-action-sheet-cancel-text-color;
 			text-align: center;
-			padding: $u-action-sheet-cancel-text-font-size;
+			// padding: $u-action-sheet-cancel-text-font-size;
 		}
 
 		&--hover {

+ 27 - 0
src/uni_modules/uview-plus/components/u-album/album.js

@@ -0,0 +1,27 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:47:24
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/album.js
+ */
+export default {
+    // album 组件
+    album: {
+        urls: [],
+        keyName: '',
+        singleSize: 180,
+        multipleSize: 70,
+        space: 6,
+        singleMode: 'scaleToFill',
+        multipleMode: 'aspectFill',
+        maxCount: 9,
+        previewFullImage: true,
+        rowCount: 3,
+        showMore: true,
+        autoWrap: false,
+        unit: 'px'
+    }
+}

+ 24 - 3
src/uni_modules/uview-plus/components/u-album/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 图片地址,Array<String>|Array<Object>形式
         urls: {
@@ -55,6 +56,26 @@ export default {
         showMore: {
             type: Boolean,
             default: () => defProps.album.showMore
+        },
+        // 图片形状,circle-圆形,square-方形
+        shape: {
+            type: String,
+            default: () => defProps.image.shape
+        },
+        // 圆角,单位任意
+        radius: {
+            type: [String, Number],
+            default: () => defProps.image.radius
+        },
+        // 自适应换行
+        autoWrap: {
+            type: Boolean,
+            default: () => defProps.album.autoWrap
+        },
+        // 单位
+        unit: {
+            type: [String],
+            default: () => defProps.album.unit
         }
     }
-}
+})

+ 43 - 29
src/uni_modules/uview-plus/components/u-album/u-album.vue

@@ -6,6 +6,7 @@
             v-for="(arr, index) in showUrls"
             :forComputedUse="albumWidth"
             :key="index"
+            :style="{flexWrap: autoWrap ? 'wrap' : 'nowrap'}"
         >
             <view
                 class="u-album__row__wrapper"
@@ -26,7 +27,8 @@
                     :style="[
                         {
                             width: imageWidth,
-                            height: imageHeight
+                            height: imageHeight,
+                            borderRadius: shape == 'circle' ? '10000px' : addUnit(radius)
                         }
                     ]"
                 ></image>
@@ -38,6 +40,9 @@
                         index1 === showUrls[showUrls.length - 1].length - 1
                     "
                     class="u-album__row__wrapper__text"
+                    :style="{
+					    borderRadius: shape == 'circle' ? '50%' : addUnit(radius),
+				    }"
                 >
                     <up-text
                         :text="`+${urls.length - maxCount}`"
@@ -53,9 +58,9 @@
 </template>
 
 <script>
-import props from './props';
-import mpMixin from '../../libs/mixin/mpMixin';
-import mixin from '../../libs/mixin/mixin';
+import { props } from './props';
+import { mpMixin } from '../../libs/mixin/mpMixin';
+import { mixin } from '../../libs/mixin/mixin';
 import { addUnit, sleep } from '../../libs/function/index';
 import test from '../../libs/function/test';
 // #ifdef APP-NVUE
@@ -79,7 +84,10 @@ const dom = uni.requireNativePlugin('dom')
  * @property {Boolean}         previewFullImage 是否可以预览图片 (默认 true )
  * @property {String | Number} rowCount         每行展示图片数量,如设置,singleSize和multipleSize将会无效	(默认 3 )
  * @property {Boolean}         showMore         超出maxCount时是否显示查看更多的提示 (默认 true )
- *
+ * @property {String}          shape            图片形状,circle-圆形,square-方形 (默认 'square' )
+ * @property {String | Number} radius           圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
+ * @property {Boolean}         autoWrap         自适应换行模式,不受rowCount限制,图片会自动换行 (默认 false )
+ * @property {String}          unit             图片单位 (默认 px )
  * @event    {Function}        albumWidth       某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送  (回调参数 width )
  * @example <u-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></u-album>
  */
@@ -119,42 +127,48 @@ export default {
                     marginBottom: addUnit(space)
                 }
                 // 如果为最后一行,则每个图片都无需下边框
-                if (index1 === rowLen) style.marginBottom = 0
+                if (index1 === rowLen && !this.autoWrap) style.marginBottom = 0
                 // 每行的最右边一张和总长度的最后一张无需右边框
-                if (
-                    index2 === rowCount ||
-                    (index1 === rowLen &&
-                        index2 === this.showUrls[index1 - 1].length)
-                )
-                    style.marginRight = 0
+                if (!this.autoWrap) {
+                    if (
+                        index2 === rowCount ||
+                        (index1 === rowLen &&
+                            index2 === this.showUrls[index1 - 1].length)
+                    )
+                        style.marginRight = 0
+                }
                 return style
             }
         },
         // 将数组划分为二维数组
         showUrls() {
-            const arr = []
-            this.urls.map((item, index) => {
-                // 限制最大展示数量
-                if (index + 1 <= this.maxCount) {
-                    // 计算该元素为第几个素组内
-                    const itemIndex = Math.floor(index / this.rowCount)
-                    // 判断对应的索引是否存在
-                    if (!arr[itemIndex]) {
-                        arr[itemIndex] = []
+            if (this.autoWrap) {
+                return [ this.urls.slice(0, this.maxCount) ];
+            } else {
+                const arr = []
+                this.urls.map((item, index) => {
+                    // 限制最大展示数量
+                    if (index + 1 <= this.maxCount) {
+                        // 计算该元素为第几个素组内
+                        const itemIndex = Math.floor(index / this.rowCount)
+                        // 判断对应的索引是否存在
+                        if (!arr[itemIndex]) {
+                            arr[itemIndex] = []
+                        }
+                        arr[itemIndex].push(item)
                     }
-                    arr[itemIndex].push(item)
-                }
-            })
-            return arr
+                })
+                return arr
+            }
         },
         imageWidth() {
             return addUnit(
-                this.urls.length === 1 ? this.singleWidth : this.multipleSize
+                this.urls.length === 1 ? this.singleWidth : this.multipleSize, this.unit
             )
         },
         imageHeight() {
             return addUnit(
-                this.urls.length === 1 ? this.singleHeight : this.multipleSize
+                this.urls.length === 1 ? this.singleHeight : this.multipleSize, this.unit
             )
         },
         // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度
@@ -173,6 +187,7 @@ export default {
         }
     },
     methods: {
+        addUnit,
         // 预览图片
         onPreviewTap(url) {
             const urls = this.urls.map((item) => {
@@ -242,7 +257,6 @@ export default {
 
     &__row {
         @include flex(row);
-        flex-wrap: wrap;
 
         &__wrapper {
             position: relative;
@@ -261,4 +275,4 @@ export default {
         }
     }
 }
-</style>
+</style>

+ 22 - 0
src/uni_modules/uview-plus/components/u-alert/alert.js

@@ -0,0 +1,22 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:48:53
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/alert.js
+ */
+export default {
+    // alert警告组件
+    alert: {
+        title: '',
+        type: 'warning',
+        description: '',
+        closable: false,
+        showIcon: false,
+        effect: 'light',
+        center: false,
+        fontSize: 14
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-alert/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 显示文字
         title: {
@@ -42,4 +43,4 @@ export default {
             default: () => defProps.alert.fontSize
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-alert/u-alert.vue

@@ -60,9 +60,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, addStyle } from '../../libs/function/index';
 	/**
 	 * Alert  警告提示

+ 23 - 0
src/uni_modules/uview-plus/components/u-avatar-group/avatarGroup.js

@@ -0,0 +1,23 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:49:55
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/avatarGroup.js
+ */
+export default {
+    // avatarGroup 组件
+    avatarGroup: {
+        urls: [],
+        maxCount: 5,
+        shape: 'circle',
+        mode: 'scaleToFill',
+        showMore: true,
+        size: 40,
+        keyName: '',
+        gap: 0.5,
+		extraValue: 0
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-avatar-group/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 头像图片组
         urls: {
@@ -50,4 +51,4 @@ export default {
 			default: () => defProps.avatarGroup.extraValue
 		}
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue

@@ -32,9 +32,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit } from '../../libs/function/index';
 	import test from '../../libs/function/test';
 	/**

+ 28 - 0
src/uni_modules/uview-plus/components/u-avatar/avatar.js

@@ -0,0 +1,28 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:49:22
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/avatar.js
+ */
+export default {
+    // avatar 组件
+    avatar: {
+        src: '',
+        shape: 'circle',
+        size: 40,
+        mode: 'scaleToFill',
+        text: '',
+        bgColor: '#c0c4cc',
+        color: '#ffffff',
+        fontSize: 18,
+        icon: '',
+        mpAvatar: false,
+        randomBgColor: false,
+        defaultUrl: '',
+        colorIndex: '',
+        name: ''
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-avatar/props.js

@@ -1,6 +1,7 @@
-import defProps from '../../libs/config/props.js';
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
 import test from '../../libs/function/test';
-export default {
+export const props = defineMixin({
     props: {
         // 头像图片路径(不能为相对路径)
         src: {
@@ -77,4 +78,4 @@ export default {
             default: () => defProps.avatar.name
         }
     }
-}
+})

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3 - 3
src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue


+ 27 - 0
src/uni_modules/uview-plus/components/u-back-top/backtop.js

@@ -0,0 +1,27 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:50:18
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/backtop.js
+ */
+export default {
+    // backtop组件
+    backtop: {
+        mode: 'circle',
+        icon: 'arrow-upward',
+        text: '',
+        duration: 100,
+        scrollTop: 0,
+        top: 400,
+        bottom: 100,
+        right: 20,
+        zIndex: 9,
+        iconStyle: {
+            color: '#909399',
+            fontSize: '19px'
+        }
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-back-top/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 返回顶部的形状,circle-圆形,square-方形
         mode: {
@@ -52,4 +53,4 @@ export default {
             default: () => defProps.backtop.iconStyle
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-back-top/u-back-top.vue

@@ -24,9 +24,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, addStyle, getPx, deepMerge, error } from '../../libs/function/index';
 	// #ifdef APP-NVUE
 	const dom = weex.requireModule('dom')

+ 27 - 0
src/uni_modules/uview-plus/components/u-badge/badge.js

@@ -0,0 +1,27 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-23 19:51:50
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/badge.js
+ */
+export default {
+    // 徽标数组件
+    badge: {
+        isDot: false,
+        value: '',
+        show: true,
+        max: 999,
+        type: 'error',
+        showZero: false,
+        bgColor: null,
+        color: null,
+        shape: 'circle',
+        numberType: 'overflow',
+        offset: [],
+        inverted: false,
+        absolute: false
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-badge/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 是否显示圆点
         isDot: {
@@ -75,4 +76,4 @@ export default {
             default: () => defProps.badge.absolute
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-badge/u-badge.vue

@@ -8,9 +8,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle, addUnit } from '../../libs/function/index';
 	/**
 	 * badge 徽标数

+ 27 - 0
src/uni_modules/uview-plus/components/u-box/props.js

@@ -0,0 +1,27 @@
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const propsBox = defineMixin({
+    props: {
+        // 背景色
+        bgColors: {
+            type: [Array],
+            default: ['#EEFCFF', '#FCF8FF', '#FDF8F2']
+        },
+        // 高度
+        height: {
+            type: [String],
+            default: "160px"
+        },
+        // 圆角
+        borderRadius: {
+            type: [String],
+            default: "6px"
+        },
+        // 间隔
+        gap: {
+            type: [String],
+            default: "15px"
+        },
+    }
+})

+ 92 - 0
src/uni_modules/uview-plus/components/u-box/u-box.vue

@@ -0,0 +1,92 @@
+<template>
+	<view class="u-box" :style="[{height: height}, addStyle(customStyle)]">
+        <view class="u-box__left" :style="{borderRadius: borderRadius, backgroundColor: bgColors[0]}">
+            <slot name="left">左</slot>
+        </view>
+        <view class="u-box__gap" :style="{width: gap, height: height}"></view>
+        <view class="u-box__right">
+            <view class="u-box__right-top" :style="{borderRadius: borderRadius, backgroundColor: bgColors[1]}">
+                <slot name="rightTop">右上</slot>
+            </view>
+            <view class="u-box__right-gap" :style="{height: gap}"></view>
+            <view class="u-box__right-bottom" :style="{borderRadius: borderRadius, backgroundColor: bgColors[2]}">
+                <slot name="rightBottom">右下</slot>
+            </view>
+        </view>
+	</view>
+</template>
+
+<script>
+	import { propsBox } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
+	import { addStyle } from '../../libs/function/index';
+	import test from '../../libs/function/test';
+	/**
+	 * box 盒子
+	 * @description box盒子一般为左边一个盒子,右侧两个等高的半盒组成,常用于App首页座位重点突出。
+	 * @tutorial https://uview-plus.jiangruyi.com/components/box.html
+	 * @property {Array}	bgColors			背景色
+	 * @property {String}	height			    高度
+     * @property {String}	borderRadius		圆角
+	 * @property {Object}   customStyle		    定义需要用到的外部样式
+	 * 
+	 * @event {Function}			click			点击cell列表时触发
+	 * @example <up-box colors=['blue', 'red', 'yellow'] height="200px"></up-box>
+	 */
+	export default {
+		name: 'up-box',
+		data() {
+			return {
+			}
+		},
+		mixins: [mpMixin, mixin, propsBox],
+		computed: {
+		},
+		emits: [],
+		methods: {
+			addStyle,
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-box {
+        /* #ifndef APP-NVUE */
+        /* #endif */
+        @include flex();
+        flex: 1;
+
+		&__left {
+            @include flex();
+            justify-content: center;
+            align-items: center;
+            flex: 1;
+        }
+        &__gap {
+            @include flex();
+            flex-direction: column;
+        }
+        &__right {
+            @include flex();
+            flex-direction: column;
+            flex: 1;
+        }
+
+        &__right-top {
+            @include flex();
+            flex: 1;
+            justify-content: center;
+            align-items: center;
+        }
+
+        &__right-bottom {
+            @include flex();
+            flex: 1;
+            justify-content: center;
+            align-items: center;
+        }
+	}
+</style>

+ 42 - 0
src/uni_modules/uview-plus/components/u-button/button.js

@@ -0,0 +1,42 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:51:27
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/button.js
+ */
+export default {
+    // button组件
+    button: {
+        hairline: false,
+        type: 'info',
+        size: 'normal',
+        shape: 'square',
+        plain: false,
+        disabled: false,
+        loading: false,
+        loadingText: '',
+        loadingMode: 'spinner',
+        loadingSize: 15,
+        openType: '',
+        formType: '',
+        appParameter: '',
+        hoverStopPropagation: true,
+        lang: 'en',
+        sessionFrom: '',
+        sendMessageTitle: '',
+        sendMessagePath: '',
+        sendMessageImg: '',
+        showMessageCard: false,
+        dataName: '',
+        throttleTime: 0,
+        hoverStartTime: 0,
+        hoverStayTime: 200,
+        text: '',
+        icon: '',
+        iconColor: '',
+        color: ''
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-button/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 是否细边框
         hairline: {
@@ -150,4 +151,4 @@ export default {
             default: () => defProps.button.color
         }
     }
-}
+})

+ 6 - 6
src/uni_modules/uview-plus/components/u-button/u-button.vue

@@ -110,11 +110,11 @@
 </template>
 
 <script lang="ts">
-import button from "../../libs/mixin/button";
-import openType from "../../libs/mixin/openType";
-import mpMixin from '../../libs/mixin/mpMixin';
-import mixin from '../../libs/mixin/mixin';
-import props from "./props";
+import { buttonMixin } from "../../libs/mixin/button";
+import { openType } from "../../libs/mixin/openType";
+import { mpMixin } from '../../libs/mixin/mpMixin';
+import { mixin } from '../../libs/mixin/mixin';
+import { props } from "./props";
 import { addStyle } from '../../libs/function/index';
 import { throttle } from '../../libs/function/throttle';
 import color from '../../libs/config/color';
@@ -165,7 +165,7 @@ import color from '../../libs/config/color';
 export default {
     name: "u-button",
     // #ifdef MP
-    mixins: [mpMixin, mixin, button, openType, props],
+    mixins: [mpMixin, mixin, buttonMixin, openType, props],
     // #endif
     // #ifndef MP
     mixins: [mpMixin, mixin, props],

+ 42 - 0
src/uni_modules/uview-plus/components/u-calendar/calendar.js

@@ -0,0 +1,42 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:52:43
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/calendar.js
+ */
+export default {
+    // calendar 组件
+    calendar: {
+        title: '日期选择',
+        showTitle: true,
+        showSubtitle: true,
+        mode: 'single',
+        startText: '开始',
+        endText: '结束',
+        customList: [],
+        color: '#3c9cff',
+        minDate: 0,
+        maxDate: 0,
+        defaultDate: null,
+        maxCount: Number.MAX_SAFE_INTEGER, // Infinity
+        rowHeight: 56,
+        formatter: null,
+        showLunar: false,
+        showMark: true,
+        confirmText: '确定',
+        confirmDisabledText: '确定',
+        show: false,
+        closeOnClickOverlay: false,
+        readonly: false,
+        showConfirm: true,
+        maxRange: Number.MAX_SAFE_INTEGER, // Infinity
+        rangePrompt: '',
+        showRangePrompt: true,
+        allowSameDay: false,
+		round: 0,
+		monthNum: 3
+    }
+}

+ 4 - 2
src/uni_modules/uview-plus/components/u-calendar/header.vue

@@ -21,8 +21,8 @@
 </template>
 
 <script>
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	export default {
 		name: 'u-calendar-header',
 		mixins: [mpMixin, mixin],
@@ -65,6 +65,8 @@
 	@import "../../libs/css/components.scss";
 
 	.u-calendar-header {
+		display: flex;
+		flex-direction: column;
 		padding-bottom: 4px;
 
 		&__title {

+ 6 - 4
src/uni_modules/uview-plus/components/u-calendar/month.vue

@@ -31,8 +31,8 @@
 	// 由于nvue不支持百分比单位,需要查询宽度来计算每个日期的宽度
 	const dom = uni.requireNativePlugin('dom')
 	// #endif
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, deepClone, toast, sleep } from '../../libs/function/index';
 	import { colorGradient } from '../../libs/function/colorGradient';
 	import test from '../../libs/function/test';
@@ -158,13 +158,13 @@
 					const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1))
 					// 得出每个日期的宽度
 					// #ifdef APP-NVUE
-					style.width = addUnit(dayWidth)
+					style.width = addUnit(dayWidth, 'px')
 					// #endif
 					style.height = addUnit(this.rowHeight)
 					if (index2 === 0) {
 						// 获取当前为星期几,如果为0,则为星期天,减一为每月第一天时,需要向左偏移的item个数
 						week = (week === 0 ? 7 : week) - 1
-						style.marginLeft = addUnit(week * dayWidth)
+						style.marginLeft = addUnit(week * dayWidth, 'px')
 					}
 					if (this.mode === 'range') {
 						// 之所以需要这么写,是因为DCloud公司的iOS客户端的开发者能力有限导致的bug
@@ -468,6 +468,8 @@
 	.u-calendar-month {
 
 		&__title {
+			display: flex;
+			flex-direction: column;
 			font-size: 14px;
 			line-height: 42px;
 			height: 42px;

+ 5 - 3
src/uni_modules/uview-plus/components/u-calendar/props.js

@@ -1,5 +1,7 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
     props: {
         // 日历顶部标题
         title: {
@@ -142,4 +144,4 @@ export default {
 			default: 3
 		}	
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-calendar/u-calendar.vue

@@ -66,12 +66,12 @@
 <script>
 import uHeader from './header.vue'
 import uMonth from './month.vue'
-import props from './props.js'
+import { props } from './props.js'
 import util from './util.js'
 import dayjs from 'dayjs/esm/index'
 import Calendar from '../../libs/util/calendar.js'
-import mpMixin from '../../libs/mixin/mpMixin.js'
-import mixin from '../../libs/mixin/mixin.js'
+import { mpMixin } from '../../libs/mixin/mpMixin.js'
+import { mixin } from '../../libs/mixin/mixin.js'
 import { addUnit, range, error, padZero } from '../../libs/function/index';
 import test from '../../libs/function/test';
 /**

+ 15 - 0
src/uni_modules/uview-plus/components/u-car-keyboard/carKeyboard.js

@@ -0,0 +1,15 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:53:20
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/carKeyboard.js
+ */
+export default {
+    // 车牌号键盘
+    carKeyboard: {
+        random: false
+    }
+}

+ 5 - 3
src/uni_modules/uview-plus/components/u-car-keyboard/props.js

@@ -1,5 +1,7 @@
-// import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
     props: {
         // 是否打乱键盘按键的顺序
         random: {
@@ -12,4 +14,4 @@ export default {
             default: false
         }
     }
-}
+})

+ 5 - 5
src/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue

@@ -68,13 +68,13 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { randomArray, sleep } from '../../libs/function/index';
 	/**
 	 * keyboard 键盘组件
-	 * @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
+	 * @description 此为uview-plus自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
 	 * @tutorial https://uview-plus.jiangruyi.com/components/keyboard.html
 	 * @property {Boolean} random 是否打乱键盘的顺序
 	 * @event {Function} change 点击键盘触发
@@ -82,7 +82,7 @@
 	 * @example <u-keyboard ref="uKeyboard" mode="car" v-model="show"></u-keyboard>
 	 */
 	export default {
-		name: "u-keyboard",
+		name: "u-car-keyboard",
 		mixins: [mpMixin, mixin, props],
 		data() {
 			return {

+ 140 - 0
src/uni_modules/uview-plus/components/u-card/props.js

@@ -0,0 +1,140 @@
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const propsCard = defineMixin({
+    props: {
+        // 与屏幕两侧是否留空隙
+		full: {
+			type: Boolean,
+			default: false
+		},
+		// 标题
+		title: {
+			type: String,
+			default: ''
+		},
+		// 标题颜色
+		titleColor: {
+			type: String,
+			default: '#303133'
+		},
+		// 标题字体大小
+		titleSize: {
+			type: [Number, String],
+			default: '15px'
+		},
+		// 副标题
+		subTitle: {
+			type: String,
+			default: ''
+		},
+		// 副标题颜色
+		subTitleColor: {
+			type: String,
+			default: '#909399'
+		},
+		// 副标题字体大小
+		subTitleSize: {
+			type: [Number, String],
+			default: '13'
+		},
+		// 是否显示外部边框,只对full=false时有效(卡片与边框有空隙时)
+		border: {
+			type: Boolean,
+			default: true
+		},
+		// 用于标识点击了第几个
+		index: {
+			type: [Number, String, Object],
+			default: ''
+		},
+		// 用于隔开上下左右的边距,带单位的写法,如:"30px 30px","20px 20px 30px 30px"
+		margin: {
+			type: String,
+			default: '15px'
+		},
+		// card卡片的圆角
+		borderRadius: {
+			type: [Number, String],
+			default: '8px'
+		},
+		// 头部自定义样式,对象形式
+		headStyle: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 主体自定义样式,对象形式
+		bodyStyle: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 底部自定义样式,对象形式
+		footStyle: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		// 头部是否下边框
+		headBorderBottom: {
+			type: Boolean,
+			default: true
+		},
+		// 底部是否有上边框
+		footBorderTop: {
+			type: Boolean,
+			default: true
+		},
+		// 标题左边的缩略图
+		thumb: {
+			type: String,
+			default: ''
+		},
+		// 缩略图宽高
+		thumbWidth: {
+			type: [String, Number],
+			default: '30px'
+		},
+		// 缩略图是否为圆形
+		thumbCircle: {
+			type: Boolean,
+			default: false
+		},
+		// 给head,body,foot的内边距
+		padding: {
+			type: [String, Number],
+			default: '15px'
+		},
+		paddingHead: {
+			type: [String, Number],
+			default: ''
+		},
+		paddingBody: {
+			type: [String, Number],
+			default: ''
+		},
+		paddingFoot: {
+			type: [String, Number],
+			default: ''
+		},
+		// 是否显示头部
+		showHead: {
+			type: Boolean,
+			default: true
+		},
+		// 是否显示尾部
+		showFoot: {
+			type: Boolean,
+			default: true
+		},
+		// 卡片外围阴影,字符串形式
+		boxShadow: {
+			type: String,
+			default: 'none'
+		}
+    }
+})

+ 186 - 0
src/uni_modules/uview-plus/components/u-card/u-card.vue

@@ -0,0 +1,186 @@
+<template>
+	<view
+		class="u-card"
+		@tap.stop="click"
+		:class="{ 'u-border': border, 'u-card-full': full, 'u-card--border': getPx(borderRadius) > 0 }"
+		:style="{
+			borderRadius: addUnit(borderRadius),
+			margin: margin,
+			boxShadow: boxShadow
+		}"
+	>
+		<view
+			v-if="showHead"
+			class="u-card__head"
+			:style="[{padding: addUnit(paddingHead || padding)}, headStyle]"
+			:class="{
+				'u-border-bottom': headBorderBottom
+			}"
+			@tap="headClick"
+		>
+			<view v-if="!$slots.head" class="u-flex u-row-between">
+				<view class="u-card__head--left u-flex u-line-1" v-if="title">
+					<image
+						:src="thumb"
+						class="u-card__head--left__thumb"
+						mode="aspectFill"
+						v-if="thumb"
+						:style="{ 
+							height: addUnit(thumbWidth), 
+							width: addUnit(thumbWidth), 
+							borderRadius: thumbCircle ? '50px' : '4px' 
+						}"
+					></image>
+					<text
+						class="u-card__head--left__title u-line-1"
+						:style="{
+							fontSize: addUnit(titleSize),
+							color: titleColor
+						}"
+					>
+						{{ title }}
+					</text>
+				</view>
+				<view class="u-card__head--right u-line-1" v-if="subTitle">
+					<text
+						class="u-card__head__title__text"
+						:style="{
+							fontSize: addUnit(subTitleSize),
+							color: subTitleColor
+						}"
+					>
+						{{ subTitle }}
+					</text>
+				</view>
+			</view>
+			<slot name="head" v-else />
+		</view>
+		<view @tap="bodyClick" class="u-card__body"
+			:style="[{padding: addUnit(paddingBody || padding)}, bodyStyle]"><slot name="body" /></view>
+		<view
+			v-if="showFoot"
+			class="u-card__foot"
+			 @tap="footClick"
+			:style="[{padding: $slots.foot ? addUnit(paddingFoot || padding) : 0}, footStyle]"
+			:class="{
+				'u-border-top': footBorderTop
+			}"
+		>
+			<slot name="foot" />
+		</view>
+	</view>
+</template>
+
+<script>
+    import { propsCard } from './props';
+    import { mpMixin } from '../../libs/mixin/mpMixin';
+    import { mixin } from '../../libs/mixin/mixin';
+    import { addStyle, addUnit, getPx } from '../../libs/function/index';
+    /**
+     * card 卡片
+     * @description 卡片组件一般用于多个列表条目,且风格统一的场景
+     * @tutorial https://uview-plus.jiangruyi.com/components/card.html
+     * @property {Boolean} full 卡片与屏幕两侧是否留空隙(默认false)
+     * @property {String} title 头部左边的标题
+     * @property {String} title-color 标题颜色(默认#303133)
+     * @property {String | Number} title-size 标题字体大小,单位rpx(默认15px)
+     * @property {String} sub-title 头部右边的副标题
+     * @property {String} sub-title-color 副标题颜色(默认#909399)
+     * @property {String | Number} sub-title-size 副标题字体大小(默认13px
+     * @property {Boolean} border 是否显示边框(默认true)
+     * @property {String | Number} index 用于标识点击了第几个卡片
+     * @property {String} box-shadow 卡片外围阴影,字符串形式(默认none)
+     * @property {String} margin 卡片与屏幕两边和上下元素的间距,需带单位,如"30px 20px"(默认15px)
+     * @property {String | Number} border-radius 卡片整体的圆角值,单位rpx(默认8px)
+     * @property {Object} head-style 头部自定义样式,对象形式
+     * @property {Object} body-style 中部自定义样式,对象形式
+     * @property {Object} foot-style 底部自定义样式,对象形式
+     * @property {Boolean} head-border-bottom 是否显示头部的下边框(默认true)
+     * @property {Boolean} foot-border-top 是否显示底部的上边框(默认true)
+     * @property {Boolean} show-head 是否显示头部(默认true)
+     * @property {Boolean} show-foot 是否显示尾部(默认true)
+     * @property {String} thumb 缩略图路径,如设置将显示在标题的左边,不建议使用相对路径
+     * @property {String | Number} thumb-width 缩略图的宽度,高等于宽,单位px(默认30px)
+     * @property {Boolean} thumb-circle 缩略图是否为圆形(默认false)
+     * @event {Function} click 整个卡片任意位置被点击时触发
+     * @event {Function} head-click 卡片头部被点击时触发
+     * @event {Function} body-click 卡片主体部分被点击时触发
+     * @event {Function} foot-click 卡片底部部分被点击时触发
+     * @example <u-card paddingFoot="2px 15px" title="card"></u-card>
+     */
+    export default {
+        name: 'up-card',
+        data() {
+            return {};
+        },
+        mixins: [mpMixin, mixin, propsCard],
+        emits: ['click', 'head-click', 'body-click', 'foot-click'],
+        methods: {
+			addStyle,
+			addUnit,
+			getPx,
+            click() {
+                this.$emit('click', this.index);
+            },
+            headClick() {
+                this.$emit('head-click', this.index);
+            },
+            bodyClick() {
+                this.$emit('body-click', this.index);
+            },
+            footClick() {
+                this.$emit('foot-click', this.index);
+            }
+        }
+    };
+</script>
+
+<style lang="scss" scoped>
+@import "../../libs/css/components.scss";
+	
+.u-card {
+	position: relative;
+	overflow: hidden;
+	font-size: 28rpx;
+	background-color: #ffffff;
+	box-sizing: border-box;
+	
+	&-full {
+		// 如果是与屏幕之间不留空隙,应该设置左右边距为0
+		margin-left: 0 !important;
+		margin-right: 0 !important;
+		width: 100%;
+	}
+	
+	&--border:after {
+		border-radius: 16rpx;
+	}
+
+	&__head {
+		&--left {
+			color: $u-main-color;
+			
+			&__thumb {
+				margin-right: 16rpx;
+			}
+			
+			&__title {
+				max-width: 400rpx;
+			}
+		}
+
+		&--right {
+			color: $u-tips-color;
+			margin-left: 6rpx;
+		}
+	}
+
+	&__body {
+		color: $u-content-color;
+	}
+
+	&__foot {
+		color: $u-tips-color;
+	}
+}
+</style>

+ 17 - 0
src/uni_modules/uview-plus/components/u-cell-group/cellGroup.js

@@ -0,0 +1,17 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:54:16
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/cellGroup.js
+ */
+export default {
+    // cell-group组件的props
+    cellGroup: {
+        title: '',
+        border: true,
+        customStyle: {}
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-cell-group/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 分组标题
         title: {
@@ -12,4 +13,4 @@ export default {
             default: () => defProps.cellGroup.border
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue

@@ -13,9 +13,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle } from '../../libs/function/index';
 	/**
 	 * cellGroup  单元格

+ 35 - 0
src/uni_modules/uview-plus/components/u-cell/cell.js

@@ -0,0 +1,35 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-23 20:53:09
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/cell.js
+ */
+export default {
+	// cell组件的props
+	cell: {
+		customClass: '',
+		title: '',
+		label: '',
+		value: '',
+		icon: '',
+		disabled: false,
+		border: true,
+		center: false,
+		url: '',
+		linkType: 'navigateTo',
+		clickable: false,
+		isLink: false,
+		required: false,
+		arrowDirection: '',
+		iconStyle: {},
+		rightIconStyle: {},
+		rightIcon: 'arrow-right',
+		titleStyle: {},
+		size: '',
+		stop: true,
+		name: ''
+	}
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-cell/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 标题
         title: {
@@ -108,4 +109,4 @@ export default {
             default: () => defProps.cell.name
         }
     }
-}
+})

+ 25 - 4
src/uni_modules/uview-plus/components/u-cell/u-cell.vue

@@ -16,7 +16,7 @@
 					<slot name="title" v-if="$slots.title || !title">
 					</slot>
                     <text v-else class="u-cell__title-text" :style="[titleTextStyle]"
-                        :class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
+                        :class="[required && 'u-cell--required', disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
 					<slot name="label">
 						<text class="u-cell__label" v-if="label"
 							:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text>
@@ -47,9 +47,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle } from '../../libs/function/index';
 	import test from '../../libs/function/test';
 	/**
@@ -192,6 +192,8 @@
 
 		&__title {
 			flex: $u-cell-title-flex;
+			display: flex;
+			flex-direction: column;
 
 			&-text {
 				font-size: $u-cell-title-font-size;
@@ -229,6 +231,25 @@
 			}
 		}
 
+		&--required {
+			/* #ifndef APP-NVUE */
+			overflow: visible;
+			/* #endif */
+			@include flex;
+			align-items: center;
+		}
+
+		&--required:before {
+			position: absolute;
+			/* #ifndef APP-NVUE */
+			content: '*';
+			/* #endif */
+			left: -8px;
+			margin-top: 4rpx;
+			font-size: 14px;
+			color: $u-error;
+		}
+
 		&--clickable {
 			background-color: $u-cell-clickable-color;
 		}

+ 29 - 0
src/uni_modules/uview-plus/components/u-checkbox-group/checkboxGroup.js

@@ -0,0 +1,29 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:54:47
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/checkboxGroup.js
+ */
+export default {
+    // checkbox-group组件
+    checkboxGroup: {
+        name: '',
+        value: [],
+        shape: 'square',
+        disabled: false,
+        activeColor: '#2979ff',
+        inactiveColor: '#c8c9cc',
+        size: 18,
+        placement: 'row',
+        labelSize: 14,
+        labelColor: '#303133',
+        labelDisabled: false,
+        iconColor: '#ffffff',
+        iconSize: 12,
+        iconPlacement: 'left',
+        borderBottom: false
+    }
+}

+ 5 - 4
src/uni_modules/uview-plus/components/u-checkbox-group/props.js

@@ -1,5 +1,7 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
     props: {
         // 标识符
         name: {
@@ -87,6 +89,5 @@ export default {
             type: Boolean,
             default: () => defProps.checkboxGroup.borderBottom
         }
-
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue

@@ -8,9 +8,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	/**
 	 * checkboxGroup 复选框组
 	 * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便

+ 27 - 0
src/uni_modules/uview-plus/components/u-checkbox/checkbox.js

@@ -0,0 +1,27 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-23 21:06:59
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/checkbox.js
+ */
+export default {
+    // checkbox组件
+    checkbox: {
+        name: '',
+        shape: '',
+        size: '',
+        checkbox: false,
+        disabled: '',
+        activeColor: '',
+        inactiveColor: '',
+        iconSize: '',
+        iconColor: '',
+        label: '',
+        labelSize: '',
+        labelColor: '',
+        labelDisabled: ''
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-checkbox/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // checkbox的名称
         name: {
@@ -72,4 +73,4 @@ export default {
             default: () => false
         }
     }
-}
+})

+ 42 - 30
src/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue

@@ -20,21 +20,23 @@
 				/>
 			</slot>
 		</view>
-		<text
-		    @tap.stop="labelClickHandler"
-		    :style="{
-				color: elDisabled ? elInactiveColor : elLabelColor,
-				fontSize: elLabelSize,
-				lineHeight: elLabelSize
-			}"
-		>{{label}}</text>
+		<slot name="label" :label="label" :elDisabled="elDisabled">
+			<text
+				@tap.stop="labelClickHandler"
+				:style="{
+					color: elDisabled ? elInactiveColor : elLabelColor,
+					fontSize: elLabelSize,
+					lineHeight: elLabelSize
+				}"
+			>{{label}}</text>
+		</slot>
 	</view>
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle, addUnit, deepMerge, formValidate, error } from '../../libs/function/index';
 	import test from '../../libs/function/test';
 	/**
@@ -89,7 +91,7 @@
 			}
 		},
 		computed: {
-			// 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
+			// 是否禁用,如果父组件u-radios-group禁用的话,将会忽略子组件的配置
 			elDisabled() {
 				return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
 			},
@@ -187,7 +189,7 @@
 		mounted() {
 			this.init()
 		},
-		emits: ["change"],
+		emits: ["change", "update:checked"],
 		methods: {
 			init() {
 				if (!this.usedAlone) {
@@ -196,21 +198,25 @@
 					if (!this.parent) {
 						error('u-checkbox必须搭配u-checkbox-group组件使用')
 					}
-				}
-				// #ifdef VUE2
-				const value = this.parentData.value
-				// #endif
-				// #ifdef VUE3
-				const value = this.parentData.modelValue
-				// #endif
-				// 设置初始化时,是否默认选中的状态,父组件u-checkbox-group的value可能是array,所以额外判断
-				if (this.checked) {
-					this.isChecked = true
-				} else if (!this.usedAlone && test.array(value)) {
-					// 查找数组是是否存在this.name元素值
-					this.isChecked = value.some(item => {
-						return item === this.name
-					})
+					// #ifdef VUE2
+					const value = this.parentData.value
+					// #endif
+					// #ifdef VUE3
+					const value = this.parentData.modelValue
+					// #endif
+					// 设置初始化时,是否默认选中的状态,父组件u-checkbox-group的value可能是array,所以额外判断
+					if (this.checked) {
+						this.isChecked = true
+					} else if (!this.usedAlone && test.array(value)) {
+						// 查找数组是是否存在this.name元素值
+						this.isChecked = value.some(item => {
+							return item === this.name
+						})
+					}
+				} else {
+					if (this.checked) {
+						this.isChecked = true
+					}
 				}
 			},
 			updateParentData() {
@@ -242,6 +248,10 @@
 			},
 			emitEvent() {
 				this.$emit('change', this.isChecked)
+				// 双向绑定
+				if (this.usedAlone) {
+					this.$emit('update:checked', this.isChecked)
+				}
 				// 尝试调用u-form的验证方法,进行一定延迟,否则微信小程序更新可能会不及时
 				this.$nextTick(() => {
 					formValidate(this, 'change')
@@ -260,8 +270,10 @@
 			}
 		},
 		watch:{
-			checked(){
-				this.isChecked = this.checked
+			checked(newValue, oldValue){
+				if (newValue !== this.isChecked) {
+					this.isChecked = newValue
+				}
 			}
 		}
 	}

+ 15 - 0
src/uni_modules/uview-plus/components/u-circle-progress/circleProgress.js

@@ -0,0 +1,15 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:55:02
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/circleProgress.js
+ */
+export default {
+    // circleProgress 组件
+    circleProgress: {
+        percentage: 30
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-circle-progress/props.js

@@ -1,9 +1,10 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         percentage: {
             type: [String, Number],
             default: () => defProps.circleProgress.percentage
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue

@@ -27,9 +27,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import {sleep } from '../../libs/function/index';
 	// #ifdef APP-NVUE
 	const animation = uni.requireNativePlugin('animation')

+ 29 - 0
src/uni_modules/uview-plus/components/u-code-input/codeInput.js

@@ -0,0 +1,29 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:55:58
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/codeInput.js
+ */
+export default {
+    // codeInput 组件
+    codeInput: {
+		adjustPosition: true,
+        maxlength: 6,
+        dot: false,
+        mode: 'box',
+        hairline: false,
+        space: 10,
+        value: '',
+        focus: false,
+        bold: false,
+        color: '#606266',
+        fontSize: 18,
+        size: 35,
+        disabledKeyboard: false,
+        borderColor: '#c9cacc',
+		disabledDot: true
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-code-input/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
 		// 键盘弹起时,是否自动上推页面
 		adjustPosition: {
@@ -86,4 +87,4 @@ export default {
 			default: () => defProps.codeInput.disabledDot
 		}
     }
-}
+})

+ 46 - 12
src/uni_modules/uview-plus/components/u-code-input/u-code-input.vue

@@ -23,8 +23,13 @@
 				v-if="mode === 'line'"
 				:style="[lineStyle]"
 			></view>
-			<!-- #ifndef APP-PLUS -->
-			<view v-if="isFocus && codeArray.length === index" :style="{backgroundColor: color}" class="u-code-input__item__cursor"></view>
+			<!-- #ifndef APP-NVUE -->
+			<view v-if="isFocus && codeArray.length === index"
+				:style="{backgroundColor: color}" class="u-code-input__item__cursor"></view>
+			<!-- #endif -->
+			<!-- #ifdef APP-NVUE -->
+			 <view v-if="isFocus && codeArray.length === index"
+			 :style="{backgroundColor: color, opacity: opacity}" class="u-code-input__item__cursor"></view>
 			<!-- #endif -->
 		</view>
 		<input
@@ -46,9 +51,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, getPx } from '../../libs/function/index';
 	/**
 	 * CodeInput 验证码输入
@@ -79,22 +84,51 @@
 		data() {
 			return {
 				inputValue: '',
-				isFocus: this.focus
+				isFocus: this.focus,
+				timer: null,
+				opacity: 1
 			}
 		},
 		watch: {
 			// #ifdef VUE2
 			value: {
+				immediate: true,
+				handler(val) {
+					// 转为字符串,超出部分截掉
+					this.inputValue = String(val).substring(0, this.maxlength)
+				}
+			},
 			// #endif
 			// #ifdef VUE3
 			modelValue: {
-			// #endif
 				immediate: true,
 				handler(val) {
 					// 转为字符串,超出部分截掉
 					this.inputValue = String(val).substring(0, this.maxlength)
 				}
 			},
+			// #endif
+			isFocus: {
+				handler(val) {
+					// #ifdef APP-NVUE
+					if (val) {
+						this.timer = setInterval(() => {
+							this.opacity = Math.abs(this.opacity - 1)
+						}, 600)
+					} else {
+						clearInterval(this.timer)
+					}
+					// #endif
+				}
+			}
+		},
+		created() {
+			
+		},
+		beforeUnmount() {
+			// #ifdef APP-NVUE
+			clearInterval(this.timer)
+			// #endif
 		},
 		computed: {
 			// 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
@@ -188,7 +222,7 @@
 <style lang="scss" scoped>
 	@import "../../libs/css/components.scss";
 	$u-code-input-cursor-width: 1px;
-	$u-code-input-cursor-height: 40%;
+	$u-code-input-cursor-height: 20px;
 	$u-code-input-cursor-animation-duration: 1s;
 	$u-code-input-cursor-animation-name: u-cursor-flicker;
 
@@ -223,18 +257,18 @@
 				width: 40px;
 				background-color: $u-content-color;
 			}
-			/* #ifndef APP-PLUS */
 			&__cursor {
 				position: absolute;
+				/* #ifndef APP-NVUE */
 				top: 50%;
 				left: 50%;
+				opacity: 1;
 				transform: translate(-50%,-50%);
+				/* #endif */
 				width: $u-code-input-cursor-width;
 				height: $u-code-input-cursor-height;
 				animation: $u-code-input-cursor-animation-duration u-cursor-flicker infinite;
 			}
-			/* #endif */
-			
 		}
 
 		&__input {
@@ -249,7 +283,7 @@
 		}
 	}
 	
-	/* #ifndef APP-PLUS */
+	/* #ifndef APP-NVUE */
 	@keyframes u-cursor-flicker {
 		0% {
 		    opacity: 0;

+ 21 - 0
src/uni_modules/uview-plus/components/u-code/code.js

@@ -0,0 +1,21 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:55:27
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/code.js
+ */
+
+export default {
+    // code 组件
+    code: {
+        seconds: 60,
+        startText: '获取验证码',
+        changeText: 'X秒重新获取',
+        endText: '重新获取',
+        keepRunning: false,
+        uniqueKey: ''
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-code/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 倒计时总秒数
         seconds: {
@@ -32,4 +33,4 @@ export default {
             default: () => defProps.code.uniqueKey
         }
     }
-}
+})

+ 3 - 8
src/uni_modules/uview-plus/components/u-code/u-code.vue

@@ -5,9 +5,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	/**
 	 * Code 验证码输入框
 	 * @description 考虑到用户实际发送验证码的场景,可能是一个按钮,也可能是一段文字,提示语各有不同,所以本组件 不提供界面显示,只提供提示语,由用户将提示语嵌入到具体的场景
@@ -119,12 +119,7 @@
 			}
 		},
 		// 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除
-		// #ifdef VUE2
-		beforeDestroy() {
-		// #endif
-		// #ifdef VUE3
 		beforeUnmount() {
-		// #endif
 			this.setTimeToStorage()
 			clearTimeout(this.timer)
 			this.timer = null

+ 19 - 0
src/uni_modules/uview-plus/components/u-col/col.js

@@ -0,0 +1,19 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:56:12
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/col.js
+ */
+export default {
+    // col 组件
+    col: {
+        span: 12,
+        offset: 0,
+        justify: 'start',
+        align: 'stretch',
+        textAlign: 'left'
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-col/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 占父容器宽度的多少等分,总分为12份
         span: {
@@ -27,4 +28,4 @@ export default {
             default: () => defProps.col.textAlign
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-col/u-col.vue

@@ -13,9 +13,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle, addUnit, deepMerge, getPx } from '../../libs/function/index';
 	/**
 	 * CodeInput 栅格系统的列 

+ 26 - 0
src/uni_modules/uview-plus/components/u-collapse-item/collapseItem.js

@@ -0,0 +1,26 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:56:42
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/collapseItem.js
+ */
+export default {
+    // collapseItem 组件
+    collapseItem: {
+        title: '',
+        value: '',
+        label: '',
+        disabled: false,
+        isLink: true,
+        clickable: true,
+        border: true,
+        align: 'left',
+        name: '',
+        icon: '',
+        duration: 300,
+        showRight: true
+    }
+}

+ 10 - 4
src/uni_modules/uview-plus/components/u-collapse-item/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 标题
         title: {
@@ -55,6 +56,11 @@ export default {
         duration: {
             type: Number,
             default: () => defProps.collapseItem.duration
-        }
+        },
+        // 显示右侧图标
+        showRight: {
+            type: Boolean,
+            default: () => defProps.collapseItem.showRight
+        },
     }
-}
+})

+ 9 - 7
src/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue

@@ -33,9 +33,11 @@
 				</slot>
 			</template>
 			<template #right-icon>
-				<u-icon v-if="!$slots['right-icon']" :size="16" name="arrow-right"></u-icon>
-				<slot name="right-icon">
-				</slot>
+				<template v-if="showRight">
+					<u-icon v-if="!$slots['right-icon']" :size="16" name="arrow-right"></u-icon>
+					<slot name="right-icon">
+					</slot>
+				</template>
 			</template>
 		</u-cell>
 		<view
@@ -54,9 +56,9 @@
 </template>
 
 <script>
-	import props from './props.js';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props.js';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { nextTick } from 'vue';
 	import { guid, sleep, error } from '../../libs/function/index';
 	import test from '../../libs/function/test';
@@ -153,7 +155,7 @@
 				// 每次面板打开或者收起时,都查询元素尺寸
 				// 好处是,父组件从服务端获取内容后,变更折叠面板后可以获得最新的高度
 				const rect = await this.queryRect()
-				const height = this.expanded ? 'auto' : 0
+				const height = this.expanded ? rect.height : 0
 				this.animating = true
 				// #ifdef APP-NVUE
 				const ref = this.$refs['animation'].ref

+ 17 - 0
src/uni_modules/uview-plus/components/u-collapse/collapse.js

@@ -0,0 +1,17 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:56:30
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/collapse.js
+ */
+export default {
+    // collapse 组件
+    collapse: {
+        value: null,
+        accordion: false,
+        border: true
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-collapse/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 当前展开面板的name,非手风琴模式:[<string | number>],手风琴模式:string | number
         value: {
@@ -17,4 +18,4 @@ export default {
             default: () => defProps.collapse.border
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-collapse/u-collapse.vue

@@ -6,9 +6,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	/**
 	 * collapse 折叠面板 
 	 * @description 通过折叠面板收纳内容区域

+ 24 - 0
src/uni_modules/uview-plus/components/u-column-notice/columnNotice.js

@@ -0,0 +1,24 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:57:16
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/columnNotice.js
+ */
+export default {
+    // columnNotice 组件
+    columnNotice: {
+        text: '',
+        icon: 'volume',
+        mode: '',
+        color: '#f9ae3d',
+        bgColor: '#fdf6ec',
+        fontSize: 14,
+        speed: 80,
+        step: false,
+        duration: 1500,
+        disableTouch: true
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-column-notice/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 显示的内容,字符串
         text: {
@@ -53,4 +54,4 @@ export default {
             default: () => defProps.columnNotice.disableTouch
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue

@@ -57,9 +57,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, error } from '../../libs/function/index';
 	import test from '../../libs/function/test';
 	/**

+ 1 - 1
src/uni_modules/uview-plus/components/u-copy/u-copy.vue

@@ -5,7 +5,7 @@
 </template>
 <script>
 export default {
-    name: "xy-copy",
+    name: "up-copy",
     props: {
         content: {
             type: String,

+ 18 - 0
src/uni_modules/uview-plus/components/u-count-down/countDown.js

@@ -0,0 +1,18 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 17:11:29
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/countDown.js
+ */
+export default {
+    // u-count-down 计时器组件
+    countDown: {
+        time: 0,
+        format: 'HH:mm:ss',
+        autoStart: true,
+        millisecond: false
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-count-down/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 倒计时时长,单位ms
         time: {
@@ -22,4 +23,4 @@ export default {
             default: () => defProps.countDown.millisecond
         }
     }
-}
+})

+ 3 - 8
src/uni_modules/uview-plus/components/u-count-down/u-count-down.vue

@@ -7,9 +7,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import {
 		isSameSecond,
 		parseFormat,
@@ -141,12 +141,7 @@
 				this.timer = null
 			}
 		},
-		// #ifdef VUE2
-		beforeDestroy() {
-		// #endif
-		// #ifdef VUE3
 		beforeUnmount() {
-		// #endif
 			this.clearTimeout()
 		}
 	}

+ 25 - 0
src/uni_modules/uview-plus/components/u-count-to/countTo.js

@@ -0,0 +1,25 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:57:32
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/countTo.js
+ */
+export default {
+    // countTo 组件
+    countTo: {
+        startVal: 0,
+        endVal: 0,
+        duration: 2000,
+        autoplay: true,
+        decimals: 0,
+        useEasing: true,
+        decimal: '.',
+        color: '#606266',
+        fontSize: 22,
+        bold: false,
+        separator: ''
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-count-to/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 开始的数值,默认从0增长到某一个数
         startVal: {
@@ -57,4 +58,4 @@ export default {
             default: () => defProps.countTo.separator
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-count-to/u-count-to.vue

@@ -10,9 +10,9 @@
 </template>
 
 <script>
-import props from './props';
-import mpMixin from '../../libs/mixin/mpMixin';
-import mixin from '../../libs/mixin/mixin';
+import { props } from './props';
+import { mpMixin } from '../../libs/mixin/mpMixin';
+import { mixin } from '../../libs/mixin/mixin';
 import { addUnit } from '../../libs/function/index';
 /**
  * countTo 数字滚动

+ 37 - 0
src/uni_modules/uview-plus/components/u-datetime-picker/datetimePicker.js

@@ -0,0 +1,37 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:57:48
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/datetimePicker.js
+ */
+export default {
+    // datetimePicker 组件
+    datetimePicker: {
+        show: false,
+		popupMode: 'bottom',
+        showToolbar: true,
+        value: '',
+        title: '',
+        mode: 'datetime',
+        maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(),
+        minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(),
+        minHour: 0,
+        maxHour: 23,
+        minMinute: 0,
+        maxMinute: 59,
+        filter: null,
+        formatter: null,
+        loading: false,
+        itemHeight: 44,
+        cancelText: '取消',
+        confirmText: '确认',
+        cancelColor: '#909193',
+        confirmColor: '#3c9cff',
+        visibleItemCount: 5,
+        closeOnClickOverlay: false,
+        defaultIndex: []
+    }
+}

+ 9 - 3
src/uni_modules/uview-plus/components/u-datetime-picker/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 是否显示input
         hasInput: {
@@ -29,6 +30,11 @@ export default {
             type: Boolean,
             default: () => defProps.datetimePicker.showToolbar
         },
+        // 工具栏右侧内容
+		toolbarRightSlot:{
+			type: Boolean,
+			default:  false
+		},
         // #ifdef VUE2
         // 绑定值
         value: {
@@ -141,4 +147,4 @@ export default {
             default: () => defProps.datetimePicker.defaultIndex
         }
     }
-}
+})

+ 55 - 39
src/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue

@@ -1,33 +1,46 @@
 <template>
-    <view v-if="hasInput" class="u-datetime-picker">
-        <u-input
-            :placeholder="placeholder"
-            border="surround"
-            v-model="inputValue"
+    <view class="u-datetime-picker">
+        <view v-if="hasInput" class="u-datetime-picker__has-input"
             @click="showByClickInput = !showByClickInput"
-        ></u-input>
+        >
+            <u-input
+                :placeholder="placeholder"
+                :readonly="!!showByClickInput"
+                border="surround"
+                v-model="inputValue"
+            ></u-input>
+        </view>
+        <u-picker
+            ref="picker"
+            :show="show || (hasInput && showByClickInput)"
+            :popupMode="popupMode"
+            :closeOnClickOverlay="closeOnClickOverlay"
+            :columns="columns"
+            :title="title"
+            :itemHeight="itemHeight"
+            :showToolbar="showToolbar"
+            :visibleItemCount="visibleItemCount"
+            :defaultIndex="innerDefaultIndex"
+            :cancelText="cancelText"
+            :confirmText="confirmText"
+            :cancelColor="cancelColor"
+            :confirmColor="confirmColor"
+            :toolbarRightSlot="toolbarRightSlot"
+            @close="close"
+            @cancel="cancel"
+            @confirm="confirm"
+            @change="change"
+        >
+            <template #toolbar-right>
+                <slot name="toolbar-right">
+                </slot>
+            </template>
+            <template #toolbar-bottom>
+                <slot name="toolbar-bottom">
+                </slot>
+            </template>
+        </u-picker>
     </view>
-	<u-picker
-		ref="picker"
-		:show="show || (hasInput && showByClickInput)"
-		:popupMode="popupMode"
-		:closeOnClickOverlay="closeOnClickOverlay"
-		:columns="columns"
-		:title="title"
-		:itemHeight="itemHeight"
-		:showToolbar="showToolbar"
-		:visibleItemCount="visibleItemCount"
-		:defaultIndex="innerDefaultIndex"
-		:cancelText="cancelText"
-		:confirmText="confirmText"
-		:cancelColor="cancelColor"
-		:confirmColor="confirmColor"
-		@close="close"
-		@cancel="cancel"
-		@confirm="confirm"
-		@change="change"
-	>
-	</u-picker>
 </template>
 
 <script>
@@ -39,9 +52,9 @@
 	    }
 	    return result
 	}
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import dayjs from 'dayjs/esm/index';
 	import { range, error, padZero } from '../../libs/function/index';
 	import test from '../../libs/function/test';
@@ -78,7 +91,7 @@
 	 * @example  <u-datetime-picker :show="show" :value="value1"  mode="datetime" ></u-datetime-picker>
 	 */
 	export default {
-		name: 'datetime-picker',
+		name: 'up-datetime-picker',
 		mixins: [mpMixin, mixin, props],
 		data() {
 			return {
@@ -188,11 +201,6 @@
 			},
 			// 点击工具栏的确定按钮
 			confirm() {
-				this.$emit('confirm', {
-					value: this.innerValue,
-					mode: this.mode
-				})
-                
 				// #ifdef VUE3
 				this.$emit('update:modelValue', this.innerValue)
 				// #endif
@@ -203,6 +211,10 @@
 					this.getInputValue(this.innerValue)
                     this.showByClickInput = false
                 }
+				this.$emit('confirm', {
+					value: this.innerValue,
+					mode: this.mode
+				})
 			},
 			//用正则截取输出值,当出现多组数字时,抛出错误
 			intercept(e,type){
@@ -443,14 +455,18 @@
 			        [`${type}Hour`]: hour,
 			        [`${type}Minute`]: minute
 			    }
-			},
-		},
+			}
+		}
 	}
 </script>
 
 <style lang="scss" scoped>
 	@import '../../libs/css/components.scss';
 	.u-datetime-picker {
-		width: 100%;
+        &__has-input {
+            /* #ifndef APP-NVUE */
+            width: 100%;
+            /* #endif */
+        }
 	}
 </style>

+ 23 - 0
src/uni_modules/uview-plus/components/u-divider/divider.js

@@ -0,0 +1,23 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 16:58:03
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/divider.js
+ */
+export default {
+    // divider组件
+    divider: {
+        dashed: false,
+        hairline: true,
+        dot: false,
+        textPosition: 'center',
+        text: '',
+        textSize: 14,
+        textColor: '#909399',
+        lineColor: '#dcdfe6'
+    }
+
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-divider/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 是否虚线
         dashed: {
@@ -42,4 +43,4 @@ export default {
             default: () => defProps.divider.lineColor
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-divider/u-divider.vue

@@ -29,9 +29,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addStyle, addUnit } from '../../libs/function/index';
 	/**
 	 * divider 分割线

+ 4 - 3
src/uni_modules/uview-plus/components/u-dropdown-item/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // #ifdef VUE3
         // 当前选中项的value值
@@ -43,4 +44,4 @@ export default {
             default: true
         }
     }
-}
+})

+ 5 - 5
src/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue

@@ -5,14 +5,14 @@
 				height: addUnit(height)
 			}">
 				<view class="u-dropdown-item__options">
-					<up-cell-group>
+					<u-cell-group>
 						<up-cell @click="cellClick(item.value)" :arrow="false" :title="item.label" v-for="(item, index) in options"
 						 :key="index" :title-style="{
 							color: modelValue == item.value ? activeColor : inactiveColor
 						}">
 							<up-icon v-if="modelValue == item.value" name="checkbox-mark" :color="activeColor" size="32"></up-icon>
 						</up-cell>
-					</up-cell-group>
+					</u-cell-group>
 				</view>
 			</scroll-view>
 		</block>
@@ -21,9 +21,9 @@
 </template>
 
 <script>
-    import props from './props';
-    import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+    import { props } from './props';
+    import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, $parent } from '../../libs/function/index';
 	/**
 	 * dropdown-item 下拉菜单

+ 4 - 3
src/uni_modules/uview-plus/components/u-dropdown/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 菜单标题和选项的激活态颜色
         activeColor: {
@@ -57,4 +58,4 @@ export default {
             default: 14
         }
     }
-}
+})

+ 4 - 4
src/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue

@@ -34,9 +34,9 @@
 </template>
 
 <script>
-    import props from './props';
-    import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+    import { props } from './props';
+    import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, sys} from '../../libs/function/index';
 	/**
 	 * dropdown 下拉菜单
@@ -244,7 +244,7 @@
 			&__popup {
 				position: relative;
 				z-index: 10;
-				transition: all 0.3s;
+				transition: transform 0.3s;
 				transform: translate3D(0, -100%, 0);
 				overflow: hidden;
 			}

+ 26 - 0
src/uni_modules/uview-plus/components/u-empty/empty.js

@@ -0,0 +1,26 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 17:03:27
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/empty.js
+ */
+export default {
+    // empty组件
+    empty: {
+        icon: '',
+        text: '',
+        textColor: '#c0c4cc',
+        textSize: 14,
+        iconColor: '#c0c4cc',
+        iconSize: 90,
+        mode: 'data',
+        width: 160,
+        height: 160,
+        show: true,
+        marginTop: 0
+    }
+
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-empty/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 内置图标名称,或图片路径,建议绝对路径
         icon: {
@@ -57,4 +58,4 @@ export default {
             default: () => defProps.empty.marginTop
         }
     }
-}
+})

+ 3 - 3
src/uni_modules/uview-plus/components/u-empty/u-empty.vue

@@ -31,9 +31,9 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
 	import { addUnit, addStyle, deepMerge } from '../../libs/function/index';
 	/**
 	 * empty 内容为空

+ 24 - 0
src/uni_modules/uview-plus/components/u-form-item/formItem.js

@@ -0,0 +1,24 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 17:04:32
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/formItem.js
+ */
+export default {
+    // formItem 组件
+    formItem: {
+        label: '',
+        prop: '',
+        rules: [],
+        borderBottom: '',
+        labelPosition: '',
+        labelWidth: '',
+        rightIcon: '',
+        leftIcon: '',
+        required: false,
+        leftIconStyle: '',
+    }
+}

+ 7 - 6
src/uni_modules/uview-plus/components/u-form-item/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // input的label提示语
         label: {
@@ -12,9 +13,9 @@ export default {
             default: () => defProps.formItem.prop
         },
         // 绑定的规则
-        rule: {
-            type: String,
-            default: () => defProps.formItem.rule
+        rules: {
+            type: Array,
+            default: () => defProps.formItem.rules
         },
         // 是否显示表单域的下划线边框
         borderBottom: {
@@ -51,4 +52,4 @@ export default {
             default: () => defProps.formItem.leftIconStyle,
         }
     }
-}
+})

+ 27 - 8
src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="u-form-item">
+	<view class="u-form-item" :class="{'u-form-item--error':(!!message && parentData.errorType === 'message')}">
 		<view
 			class="u-form-item__body"
 			@tap="clickHandler"
@@ -75,10 +75,10 @@
 </template>
 
 <script>
-	import props from './props';
-	import mpMixin from '../../libs/mixin/mpMixin';
-	import mixin from '../../libs/mixin/mixin';
-	import defProps from '../../libs/config/props.js';
+	import { props } from './props';
+	import { mpMixin } from '../../libs/mixin/mpMixin';
+	import { mixin } from '../../libs/mixin/mixin';
+	import defProps from '../../libs/config/props.js'
 	import color from '../../libs/config/color';
 	import { addStyle, addUnit, getProperty, setProperty, error } from '../../libs/function/index';
 	/**
@@ -87,12 +87,12 @@
 	 * @tutorial https://ijry.github.io/uview-plus/components/form.html
 	 * @property {String}			label			input的label提示语
 	 * @property {String}			prop			绑定的值
-	 * @property {String}			rule			绑定的规则
+	 * @property {Array}			rules			绑定的规则
 	 * @property {String | Boolean}	borderBottom	是否显示表单域的下划线边框
 	 * @property {String | Number}	labelWidth		label的宽度,单位px
 	 * @property {String}			rightIcon		右侧图标
 	 * @property {String}			leftIcon		左侧图标
-	 * @property {String | Object} leftIconStyle 左侧图标的样式
+	 * @property {String | Object} leftIconStyle    左侧图标的样式
 	 * @property {Boolean}			required		是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 (默认 false )
 	 *
 	 * @example <u-form-item label="姓名" prop="userInfo.name" borderBottom ref="item1"></u-form-item>
@@ -116,7 +116,8 @@
 					// 错误提示方式
 					errorType: 'message'
 				},
-				color: color
+				color: color,
+				itemRules: []
 			}
 		},
 		// 组件创建完成时,将当前实例保存到u-form中
@@ -129,6 +130,15 @@
 			this.init()
 		},
 		emits: ["click"],
+		watch: {
+			// 监听规则的变化
+			rules: {
+				immediate: true,
+				handler(n) {
+					this.setRules(n);
+				},
+			},
+		},
 		methods: {
 			addStyle,
 			addUnit,
@@ -139,6 +149,15 @@
 					error('u-form-item需要结合u-form组件使用')
 				}
 			},
+			// 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
+			setRules(rules) {
+				// 判断是否有规则
+				if (rules.length === 0) {
+					this.itemRules = [];
+					return
+				};
+				this.itemRules = rules;
+			},
 			// 获取父组件的参数
 			updateParentData() {
 				// 此方法写在mixin中

+ 22 - 0
src/uni_modules/uview-plus/components/u-form/form.js

@@ -0,0 +1,22 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-20 16:44:21
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-20 17:03:49
+ * @FilePath     : /u-view2.0/uview-ui/libs/config/props/form.js
+ */
+export default {
+    // form 组件
+    form: {
+        model: {},
+        rules: {},
+        errorType: 'message',
+        borderBottom: true,
+        labelPosition: 'left',
+        labelWidth: 45,
+        labelAlign: 'left',
+        labelStyle: {}
+    }
+}

+ 4 - 3
src/uni_modules/uview-plus/components/u-form/props.js

@@ -1,5 +1,6 @@
-import defProps from '../../libs/config/props.js';
-export default {
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
     props: {
         // 当前form的需要验证字段的集合
         model: {
@@ -43,4 +44,4 @@ export default {
             default: () => defProps.form.labelStyle
         }
     }
-}
+})

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor