diff --git a/uni_modules/uview-plus/README.md b/uni_modules/uview-plus/README.md
index 3594d52..d9e44df 100644
--- a/uni_modules/uview-plus/README.md
+++ b/uni_modules/uview-plus/README.md
@@ -1,90 +1,74 @@
-
-
-
-uview-plus 3.0
-多平台快速开发的UI框架
-
-[](https://github.com/ijry/uview-plus)
-[](https://github.com/ijry/uview-plus)
-[](https://github.com/ijry/uview-plus/issues)
-[](https://gitee.com/jry/uview-plus/releases)
-[](https://en.wikipedia.org/wiki/MIT_License)
-
-## 说明
-
-【文档有广告,不喜勿入谢谢】
-
-uview-plus,是uni-app全面兼容vue3/nvue/鸿蒙/uni-app-x(已经发布https://ext.dcloud.net.cn/plugin?name=uview-ultra)的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
-
-## 版本
-
-### uview-plus v3 (uni-app版本)
-1. 保持选项式API,尽可能兼容原有uview2各种API,比如mixins,方便大家升级更容易;
-2. 新手友好,保持原汁原味js,二次开发方便,未使用typescript重写,但带有独立的类型申明包;
-
-### uview-ultra v4 (uni-app-x版本)
-1. 尽可能保持原有组件的API一致,方便大家升级;
-2. 使用uts + 组合式API架构级全新重构,但仍然保持源码的简易,不封装过于复杂,便于修改。
-
-## 可视化设计
-
-uview-plus现已推出免费可视化设计,可以方便的进行页面可视化设计,导出源码即可使用。极大提高前端页面开发效率;如产品经理设计师直接使用更可作为高保真高可用原型制作工具,让设计稿即代码,无需传统的设计稿开发还原步骤。
-
-
-
-
-
-## 文档
-[官方文档:https://uview-plus.jiangruyi.com](https://uview-plus.jiangruyi.com)
-[备用文档:https://uiadmin.net/uview-plus](https://uiadmin.net/uview-plus)
-
-
-## 预览
-
-您可以通过**微信**扫码,查看最佳的演示效果。
-
-
-
-| H5 | 微信小程序 | 安卓 | 鸿蒙Next(已上架) |
-| --- | --- | --- | --- |
-|
|
|
|
|
-
-
-
-
-## 链接
-
-- [官方文档](https://uview-plus.jiangruyi.com)
-- [更新日志](https://uview-plus.jiangruyi.com/components/changelog.html)
-- [升级指南](https://uview-plus.jiangruyi.com/components/changeGuide.html)
-- [关于我们](https://uview-plus.jiangruyi.com/cooperation/about.html)
-
-
-## 关于PR
-
-> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uview-plus是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
-> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
-
-## 安装
-
-#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?name=uview-plus](https://ext.dcloud.net.cn/plugin?name=uview-plus)
-
-请通过[官网安装文档](https://uview-plus.jiangruyi.com/components/install.html)了解更详细的内容
-
-## 快速上手
-
-请通过[快速上手](https://uview-plus.jiangruyi.com/components/quickstart.html)了解更详细的内容
-
-## 使用方法
-配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
-
-```html
-
-
-
-```
-
-## 版权信息
-uview-plus遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uview-plus应用到您的产品中。
-
-Root 组件基于上游项目 `uni-ku/root` 二次开发,已按 MIT 要求保留其原始授权文件:`libs/root/LICENSE`。
+
+
+
+uview-plus 3.0
+多平台快速开发的UI框架
+
+[](https://github.com/ijry/uview-plus)
+[](https://github.com/ijry/uview-plus)
+[](https://github.com/ijry/uview-plus/issues)
+[](https://gitee.com/jry/uview-plus/releases)
+[](https://en.wikipedia.org/wiki/MIT_License)
+
+## 说明
+
+uview-plus,是uni-app全面兼容vue3/nvue/鸿蒙/uni-app-x的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
+
+## 可视化设计
+
+uview-plus现已推出免费可视化设计,可以方便的进行页面可视化设计,导出源码即可使用。极大提高前端页面开发效率;如产品经理设计师直接使用更可作为高保真高可用原型制作工具,让设计稿即代码,无需传统的设计稿开发还原步骤。
+
+
+
+
+
+## 文档
+[官方文档:https://uview-plus.jiangruyi.com](https://uview-plus.jiangruyi.com)
+[备用文档:https://uiadmin.net/uview-plus](https://uiadmin.net/uview-plus)
+
+
+## 预览
+
+您可以通过**微信**扫码,查看最佳的演示效果。
+
+
+
+
+## 链接
+
+- [官方文档](https://uview-plus.jiangruyi.com)
+- [更新日志](https://uview-plus.jiangruyi.com/components/changelog.html)
+- [升级指南](https://uview-plus.jiangruyi.com/components/changeGuide.html)
+- [关于我们](https://uview-plus.jiangruyi.com/cooperation/about.html)
+
+## 交流反馈
+
+欢迎加入我们的QQ群交流反馈:[点此跳转](https://uview-plus.jiangruyi.com/components/addQQGroup.html)
+
+## 关于PR
+
+> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uview-plus是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
+> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
+
+## 安装
+
+#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?name=uview-plus](https://ext.dcloud.net.cn/plugin?name=uview-plus)
+
+请通过[官网安装文档](https://uview-plus.jiangruyi.com/components/install.html)了解更详细的内容
+
+## 快速上手
+
+请通过[快速上手](https://uview-plus.jiangruyi.com/components/quickstart.html)了解更详细的内容
+
+## 使用方法
+配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
+
+```html
+
+
+
+```
+
+## 版权信息
+uview-plus遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uview-plus应用到您的产品中。
+
diff --git a/uni_modules/uview-plus/changelog.md b/uni_modules/uview-plus/changelog.md
index 181c58b..34ec52d 100644
--- a/uni_modules/uview-plus/changelog.md
+++ b/uni_modules/uview-plus/changelog.md
@@ -1,2375 +1,623 @@
-## 3.8.82
-fix: App 端内置图标字体改为包内本地加载
-
-- App / App-nvue 内置 u-icon 字体改为从包内 upicon.ttf 加载,不再依赖 alicdn 网络请求(#1044)
-- 使用 upicon.ttf?url 由构建产物发射本地字体资源,配合 uni.loadFontFace / weex addRule,避免弱网阻塞页面渲染
-- 无需手动拷贝到 static,也无需 npm postinstall hook
-
-## 3.8.81
-fix: 修复全局 mixin 的 $u 缓存未声明导致 Vue3 开发警告
-
-- 将 $u 计算属性缓存从未声明的 chacheU 改为内部实例非响应式缓存,避免全局 mixin 注入后每个组件实例渲染都触发警告(#1045)
-- 主题变化时同步清空新的 $u 缓存,保持运行时主题刷新行为不变
-
-## 3.8.80
-fix: 修复 swipeAction 关闭态右侧删除按钮露边
-
-- H5 关闭态内容层与容器之间可能出现 1px 亚像素缝隙,右侧删除按钮红色底会透出(#843)
-- 为内容层补全覆盖与同色 box-shadow 封边,并强化容器合成层裁剪
-
-## 3.8.79
-fix: 适配鸿蒙 platform/UA 检测,并修复 u-image flex 压缩
-
-- u-sticky / gcanvas bridge-weex 显式识别 harmony/harmonyos/ohos,消除鸿蒙静态检查告警(#1028)
-- u-image 在 flex 布局下增加防压缩尺寸策略,修正 radius 字符串判断
-
-## 3.8.78
-fix: 完善 u-dragsort 禁用拖拽逻辑
-
-- 全局 draggable 为 false 时,onTouchStart 不再写入 dragIndex
-- 避免 Android 禁用场景下出现小范围漂浮与阴影(关联 #854)
-
-## 3.8.77
-修复 index.js 在 H5 环境下组件自动注册逻辑,移除对 import.meta.glob 的运行时函数判断。
-确保 Vite 编译期宏可以正常展开,避免全局组件注册被误跳过。
-
-## 3.8.76
-统一 up-canvas 画布承载,迁移二维码、条形码、裁剪、海报、上传等组件的直接 canvas 使用。
-补充 up-canvas 跨端绘制、导出、像素读写能力,并增加对应组件文档。
-
-## 3.8.75
-fix: 调整 up-button 默认宽度语义
-
-- 将非 nvue 普通按钮默认宽度从 100% 改为 auto,避免在横向布局中挤压相邻内容。
-- size="large" 仍保持全宽表现;需要普通按钮全宽时请显式设置 custom-style 或外层容器宽度。
-- 同步更新 Button 文档提示默认宽度语义变化。
-
-## 3.8.74
-fix: 修复waterfall组件在列高未稳定时可能只渲染左侧一列的问题
-fix: 调整markdown组件marked依赖为mjs模块导入,提升打包解析兼容性
-
-## 3.8.73
-修复 u-calendar 页面内模式弹层安全区配置不足
-
-- u-calendar 新增 overlay、duration、overlayStyle、overlayOpacity、zIndex、safeAreaInsetBottom、safeAreaInsetTop、bgColor 等常用 u-popup 透传属性
-- pageInline 模式可通过 safeAreaInsetBottom=false 关闭底部安全区,默认行为保持不变
-- 同步补充 TypeScript 类型声明与静态校验
-
-## 3.8.72
-修复 pagination 总数和每页条数选择展示问题
-
-- total 布局项改为展示总记录数,移除误显示当前页的调试文本
-- 恢复 sizes 布局项的每页条数选择器,并兼容数字数组与 { label, value } 配置
-
-## 3.8.71
-修复 line-progress 默认参数错配导致默认进度宽度异常
-
-- 修正 inactiveColor 与 percentage 默认值读取字段,避免默认渲染计算出 NaNpx
-- 补充 fromRight 类型声明,完善从右往左加载能力提示
-- 补充 line-progress 示例默认配置场景,并同步文档说明
-
-## 3.8.70
-feat: u-tooltip 新增 singleton 单例打开能力
-
-- 新增 singleton 属性,开启该属性的 tooltip 同一页面同时只显示一个
-- 默认值为 false,保持现有多 tooltip 同时展示行为不变
-- close 时同步触发 update:show,便于 manual 模式外部状态保持一致
-
-## 3.8.69
-修复 navbar 全局左侧点击拦截器无法获取组件实例
-
-## 3.8.68
-修复 action-sheet 描述文本边距不生效问题
-
-## 3.8.67
-fix: 修复 pageInline 在 nvue 下不显示
-
-## 3.8.66
-fix: 修复 u-number-box 在 integer=false 时无法调出小数点键盘
-
-- integer=false 时 input type 使用 digit,integer=true 时仍使用 number
-- 同步覆盖微信小程序与 APP/H5 等非微信端
-
-## 3.8.64
-fix: 修复 up-textarea 开启 count 时 v-model 为空值导致报错
-
-- 字数统计改为安全取值,避免 null/undefined 访问 length
-- 外部绑定值与输入值统一做字符串归一化
-
-## 3.8.63
-chore: 给radio和checkbox组件添加选中样式名及插槽变量
-
-## 3.8.62(2026-07-07)
-fix: 修复avatar语法问题
-
-## 3.8.61(2026-07-06)
-fix:(up-avbar) : 优化安全区背景渲染
-fix(up-color-picker): 增加box-sizing解决content padding撑开宽度问题
-
-保留up-status-bar作为透明占位,将navbar背景统一设置到外层容器,并让内容区透明以支持渐变和图片背景连续覆盖。
-
-## 3.8.60(2026-06-30)
-fix: 添加 uni API shim 防止支付宝等平台缺失 onWindowResize 导致报错
-
-支付宝小程序等平台不支持 uni.onWindowResize / uni.offWindowResize,导致 u-tabs、u-subsection 等组件运行时报错。新增 uni-api-shims.js 模块,在库初始化时按能力检测并自动补齐缺失 API 为空实现,确保所有平台均可正常加载。
-
-## 3.8.59(2026-06-29)
-feat: 优化组件 props 默认配置按需加载
-
-- 将全局 props 默认配置从“集中静态导入所有组件”改为懒注册机制,避免单个组件 props 加载时拉入全部组件默认配置。
-- 各组件 `props.js` 改为只导入并注册自身默认 props,降低按需使用场景下的依赖体积。
-- `setConfig({ props })` 改为写入共享懒加载 props store,继续兼容组件加载前后的全局默认值覆盖。
-- 恢复并保留 `uni.$u.props` 运行时访问与直接赋值能力。
-- 新增 props lazy-loading 验证脚本,覆盖全量导入检查、默认值补齐、用户覆盖优先和入口配置接入。
-
-## 3.8.58(2026-06-23)
-feat: forward markdown parse link events
-
-## 3.8.57(2026-06-21)
-fix: 修复 table2 超出隐藏失效并补齐表格属性行为
-
-为 table2 单元格内容增加稳定宽度约束和默认文本截断包装,兼容 H5、小程序及 nvue 下 showOverflowTooltip 的单行省略表现。
-同时补齐 rowStyle、defaultExpandAll、lazy/load、排序配置和 context 透传等表格属性的实际行为。
-
-## 3.8.56(2026-06-16)
-fix 修复 table2 超出隐藏失效问题
-
-## 3.8.55(2026-06-12)
-fix: 完善日历今天按钮的区间模式表现及修复小程序多输入框切换时 blur 格式化视图不刷新
-
-- 问题出现在小程序真机多个输入框切换场景中,A 输入框在 blur 回调里完成格式化后,点击 B 输入框会导致数据已更新但 A 的显示值未及时同步。本次修改在 u-input 内部记录 blur 时的原始值,并在 modelValue 回流阶段识别 blur 后的外部格式化结果,允许该结果覆盖 innerValue,避免被 changeFromInner 保护逻辑拦截。这样在点击其他输入框触发 blur 时,格式化结果也能正确更新到视图。
-- 避免日期区间模式点击今天时清空已有选中范围,同时提供今天日期的独立高亮能力。新增 todayColor 配置、组件透传与类型声明,并调整 range 模式下今天按钮仅定位不选中。single 模式保持点击今天直接选中,range 模式保留原区间并定位到今天。
-
-## 3.8.54(2026-06-11)
-fix(calendar): 修复今天按钮点击后未选中日期的问题
-
-今天按钮在跳转到今天所在月份后,会复用日历原有日期点击逻辑选中今天,并按 showConfirm 配置保持确认行为一致。
-
-## 3.8.53(2026-06-11)
-feat(calendar): 日历顶部增加时分秒选择能力
-
-新增 enableTime、timePrecision、defaultTime 配置,支持单选与区间首尾模式在顶部点击时间区域后弹出居中 picker 进行时间编辑。
-确认返回仍为字符串数组:单选与区间首尾模式返回日期时间字符串;区间 all 模式按约定不展示时间选择并保持原日期数组返回;同日区间增加结束时间不能早于开始时间的校验。
-
-## 3.8.52(2026-06-10)
-fix(table2): 修复微信小程序中重复 slot name="cell" 导致的报错 (#839)
-
-在固定列浮动视图(u-table-fixed-shadow)的 MP-WEIXIN 条件编译块中,
-将 改为直接内联渲染,消除同组件内同名 slot 的冲突。
-微信小程序不允许单个组件实例中出现多个同名 slot,而主表体已占用 "cell",
-固定列视图区仅用于视觉叠加,直接渲染 item.row[col.key] 即可满足需求。
-
-## 3.8.51(2026-06-09)
-fix(picker): 修复异步columns加载时defaultIndex位置不更新的问题 (#841)
-
-问题:当columns从接口动态返回时(初始为空数组,延迟后赋值),
-defaultIndex已提前设置好innerIndex,columns变化时innerIndex值未改变,
-picker-view的:value绑定不触发重新渲染,导致滚动位置停留在第0项。
-
-修复:在setColumns中检测是否有列从空变为有数据,若是则先清空innerIndex,
-再在$nextTick中恢复目标值,强制picker-view重新滚动到defaultIndex指定位置。
-
-## 3.8.50(2026-06-08)
-fix: 修复 pageInline 日历隐藏挂载时首日偏移异常
-
-问题原因:u-calendar 在隐藏容器中挂载时可能获取到 width=0,导致首日 margin-left 计算为 0。
-改动内容:
-1) 非 APP-NVUE 场景首日偏移改为百分比计算,避免依赖运行时宽度。
-2) 宽度获取增加 windowWidth 兜底,降低隐藏挂载导致的布局异常风险。
-影响范围:仅调整 u-calendar/month.vue 的首日偏移与宽度兜底逻辑,不改变选择交互行为。
-
-## 3.8.49(2026-06-05)
-fix(datetime-picker): 修复hasInput模式下点击遮罩无法关闭弹窗的问题
-
-- 在close()方法中补充将showByClickInput置为false的逻辑,
-- 与cancel()和confirm()的处理保持一致,修复issue #759
-
-## 3.8.48(2026-06-04)
-feat(calendar): 新增区间模式返回值格式配置
-
-- 新增 rangeResultMode 配置项,支持 range 模式在 confirm 时返回全部区间日期或仅返回起止日期。
-- 本次改动覆盖默认配置、组件 props、确认回调返回逻辑与 TypeScript 类型声明,默认值为 all 以保持现有行为兼容。
-
-## 3.8.47(2026-06-03)
-扩展 u-datetime-picker 支持小时与秒级时间选择
-
-- 新增 datehour、timesecond、datetimesecond 三种模式,覆盖年月日时与秒级场景\n- 增加 minSecond/maxSecond 配置,并同步列生成、边界计算、回显与变更事件处理\n- 更新 TypeScript 类型定义,确保新模式和秒级属性在项目中可被正确约束
-
-## 3.8.46(2026-06-02)
-fix: 修复DatetimePicker在pageInline模式下无法滚动到默认值问题 #941
-
-pageInline模式下picker-view原生组件常驻显示,Android/HarmonyOS端
-原生组件尚未完成初始化时已渲染为索引0位置,后续更新无法可靠触发滚动。
-
-- updateColumnValue改用$nextTick+条件延时:pageInline时等待100ms
-- mounted新增pageInline兜底:200ms后再次设置索引确保原生组件就绪
-
-## 3.8.45(2026-06-01)
-fix: 修复NumberBox最小值限制导致无法输入新值问题 #914
-
-## 3.8.44(2026-05-31)
-fix: 修复up-tooltip未暴露open/close方法及manual模式失效问题 #1021
-
-- 新增 show prop,支持 triggerMode="manual" 时通过 :show 控制显示
-- 新增 open() / close() 方法并对外暴露
-- 监听 show prop 变化,manual 模式下自动调用 open/close
-- 新增 open / close emit 事件,u-popover 的 @open @close 监听可正常工作
-- 统一内部显示/隐藏逻辑均走 open()/close() 方法
-
-## 3.8.43(2026-05-30)
-fix: 修复小程序中 tabbar midButton 模式图标不显示问题
-
-- 使用 :deep() 选择器替代普通后代选择器,解决 virtualHost:true 导致
-- 父组件 scoped 样式无法传播到子组件根元素的问题。
-
-## 3.8.42(2026-05-29)
-feat: 新增单行日历组件并支持下拉展开完整月历及修复签名组件 clear 方法实现
-
--新增 up-calendar-strip 组件,支持单行横向滚动日期、前后切月、选中态与今天高亮,并受 minDate/maxDate 约束。
--完整模式复用内嵌 up-calendar(pageInline + monthSwitch),支持下拉展开、上拉收起与完整月历选中回写,降低重复代码与维护复杂度。
--同步接入全局默认 props 与 TypeScript 类型声明,并在 calendar 示例页增加可直接验证的演示入口。
-- 修复 Signature 组件对外 clear 方法缺失导致 ref 调用报错的问题。
-- 在 u-signature 中新增 clear 公共方法,统一重置路径与绘制状态并清空画布,同时触发 clear 事件,保持工具栏清空与外部调用行为一致。
-
-## 3.8.41(2026-05-29)
-feat: tabs新增多形态模式并优化示例页吸顶展示
-
-- 新增shapeMode能力,支持capsule/card/pill-arrow/tag四种模式,并补齐props默认配置与类型声明。
-- 完善各模式样式细节与尺寸,优化圆角矩形箭头视觉表现,卡片模式使用轻量阴影增强层次。
-
-## 3.8.40(2026-05-28)
-feat: 新增 up-guide 首屏全屏引导组件,支持开箱即用的一次性引导能力。
-
-## 3.8.39(2026-05-27)
-feat: 新增 tabbar 风格体系与动态图标表现
-
-- 为 tabbar 增加多种内置风格、轻量选中动画与双态图标支持。
-- 扩展示例页覆盖普通场景、NVUE 场景及中间按钮组合用法。
-
-## 3.8.38(2026-05-25)
-add: uni-ku/root上游组建的协议原文
-
-## 3.8.37(2026-05-22)
-feat: 日历组件新增今天按钮并支持快速回到当月
-
-在日历头部增加今天按钮与禁用态,点击后可跳转到今天所在月份;为今天日期增加独立高亮样式且不覆盖用户当前已选日期。同时补充 showToday 配置、类型声明与多语言文案键,保证不同语言和模式下行为一致。
-
-## 3.8.36(2026-05-20)
-fix: 修复 u-parse 链接点击在 iOS 端可能闪退的问题
-
-- 在 u-parse 的两个链接点击入口统一增加 href 规范化与外链判断,避免空值或非法值传入 plus.runtime.openWeb/openURL。
-- 同时将原生外链打开封装为受保护调用并添加异常兜底,降低 APP-PLUS 与 APP-HARMONY 下点击链接导致崩溃的风险。
-
-## 3.8.35(2026-05-19)
-fix: 修复up-input在confirm阶段可能丢失扫码内容
-
-- 问题背景:issue #1011 反馈外接扫码枪场景下,up-input 的 confirm 回调偶发丢码,连续0更明显。
-- 原因分析:组件 onConfirm 直接返回 innerValue,当扫码输入与回车触发节奏接近时,confirm 可能早于最后一次 input 同步,导致取到旧值。
-- 改动说明:onConfirm 优先使用 event.detail.value,若平台未提供该字段再回退到 innerValue,兼容原有行为并降低扫码场景丢码风险。
-## 3.8.34(2026-05-18)
-fix: 仅在 TabBar 页面同步 TabBar 样式
-
-- 在 libs/theme/runtime.js 新增 isTabBarPage 与 trySetTabBarStyle,统一封装 TabBar 页面判断与安全调用。
-- 在 runtime/theme/common mixin 的原生主题同步路径中,全部改为调用 trySetTabBarStyle,不再直接调用 uni.setTabBarStyle。
-
-## 3.8.33(2026-05-17)
-fix: 修复主题变量桥接与 nvue 按钮取色问题
-
-- 调整主题 bridge 的导出位置,避免 legacy light 变量在样式注入后覆盖用户自定义 CSS 变量。
-- 修复 up-button 在 nvue 下的主题取色与 info/plain 样式问题,补充运行时取色兜底,避免按钮颜色错误或主题方法缺失时报错。
-- 同步更新示例接入、版本号与变更记录,保持主题改造后的行为与文档一致。
-
-## 3.8.32(2026-05-14)
-feat: 新增二维码静区配置
-
-- 为 up-qrcode 增加 quietZone 属性,默认值调整为 0。
-- 同步更新二维码绘制逻辑与类型声明,支持按静区宽度控制外层留白。
-
-## 3.8.31(2026-05-14)
-fix: 修复toast组件overlay设置为false时不显示toast的问题 (#1016)
-
-
-## 3.8.30(2026-05-14)
-fix(tooltip): 修复tooltip组件字体大小(size)属性未生效的问题
-
-## 3.8.29(2026-05-13)
-style: 将 Toast 组件硬编码颜色替换为主题变量
-
-- 替换 primary、success、error、warning 类型的背景与边框硬编码颜色
-- 统一接入 $u-{type}-light 与 $u-{type}-disabled 主题变量
-- 增强组件在不同主题下的样式一致性与可维护性
-
-## 3.8.28(2026-05-12)
-style: 优化 up-textarea 组件主题变量与边框样式
-
-- 字数统计区域新增文本颜色主题变量支持
-- 输入框区域重构样式计算,补充背景色、文本色与光标色主题变量
-- 移除原有边框 CSS 类名依赖,改为通过计算属性动态注入边框样式
-- 新增边框颜色计算逻辑,根据亮暗色模式自动适配主题色
-- 修复 H5 端 uni-app 默认包装器样式冲突,统一背景、边框与占位符颜色
-
-## 3.8.27(2026-05-11)
-feat: 新增 nativeThemeSync 配置控制原生UI主题同步
-
-- 在 config 中新增 nativeThemeSync 选项,默认值为 false
-- 在 theme.js 与 runtime.js 的 applyNativeThemeUI 中增加配置拦截,未开启时跳过原生导航栏、页面背景及 tabBar 的样式同步
-- 补充 TypeScript 类型定义,明确默认关闭以避免升级覆盖项目已有的 pages.json 或 theme.json 全局样式
-- 更新验证脚本,增加对该配置开关行为的断言测试
-## 3.8.26(2026-05-11)
-fix: 修复海报组件多行文本截断与省略号渲染问题
-
-- 提取省略号宽度计算与截断逻辑为独立辅助函数,提升代码可维护性
-- 修正达到最大行数时的截断流程,确保末行正确计算宽度并添加省略号
-- 调整换行后当前行字符的赋值时机,避免首字符丢失或渲染状态错乱
-- 补充文件末尾缺失的换行符以符合代码规范
-
-## 3.8.25(2026-05-10)
-fix: 修复H5安装时写入页面背景
-
-- 移除主题初始化时对html、body和#app背景色的内联写入,避免use(uviewPlus)覆盖业务页面背景。
-- 补充运行时主题回归断言,确保H5仍同步data-up-theme但不再改写宿主页面背景样式。
-
-## 3.8.24(2026-05-09)
-fix: 合并 up-slider 组件重复的 mounted 生命周期钩子
-
-- 将原本分散的两个 mounted 钩子合并为单个 async mounted
-- 确保高度/尺寸赋值与滑块 DOM 尺寸获取逻辑在同一钩子内顺序执行
-- 移除底部重复的生命周期代码块,修复因 Vue 钩子执行顺序不确定导致的 init 初始化异常
-
-## 3.8.23(2026-05-09)
-style: 弹窗组件支持主题变量动态设置指示器与关闭图标颜色
-
-- 将底部横条指示器背景色替换为 --up-light-color 主题变量
-- 将关闭图标颜色替换为 --up-content-color 主题变量
-- 新增 indicatorStyle 与 closeIconColor 计算属性实现动态绑定
-- 同步更新 CSS 与内联样式,移除硬编码颜色值以提升多主题适配能力
-
-## 3.8.22(2026-05-08)
-style: 优化 up-input 组件边框样式与主题变量适配
-
-- 移除原有的 u-border 和 u-border-bottom 工具类,改为通过内联样式动态控制边框
-- 新增 inputBorderColor 计算属性,支持通过 --up-input-border-color 主题变量自定义边框颜色
-- 适配深色模式,默认边框颜色根据主题状态自动切换为半透明白色或浅色边框
-- 统一将边框宽度设置为 0.5px,提升多端显示的一致性
-
-## 3.8.21(2026-05-07)
-fix: 修正索引锚点默认背景色识别逻辑
-
-- 扩展默认背景色判断条件,兼容 #f1f1f1 与 #dedede
-- 更新主题变量回退默认值为 #f1f1f1 以匹配新版设计
-
-## 3.8.20(2026-05-06)
-feat: 表单标签颜色支持主题变量动态适配
-
-- 新增 labelDynamicStyle 计算属性,动态读取 --up-main-color 主题变量
-- 将动态样式注入标签元素,实现表单标签颜色随主题配置自动切换
-
-## 3.8.19(2026-04-30)
-feat: 为日期时间选择器遮罩层添加暗色模式自适应样式
-
-- 新增 resolvedMaskStyle 计算属性,优先返回外部传入的 maskStyle
-- 未传入自定义样式且处于暗色主题时,自动注入渐变背景以适配深色模式
-- 替换模板中的遮罩样式绑定,避免硬编码并提升主题切换兼容性
-
-## 3.8.18(2026-04-29)
-fix: 规避 H5 主题切换时的导航栏 page not found 报错
-
-为主题系统中的 setNavigationBarColor 调用增加活动页面判断,并对调用失败做静默兜底,避免 H5 启动或路由切换早期抛出 page not found。背景色与 tabBar 同步逻辑保持不变。
-## 3.8.17(2026-04-29)
-refactor: 将 Cell 组件颜色引用替换为主题变量
-
-- up-cell-group 标题文本颜色改用 upThemeVar 动态获取
-- up-cell 禁用态、标题、描述及值颜色统一替换为主题变量
-- 点击态背景色 SCSS 变量改为依赖 CSS 变量 --up-hover-bg-color
-- 移除对 $u.color 的直接依赖,提升主题切换兼容性
-
-## 3.8.16(2026-04-28)
-style: 统一下拉刷新组件与示例页的文本及图标颜色
-
-- 为示例页列表项、提示文本及表情图标补充对应样式类名
-- 组件下拉与释放状态的箭头图标显式指定内容色 CSS 变量
-- 将组件提示文本颜色由内容色变量调整为主色变量以统一视觉
-
-## 3.8.15(2026-04-28)
-style: 统一协议组件文本颜色为主题变量
-
-- 为协议页面标题、自定义内容及正文应用主色变量
-- 将协议内联链接颜色替换为主题主色变量
-- 为 up-agreement 组件容器设置默认文本主色
-
-## 3.8.14(2026-04-27)
-refactor: up-action-sheet 组件样式适配主题变量
-
-- 模板中硬编码颜色替换为动态计算属性,统一通过 upThemeVar 获取主题色
-- 新增标题、描述、关闭图标、分割线及取消按钮区域的颜色动态样式绑定
-- 修复 SCSS 变量 description-color 误赋值为字号的缺陷
-- 样式层全面迁移至 CSS 变量,确保组件在暗黑模式与自定义主题下正确渲染
-
-## 3.8.13(2026-04-26)
-feat: 重构 up-tree 组件并新增手风琴、高亮及复选框控制
-
-- 移除独立子组件,采用扁平化 visibleNodes 计算属性重构渲染逻辑
-- 新增手风琴模式、当前节点高亮及自定义缩进/展开图标配置
-- 完善复选框联动机制,支持半选状态、父子级联与严格模式切换
-- 暴露 setCheckedKeys、getCheckedKeys 等实例方法支持编程式控制
-- 补充 node-expand、current-change 等事件以增强交互反馈
-- 同步更新示例页,覆盖基础展示、自定义插槽、复选框及手风琴场景
-
-## 3.8.12(2026-04-24)
-style: 添加骨架屏演示区块标题样式
-
-## 3.8.11(2026-04-24)
-refactor: 新增日历组件单月模式演示并重构示例页主题逻辑
-
-- 统一示例页主题适配逻辑,移除旧版事件监听,改用 upThemeIsDark 与 upThemeVar 动态计算样式
-- 组件列表页增加 page-meta 导航栏配置,实现状态栏与导航栏颜色随主题自动切换
-- 日历组件示例新增单月切换模式,覆盖单选、日期区间及多选三种场景
-- 加载页示例补充 color 属性配置,完善自定义加载动画演示
-- 个人中心页增加 applyNativeThemeUI 方法存在性校验,提升原生主题调用安全性
-
-## 3.8.10(2026-04-24)
-refactor: 重构主题系统并扩展深浅色模式变量
-
-- 统一主题状态管理,引入版本号机制与运行时同步函数,优化组件主题切换响应
-- 扩展 CSS 变量体系,新增 hover、表格、骨架屏等组件专属背景色及主色深浅变体
-- 优化 NVUE 平台兼容性,分离样式导入逻辑并动态计算页面最小高度
-- 重构全局 Mixin 与页面导航组件,抽离主题计算逻辑至独立运行时模块
-- 完善原生 UI 主题适配,支持 TabBar 与导航栏随深浅色模式自动切换
-
-## 3.8.9(2026-04-23)
-feat: 新增 nvue 运行时主题支持与全局主题 API
-
-- 新增 runtime.js 模块,提供主题变量动态解析、本地存储同步及原生 UI 样式应用逻辑
-- 重构 Vite 插件转换逻辑,为 nvue 页面自动注入主题根组件及响应式 Mixin/Composables
-- 在 Vue 全局属性中注册 upThemeIsDark、upThemeVar 等辅助方法,简化组件内主题调用
-- 优化主题构建逻辑,新增导航栏背景色变量支持及 TabBar 样式动态适配
-- 新增 nvue-root.vue 根组件,统一处理 nvue 页面主题刷新与系统主题变更事件监听
-
-## 3.8.8(2026-04-23)
-fix: 修复nvue下白屏报错URL is not defined和 Cannot set property 'getRect' of undefined
-
-## 3.8.7(2026-04-22)
-feat: 日历组件新增单月切换模式并适配主题变量
-
-- 新增 monthSwitch 属性,支持非滚动的单月切换展示模式
-- 头部新增上/下一月及上/下一年切换按钮,并实现越界禁用逻辑
-- 重构组件样式,将硬编码颜色替换为 CSS 变量以完善主题适配
-- 优化单月模式下的月份索引计算与容器高度动态调整逻辑
-- 调整日期范围选中背景色透明度,提升暗黑模式下的视觉对比度
-
-## 3.8.6(2026-04-22)
-fix: 修复商品SKU未完全选择时仍可购买的问题
-
-- 修改 canBuy 计算属性中已选SKU数量的统计逻辑
-- 过滤值为空字符串的SKU选项,仅统计实际已选择的规格
-- 避免初始化空值导致购买按钮状态判断错误
-
-## 3.8.5(2026-04-21)
-fix: 修复 up-choose 组件 modelValue 更新不同步问题
-
-- 移除 created 生命周期中的初始赋值逻辑
-- 新增 watch 监听 modelValue 并设置 immediate: true
-- 确保外部传入的 modelValue 变化时能实时同步至 currentIndex
-- 补充文件末尾换行符以符合规范
-
-## 3.8.4(2026-04-20)
-fix(u-rate): 增强数值校验与边界处理,修复计算异常
-
-- 新增 normalizeActiveIndex 等辅助方法,统一处理评分值的类型转换与 minCount/count 边界限制
-- 对 DOM 节点获取的 left 和 width 增加 Number.isFinite 校验,避免 NaN 导致布局计算崩溃
-- 优化 emitEvent 逻辑,在触发 change 及双向绑定更新前进行值归一化,防止无效值传播
-- 在触摸与点击事件处理前调用 ensureRateMetrics,确保尺寸数据有效后再执行坐标计算
-- 移除直接读取 prop 的硬编码逻辑,提升组件在异常传参或异步渲染场景下的稳定性
-
-## 3.8.3(2026-04-19)
-fix: 修复日期时间选择器快速滚动越界与空值异常
-
-- 新增 safeColumnValue 与 toInt 辅助方法,安全读取滚动列数据并统一类型转换
-- 优化 change 事件处理逻辑,使用 range 严格限制年月日时分在合法区间内,防止越界
-- 增强 intercept 方法容错性,处理 undefined/null 输入并转为字符串匹配,避免正则报错
-- 补充列数据生成兜底逻辑,快速滚动导致日列范围异常时自动回退至当月天数或默认 31 天
-- 完善 show 监听与 close 方法,在含输入框模式下关闭选择器时同步重置 showByClickInput 状态
-
-## 3.8.2(2026-04-17)
-fix: 修复级联选择器仅回显未改动时确认返回空数组的问题
-
-- 提取 getSelectedValues 方法统一处理选中值获取逻辑,消除重复代码
-- 初始化时若 modelValue 为空则显式清空 confirmValues,避免状态残留
-- 数据回显后同步更新 confirmValues,确保未手动修改直接确认时能正确返回默认值
-- 优化 handleConfirm 逻辑,优先使用已同步的确认值,提升事件触发准确性
-
-## 3.8.1(2026-04-16)
-feat(select): 增强下拉框样式能力并补充 100% 宽度示例
-
-- 新增 up-select 的边框样式能力与下拉面板宽度配置,便于构建接近 PC Select 的交互样式。
-- 新增 border 属性:支持为触发区显示边框、圆角和内边距(默认关闭,保持兼容)
-- 新增 optionsWidth 属性:支持 String/Number,允许 px/rpx/% 等宽度控制
-- 优化下拉面板定位逻辑,保留溢出时左右对齐修正行为
-- 更新 select 示例页:新增“边框与下拉宽度”示例,并改为 100% 宽度展示
-
-## 3.8.0(2026-04-16)
-feat: 新增暗黑模式支持完成全链路适配与主题能力统一
-
-【架构设计】
-1. 建立主题变量分层:新增核心令牌层 theme-vars-core(统一定义亮/暗主题语义变量),并通过 theme-vars 进行聚合输出。
-2. 建立组件主题扩展层:为 navbar/notice-bar/subsection/switch/tag 等组件新增独立 theme-vars 文件,按组件边界管理主题差异,降低跨组件耦合。
-3. 建立运行时主题层:新增 libs/theme/theme.js,结合全局 mixin 与入口注入实现主题状态读取、切换与分发,形成“变量定义 -> 运行时注入 -> 组件消费”的闭环。
-
-【关键改动范围】
-1. 基础设施:App.up.vue、common/mixin.js、pages.json、manifest.json、theme.json 及全局样式入口同步调整。
-2. 组件库:大规模修复表单、导航、反馈、布局、展示类组件在暗黑模式下的背景、文字、边框、占位符、选中态对比度问题。
-3. 示例页与模板页:对示例与业务模板页进行暗黑联调,减少页面级重复 pageStyle 覆盖,统一回归到主题变量驱动。
-
-【兼容性与收益】
-1. 保持组件 API 行为不变,主要为样式与主题渲染层升级。
-2. 统一暗黑适配策略,减少页面散落样式补丁,后续新增组件可按统一主题规范快速接入。
-3. 提升微信小程序/H5 场景下暗色模式的一致性与可维护性。
-
-## 3.7.38(2026-04-16)
-feat(root): 支持全局Toast/Notify注入与调用及新增 root 模块构建缓存兼容垫片
-
-- Root 注入宿主统一承载 up-toast 与 up-notify,并注册 upGlobalToastRef/upGlobalNotifyRef
-- 新增 uni..rootNotify / setRootNotifyRef,并完善 rootToast 全局调用链路
-- Root 模板注入改为 -root-toast-host,避免 easycom 干扰
-- 补充 TypeScript 声明与 App.up.vue 全局调用示例
-- 提供透传函数 createGlobalUpRoot 以兼容旧版缓存引用
-- 防止增量构建缓存残留导致模块加载异常
-- 明确新架构已不再依赖该文件,仅作为过渡期保留
-
-## 3.7.37(2026-04-16)
-feat:新增全局root-view组件接入全局根容器注入并完善页面匹配
-
- - 新增 App.up 根容器与 libs/root 插件链路,自动注册 global-up-root 并包裹页面模板。
- - 支持 pages.json 页面按真实文件扩展名匹配(.vue/.nvue/.uvue),避免 nvue 页面漏注入。
- - 修复模板起始偏移为 0 时的注入边界判断,确保首行 template 也能正确注入。
- - 在 vite.config.ts 接入 UniUpRoot 插件默认配置。
-
-## 3.7.36(2026-04-15)
-fix: stepsItem.d.ts ts插槽name更新 #940
-
-## 3.7.35(2026-04-14)
-fix: timeFormat方法支持多种ISO格式
-
-## 3.7.34(2026-04-14)
-fix: up-waterfall组件告警void app logic that relies on enumerating keys on a component instance #993
-
-## 3.7.33(2026-04-14)
-fix: up-waterfall组件告警void app logic that relies on enumerating keys on a component instance #993
-
-## 3.7.32(2026-04-12)
-fix: up-picker添加默认背景色 防止其他使用该组件的没有配置背景色导致奇怪的样式
-
-## 3.7.31(2026-04-10)
-fix: up-cascader垂直头部点击节点切换
-
-
-## 3.7.30(2026-03-31)
-fix: pagination分页组件小程序上展示问题
-
-## 3.7.29(2026-03-23)
-fix: 修复 popup 弹出层背景色修改后,在小程序端默认背景色还存在
-
-## 3.7.28(2026-03-21)
-feat: 添加 up-switch 组件的圆点颜色属性
-
-## 3.7.27(2026-03-12)
-improvment: 优化up-form的错误提示message字段类型
-
-## 3.7.26(2026-03-09)
-add: up-select增加禁用功能
-
-## 3.7.25(2026-03-07)
-fix: 优化up-coupon规范化scss
-
-## 3.7.24(2026-03-06)
-fix: 修复up-table2 组件在小程序不显示单元格内容的问题
-
-## 3.7.23(2026-03-06)
-fix: up-cascader在开启auto-close时最后层级选择后未触发confirm
-
-## 3.7.22(2026-03-05)
-improvment: floatButton组件示例改为组合式API
-
-## 3.7.21(2026-03-05)
-feat: 新增禁用 iOS Safari 下拉刷新工具类、移除 H5 端图标复制限制、优化 u-copy 组件注释
-
-## 3.7.20(2026-02-26)
-improvement:box组件示例改为组合式API
-
-## 3.7.19(2026-02-25)
-improvement:agreement组件示例改为组合式API
-
-## 3.7.18(2026-02-24)
-improvement:barcode组件示例改为组合式API
-
-## 3.7.17(2026-02-11)
-fix: 修复steps组件current失效
-
-## 3.7.16(2026-02-09)
-improvment: choose组件示例改为组合式API
-
-## 3.7.14(2026-02-08)
-refactor: up-signature组件改用up-canvas组件
-
-## 3.7.13(2026-02-07)
-add: 新增up-canvas组件
-
-## 3.7.12(2026-02-07)
-improvment: 优化签名组件兼容性修复微信小程序支持
-
-## 3.7.11(2026-02-06)
-add: action-sheet组件新增nameKey和subnameKey属性
-
-## 3.7.10(2026-02-06)
-add: checkbox-group组件的change事件增加第二个返回参数为当前触发变化的checkbox组件name信息等
-
-## 3.7.9(2026-02-06)
-fix: 修复align-self属性值缺少d导致样式不生效的问题
-
-## 3.7.8(2026-02-05)
-improvment: 优化card组件示例
-
-## 3.7.7(2026-02-05)
-add: select组件新增closeSelect方法用于自定义控制关闭
-
-
-## 3.7.6(2026-02-04)
-add: picker组件示例onLoad后加载数据
-
-## 3.7.5(2026-02-03)
-add: up-slider组件新增垂直模式
-
-## 3.7.4(2026-02-03)
-add: box组件props优化及新增leftIcon/leftTitle/rightTopIcon/rightTopTitle/rightBottomIcon/rightBottomTitle参数
-
-## 3.7.3(2026-02-03)
-improvment: city-locate组件示例改为组合式API
-
-## 3.7.2(2026-02-02)
-improvment: color-picker组件示例改为组合式API
-
-## 3.7.1(2026-02-02)
-fix:修复qrcode缺失的preview定义emit
-
-## 3.7.0(2026-02-01)
-fix: 修复up-qrcode二维码在微信小程序报错
-
-## 3.6.134(2026-01-30)
-chore: dragsort可通过参数控制是否可震动
-
-## 3.6.132(2026-01-30)
-feat: dragsort支持自定义拖动句柄
-
-## 3.6.131(2026-01-29)
-fix: 优化dragdort组件
-
-## 3.6.130(2026-01-28)
-improvment: cropper组件示例改为组合式API
-
-## 3.6.129(2026-01-28)
-improvment: drag组件示例改为组合式API
-
-## 3.6.128(2026-01-27)
-improvment: tooltip组件示例改为组合式API
-
-## 3.6.127(2026-01-27)
-improvment: textarea组件示例改为组合式API
-
-## 3.6.126(2026-01-27)
-improvment: text组件示例改为组合式API
-
-## 3.6.125(2026-01-27)
-fix: 修复Cascader级联选择器设置默认值显示问题
-
-修复在传入默认值时多列只会显示第一列bug
-
-## 3.6.124(2026-01-27)
-improvment: tabs组件示例改为组合式API
-
-## 3.6.123(2026-01-27)
-improvment: swiper组件示例改为组合式API
-
-## 3.6.122(2026-01-26)
-fix: 🐛 修复u-input在change事件里无法获取value的异常情况 #950
-
-## 3.6.120(2026-01-26)
-improvment: 增加Cascader级联选择器的取消事件
-
-## 3.6.119(2026-01-26)
-improvment: skeleton组件示例改为组合式API
-
-## 3.6.118(2026-01-26)
-improvment: steps组件示例改为组合式API
-
-## 3.6.117(2026-01-24)
-improvment: subsection组就示例改为组合式API
-
-## 3.6.116(2026-01-24)
-improvment: 优化Cascader级联选择器右上角关闭图标的显示控制
-
-如果在级联文本过长或者类目过多时关闭图标会与类目文字重合,现在增加控制关闭图标的控制可以控制是否需要显示关闭图标,底部有取消按钮,关闭图标不是必须的
-
-## 3.6.115(2026-01-23)
-improvment: scroll-list组就示例改为组合式API
-
-## 3.6.114(2026-01-23)
-improvment: readmore组就示例改为组合式API
-
-## 3.6.113(2026-01-23)
-improvment: popover组就示例改为组合式API
-
-## 3.6.112(2026-01-23)
-improvment: picker组件示例改为组合式API
-
-## 3.6.111(2026-01-23)
-improvment: no-network组件示例改为组合式API
-
-## 3.6.110(2026-01-22)
-improvment: navbar组件示例改为组合式API
-
-## 3.6.109(2026-01-22)
-improvment: modal组件示例改为组合式API
-
-## 3.6.108(2026-01-22)
-improvment: loadmore组件示例改为组合式API
-
-## 3.6.107(2026-01-21)
-improvment: list组件示例改为组合式API
-
-## 3.6.106(2026-01-21)
-improvment: index-list2组件示例改为组合式API
-
-## 3.6.105(2026-01-21)
-improvment: index-list组件示例改为组合式API
-
-## 3.6.104(2026-01-21)
-improvment: layout组件示例改为组合式API
-
-## 3.6.103(2026-01-21)
-improvment: input组件示例改为组合式API
-
-## 3.6.102(2026-01-20)
-fix: 修复cascader缺少emits申明
-
-## 3.6.101(2026-01-20)
-improvment: form组件示例改为组合式API
-
-## 3.6.100(2026-01-20)
-improvment: datetimepicker组件示例改为组合式API
-
-## 3.6.99(2026-01-20)
-fix: 修复cate-tab组件设置默认current不生效
-
-## 3.6.98(2026-01-20)
-improvment: code-input组件示例改为组合式API
-
-## 3.6.97(2026-01-20)
-improvment: calendar组件示例改为组合式API
-
-## 3.6.96(2026-01-20)
-improvment: avatar组件示例改为组合式API
-
-## 3.6.95(2026-01-20)
-improvment: album组件示例改为组合式API
-
-## 3.6.94(2026-01-19)
-improvment: waterfall组件示例改为组合式API
-
-## 3.6.93(2026-01-19)
-improvment: upload组件示例改为组合式API
-
-## 3.6.92(2026-01-17)
-improvment: toast组件示例改为组合式API
-
-## 3.6.91(2026-01-16)
-improvment: tag组件示例改为组合式API
-
-## 3.6.90(2026-01-16)
-improvment: table2组件示例改为组合式API
-
-## 3.6.89(2026-01-16)
-add: 增加鸿蒙Next已上架二维码
-
-## 3.6.88(2026-01-16)
-improvment: table组件示例改为组合式API
-
-## 3.6.87(2026-01-15)
-tabbar2组件示例改为组合式API
-## 3.6.86(2026-01-15)
-improvment: tabbar组件示例改为组合式API
-## 3.6.85(2026-01-15)
-improvment: switch组件示例改为组合式API
-
-## 3.6.84(2026-01-15)
-improvment: slider组件示例改为组合式API
-
-## 3.6.83(2026-01-15)
-improvment: search组件示例改为组合式API
-
-## 3.6.82(2026-01-15)
-improvment: progress组件示例改为组合式API
-
-## 3.6.81(2026-01-15)
-improvment: parse组件示例改为组合式API
-
-
-## 3.6.80(2026-01-15)
-improvment: number-box组件示例改为组合式API
-
-## 3.6.78(2026-01-15)
-improvment: notify组件示例改为组合式API
-
-## 3.6.77(2026-01-15)
-improvment: notice-bar组件示例改为组合式API
-
-## 3.6.76(2026-01-15)
- improvment: keyborad组件示例改为组合式API
-
-## 3.6.75(2026-01-15)
-improvment: dropdown组件示例改为组合式API
-
-## 3.6.74(2026-01-15)
-fix: 修复parse组件props缺少)
-
-## 3.6.73(2026-01-15)
-improvment: count-to组件示例改为组合式API
-
-## 3.6.72(2026-01-15)
-improvment: count-down组件示例改为组合式API
-
-## 3.6.71(2026-01-14)
-improvment: collapse组件示例改为组合式API
-
-## 3.6.70(2026-01-14)
-improvment: code组件示例改为组合式API
-
-## 3.6.69(2026-01-14)
-improvment: card组件示例改为组合式API
-
-## 3.6.68(2026-01-13)
-fix: 修复list组件在支付宝小程序下scrolltolower无法触发 #422
-## 3.6.67(2026-01-13)
-fix: 删除经典下拉框的打印
-
-## 3.6.66(2026-01-12)
-fix: 修正 RadioSlots 类型定义
-
-## 3.6.65(2026-01-12)
-fix: 修复u-picker在hasInput下回显异常和vue报错
-
-## 3.6.64(2026-01-12)
-fix: 解决cropper在ios小程序中底部操作栏被遮挡的问题
-
-## 3.6.63(2026-01-10)
-improvment: badge组建示例改为组合式API
-
-## 3.6.62(2026-01-10)
-improvment: alert组件示例改为组合式API
-
-## 3.6.61(2026-01-09)
-improvment: action-sheet组件示例改为组合式API
-
-## 3.6.60(2026-01-09)
-improvment: transition组件示例改为组合式API
-
-## 3.6.59(2026-01-09)
-improvment: swipe-action组件示例改为组合式API
-
-## 3.6.58(2026-01-09)
-improvment: sticky组件示例改为组合式API
-
-## 3.6.57(2026-01-08)
-improvment: 优化完善no-nerwork组件细节
-
-## 3.6.56(2026-01-08)
-fix: 修复signature的t方法
-
-## 3.6.55(2026-01-08)
-perf:补充多处TS声明提示信息 #953
-
-## 3.6.54(2026-01-08)
-fix: 修复slider示例页面变量重复
-## 3.6.53(2026-01-08)
-fix: 修复qrcode组件鸿蒙兼容
-
-## 3.6.52(2026-01-08)
-fix: nvue下采用webview支持二维码显示logo(因为gcanvas不支持图片渲染)
-
-## 3.6.51(2026-01-08)
-fix: 修复qrcode组件在App不显示logo
-
-improvment: qrcode逻辑优化封装
-
-## 3.6.50(2026-01-06)
-improvment: rate组件示例改为组合式API
-
-## 3.6.49(2026-01-06)
-improvment: radio组件示例改为组合式API
-
-## 3.6.48(2026-01-06)
-improvment: popup组件示例改为组合式API
-
-## 3.6.47(2026-01-06)
-improvment: overlay示例改为组合式API
-
-## 3.6.46(2026-01-05)
-improvment: loading-page组建示例改为组合式API
-
-## 3.6.45(2026-01-05)
-improvment: loading-icon组件示例改为组合式API
-
-## 3.6.44(2026-01-05)
-improvment: link组件示例改为组合式API
-
-## 3.6.43(2026-01-05)
-improvment: line组件示例改为组合式API
-
-## 3.6.42(2026-01-04)
-improvment: layzload组件示例改为组合式API
-
-## 3.6.41(2026-01-04)
-fix: 修复select组件缺少mixin
-
-## 3.6.40(2026-01-04)
-improvment: 去除ReadmeQQ群链接
-
-## 3.6.39(2026-01-04)
-improvment: image组件示例改为组合式API
-
-## 3.6.38(2026-01-03)
-improvment: icon示例改为组合式API
-
-## 3.6.37(2025-12-31)
-improvment: 静态资源修复
-
-## 3.6.36(2025-12-30)
-improvment: grid示例改为组合式API
-
-## 3.6.35(2025-12-25)
-fix: 修复grid布局由于内容溢出导致形变
-
-## 3.6.34(2025-12-24)
-fix: modal组件asyncCloseTip多语言key未对应
-
-## 3.6.33(2025-12-23)
-fix: 提升$parent方法兼容性修复表单验证失效
-
-## 3.6.32(2025-12-21)
-improvment: 优化slider、search、steps等组件细节
-
-## 3.6.31(2025-12-19)
-improvment: 优化search组件等
-
-## 3.6.30(2025-12-19)
-improvment: 优化完善部分文件注释
-
-## 3.6.29(2025-12-18)
-fix: 修复语法错
-## 3.6.28(2025-12-18)
-fix: 优化$parent方法兼容性
-
-## 3.6.27(2025-12-17)
-add: datetimepicker增加maskClass和maskStyle属性
-
-## 3.6.26(2025-12-16)
-add: picker增加maskClass/maskStyle属性
-
-## 3.6.25(2025-12-15)
-fix: 修复cascader对列表数据层级差异的兼容问题
-
-## 3.6.24(2025-12-14)
-fix: 修复将empty组件的mode设置为wifi后图标不能显示的问题 #928
-
-## 3.6.23(2025-12-13)
-fix: 修复cascader已选中三级菜单后再选择二级菜单时tabs报错问题
-
-## 3.6.22(2025-12-12)
-fix: dragsort组件拖动抖动的问题
-
-## 3.6.21(2025-12-09)
- fix: form-item初始化时机优化
-
-## 3.6.20(2025-12-08)
-improvment: 优化form组件语法普适性
-
-## 3.6.19(2025-12-01)
-fix: 修复商品SKU组件i18n
-
-fix: Choose组件会有width警告提示 #915
-
-## 3.6.18(2025-11-30)
-feature: upload组件file模式支持微信小程序chooseMessageFile的extension属性 #913
-
-## 3.6.17(2025-11-18)
-add: picker-data支持表单验证
-
-## 3.6.16(2025-11-18)
-improvment: 优化下拉菜单示例
-
-## 3.6.15(2025-11-10)
-fix: 修复tabs添加activeStyle切换后滑块无法居中
-
-## 3.6.14(2025-11-07)
-fix: 修复引用拼写
-
-## 3.6.13(2025-11-06)
-improvment: 组合式API升级之gap示例改造
-
-## 3.6.12(2025-11-05)
-improvment: empty示例改为组合式API
-
-## 3.6.11(2025-11-05)
-improvment: divider示例改为组合式API
-
-## 3.6.10(2025-11-04)
-improvment: checkbox示例改为组合式API
-
-## 3.6.9(2025-10-21)
-improvment: cell示例改为组合式API
-
-## 3.6.8(2025-10-20)
-imporvment: button示例改为组合式API
-
-## 3.6.7(2025-10-17)
-fix: 优化picker当前列判断
-
-## 3.6.6(2025-10-13)
-fix: 修复getWindowInfo微信小程序下报警告
-
-## 3.6.5(2025-10-11)
-🐛fix: 修复picker双向绑定 #753
-
-## 3.6.4(2025-10-09)
-🐛fix: import rpx2px function and add to exports in index.js
-
-## 3.6.3(2025-10-09)
-fix: 修复getWindowInfo微信小程序下报警告
-
-## 3.6.2(2025-10-05)
-fix: 修复picker双向绑定 #753
-
-## 3.6.1(2025-10-01)
-fix: 修复poster海报组件微信小程序图片绘制失败
-
-## 3.6.0(2025-09-30)
-fix: 修复parse事件报错及统一事件名称小写
-
-## 3.5.57(2025-09-30)
-improvment: 更换部分资源域名提升访问速度
-
-## 3.5.56(2025-09-29)
-fix: 修复picker和datetime-picker在部分原生渲染时hasInput触发键盘弹起
-
-## 3.5.55(2025-09-29)
-feat: waterfall新增after-add-one和after-add-all事件
-
-## 3.5.54(2025-09-25)
-🐞 fix: 解决索引列表初始化时获取不到高度导致的字母列表异常
-
-## 3.5.53(2025-09-19)
-improvment: back-top示例组合式API改造
-
-## 3.5.52(2025-09-19)
-fix: 优化tabbar的borderColor优先级
-
-## 3.5.51(2025-09-19)
-fix: 微信小程序下u-transition包裹的内容因为没有默认flex column而出现布局错误
-
-## 3.5.50(2025-09-18)
-fix: 修复tabbar组件borderColor类型
-
-## 3.5.49(2025-09-18)
-fix: 修复action-sheet列表中第一个item的hover style
-
-## 3.5.48(2025-09-17)
-fix: 修复table2的fixedHeader参数生效
-
-## 3.5.47(2025-09-16)
-fix: 修复modelValue类型
-
-## 3.5.46(2025-09-15)
-feat: table2新增支持span-method合并单元格
-
-## 3.5.45(2025-09-13)
-fix: 修复数据分配时未等待获取元素后再执行下一次循环导致数据插入错误,addTime属性未使用修改。
-
-## 3.5.44(2025-09-12)
-fix: 单选快捷组件作为受控组件,当modelValue清除选择时,组件状态未被清除。
-
-## 3.5.43(2025-09-10)
-fix: 增加subsection兼容性索引转为数字
-
-## 3.5.42(2025-09-09)
-feat: index-list增加下边距高度
-
-## 3.5.41(2025-09-08)
-fix: 修复cascader方法引用位置
-
-## 3.5.40(2025-09-08)
-feat: goods-sku组件支持多语言
-
-## 3.5.39(2025-09-07)
-fix: 修复cascader多语言问题
-
-## 3.5.38(2025-09-07)
-improvment: 完善演示图标
-
-## 3.5.37(2025-09-05)
-feat: cascader支持多语言
-
-## 3.5.36(2025-09-04)
-improvment: 补充图标
-
-## 3.5.35(2025-09-04)
-feat: cascader级联组件增加垂直头部与单列选项支持
-
-## 3.5.34(2025-09-03)
-improvement: 优化steps-item
-
-## 3.5.33(2025-09-02)
-升级uni-app至最新版
-## 3.5.32(2025-09-01)
-feat: cate-tab支持非联动跟随的单一切换模式
-
-feat: choose组件示例使用cate-tab的单一切换模式
-
-
-## 3.5.31(2025-09-01)
-feat: 新增choose通用选项选择器组件
-
-## 3.5.30(2025-08-31)
-fix: 修复缺失cascader级联选择器
-
-## 3.5.29(2025-08-30)
-feat: 新增cascader级联选择器
-
-## 3.5.28(2025-08-29)
-feat: 多语言增加泰语
-
-## 3.5.27(2025-08-29)
-feat: 新增基于tooltip的popover组件
-
-## 3.5.26(2025-08-29)
-improvment: 增强多语言兼容性
-
-## 3.5.25(2025-08-28)
-fix: 修复左侧与右侧弹出时页面打开闪现问题
-
-## 3.5.24(2025-08-28)
-feat: 优化tooltip弹窗定位
-
-feat: tooltip组件新增forcePosition支持强制精确定位
-
-## 3.5.23(2025-08-28)
-improvment: 调整pdf阅读器默认高度
-
-## 3.5.22(2025-08-28)
-feat: 新增goods-sku商品SKU选购组件
-
-## 3.5.21(2025-08-27)
-fix: 修复popup组件手势控制参数注释
-
-## 3.5.20(2025-08-27)
-improvement: 提升checkbox条件编译兼容性
-
-## 3.5.19(2025-08-27)
-feat: popup新增iOS风格手势控制上下高度及下滑关闭
-
-## 3.5.18(2025-08-26)
-feat: 新增coupon优惠券组件
-
-## 3.5.17(2025-08-26)
-fix: 分支合并冲突修复
-
-feat: picker-data组件新增cancel/close/confirm事件支持
-
-## 3.5.16(2025-08-26)
-feat: tabbar新增支持中间凸起按钮
-
-## 3.5.15(2025-08-25)
-feat: 之前的color-picker颜色选择器按计划上线
-
-## 3.5.14(2025-08-25)
-feat: 新增PDF阅读器组件
-
-## 3.5.13(2025-08-24)
-fix: 修复短视频示例https
-
-## 3.5.12(2025-08-23)
-feat: short-video短视频组件增加视频播放示例
-
-## 3.5.11(2025-08-23)
-feat: 新增short-video短视频切换组件
-
-feat: tabbar支持backgroundColor和borderColor属性
-
-feat: slider支持innerStyle样式属性
-
-## 3.5.10(2025-08-22)
-feat: 新增poster海报生成组件
-
-
-## 3.5.9(2025-08-22)
-feat: 优化qrcode组件支持toTempFilePath方法
-
-## 3.5.8(2025-08-22)
-fix: 优化rpx下calendar高度计算强制px
-
-## 3.5.7(2025-08-22)
-feat: input和search新增onlyClearableOnFocused参数支持控制是否仅聚焦时显示清除按钮
-
-## 3.5.6(2025-08-21)
-feat: picker弹窗及datetime-picker组件支持页面内模式
-
-## 3.5.5(2025-08-21)
-feat: popup弹窗及canlendar组件支持页面内插入无弹窗模式
-
-## 3.5.4(2025-08-21)
-feat: popup弹窗及canlendar组件支持页面内插入无弹窗模式
-
-## 3.5.3(2025-08-21)
-fix: 修复下拉刷新多语言key
-
-## 3.5.2(2025-08-20)
-fix: 修复非cli模式下引入的三方库报An error occurred while trying to read the map file错误
-
-fix: 去除i18n多语言多余console
-
-## 3.5.1(2025-08-20)
-feat: calendar组件月份标题自动适配多语言
-
-## 3.5.0(2025-08-20)
-feat: 组件库新增多语言支持且无侵入无依赖内置八种语言
-
-## 3.4.107(2025-08-20)
-feat: input组件支持密码显示切换
-
-## 3.4.106(2025-08-20)
-feat: tooltip组件支持左右方向弹窗
-
-## 3.4.105(2025-08-19)
-feat: 增加markdown解析器组件AI对话流式响应示例
-
-## 3.4.104(2025-08-19)
-feat: tooltip支持自定义触发器
-
-feat: tooltip支持插槽自定义内容
-
-feat: tooltip支持单击触发
-
-feat: tooltip支持设置弹窗背景色
-
-## 3.4.103(2025-08-19)
-feat: 内置一份dayjs库
-
-fix: 删除个别组件多余重复方法
-
-fix: 修复marked库App打包时报错
-
-## 3.4.102(2025-08-19)
-fix: 小程序下cate-tab动态加载数据后尺寸获取及联动异常
-
-## 3.4.101(2025-08-18)
-improvment: 增加一些涉及触摸组件PC端需要仿真模式提示
-
-## 3.4.100(2025-08-18)
-feat: 新增markdown解析器组件
-
-## 3.4.99(2025-08-18)
-fix: 修复parse富文本组件可能导致无限循环的问题
-
-## 3.4.98(2025-08-17)
-feat: alert组件新增transitionMode/icon/duration/modelValue等参数
-
-improvment: 完善alert组件注释
-
-## 3.4.97(2025-08-16)
-improvment: 完善album组件注释
-
-## 3.4.96(2025-08-16)
-improvment: 完善action-sheet注释
-
-## 3.4.95(2025-08-16)
-del: 去除不再需要的重复组件
-
-## 3.4.94(2025-08-15)
-improvment: 组件库内部icon前缀统一
-
-## 3.4.93(2025-08-15)
-fix: 修复dropdown组件在打开下拉菜单时content高度为NANpx的问题
-
-## 3.4.92(2025-08-14)
-fix: 修复多余空格导致cropper编译出错 #830
-
-## 3.4.91(2025-08-14)
-feat: 新增agreement弹窗协议组件
-
-## 3.4.90(2025-08-13)
-feat: datetimepicker新增datehour类型
-
-## 3.4.89(2025-08-13)
-fix: 修复u-form-item组件缺少对labelPosition的判断
-
-## 3.4.88(2025-08-13)
-fix: subsection组件的disabled属性应为Boolean类型
-
-## 3.4.87(2025-08-12)
-improvment: 签名组件示例前缀改为up
-
-## 3.4.86(2025-08-12)
-feat: 新增signature签名签字组件
-
-## 3.4.85(2025-08-11)
-feat: 完善图片裁剪功能支持props及JS两种方式
-
-fix: 修复H5下裁剪后图片黑屏
-
-## 3.4.84(2025-08-11)
-feat: 新增cropper图片裁剪组件
-
-## 3.4.83(2025-08-11)
-feat: 新增barcode无三方依赖条码组
-
-## 3.4.82(2025-08-11)
-improvment: 优化table2递归组件逻辑
-
-feat: 支持树状列表复选框
-
-## 3.4.81(2025-08-10)
-feat: table2新增树状结构递归支持
-
-## 3.4.80(2025-08-10)
-feat: 新增table2固定列对树状支持
-
-## 3.4.79(2025-08-09)
-feat: table2组件支持左侧固定列功能
-
-## 3.4.78(2025-08-09)
-fix: 修复table2在popup弹窗中无法横向滚动
-
-## 3.4.77(2025-08-08)
-feat: 优化waterfall瀑布流组件逻辑
-
-feat: waterfall瀑布流组件支持多列
-
-feat: waterfall瀑布流组件支持响应式列数
-
-## 3.4.76(2025-08-08)
-feat: 取消props中tabs组件默认颜色影响主题色生效
-
-fix: 修复parse富文本组件报错$options
-
-feat: timeFormat时间格式化方法支持UTC格式时间 #596
-
-## 3.4.75(2025-08-07)
-feat: 新增loadFontOnce参数控制是否全局只加载一次字体图标
-
-## 3.4.74(2025-08-07)
-feat: input组件新增cursorColor属性
-
-## 3.4.73(2025-08-05)
-improvment: 优化下拉刷新默认图标
-
-## 3.4.72(2025-08-05)
-improvment: 优化virtual-list虚拟列表样式
-
-feat: 新增virtual-list虚拟列表演示
-
-## 3.4.71(2025-08-05)
-feat: 新增virtual-list虚拟列表组件
-
-feat: 新增pull-refresh下拉刷新结合虚拟列表使用
-
-## 3.4.70(2025-08-05)
-fix: 修复qrcode组件长按事件传入错误cid导致的报错
-
-fix: 修复index-list组件key为undefined导致的索引报错消失
-
-## 3.4.69(2025-08-04)
-feat: pull-refresh下拉刷新新增上拉加载特性
-
-## 3.4.68(2025-08-03)
-feat: 新增pull-refresh下拉刷新组件
-
-## 3.4.67(2025-08-02)
-feat: number-box支持disabledBgColor参数
-
-## 3.4.66(2025-08-01)
-improvment: 增加组件图标
-
-feat: table2组件新增列排序插槽
-
-fix: 分段器组件onWindowResize使用条件编译
-
-fix: 修复u-line-1单行省略样式
-
-## 3.4.65(2025-07-26)
-fix: 修复部分环境下字体图标全局加载问题
-
-## 3.4.64(2025-07-25)
-feat: 新增dragsort拖动排序组件
-
-## 3.4.63(2025-07-24)
-feat: count-down支持slot传递时间参数
-
-## 3.4.62(2025-07-24)
-feat: divider支持默认插槽
-
-## 3.4.61(2025-07-24)
-feat: divider支持默认插槽
-
-## 3.4.60(2025-07-23)
-fix: 修复use阶段全局加载图标引起App端不明$page报错
-
-## 3.4.59(2025-07-23)
-fix: 修复album组件和CateTab组件watch和emits重复
-
-fix: 修复样式优先级导致form表单labelPosition属性top失效
-
-## 3.4.58(2025-07-22)
-fix: 修复样式优先级影响grid宫格组件布局
-
-## 3.4.57(2025-07-22)
-feat: 新增title标题组件
-
-## 3.4.56(2025-07-21)
-fix: 去除多余hotCity参数
-
-## 3.4.55(2025-07-21)
-feat: 新增city-locate城市定位选择组件
-
-feat: 优化index-list组件索引
-
-## 3.4.54(2025-07-18)
-feat: dropdown组件的highlight方法支持同时高亮多个菜单项
-
-feat: 支持一次性全局加载icon字体
-
-## 3.4.53(2025-07-18)
-feat: dropdown组件的highlight方法支持同时高亮多个菜单项 感谢@keeplearning66
-
-## 3.4.52(2025-07-16)
-fix: 修复底部安全区域组件兼容性
-
-## 3.4.51(2025-07-14)
-fix: 修复u-slider在click后没有触发change事件
-
-## 3.4.50(2025-07-13)
-feat: subsection分段器添加禁用参数
-
-## 3.4.49(2025-07-11)
-feat: picker支持bgColor、round、duration和overlayOpacity属性
-
-## 3.4.48(2025-07-10)
-fix: 官方文档Card示例组件多行显示省略号样式异常
-
-feat: album组件支持自定义preview事件
-
-## 3.4.47(2025-07-09)
-fix: 修复datetime-picker打开时,数值可能出现对不上的问题
-
-feat: Subsection 分段器添加支持从 list中读取激活文字颜色和未激活文字颜色
-
-fix: 修复modal定义confirmButton
-
-fix: safe-bottom底部安全距离在小程序优先用JS计算
-
-feat: 新增tree树形组件
-
-## 3.4.46(2025-07-08)
-feat: 上传组件预览视频支持videoPreviewObjectFit参数
-
-feat: td增加多个样式props
-
-fix: 修复noticeBar字号增大时文字遮挡
-
-feat: 项目工程增加pinia
-
-## 3.4.45(2025-07-01)
-fix: 修复picker-data组件缺少name
-
-fix: 优化picker高度单位
-
-## 3.4.44(2025-06-30)
-fix: 修复indexList中stikcy属性写死的问题(always true)
-
-feat: 搜索框添加新的右侧插槽
-
-fix: 修复indexList中丢失的select event
-
-fix: 解决因为层级问题导致点击picker选择器无法正常弹出
-
-## 3.4.43(2025-06-16)
-feat: table2支持header插槽
-
-## 3.4.42(2025-06-12)
-fix: 修复qrcode中默认id问题及canvas2时App无法绘制二维码 感谢@jiaruiyan
-
-## 3.4.41(2025-06-11)
-feat: qrcode支持 新参数useRootHeightAndWidth 是否使用根节点的宽高 感谢@YJR
-
-feat: toast支持设置zIndex层级
-
-
-
-## 3.4.40(2025-06-06)
-fix: 升级二维码 canvas -> canvas2 感谢@yjr
-
-## 3.4.39(2025-05-31)
-fix: 修改步骤条微信小程序下的布局 感谢@jiaruiyan
-
-fix: u-tabs在屏幕尺寸发生变化时滑块位置没有发生变化 感谢@aqzhft
-
-fix: 鸿蒙平台不支持plus.runtime.openWeb 感谢@aqzhft
-
-## 3.4.38(2025-05-30)
-fix: 修复picker-data快捷组件缺少index
-
-fix: 修复picker组件双向绑定初始化及取消后复原再次打开后的当前项目
-
-## 3.4.37(2025-05-29)
-feat: modal支持设置动画时间
-
-fix: DatetimePicker v-model 绑定异步设置无效 (#803)
-
-## 3.4.36(2025-05-28)
-fix: lazy-load图片为空时显示错误
-
-## 3.4.35(2025-05-28)
-feat: 进度条支持从右往左加载
-
-## 3.4.34(2025-05-28)
-feat: table2支持自定义标题和单元格样式
-
-## 3.4.33(2025-05-27)
-fix: 修复小程序cate-tab第一次切换时没反应 感谢@jiaruiyan
-
-fix: 修复datetimepicker传入空字符串时导致组件崩溃 感谢@jiaruiyan
-
-fix: 修复album带单位的字符串参与计算导致的计算数据错误 感谢@jiaruiyan
-
-## 3.4.32(2025-05-26)
-feat: 增加状态栏独立颜色配置支持支付宝小程序状态栏对背景色识别的不友好的情况
-
-fix: 抖音二维码兼容修复
-
-feat: cate-tab组件增加rightTop插槽 #715
-
-fix: 修改 test.promise(res) 预期结果不一致
-
-## 3.4.31(2025-05-17)
-fix: 修复parse富文本组件导致鸿蒙运行白屏
-
-fix: 去除演示项目中uni.$u用法便于兼容鸿蒙
-
-feat: modal新增popupBottom插槽适用类似关闭按钮与内容区域分离的场景
-
-## 3.4.30(2025-05-16)
-feat: 新增pagination分页器组件
-
-feat: popup新增bottom插槽适用类似关闭按钮与内容区域分离的场景
-
-## 3.4.29(2025-05-15)
-fix: 修复table2横向滚动样式
-
-fix: 修复table2组件宽度兼容
-
-fix: 修复image显示png图片时默认背景色问题
-
-feat: cate-tab新增height参数便于设置组件高度
-
-feat: 在index.js种导出digit.js便于使用
-
-fix: 修复tag组件缺失iconColor属性
-
-fix: 优化index-list的setValueForTouch方法逻辑 #708
-
-feat: number-box支持change事件返回变动是点击了增加还是减少按钮
-
-fix: 修复table2在小程序下部分情形不显示表格
-
-## 3.4.28(2025-05-12)
-feat: 新增table表格组件
-
-feat: 新增element-plus风格的table2组件
-
-## 3.4.27(2025-05-06)
-fix: 修复card组件props
-
-## 3.4.26(2025-05-06)
-fix: 修复test工具引入
-
-feat: card组件支持全局设置props默认值
-
-fix: 修复image在加载错误情况下高度和宽度不正确问题
-
-fix: 修复picker-data快捷组件默认picker选中
-
-fix: 修复日历month子组件缺失emits定义
-
-## 3.4.25(2025-04-27)
-fix: up-form编译在微信小程序里样式缺失 #640
-
-fix: number-box输入为空时自动设为最小值
-
-feat: picker与datetimepicke组件hasInput模式支持inputProps属性
-
-## 3.4.24(2025-04-25)
-fix: 修复upload上传逻辑(感谢@semdy)
-
-## 3.4.23(2025-04-24)
-chore: 补全chooseFile TS类型(感谢@semdy)
-
-feat: u-search组件的图标支持显示在右边(感谢@semdy)
-
-chore: 修正chooseFile返回的数据TS类型(感谢@semdy)
-
-fix: PR导致缺失name影响uplad自动上传扩展名
-
-
-## 3.4.22(2025-04-22)
-fix: 修复自动上传偶发的success被覆盖为uploading
-
-fix: float-button缺少key #677
-
-fix: upload组件完善优化(感谢@semdy)
-
-fix: toolbar组件confirmColor属性默认改为空,以便默认使用主题色、标题字体加粗(感谢@semdy)
-
-## 3.4.21(2025-04-21)
-feat: subsection分段器支持双向绑定current
-
-feat: select组件支持maxHeight属性
-
-feat: datetime-picker支持inputBorder属性
-
-## 3.4.20(2025-04-17)
-fix: 修复navbar-mini提示border不存在
-
-feat: status-bar支持对外暴露状态栏高度值
-
-feat: upload支持自定义自动上传后处理逻辑便于对接不同规范后端
-
-feat: 优化tag组件插槽
-
-
-## 3.4.19(2025-04-14)
-fix: 修复model组件增加contentStyle带来的语法问题
-
-## 3.4.18(2025-04-14)
-fix: upload组件支持所有文件类型的onClickPreview事件
-
-## 3.4.17(2025-04-11)
-feat: select组件text插槽增加scope传递currentLabel
-
-## 3.4.16(2025-04-10)
-fix: 修复安卓新加载字体方式导致Cannot read property '$page' of undefined
-
-## 3.4.15(2025-04-10)
-improvment: 优化移步加载数据时swiper组件displayMultipleItems报错
-
-feat: modal增加contentStyle属性
-
-fix: 修复下拉菜单收起动画缺失
-
-fix: 修复sticky的offset属性值为响应式数据时失效 #237
-
-
-## 3.4.14(2025-04-09)
-feat: 支持自托管内置图标及扩展自定义图标
-
-## 3.4.13(2025-04-08)
-fix: tabs点击当前tab触发change事件
-
-## 3.4.12(2025-04-02)
-fix: dropdown关闭后遮挡页面内容 #653
-
-fix u-sticky.vue Uncaught TypeError: e.querySelector is not a function at uni-app-view.umd.js
-
-## 3.4.11(2025-03-31)
-fix: 优化upload组件预览视频的弹窗占位
-
-## 3.4.10(2025-03-28)
-feat: select组件新增多个props属性及优化
-
-fix: 修复cate-tab报错index is not defined #661
-
-
-## 3.4.9(2025-03-27)
-fix: 修复upload组件split报错
-
-fix: 修复float-button缺少flex样式
-
-## 3.4.8(2025-03-27)
-fix: 修复upload组件split报错
-
-fix: 移除mapState
-
-## 3.4.7(2025-03-26)
-fix: 修复action-sheet-data和picker-data数据回显
-
-fix: 优化upload组件视频封面兼容
-
-## 3.4.6(2025-03-25)
-feat: checkbox触发change时携带name参数
-
-feat: upload组件支持服务器本机和阿里云OSS自动上传功能及上传进度条
-
-feat: upload组件支持视频预览及oss上传时获取视频封面图
-
-feat: 新增up-action-sheet-data快捷组件
-
-feat: 新增up-picker-data快捷组件
-
-## 3.4.5(2025-03-24)
-feat: tag组件新增textSize/height/padding/borderRadius属性
-
-feat: 新增genLightColor自动计算浅色方法及tag组件支持autoBgColor自动计算背景色
-
-## 3.4.4(2025-03-13)
-feat: modal增加异步操作进行中点击取消弹出提示特性防止操作被中断
-
-fix: 修复toast组件show方法类型声明
-
-## 3.4.3(2025-03-12)
-fix: 修复textarea自动增高时在输入时高度异常
-
-## 3.4.2(2025-03-11)
-feat: step组件增加title插槽及增加辅助class便于自定义样式
-
-## 3.4.1(2025-03-11)
-feat: 新机制确保setConfig与http在nvue等环境下生效
-
-## 3.3.74(2025-03-06)
-fix: CateTab语法问题
-
-## 3.3.73(2025-03-06)
-feat: CateTab新增v-model:current属性
-
-## 3.3.72(2025-02-28)
-feat: tabs组件支持icon图标及插槽
-
-## 3.3.71(2025-02-27)
-feat: 折叠面板collapse增加titileStyle/iconStyle/rightIconStyle属性
-
-feat: 折叠面板组件新增cellCustomStyle/cellCustomClass属性
-
-fix: select组件盒模型
-
-## 3.3.70(2025-02-24)
-fix: 修改u-checkbox-group组件changes事件发生位置
-
-## 3.3.69(2025-02-19)
-picker允许传递禁用颜色props
-
-slider组件isRange状态下增加min max插槽分开显示内容
-
-feat: 新增经典下拉框组件up-select
-
-## 3.3.68(2025-02-12)
-fix: 修复weekText类型
-
-feat: 日历增加单选与多选指定禁止选中的日期功能
-
-fix: NumberBox删除数字时取值有误 #613
-
-## 3.3.67(2025-02-11)
-feat: navbar支持返回全局拦截器配置
-
-feat: 表单-校验-支持无提示-得到校验结果
-
-feat: picker传递hasInput属性时候,可以禁用输入框点击
-
-## 3.3.66(2025-02-09)
-feat: steps-item增加content插槽
-
-## 3.3.65(2025-02-05)
-feat: number-box组件新增按钮圆角/按钮宽度/数据框背景色/迷你模式
-## 3.3.64(2025-01-18)
-feat: 日历组件支持自定义星期文案
-
-## 3.3.63(2025-01-13)
-fix: cate-tab支持支付宝小程序
-
-fix: textarea 修复 placeholder-style
-
-fix: 修复在图片加载及加载失败时容器宽度
-
-fix: waterfall组件报错Maximum recursive updates
-
-## 3.3.62(2025-01-10)
-feat: sleder滑动选择器双滑块增加外层触发值的变动功能
-
-fix: picker支持hasInput优化
-
-## 3.3.61(2024-12-31)
-fix: 修复微信getSystemInfoSync接口废弃警告
-
-fix: 'u-status-bar' symbol missing
-
-## 3.3.60(2024-12-30)
-feat: 日期组件支持禁用
-
-fix: ts定义修复 #600
-
-feat: Tabs组件选中时增加一个active的class #595
-
-## 3.3.59(2024-12-30)
-fix: Property "isH5" was accessed during render
-
-## 3.3.58(2024-12-26)
-fix: slider组件change事件传参
-
-## 3.3.57(2024-12-23)
-fix: slider组件change事件传参
-
-feat: 更新u-picker组件增加当前选中class类名
-
-## 3.3.56(2024-12-18)
-feat: 在u-alert组件中添加关闭事件
-
-## 3.3.55(2024-12-17)
-add: swiper增加双向绑定
-
-## 3.3.54(2024-12-11)
-add: qrcode支持props控制是否开启点击预览
-
-add: 新增cate-tab垂直分类组件
-
-## 3.3.53(2024-12-10)
-fix: 修复popup居中模式点击内容区域触发关闭
-
-## 3.3.52(2024-12-09)
-add: notice-bar支持justifyContent属性
-
-## 3.3.51(2024-12-09)
-add: radio增加label插槽
-
-## 3.3.50(2024-12-05)
-fix: 优化popup等对禁止背景滚动机制
-
-add: slider在弹窗使用示例
-
-fix: card组件类名问题
-
-## 3.3.49(2024-12-02)
-fix: 去除album多余的$u引用
-
-fix: 优化图片组件兼容性
-
-add: picker组件增加zIndex属性
-
-add: text增加是否占满剩余空间属性
-
-add: input颜色示例
-
-## 3.3.48(2024-11-29)
-add: 文本行数限制样式提高到10行
-
-del: 去除不跨端的inputmode
-## 3.3.47(2024-11-28)
-fix: 时间选择器在hasInput模式下部分机型键盘弹出
-
-## 3.3.46(2024-11-26)
-fix: 修复text传递事件参数
-
-## 3.3.45(2024-11-24)
-add: navbar组件支持配置标题颜色
-
-fix: 边框按钮警告类型下颜色变量使用错误
-
-## 3.3.43(2024-11-18)
-fix: 支持瀑布流组件v-model置为[]
-
-add: 新增字符串路径访问工具方法getValueByPath
-
-add: 新增float-button悬浮按钮组件
-
-## 3.3.42(2024-11-15)
-add: button组件支持stop参数阻止冒泡
-
-## 3.3.41(2024-11-13)
-fix: u-radio-group invalid import
-
-improvement: 优化图片组件宽高及修复事件event传递
-
-## 3.3.40(2024-11-11)
-add: 组件radioGroup增加gap属性用于设置item间隔
-
-fix: 修复H5全局导入
-
-## 3.3.39(2024-11-04)
-fix: 修复相册组件
-
-## 3.3.38(2024-11-04)
-fix: 修复视频预览报错 #510
-
-add: album组件增加stop参数支持阻止事件冒泡
-
-## 3.3.37(2024-10-21)
-fix: 修复因为修改组件名称前缀,导致h5打包后$parent方法内找不到父组件的问题
-
-fix: 修复datetime-picker选择2000年以前日期出错
-
-## 3.3.36(2024-10-09)
-fix: toast 自动关闭
-
-feat: 增加微信小程序用户昵称审核完毕回调及修改 ts 定义文件
-
-## 3.3.35(2024-10-08)
-feat: modal和picker支持v-model:show双向绑定
-
-feat: 支持checkbox使用slot自定义label后自带点击事件 #522
-
-feat: swipe-action支持自动关闭特性及初始化打开状态
-
-## 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)
-上传组件支持微信小程序预览视频
-
-修复折叠面板右侧箭头不显示
-
-修复uxp2px
-
-## 3.2.21(2024-05-10)
-fix: loading-icon修复flex布局
-## 3.2.20(2024-05-10)
-修复瀑布流大小写#355
-## 3.2.19(2024-05-10)
-去除意外的文件引入
-## 3.2.18(2024-05-09)
-fix: 349 popup 组件设置 zIndex 属性后,组件渲染异常#
-feat: 搜索框增加adjustPosition属性
-fix: #331增加u-action-sheet__cancel
-优化mixin兼容性
-feat: #326 up-list增加下拉刷新功能
-fix: #319 优化up-tabs参数与定义匹配
-fix: index-list组件微信小程序端使用自定义导航栏异常
-fix: #285 pickerimmediateChange 写死为true
-fix: #111 u-scroll-list组件,隐藏指示器后报错, 提示找不到ref
-list增加微信小程序防抖配置
-
-## 3.2.17(2024-05-08)
-fix: 支付宝小程序二维码渲染
-## 3.2.16(2024-05-06)
-修复tabs中,当前激活样式的undefined bug
-
-fix: #341u-code 倒计时没结束前退出,再次进入结束后退出界面,再次进入重新开始倒计时bug
-
-受到uni-app内置text样式影响修复
-
-## 3.2.15(2024-04-28)
-优化时间选择器hasInput模式初始化值
-## 3.2.14(2024-04-24)
-去除pleaseSetTranspileDependencies
-
-http采用useStore
-
-## 3.2.13(2024-04-22)
-修复modal标题样式
-
-优化日期选择器hasInput模式宽度
-
-## 3.2.12(2024-04-22)
-修复color应用
-## 3.2.11(2024-04-18)
-修复import化带来的问题
-## 3.2.10(2024-04-17)
-完善input清空事件App端失效的兼容性
-
-修复日历组件二次打开后当前月份显示不正确
-
-## 3.2.9(2024-04-16)
-组件内uni.$u用法改为import引入
-
-规范化及兼容性增强
-
-## 3.2.8(2024-04-15)
-修复up-tag语法错
-## 3.2.7(2024-04-15)
-修复下拉菜单背景色在支付宝小程序无效
-
-setConfig改为浅拷贝解决无法用import导入代替uni.$u.props设置
-
-## 3.2.6(2024-04-14)
-修复某些情况下滑动单元格默认右侧按钮是展开的问题
-## 3.2.5(2024-04-13)
-调整分段器尺寸及修复窗口大小改变时重新计算尺寸
-
-多个组件支持cursor-pointer增强PC端体验
-
-## 3.2.4(2024-04-12)
-初步支持typescript
-## 3.2.3(2024-04-12)
-fix: 修复square属性在小程序下无效问题
-
-fix:修复lastIndex异常导致的column异常问题
-
-fix: alipayapp picker style
-
-feat(button): 添加用户同意隐私协议事件回调
-
-fix: input switch password
-
-fix: 修复u-code组件keepRuning失效问题
-
-feat: form-item添加labelPosition属性
-
-新增dropdown组件
-
-分段器支持内部current值
-
-优化cell和action-sheet视觉大小
-
-修复tabs文字换行
-
-## 3.2.2(2024-04-11)
-修复换行符问题
-## 3.2.1(2024-04-11)
-修复演示H5二维码
-
-fix: #270 ReadMore 展开阅读更多内容变化兼容
-
-fix: #238Calendar组件maxDate修改为不能小于minDate
-
-checkbox支持独立使用
-
-修复popup中在微信小程序中真机调试滚动失效
-
-## 3.2.0(2024-04-10)
-修复轮播图在nvue显示
-修复疑似u-slider名称被占用导致slider在App下不显示
-解决微信小程序提示 Some selectors are not allowed in component wxss
-示例中u-前缀统一为up-
-增加瀑布流与图片懒加载组件
-fix: #308修复tag组件缺失iconColor参数
-fix: #297使用grid布局解决目前编译为抖音小程序无法开启virtualHost
-## 3.1.52(2024-04-07)
-工具类方法调用import化改造
-新增up-copy复制组件
-## 3.1.51(2024-04-07)
-优化时间选择器自带输入框格式化显示
-防止按钮文字换行
-修复订单列表模板滑动
-增加u-qrcode二维码组件
-## 3.1.49(2024-03-27)
-日期时间组件支持自带输入框
-fix: popup弹窗滚动穿透问题
-fix: 修复小程序numberbox bug
-## 3.1.48(2024-03-18)
-fix:[plugin:uni:pre-css] Unbalanced delimiter found in string
-## 3.1.47(2024-03-18)
-fix: setConfig设置组件默认参数无效问题
-fix: 修复自定义图标无效问题
-feat: 增加u-form-item单独设置规则变量
-fix:#293小程序是自定义导航栏的时候即传了customNavHeight的时候会出现跳转偏移的情况
-
-## 3.1.46(2024-01-29)
-beforeUnmount
-## 3.1.45(2024-01-24)
-fix: #262ext组件为超链接的情况下size属性不生效
-fix: #263最新版本3.1.42中微信小程序u-swipe-action-item报错
-fix: #224最新版本3.1.42中微信小程序u-swipe-action-item报错
-fix: #263支持支付宝小程序
-fix: #261u-input在直接修改v-model的绑定值时,每隔一次会无法出发change事件
-优化折叠面板兼容微信小程序
-## 3.1.42(2024-01-15)
-修复u-number-box默认值0时在小程序不显示值
-优化u-code的timer判断
-优化支付宝小程序下textarea字数统计兼容
-优化u-calendar
-## 3.1.41(2023-11-18)
-#215优化u-cell图标容器间距问题
-## 3.1.40(2023-11-16)
-修复u-slider双向绑定
-## 3.1.39(2023-11-10)
-修复头条小程序不支持env(safe-area-inset-bottom)
-优化#201u-grid 指定列数导致闪烁
-#193IndexList 索引列表 高度错误
-其他优化
-## 3.1.38(2023-10-08)
-修复u-slider
-## 3.1.37(2023-09-13)
-完善emits定义及修复code-input双向数据绑定
-## 3.1.36(2023-08-08)
-修复富文本事件名称大小写
-## 3.1.35(2023-08-02)
-修复编译到支付宝小程序u-form报错
-## 3.1.34(2023-07-27)
-修复App打包uni.$u.mpMixin方式sdk暂时不支持导致报错
-## 3.1.33(2023-07-13)
-修复弹窗进入动画、模板页面样式等
-## 3.1.31(2023-07-11)
-修复dayjs引用
-## 3.0.8(2022-07-12)
-修复u-tag默认宽度撑满容器
-## 3.0.7(2022-07-12)
-修复u-navbar自定义插槽演示示例
-## 3.0.6(2022-07-11)
-修复u-image缺少emits申明
-## 3.0.5(2022-07-11)
-修复u-upload缺少emits申明
-## 3.0.4(2022-07-10)
-修复u-textarea/u-input/u-datetime-picker/u-number-box/u-radio-group/u-switch/u-rate在vue3下数据绑定
-## 3.0.3(2022-07-09)
-启用自建演示二维码
-## 3.0.2(2022-07-09)
-修复dayjs/clipboard等导致打包报错
-## 3.0.1(2022-07-09)
-增加插件市场地址
-## 3.0.0(2022-07-09)
-# uview-plus(vue3)初步发布
-## 3.8.39
-
-- feat: tabbar 新增多种风格预设、动态图标切换与轻量选中动画
-- improvment: tabbar 补充高颜值本地图标示例并优化发布型底栏视觉
+## 3.3.72(2025-02-28)
+feat: tabs组件支持icon图标及插槽
+
+## 3.3.71(2025-02-27)
+feat: 折叠面板collapse增加titileStyle/iconStyle/rightIconStyle属性
+
+feat: 折叠面板组件新增cellCustomStyle/cellCustomClass属性
+
+fix: select组件盒模型
+
+## 3.3.70(2025-02-24)
+fix: 修改u-checkbox-group组件changes事件发生位置
+
+## 3.3.69(2025-02-19)
+picker允许传递禁用颜色props
+
+slider组件isRange状态下增加min max插槽分开显示内容
+
+feat: 新增经典下拉框组件up-select
+
+## 3.3.68(2025-02-12)
+fix: 修复weekText类型
+
+feat: 日历增加单选与多选指定禁止选中的日期功能
+
+fix: NumberBox删除数字时取值有误 #613
+
+## 3.3.67(2025-02-11)
+feat: navbar支持返回全局拦截器配置
+
+feat: 表单-校验-支持无提示-得到校验结果
+
+feat: picker传递hasInput属性时候,可以禁用输入框点击
+
+## 3.3.66(2025-02-09)
+feat: steps-item增加content插槽
+
+## 3.3.65(2025-02-05)
+feat: number-box组件新增按钮圆角/按钮宽度/数据框背景色/迷你模式
+## 3.3.64(2025-01-18)
+feat: 日历组件支持自定义星期文案
+
+## 3.3.63(2025-01-13)
+fix: cate-tab支持支付宝小程序
+
+fix: textarea 修复 placeholder-style
+
+fix: 修复在图片加载及加载失败时容器宽度
+
+fix: waterfall组件报错Maximum recursive updates
+
+## 3.3.62(2025-01-10)
+feat: sleder滑动选择器双滑块增加外层触发值的变动功能
+
+fix: picker支持hasInput优化
+
+## 3.3.61(2024-12-31)
+fix: 修复微信getSystemInfoSync接口废弃警告
+
+fix: 'u-status-bar' symbol missing
+
+## 3.3.60(2024-12-30)
+feat: 日期组件支持禁用
+
+fix: ts定义修复 #600
+
+feat: Tabs组件选中时增加一个active的class #595
+
+## 3.3.59(2024-12-30)
+fix: Property "isH5" was accessed during render
+
+## 3.3.58(2024-12-26)
+fix: slider组件change事件传参
+
+## 3.3.57(2024-12-23)
+fix: slider组件change事件传参
+
+feat: 更新u-picker组件增加当前选中class类名
+
+## 3.3.56(2024-12-18)
+feat: 在u-alert组件中添加关闭事件
+
+## 3.3.55(2024-12-17)
+add: swiper增加双向绑定
+
+## 3.3.54(2024-12-11)
+add: qrcode支持props控制是否开启点击预览
+
+add: 新增cate-tab垂直分类组件
+
+## 3.3.53(2024-12-10)
+fix: 修复popup居中模式点击内容区域触发关闭
+
+## 3.3.52(2024-12-09)
+add: notice-bar支持justifyContent属性
+
+## 3.3.51(2024-12-09)
+add: radio增加label插槽
+
+## 3.3.50(2024-12-05)
+fix: 优化popup等对禁止背景滚动机制
+
+add: slider在弹窗使用示例
+
+fix: card组件类名问题
+
+## 3.3.49(2024-12-02)
+fix: 去除album多余的$u引用
+
+fix: 优化图片组件兼容性
+
+add: picker组件增加zIndex属性
+
+add: text增加是否占满剩余空间属性
+
+add: input颜色示例
+
+## 3.3.48(2024-11-29)
+add: 文本行数限制样式提高到10行
+
+del: 去除不跨端的inputmode
+## 3.3.47(2024-11-28)
+fix: 时间选择器在hasInput模式下部分机型键盘弹出
+
+## 3.3.46(2024-11-26)
+fix: 修复text传递事件参数
+
+## 3.3.45(2024-11-24)
+add: navbar组件支持配置标题颜色
+
+fix: 边框按钮警告类型下颜色变量使用错误
+
+## 3.3.43(2024-11-18)
+fix: 支持瀑布流组件v-model置为[]
+
+add: 新增字符串路径访问工具方法getValueByPath
+
+add: 新增float-button悬浮按钮组件
+
+## 3.3.42(2024-11-15)
+add: button组件支持stop参数阻止冒泡
+
+## 3.3.41(2024-11-13)
+fix: u-radio-group invalid import
+
+improvement: 优化图片组件宽高及修复事件event传递
+
+## 3.3.40(2024-11-11)
+add: 组件radioGroup增加gap属性用于设置item间隔
+
+fix: 修复H5全局导入
+
+## 3.3.39(2024-11-04)
+fix: 修复相册组件
+
+## 3.3.38(2024-11-04)
+fix: 修复视频预览报错 #510
+
+add: album组件增加stop参数支持阻止事件冒泡
+
+## 3.3.37(2024-10-21)
+fix: 修复因为修改组件名称前缀,导致h5打包后$parent方法内找不到父组件的问题
+
+fix: 修复datetime-picker选择2000年以前日期出错
+
+## 3.3.36(2024-10-09)
+fix: toast 自动关闭
+
+feat: 增加微信小程序用户昵称审核完毕回调及修改 ts 定义文件
+
+## 3.3.35(2024-10-08)
+feat: modal和picker支持v-model:show双向绑定
+
+feat: 支持checkbox使用slot自定义label后自带点击事件 #522
+
+feat: swipe-action支持自动关闭特性及初始化打开状态
+
+## 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)
+上传组件支持微信小程序预览视频
+
+修复折叠面板右侧箭头不显示
+
+修复uxp2px
+
+## 3.2.21(2024-05-10)
+fix: loading-icon修复flex布局
+## 3.2.20(2024-05-10)
+修复瀑布流大小写#355
+## 3.2.19(2024-05-10)
+去除意外的文件引入
+## 3.2.18(2024-05-09)
+fix: 349 popup 组件设置 zIndex 属性后,组件渲染异常#
+feat: 搜索框增加adjustPosition属性
+fix: #331增加u-action-sheet__cancel
+优化mixin兼容性
+feat: #326 up-list增加下拉刷新功能
+fix: #319 优化up-tabs参数与定义匹配
+fix: index-list组件微信小程序端使用自定义导航栏异常
+fix: #285 pickerimmediateChange 写死为true
+fix: #111 u-scroll-list组件,隐藏指示器后报错, 提示找不到ref
+list增加微信小程序防抖配置
+
+## 3.2.17(2024-05-08)
+fix: 支付宝小程序二维码渲染
+## 3.2.16(2024-05-06)
+修复tabs中,当前激活样式的undefined bug
+
+fix: #341u-code 倒计时没结束前退出,再次进入结束后退出界面,再次进入重新开始倒计时bug
+
+受到uni-app内置text样式影响修复
+
+## 3.2.15(2024-04-28)
+优化时间选择器hasInput模式初始化值
+## 3.2.14(2024-04-24)
+去除pleaseSetTranspileDependencies
+
+http采用useStore
+
+## 3.2.13(2024-04-22)
+修复modal标题样式
+
+优化日期选择器hasInput模式宽度
+
+## 3.2.12(2024-04-22)
+修复color应用
+## 3.2.11(2024-04-18)
+修复import化带来的问题
+## 3.2.10(2024-04-17)
+完善input清空事件App端失效的兼容性
+
+修复日历组件二次打开后当前月份显示不正确
+
+## 3.2.9(2024-04-16)
+组件内uni.$u用法改为import引入
+
+规范化及兼容性增强
+
+## 3.2.8(2024-04-15)
+修复up-tag语法错
+## 3.2.7(2024-04-15)
+修复下拉菜单背景色在支付宝小程序无效
+
+setConfig改为浅拷贝解决无法用import导入代替uni.$u.props设置
+
+## 3.2.6(2024-04-14)
+修复某些情况下滑动单元格默认右侧按钮是展开的问题
+## 3.2.5(2024-04-13)
+调整分段器尺寸及修复窗口大小改变时重新计算尺寸
+
+多个组件支持cursor-pointer增强PC端体验
+
+## 3.2.4(2024-04-12)
+初步支持typescript
+## 3.2.3(2024-04-12)
+fix: 修复square属性在小程序下无效问题
+
+fix:修复lastIndex异常导致的column异常问题
+
+fix: alipayapp picker style
+
+feat(button): 添加用户同意隐私协议事件回调
+
+fix: input switch password
+
+fix: 修复u-code组件keepRuning失效问题
+
+feat: form-item添加labelPosition属性
+
+新增dropdown组件
+
+分段器支持内部current值
+
+优化cell和action-sheet视觉大小
+
+修复tabs文字换行
+
+## 3.2.2(2024-04-11)
+修复换行符问题
+## 3.2.1(2024-04-11)
+修复演示H5二维码
+
+fix: #270 ReadMore 展开阅读更多内容变化兼容
+
+fix: #238Calendar组件maxDate修改为不能小于minDate
+
+checkbox支持独立使用
+
+修复popup中在微信小程序中真机调试滚动失效
+
+## 3.2.0(2024-04-10)
+修复轮播图在nvue显示
+修复疑似u-slider名称被占用导致slider在App下不显示
+解决微信小程序提示 Some selectors are not allowed in component wxss
+示例中u-前缀统一为up-
+增加瀑布流与图片懒加载组件
+fix: #308修复tag组件缺失iconColor参数
+fix: #297使用grid布局解决目前编译为抖音小程序无法开启virtualHost
+## 3.1.52(2024-04-07)
+工具类方法调用import化改造
+新增up-copy复制组件
+## 3.1.51(2024-04-07)
+优化时间选择器自带输入框格式化显示
+防止按钮文字换行
+修复订单列表模板滑动
+增加u-qrcode二维码组件
+## 3.1.49(2024-03-27)
+日期时间组件支持自带输入框
+fix: popup弹窗滚动穿透问题
+fix: 修复小程序numberbox bug
+## 3.1.48(2024-03-18)
+fix:[plugin:uni:pre-css] Unbalanced delimiter found in string
+## 3.1.47(2024-03-18)
+fix: setConfig设置组件默认参数无效问题
+fix: 修复自定义图标无效问题
+feat: 增加u-form-item单独设置规则变量
+fix:#293小程序是自定义导航栏的时候即传了customNavHeight的时候会出现跳转偏移的情况
+
+## 3.1.46(2024-01-29)
+beforeUnmount
+## 3.1.45(2024-01-24)
+fix: #262ext组件为超链接的情况下size属性不生效
+fix: #263最新版本3.1.42中微信小程序u-swipe-action-item报错
+fix: #224最新版本3.1.42中微信小程序u-swipe-action-item报错
+fix: #263支持支付宝小程序
+fix: #261u-input在直接修改v-model的绑定值时,每隔一次会无法出发change事件
+优化折叠面板兼容微信小程序
+## 3.1.42(2024-01-15)
+修复u-number-box默认值0时在小程序不显示值
+优化u-code的timer判断
+优化支付宝小程序下textarea字数统计兼容
+优化u-calendar
+## 3.1.41(2023-11-18)
+#215优化u-cell图标容器间距问题
+## 3.1.40(2023-11-16)
+修复u-slider双向绑定
+## 3.1.39(2023-11-10)
+修复头条小程序不支持env(safe-area-inset-bottom)
+优化#201u-grid 指定列数导致闪烁
+#193IndexList 索引列表 高度错误
+其他优化
+## 3.1.38(2023-10-08)
+修复u-slider
+## 3.1.37(2023-09-13)
+完善emits定义及修复code-input双向数据绑定
+## 3.1.36(2023-08-08)
+修复富文本事件名称大小写
+## 3.1.35(2023-08-02)
+修复编译到支付宝小程序u-form报错
+## 3.1.34(2023-07-27)
+修复App打包uni.$u.mpMixin方式sdk暂时不支持导致报错
+## 3.1.33(2023-07-13)
+修复弹窗进入动画、模板页面样式等
+## 3.1.31(2023-07-11)
+修复dayjs引用
+## 3.0.8(2022-07-12)
+修复u-tag默认宽度撑满容器
+## 3.0.7(2022-07-12)
+修复u-navbar自定义插槽演示示例
+## 3.0.6(2022-07-11)
+修复u-image缺少emits申明
+## 3.0.5(2022-07-11)
+修复u-upload缺少emits申明
+## 3.0.4(2022-07-10)
+修复u-textarea/u-input/u-datetime-picker/u-number-box/u-radio-group/u-switch/u-rate在vue3下数据绑定
+## 3.0.3(2022-07-09)
+启用自建演示二维码
+## 3.0.2(2022-07-09)
+修复dayjs/clipboard等导致打包报错
+## 3.0.1(2022-07-09)
+增加插件市场地址
+## 3.0.0(2022-07-09)
+# uview-plus(vue3)初步发布
diff --git a/uni_modules/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue b/uni_modules/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue
deleted file mode 100644
index 234d5cf..0000000
--- a/uni_modules/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js b/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js
index bc27648..fb6787d 100644
--- a/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js
+++ b/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js
@@ -1,28 +1,26 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-08-16 10:52:35
- * @FilePath : /uview-plus/libs/config/props/actionSheet.js
- */
-export default {
- // action-sheet组件
- actionSheet: {
- show: false,
- title: '',
- description: '',
- actions: [],
- nameKey: 'name',
- subnameKey: 'subnameKey',
- index: '',
- cancelText: '',
- closeOnClickAction: true,
- safeAreaInsetBottom: true,
- openType: '',
- closeOnClickOverlay: true,
- round: 0,
- wrapMaxHeight: '600px'
- }
-}
+/*
+ * @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'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-action-sheet/props.js b/uni_modules/uview-plus/components/u-action-sheet/props.js
index 6b6550d..43ba0f2 100644
--- a/uni_modules/uview-plus/components/u-action-sheet/props.js
+++ b/uni_modules/uview-plus/components/u-action-sheet/props.js
@@ -1,82 +1,62 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @LastAuthor : jry
- * @lastTime : 2025-08-16 10:52:35
- * @FilePath : /uview-plus/libs/config/props/props.js
- */
-import { defineMixin } from '../../libs/vue'
-import ActionSheetDefaultProps from './actionSheet'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(ActionSheetDefaultProps)
-export const props = defineMixin({
- props: {
- // 操作菜单是否展示 (默认false)
- show: {
- type: Boolean,
- default: () => defProps.actionSheet.show
- },
- // 标题
- title: {
- type: String,
- default: () => defProps.actionSheet.title
- },
- // 选项上方的描述信息
- description: {
- type: String,
- default: () => defProps.actionSheet.description
- },
- // 数据
- actions: {
- type: Array,
- default: () => defProps.actionSheet.actions
- },
- // 选项名称key
- nameKey: {
- type: String,
- default: () => defProps.actionSheet.nameKey
- },
- // 选项子名称key
- subnameKey: {
- type: String,
- default: () => defProps.actionSheet.subnameKey
- },
- // 取消按钮的文字,不为空时显示按钮
- cancelText: {
- type: String,
- default: () => defProps.actionSheet.cancelText
- },
- // 点击某个菜单项时是否关闭弹窗
- closeOnClickAction: {
- type: Boolean,
- default: () => defProps.actionSheet.closeOnClickAction
- },
- // 处理底部安全区(默认true)
- safeAreaInsetBottom: {
- type: Boolean,
- default: () => defProps.actionSheet.safeAreaInsetBottom
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: () => defProps.actionSheet.openType
- },
- // 点击遮罩是否允许关闭 (默认true)
- closeOnClickOverlay: {
- type: Boolean,
- default: () => defProps.actionSheet.closeOnClickOverlay
- },
- // 圆角值
- round: {
- type: [Boolean, String, Number],
- default: () => defProps.actionSheet.round
- },
- // 选项区域最大高度
- wrapMaxHeight: {
- type: [String],
- default: () => defProps.actionSheet.wrapMaxHeight
- },
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
+ props: {
+ // 操作菜单是否展示 (默认false)
+ show: {
+ type: Boolean,
+ default: () => defProps.actionSheet.show
+ },
+ // 标题
+ title: {
+ type: String,
+ default: () => defProps.actionSheet.title
+ },
+ // 选项上方的描述信息
+ description: {
+ type: String,
+ default: () => defProps.actionSheet.description
+ },
+ // 数据
+ actions: {
+ type: Array,
+ default: () => defProps.actionSheet.actions
+ },
+ // 取消按钮的文字,不为空时显示按钮
+ cancelText: {
+ type: String,
+ default: () => defProps.actionSheet.cancelText
+ },
+ // 点击某个菜单项时是否关闭弹窗
+ closeOnClickAction: {
+ type: Boolean,
+ default: () => defProps.actionSheet.closeOnClickAction
+ },
+ // 处理底部安全区(默认true)
+ safeAreaInsetBottom: {
+ type: Boolean,
+ default: () => defProps.actionSheet.safeAreaInsetBottom
+ },
+ // 小程序的打开方式
+ openType: {
+ type: String,
+ default: () => defProps.actionSheet.openType
+ },
+ // 点击遮罩是否允许关闭 (默认true)
+ closeOnClickOverlay: {
+ type: Boolean,
+ default: () => defProps.actionSheet.closeOnClickOverlay
+ },
+ // 圆角值
+ round: {
+ type: [Boolean, String, Number],
+ default: () => defProps.actionSheet.round
+ },
+ // 选项区域最大高度
+ wrapMaxHeight: {
+ type: [String],
+ default: () => defProps.actionSheet.wrapMaxHeight
+ },
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue b/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue
index 0a877ce..1478bf6 100644
--- a/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue
+++ b/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue
@@ -1,341 +1,283 @@
-
-
-
-
-
-
- {{description}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{cancelText}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{description}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{cancelText}}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-agreement/u-agreement.vue b/uni_modules/uview-plus/components/u-agreement/u-agreement.vue
deleted file mode 100644
index 51efca1..0000000
--- a/uni_modules/uview-plus/components/u-agreement/u-agreement.vue
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
- 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,
- 请务必审慎阅读《用户协议》
- 和《隐私政策》内的所有条款,
- 尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2. 约定我们的限制责任、免责
- 条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,请先不要同意,您点击“同意并继续”的行为即表示您已阅读
- 完毕并同意以上协议的全部内容。
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-album/album.js b/uni_modules/uview-plus/components/u-album/album.js
index e7568bf..7eea921 100644
--- a/uni_modules/uview-plus/components/u-album/album.js
+++ b/uni_modules/uview-plus/components/u-album/album.js
@@ -1,28 +1,28 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-08-16 16:32:24
- * @FilePath : /uview-plus/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',
- stop: true,
- }
-}
+/*
+ * @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',
+ stop: true,
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-album/props.js b/uni_modules/uview-plus/components/u-album/props.js
index beafed1..828ab04 100644
--- a/uni_modules/uview-plus/components/u-album/props.js
+++ b/uni_modules/uview-plus/components/u-album/props.js
@@ -1,97 +1,86 @@
-/*
- * @Author : jry
- * @Description :
- * @version : 3.0
- * @LastAuthor : jry
- * @lastTime : 2025-08-16 16:35:24
- * @FilePath : /uview-plus/components/u-album/props.js
- */
-import { defineMixin } from '../../libs/vue'
-import AlbumDefaultProps from './album'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(AlbumDefaultProps)
-export const props = defineMixin({
- props: {
- // 图片地址,Array|Array
@@ -56,7 +56,7 @@
/**
* readMore 阅读更多
* @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
- * @tutorial https://uview-plus.jiangruyi.com/components/readMore.html
+ * @tutorial https://ijry.github.io/uview-plus/components/readMore.html
* @property {String | Number} showHeight 内容超出此高度才会显示展开全文按钮,单位px(默认 400 )
* @property {Boolean} toggle 展开后是否显示收起按钮(默认 false )
* @property {String} closeText 关闭时的提示文字(默认 '展开阅读全文' )
@@ -140,6 +140,8 @@
+
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-row/props.js b/uni_modules/uview-plus/components/u-row/props.js
index 7e4d76c..e80f563 100644
--- a/uni_modules/uview-plus/components/u-row/props.js
+++ b/uni_modules/uview-plus/components/u-row/props.js
@@ -1,24 +1,21 @@
-import { defineMixin } from '../../libs/vue'
-import RowDefaultProps from './row'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(RowDefaultProps)
-export const props = defineMixin({
- props: {
- // 给col添加间距,左右边距各占一半
- gutter: {
- type: [String, Number],
- default: () => defProps.row.gutter
- },
- // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
- justify: {
- type: String,
- default: () => defProps.row.justify
- },
- // 垂直对齐方式,可选值为top、center、bottom
- align: {
- type: String,
- default: () => defProps.row.align
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 给col添加间距,左右边距各占一半
+ gutter: {
+ type: [String, Number],
+ default: () => defProps.row.gutter
+ },
+ // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
+ justify: {
+ type: String,
+ default: () => defProps.row.justify
+ },
+ // 垂直对齐方式,可选值为top、center、bottom
+ align: {
+ type: String,
+ default: () => defProps.row.align
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-row/row.js b/uni_modules/uview-plus/components/u-row/row.js
index 3363f1e..e187bfb 100644
--- a/uni_modules/uview-plus/components/u-row/row.js
+++ b/uni_modules/uview-plus/components/u-row/row.js
@@ -1,17 +1,17 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/row.js
- */
-export default {
- // row
- row: {
- gutter: 0,
- justify: 'start',
- align: 'center'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:18:58
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/row.js
+ */
+export default {
+ // row
+ row: {
+ gutter: 0,
+ justify: 'start',
+ align: 'center'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-row/u-row.vue b/uni_modules/uview-plus/components/u-row/u-row.vue
index e89a941..e9afcf7 100644
--- a/uni_modules/uview-plus/components/u-row/u-row.vue
+++ b/uni_modules/uview-plus/components/u-row/u-row.vue
@@ -1,96 +1,97 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-safe-bottom/props.js b/uni_modules/uview-plus/components/u-safe-bottom/props.js
index 276d5b9..dc90e0d 100644
--- a/uni_modules/uview-plus/components/u-safe-bottom/props.js
+++ b/uni_modules/uview-plus/components/u-safe-bottom/props.js
@@ -1,8 +1,7 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ safeBottom: {} })
-export const props = defineMixin({
- props: {
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
+ props: {
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue b/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue
index 1f1031d..70c381b 100644
--- a/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue
+++ b/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue
@@ -15,7 +15,7 @@
/**
* SafeBottom 底部安全区
* @description 这个适配,主要是针对IPhone X等一些底部带指示条的机型,指示条的操作区域与页面底部存在重合,容易导致用户误操作,因此我们需要针对这些机型进行底部安全区适配。
- * @tutorial https://uview-plus.jiangruyi.com/components/safeAreaInset.html
+ * @tutorial https://ijry.github.io/uview-plus/components/safeAreaInset.html
* @property {type} prop_name
* @property {Object} customStyle 定义需要用到的外部样式
*
@@ -34,7 +34,7 @@
computed: {
style() {
const style = {};
- // #ifdef APP-NVUE || MP-TOUTIAO || MP-WEIXIN
+ // #ifdef APP-NVUE || MP-TOUTIAO
// nvue下,高度使用js计算填充
style.height = addUnit(getWindowInfo().safeAreaInsets.bottom, 'px');
// #endif
@@ -42,7 +42,7 @@
},
},
mounted() {
- // #ifdef APP-NVUE || MP-TOUTIAO || MP-WEIXIN
+ // #ifdef APP-NVUE
// 标识为是否nvue
this.isNvue = true;
// #endif
diff --git a/uni_modules/uview-plus/components/u-scroll-list/props.js b/uni_modules/uview-plus/components/u-scroll-list/props.js
index 5e1f27e..d13cc77 100644
--- a/uni_modules/uview-plus/components/u-scroll-list/props.js
+++ b/uni_modules/uview-plus/components/u-scroll-list/props.js
@@ -1,39 +1,36 @@
-import { defineMixin } from '../../libs/vue'
-import ScrollListDefaultProps from './scrollList'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(ScrollListDefaultProps)
-export const props = defineMixin({
- props: {
- // 指示器的整体宽度
- indicatorWidth: {
- type: [String, Number],
- default: () => defProps.scrollList.indicatorWidth
- },
- // 滑块的宽度
- indicatorBarWidth: {
- type: [String, Number],
- default: () => defProps.scrollList.indicatorBarWidth
- },
- // 是否显示面板指示器
- indicator: {
- type: Boolean,
- default: () => defProps.scrollList.indicator
- },
- // 指示器非激活颜色
- indicatorColor: {
- type: String,
- default: () => defProps.scrollList.indicatorColor
- },
- // 指示器的激活颜色
- indicatorActiveColor: {
- type: String,
- default: () => defProps.scrollList.indicatorActiveColor
- },
- // 指示器样式,可通过bottom,left,right进行定位
- indicatorStyle: {
- type: [String, Object],
- default: () => defProps.scrollList.indicatorStyle
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 指示器的整体宽度
+ indicatorWidth: {
+ type: [String, Number],
+ default: () => defProps.scrollList.indicatorWidth
+ },
+ // 滑块的宽度
+ indicatorBarWidth: {
+ type: [String, Number],
+ default: () => defProps.scrollList.indicatorBarWidth
+ },
+ // 是否显示面板指示器
+ indicator: {
+ type: Boolean,
+ default: () => defProps.scrollList.indicator
+ },
+ // 指示器非激活颜色
+ indicatorColor: {
+ type: String,
+ default: () => defProps.scrollList.indicatorColor
+ },
+ // 指示器的激活颜色
+ indicatorActiveColor: {
+ type: String,
+ default: () => defProps.scrollList.indicatorActiveColor
+ },
+ // 指示器样式,可通过bottom,left,right进行定位
+ indicatorStyle: {
+ type: [String, Object],
+ default: () => defProps.scrollList.indicatorStyle
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-scroll-list/scrollList.js b/uni_modules/uview-plus/components/u-scroll-list/scrollList.js
index 15e3ae0..da69b49 100644
--- a/uni_modules/uview-plus/components/u-scroll-list/scrollList.js
+++ b/uni_modules/uview-plus/components/u-scroll-list/scrollList.js
@@ -1,20 +1,20 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/scrollList.js
- */
-export default {
- // scrollList
- scrollList: {
- indicatorWidth: 50,
- indicatorBarWidth: 20,
- indicator: true,
- indicatorColor: '#f2f2f2',
- indicatorActiveColor: '#3c9cff',
- indicatorStyle: ''
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:19:28
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/scrollList.js
+ */
+export default {
+ // scrollList
+ scrollList: {
+ indicatorWidth: 50,
+ indicatorBarWidth: 20,
+ indicator: true,
+ indicatorColor: '#f2f2f2',
+ indicatorActiveColor: '#3c9cff',
+ indicatorStyle: ''
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-scroll-list/scrollWxs.wxs b/uni_modules/uview-plus/components/u-scroll-list/scrollWxs.wxs
index ce94f1d..73092c7 100644
--- a/uni_modules/uview-plus/components/u-scroll-list/scrollWxs.wxs
+++ b/uni_modules/uview-plus/components/u-scroll-list/scrollWxs.wxs
@@ -1,50 +1,50 @@
-function scroll(event, ownerInstance) {
- // detail中含有scroll-view的信息,比如scroll-view的实际宽度,当前时间点scroll-view的移动距离等
- var detail = event.detail
- var scrollWidth = detail.scrollWidth
- var scrollLeft = detail.scrollLeft
- // 获取当前组件的dataset,说白了就是祸国殃民的腾xun搞出来的垃ji
- var dataset = event.currentTarget.dataset
- // 此为scroll-view外部包裹元素的宽度
- // 某些HX版本(3.1.18),发现view元素中大写的data-scrollWidth,在wxs中,变成了全部小写,所以这里需要特别处理
- var scrollComponentWidth = dataset.scrollWidth || dataset.scrollwidth || 0
- // 指示器和滑块的宽度
- var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0
- var barWidth = dataset.barWidth || dataset.barwidth || 0
- // 此处的计算理由为:scroll-view的滚动距离与目标滚动距离(scroll-view的实际宽度减去包裹元素的宽度)之比,等于滑块当前移动距离与总需
- // 滑动距离(指示器的总宽度减去滑块宽度)的比值
- var x = scrollLeft / (scrollWidth - scrollComponentWidth) * (indicatorWidth - barWidth)
- setBarStyle(ownerInstance, x)
-}
-
-// 由于webview的无能,无法保证scroll-view在滑动过程中,一直触发scroll事件,会导致
-// 无法监听到某些滚动值,当在首尾临界值无法监听到时,这是致命的,因为错失这些值会导致滑块无法回到起点和终点
-// 所以这里需要对临界值做监听并处理
-function scrolltolower(event, ownerInstance) {
- ownerInstance.callMethod('scrollEvent', 'right')
- // 获取当前组件的dataset
- var dataset = event.currentTarget.dataset
- // 指示器和滑块的宽度
- var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0
- var barWidth = dataset.barWidth || dataset.barwidth || 0
- // scroll-view滚动到右边终点时,将滑块也设置为到右边的终点,它所需移动的距离为:指示器宽度 - 滑块宽度
- setBarStyle(ownerInstance, indicatorWidth - barWidth)
-}
-
-function scrolltoupper(event, ownerInstance) {
- ownerInstance.callMethod('scrollEvent', 'left')
- // 滚动到左边时,将滑块设置为0的偏移距离,回到起点
- setBarStyle(ownerInstance, 0)
-}
-
-function setBarStyle(ownerInstance, x) {
- ownerInstance.selectComponent('.u-scroll-list__indicator__line__bar') && ownerInstance.selectComponent('.u-scroll-list__indicator__line__bar').setStyle({
- transform: 'translateX(' + x + 'px)'
- })
-}
-
-module.exports = {
- scroll: scroll,
- scrolltolower: scrolltolower,
- scrolltoupper: scrolltoupper
-}
+function scroll(event, ownerInstance) {
+ // detail中含有scroll-view的信息,比如scroll-view的实际宽度,当前时间点scroll-view的移动距离等
+ var detail = event.detail
+ var scrollWidth = detail.scrollWidth
+ var scrollLeft = detail.scrollLeft
+ // 获取当前组件的dataset,说白了就是祸国殃民的腾xun搞出来的垃ji
+ var dataset = event.currentTarget.dataset
+ // 此为scroll-view外部包裹元素的宽度
+ // 某些HX版本(3.1.18),发现view元素中大写的data-scrollWidth,在wxs中,变成了全部小写,所以这里需要特别处理
+ var scrollComponentWidth = dataset.scrollWidth || dataset.scrollwidth || 0
+ // 指示器和滑块的宽度
+ var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0
+ var barWidth = dataset.barWidth || dataset.barwidth || 0
+ // 此处的计算理由为:scroll-view的滚动距离与目标滚动距离(scroll-view的实际宽度减去包裹元素的宽度)之比,等于滑块当前移动距离与总需
+ // 滑动距离(指示器的总宽度减去滑块宽度)的比值
+ var x = scrollLeft / (scrollWidth - scrollComponentWidth) * (indicatorWidth - barWidth)
+ setBarStyle(ownerInstance, x)
+}
+
+// 由于webview的无能,无法保证scroll-view在滑动过程中,一直触发scroll事件,会导致
+// 无法监听到某些滚动值,当在首尾临界值无法监听到时,这是致命的,因为错失这些值会导致滑块无法回到起点和终点
+// 所以这里需要对临界值做监听并处理
+function scrolltolower(event, ownerInstance) {
+ ownerInstance.callMethod('scrollEvent', 'right')
+ // 获取当前组件的dataset
+ var dataset = event.currentTarget.dataset
+ // 指示器和滑块的宽度
+ var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0
+ var barWidth = dataset.barWidth || dataset.barwidth || 0
+ // scroll-view滚动到右边终点时,将滑块也设置为到右边的终点,它所需移动的距离为:指示器宽度 - 滑块宽度
+ setBarStyle(ownerInstance, indicatorWidth - barWidth)
+}
+
+function scrolltoupper(event, ownerInstance) {
+ ownerInstance.callMethod('scrollEvent', 'left')
+ // 滚动到左边时,将滑块设置为0的偏移距离,回到起点
+ setBarStyle(ownerInstance, 0)
+}
+
+function setBarStyle(ownerInstance, x) {
+ ownerInstance.selectComponent('.u-scroll-list__indicator__line__bar') && ownerInstance.selectComponent('.u-scroll-list__indicator__line__bar').setStyle({
+ transform: 'translateX(' + x + 'px)'
+ })
+}
+
+module.exports = {
+ scroll: scroll,
+ scrolltolower: scrolltolower,
+ scrolltoupper: scrolltoupper
+}
diff --git a/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue b/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue
index 6e80fea..e09c2ec 100644
--- a/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue
+++ b/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue
@@ -1,233 +1,235 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-search/props.js b/uni_modules/uview-plus/components/u-search/props.js
index bf9d7e8..4b9a455 100644
--- a/uni_modules/uview-plus/components/u-search/props.js
+++ b/uni_modules/uview-plus/components/u-search/props.js
@@ -1,158 +1,134 @@
-import { defineMixin } from '../../libs/vue'
-import SearchDefaultProps from './search'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SearchDefaultProps)
-export const props = defineMixin({
- props: {
- // #ifdef VUE3
- // 绑定的值
- modelValue: {
- type: [String, Number],
- default: () => defProps.search.value
- },
- // #endif
- // #ifdef VUE2
- // 绑定的值
- value: {
- type: [String, Number],
- default: () => defProps.search.value
- },
- // #endif
- // 搜索框形状,round-圆形,square-方形
- shape: {
- type: String,
- default: () => defProps.search.shape
- },
- // 搜索框背景色
- bgColor: {
- type: String,
- default: () => defProps.search.bgColor
- },
- // 占位提示文字
- placeholder: {
- type: String,
- default: () => defProps.search.placeholder
- },
- // 是否启用清除控件
- clearabled: {
- type: Boolean,
- default: () => defProps.search.clearabled
- },
- // 是否仅聚焦时显示清除控件
- onlyClearableOnFocused: {
- type: Boolean,
- default: true
- },
- // 是否自动聚焦
- focus: {
- type: Boolean,
- default: () => defProps.search.focus
- },
- // 是否在搜索框右侧显示取消按钮
- showAction: {
- type: Boolean,
- default: () => defProps.search.showAction
- },
- // 右侧取消按钮文字
- actionText: {
- type: String,
- default: () => defProps.search.actionText
- },
- // 搜索框左侧文本
- label: {
- type: [String, Number, null],
- default: () => defProps.search.label
- },
- // 输入框内容对齐方式,可选值为:left|center|right
- inputAlign: {
- type: String,
- default: () => defProps.search.inputAlign
- },
- // 是否启用输入框
- disabled: {
- type: Boolean,
- default: () => defProps.search.disabled
- },
- // 开启showAction时,是否在input获取焦点时才显示
- animation: {
- type: Boolean,
- default: () => defProps.search.animation
- },
- // 边框颜色,只要配置了颜色,才会有边框
- borderColor: {
- type: String,
- default: () => defProps.search.borderColor
- },
- // 搜索图标的颜色,默认同输入框字体颜色
- searchIconColor: {
- type: String,
- default: () => defProps.search.searchIconColor
- },
- // 搜索图标的大小
- searchIconSize: {
- type: [Number, String],
- default: () => defProps.search.searchIconSize
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: () => defProps.search.color
- },
- // placeholder的颜色
- placeholderColor: {
- type: String,
- default: () => defProps.search.placeholderColor
- },
- // 左边输入框的图标,可以为uView图标名称或图片路径
- searchIcon: {
- type: String,
- default: () => defProps.search.searchIcon
- },
- // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"
- margin: {
- type: String,
- default: () => defProps.search.margin
- },
- // 应该是uView-plus版本新增的,用于控制搜索图标的插槽位置
- iconPosition: {
- type: String,
- default: () => defProps.search.iconPosition
- },
- // 输入框最大能输入的长度,-1为不限制长度
- maxlength: {
- type: [String, Number],
- default: () => defProps.search.maxlength
- },
- // 输入框高度,单位px
- height: {
- type: [String, Number],
- default: () => defProps.search.height
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: () => defProps.search.adjustPosition
- },
- // 键盘收起时,是否自动失去焦点
- autoBlur: {
- type: Boolean,
- default: () => defProps.search.autoBlur
- },
- // 输入框的样式,对象形式
- inputStyle: {
- type: Object,
- default: () => defProps.search.inputStyle
- },
- // 右侧控件的样式,对象形式
- actionStyle: {
- type: Object,
- default: () => defProps.search.actionStyle
- },
- // 自定义样式,对象形式
- customStyle: {
- type: Object,
- default: () => defProps.search.customStyle
- }
- }
-})
\ No newline at end of file
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 搜索框形状,round-圆形,square-方形
+ shape: {
+ type: String,
+ default: () => defProps.search.shape
+ },
+ // 搜索框背景色,默认值#f2f2f2
+ bgColor: {
+ type: String,
+ default: () => defProps.search.bgColor
+ },
+ // 占位提示文字
+ placeholder: {
+ type: String,
+ default: () => defProps.search.placeholder
+ },
+ // 是否启用清除控件
+ clearabled: {
+ type: Boolean,
+ default: () => defProps.search.clearabled
+ },
+ // 是否自动聚焦
+ focus: {
+ type: Boolean,
+ default: () => defProps.search.focus
+ },
+ // 是否在搜索框右侧显示取消按钮
+ showAction: {
+ type: Boolean,
+ default: () => defProps.search.showAction
+ },
+ // 右边控件的样式
+ actionStyle: {
+ type: Object,
+ default: () => defProps.search.actionStyle
+ },
+ // 取消按钮文字
+ actionText: {
+ type: String,
+ default: () => defProps.search.actionText
+ },
+ // 输入框内容对齐方式,可选值为 left|center|right
+ inputAlign: {
+ type: String,
+ default: () => defProps.search.inputAlign
+ },
+ // input输入框的样式,可以定义文字颜色,大小等,对象形式
+ inputStyle: {
+ type: Object,
+ default: () => defProps.search.inputStyle
+ },
+ // 是否启用输入框
+ disabled: {
+ type: Boolean,
+ default: () => defProps.search.disabled
+ },
+ // 边框颜色
+ borderColor: {
+ type: String,
+ default: () => defProps.search.borderColor
+ },
+ // 搜索图标的颜色,默认同输入框字体颜色
+ searchIconColor: {
+ type: String,
+ default: () => defProps.search.searchIconColor
+ },
+ // 输入框字体颜色
+ color: {
+ type: String,
+ default: () => defProps.search.color
+ },
+ // placeholder的颜色
+ placeholderColor: {
+ type: String,
+ default: () => defProps.search.placeholderColor
+ },
+ // 左边输入框的图标,可以为uView图标名称或图片路径
+ searchIcon: {
+ type: String,
+ default: () => defProps.search.searchIcon
+ },
+ searchIconSize: {
+ type: [Number, String],
+ default: () => defProps.search.searchIconSize
+ },
+ // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
+ margin: {
+ type: String,
+ default: () => defProps.search.margin
+ },
+ // 开启showAction时,是否在input获取焦点时才显示
+ animation: {
+ type: Boolean,
+ default: () => defProps.search.animation
+ },
+ // 输入框的初始化内容
+ modelValue: {
+ type: String,
+ default: () => defProps.search.value
+ },
+ value: {
+ type: String,
+ default: () => defProps.search.value
+ },
+ // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
+ maxlength: {
+ type: [String, Number],
+ default: () => defProps.search.maxlength
+ },
+ // 搜索框高度,单位px
+ height: {
+ type: [String, Number],
+ default: () => defProps.search.height
+ },
+ // 搜索框左侧文本
+ label: {
+ type: [String, Number, null],
+ default: () => defProps.search.label
+ },
+ // 键盘弹起时,是否自动上推页面
+ adjustPosition: {
+ type: Boolean,
+ default: () => true
+ },
+ // 键盘收起时,是否自动失去焦点
+ autoBlur: {
+ type: Boolean,
+ default: () => false
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-search/search.js b/uni_modules/uview-plus/components/u-search/search.js
index 5e7203c..524d447 100644
--- a/uni_modules/uview-plus/components/u-search/search.js
+++ b/uni_modules/uview-plus/components/u-search/search.js
@@ -1,41 +1,37 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/search.js
- */
-import { t } from '../../libs/i18n'
-export default {
- // search
- search: {
- shape: 'round',
- bgColor: '',
- placeholder: t("up.search.placeholder"),
- clearabled: true,
- focus: false,
- showAction: true,
- actionStyle: {},
- actionText: t("up.common.search"),
- inputAlign: 'left',
- inputStyle: {},
- disabled: false,
- borderColor: 'transparent',
- searchIconColor: '#909399',
- searchIconSize: 22,
- color: '',
- placeholderColor: '',
- searchIcon: 'search',
- iconPosition: 'left',
- margin: '0',
- animation: false,
- value: '',
- maxlength: '-1',
- height: 32,
- label: null,
- adjustPosition: true,
- autoBlur: true
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:19:45
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/search.js
+ */
+export default {
+ // search
+ search: {
+ shape: 'round',
+ bgColor: '#f2f2f2',
+ placeholder: '请输入关键字',
+ clearabled: true,
+ focus: false,
+ showAction: true,
+ actionStyle: {},
+ actionText: '搜索',
+ inputAlign: 'left',
+ inputStyle: {},
+ disabled: false,
+ borderColor: 'transparent',
+ searchIconColor: '#909399',
+ searchIconSize: 22,
+ color: '#606266',
+ placeholderColor: '#909399',
+ searchIcon: 'search',
+ margin: '0',
+ animation: false,
+ value: '',
+ maxlength: '-1',
+ height: 32,
+ label: null
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-search/u-search.vue b/uni_modules/uview-plus/components/u-search/u-search.vue
index 913bdd8..54190ee 100644
--- a/uni_modules/uview-plus/components/u-search/u-search.vue
+++ b/uni_modules/uview-plus/components/u-search/u-search.vue
@@ -1,377 +1,332 @@
-
-
-
-
-
- {{ label }}
-
-
-
-
-
-
-
-
-
-
-
- {{ actionText }}
-
-
-
-
-
-
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+ {{ actionText }}
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-section/section.js b/uni_modules/uview-plus/components/u-section/section.js
index d33780e..7a8e1b4 100644
--- a/uni_modules/uview-plus/components/u-section/section.js
+++ b/uni_modules/uview-plus/components/u-section/section.js
@@ -1,25 +1,24 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/section.js
- */
-import { t } from '../../libs/i18n'
-export default {
- // u-section组件
- section: {
- title: '',
- subTitle: t("up.common.more"),
- right: true,
- fontSize: 15,
- bold: true,
- color: '#303133',
- subColor: '#909399',
- showLine: true,
- lineColor: '',
- arrow: true
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:07:33
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/section.js
+ */
+export default {
+ // u-section组件
+ section: {
+ title: '',
+ subTitle: '更多',
+ right: true,
+ fontSize: 15,
+ bold: true,
+ color: '#303133',
+ subColor: '#909399',
+ showLine: true,
+ lineColor: '',
+ arrow: true
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-select/u-select.vue b/uni_modules/uview-plus/components/u-select/u-select.vue
index 59d7e4d..b5198a6 100644
--- a/uni_modules/uview-plus/components/u-select/u-select.vue
+++ b/uni_modules/uview-plus/components/u-select/u-select.vue
@@ -1,309 +1,137 @@
-
-
-
-
-
-
- {{ currentLabel }}
-
-
- {{ label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item[labelName]}}
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-short-video/u-short-video.vue b/uni_modules/uview-plus/components/u-short-video/u-short-video.vue
deleted file mode 100644
index b755043..0000000
--- a/uni_modules/uview-plus/components/u-short-video/u-short-video.vue
+++ /dev/null
@@ -1,463 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.author.name }}
- {{ item.author.desc }}
-
-
- 关注
-
-
-
-
-
-
-
-
- {{ item.likeCount }}
-
-
-
- {{ item.commentCount }}
-
-
-
- {{ item.shareCount }}
-
-
-
- {{ item.collectCount }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni_modules/uview-plus/components/u-signature/u-signature.vue b/uni_modules/uview-plus/components/u-signature/u-signature.vue
deleted file mode 100644
index 13987bd..0000000
--- a/uni_modules/uview-plus/components/u-signature/u-signature.vue
+++ /dev/null
@@ -1,516 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t("up.signature.penSize") }}:
-
-
-
-
-
-
-
- {{ t("up.signature.penColor") }}:
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-skeleton/props.js b/uni_modules/uview-plus/components/u-skeleton/props.js
index 419833c..5193e6b 100644
--- a/uni_modules/uview-plus/components/u-skeleton/props.js
+++ b/uni_modules/uview-plus/components/u-skeleton/props.js
@@ -1,64 +1,61 @@
-import { defineMixin } from '../../libs/vue'
-import SkeletonDefaultProps from './skeleton'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SkeletonDefaultProps)
-export const props = defineMixin({
- props: {
- // 是否展示骨架组件
- loading: {
- type: Boolean,
- default: () => defProps.skeleton.loading
- },
- // 是否开启动画效果
- animate: {
- type: Boolean,
- default: () => defProps.skeleton.animate
- },
- // 段落占位图行数
- rows: {
- type: [String, Number],
- default: () => defProps.skeleton.rows
- },
- // 段落占位图的宽度
- rowsWidth: {
- type: [String, Number, Array],
- default: () => defProps.skeleton.rowsWidth
- },
- // 段落占位图的高度
- rowsHeight: {
- type: [String, Number, Array],
- default: () => defProps.skeleton.rowsHeight
- },
- // 是否展示标题占位图
- title: {
- type: Boolean,
- default: () => defProps.skeleton.title
- },
- // 段落标题的宽度
- titleWidth: {
- type: [String, Number],
- default: () => defProps.skeleton.titleWidth
- },
- // 段落标题的高度
- titleHeight: {
- type: [String, Number],
- default: () => defProps.skeleton.titleHeight
- },
- // 是否展示头像占位图
- avatar: {
- type: Boolean,
- default: () => defProps.skeleton.avatar
- },
- // 头像占位图大小
- avatarSize: {
- type: [String, Number],
- default: () => defProps.skeleton.avatarSize
- },
- // 头像占位图的形状,circle-圆形,square-方形
- avatarShape: {
- type: String,
- default: () => defProps.skeleton.avatarShape
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 是否展示骨架组件
+ loading: {
+ type: Boolean,
+ default: () => defProps.skeleton.loading
+ },
+ // 是否开启动画效果
+ animate: {
+ type: Boolean,
+ default: () => defProps.skeleton.animate
+ },
+ // 段落占位图行数
+ rows: {
+ type: [String, Number],
+ default: () => defProps.skeleton.rows
+ },
+ // 段落占位图的宽度
+ rowsWidth: {
+ type: [String, Number, Array],
+ default: () => defProps.skeleton.rowsWidth
+ },
+ // 段落占位图的高度
+ rowsHeight: {
+ type: [String, Number, Array],
+ default: () => defProps.skeleton.rowsHeight
+ },
+ // 是否展示标题占位图
+ title: {
+ type: Boolean,
+ default: () => defProps.skeleton.title
+ },
+ // 段落标题的宽度
+ titleWidth: {
+ type: [String, Number],
+ default: () => defProps.skeleton.titleWidth
+ },
+ // 段落标题的高度
+ titleHeight: {
+ type: [String, Number],
+ default: () => defProps.skeleton.titleHeight
+ },
+ // 是否展示头像占位图
+ avatar: {
+ type: Boolean,
+ default: () => defProps.skeleton.avatar
+ },
+ // 头像占位图大小
+ avatarSize: {
+ type: [String, Number],
+ default: () => defProps.skeleton.avatarSize
+ },
+ // 头像占位图的形状,circle-圆形,square-方形
+ avatarShape: {
+ type: String,
+ default: () => defProps.skeleton.avatarShape
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-skeleton/skeleton.js b/uni_modules/uview-plus/components/u-skeleton/skeleton.js
index 6b421a9..8cf6b23 100644
--- a/uni_modules/uview-plus/components/u-skeleton/skeleton.js
+++ b/uni_modules/uview-plus/components/u-skeleton/skeleton.js
@@ -1,25 +1,25 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/skeleton.js
- */
-export default {
- // skeleton
- skeleton: {
- loading: true,
- animate: true,
- rows: 0,
- rowsWidth: '100%',
- rowsHeight: 18,
- title: true,
- titleWidth: '50%',
- titleHeight: 18,
- avatar: false,
- avatarSize: 32,
- avatarShape: 'circle'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:20:14
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js
+ */
+export default {
+ // skeleton
+ skeleton: {
+ loading: true,
+ animate: true,
+ rows: 0,
+ rowsWidth: '100%',
+ rowsHeight: 18,
+ title: true,
+ titleWidth: '50%',
+ titleHeight: 18,
+ avatar: false,
+ avatarSize: 32,
+ avatarShape: 'circle'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue b/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue
index d95aaa2..cfa92d4 100644
--- a/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue
+++ b/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue
@@ -1,253 +1,249 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-slider/nvue.js b/uni_modules/uview-plus/components/u-slider/nvue.js
index 53380ff..4f4a093 100644
--- a/uni_modules/uview-plus/components/u-slider/nvue.js
+++ b/uni_modules/uview-plus/components/u-slider/nvue.js
@@ -1,193 +1,193 @@
-/**
- * 使用bindingx方案实现slider
- * 只能使用于nvue下
- */
-// 引入bindingx,此库类似于微信小程序wxs,目的是让js运行在视图层,减少视图层和逻辑层的通信折损
-const BindingX = uni.requireNativePlugin('bindingx')
-// nvue操作dom的库,用于获取dom的尺寸信息
-const dom = uni.requireNativePlugin('dom')
-// nvue中用于操作元素动画的库,类似于uni.animation,只不过uni.animation不能用于nvue
-const animation = uni.requireNativePlugin('animation')
-import { range } from '../../libs/function/index';
-export default {
- data() {
- return {
- // 位移的偏移量
- x: 0,
- // 是否正在触摸过程中,用于标记动画类是否添加或移除
- touching: false,
- changeFromInside: false
- }
- },
- watch: {
- // 监听vlaue的变化,此变化可能是由于内部修改v-model的值,或者外部
- // 从服务端获取一个值后,赋值给slider的v-model而导致的
- value(n) {
- if (!this.changeFromInside) {
- this.initX()
- } else {
- this.changeFromInside = false
- }
- }
- },
- mounted() {
- this.init()
- },
- methods: {
- init() {
- // 更新滑块尺寸信息
- this.getSliderRect().then((size) => {
- this.sliderRect = size
- this.initX()
- })
- },
- // 获取节点信息
- // 获取slider尺寸
- getSliderRect() {
- // 获取滑块条的尺寸信息
- // 通过nvue的dom模块,查询节点信息
- return new Promise((resolve) => {
- this.$nextTick(() => {
- dom.getComponentRect(this.$refs.slider, (res) => {
- resolve(res.size)
- })
- })
- })
- },
- // 初始化按钮位置
- initButtonStyle({
- barStyle,
- buttonWrapperStyle
- }) {
- this.barStyle = barStyle
- this.buttonWrapperStyle = buttonWrapperStyle
- },
- emitEvent(event, value) {
- this.$emit(event, value || this.value)
- },
- // 滑动开始
- async onTouchStart(e) {
- // if (this.disabled) return
- // // 阻止页面滚动,可以保证在滑动过程中,不让页面可以上下滚动,造成不好的体验
- // e.stopPropagation && e.stopPropagation()
- // e.preventDefault && e.preventDefault()
- // // 更新滑块的尺寸信息
- // this.sliderRect = await this.getSliderRect()
- // // 标记滑动过程中触摸点的信息
- // this.touchStart(e)
- // this.startValue = this.format(this.value)
- // this.dragStatus = 'start'
-
- // 标记滑动过程中触摸点的信息
- // this.touchStart(e)
- },
- // 开始滑动
- onTouchMove(e) {
- // if (this.disabled) return;
- // if (this.dragStatus === 'start') {
- // this.$emit('drag-start')
- // }
- // // 标记当前滑动过程中的触点信息,此方法在touch mixin中
- // this.touchMove(e)
- // this.dragStatus = 'draging'
- // const {
- // width: sliderWidth
- // } = this.sliderRect
- // const diff = (this.deltaX / sliderWidth) * this.getRange()
- // this.newValue = this.startValue + diff
- // this.updateValue(this.newValue, false, true)
- // 获取元素ref
- // const button = this.$refs['nvue-button'].ref
- // const gap = this.$refs['nvue-gap'].ref
-
- // animation.transition(gap, {
- // styles: {
- // width: `${this.startX + this.deltaX}px`
- // }
- // })
- // // console.log(this.startX + this.deltaX);
- // animation.transition(button, {
- // styles: {
- // transform: `translateX(${this.startX + this.deltaX}px)`
- // }
- // })
- // this.barStyle = {
- // width: `${this.startX + this.deltaX}px`
- // }
- const {
- x
- } = this.getTouchPoint(e)
- this.buttonWrapperStyle = {
- transform: `translateX(${x}px)`
- }
- // this.buttonWrapperStyle = {
- // transform: `translateX(${this.format(this.startX + this.deltaX)}px)`
- // }
- },
- // onTouchEnd() {
- // if (this.disabled) return;
- // if (this.dragStatus === 'draging') {
- // this.updateValue(this.newValue, true)
- // this.$emit('drag-end');
- // }
- // },
- updateValue(value, end, drag) {
- value = this.format(value)
- const {
- width: sliderWidth
- } = this.sliderRect
- const width = `${((value - this.min) * sliderWidth) / this.getRange()}`
- this.value = value
- this.barStyle = {
- width: `${width}px`
- }
- // console.log('width', width);
- if (drag) {
- this.$emit('drag', {
- value
- })
- }
- if (end) {
- this.$emit('change', value)
- }
- if ((drag || end)) {
- this.changeFromInside = true
- this.$emit('update', value)
- }
- },
- // 从value的变化,倒推得出x的值该为多少
- initX() {
- const {
- left,
- width
- } = this.sliderRect
- // 得出x的初始偏移值,之所以需要这么做,是因为在bindingX中,触摸滑动时,只能的值本次移动的偏移值
- // 而无法的值准确的前后移动的两个点的坐标值,weex纯粹为阿里巴巴的KPI(部门业绩考核)产物,也就这样了
- this.x = this.value / 100 * width
- // 设置移动的值
- const barStyle = {
- width: `${this.x}px`
- }
- // 按钮的初始值
- const buttonWrapperStyle = {
- transform: `translateX(${this.x - this.blockHeight / 2}px)`
- }
- this.initButtonStyle({
- barStyle,
- buttonWrapperStyle
- })
- },
- // 移动点占总长度的百分比,此处需要先除以step,是为了保证step大于1时,比如10,那么在滑动11,12px这样的
- // 距离时,实际上滑块是不会滑动的,到了16,17px,经过四舍五入后,就变成了20px,进行了下一个跳变
- format(value) {
- return Math.round(range(this.min, this.max, value) / this.step) * this.step
- },
- getRange() {
- const {
- max,
- min
- } = this
- return max - min
- }
- }
-}
+/**
+ * 使用bindingx方案实现slider
+ * 只能使用于nvue下
+ */
+// 引入bindingx,此库类似于微信小程序wxs,目的是让js运行在视图层,减少视图层和逻辑层的通信折损
+const BindingX = uni.requireNativePlugin('bindingx')
+// nvue操作dom的库,用于获取dom的尺寸信息
+const dom = uni.requireNativePlugin('dom')
+// nvue中用于操作元素动画的库,类似于uni.animation,只不过uni.animation不能用于nvue
+const animation = uni.requireNativePlugin('animation')
+import { range } from '../../libs/function/index';
+export default {
+ data() {
+ return {
+ // 位移的偏移量
+ x: 0,
+ // 是否正在触摸过程中,用于标记动画类是否添加或移除
+ touching: false,
+ changeFromInside: false
+ }
+ },
+ watch: {
+ // 监听vlaue的变化,此变化可能是由于内部修改v-model的值,或者外部
+ // 从服务端获取一个值后,赋值给slider的v-model而导致的
+ value(n) {
+ if (!this.changeFromInside) {
+ this.initX()
+ } else {
+ this.changeFromInside = false
+ }
+ }
+ },
+ mounted() {
+ this.init()
+ },
+ methods: {
+ init() {
+ // 更新滑块尺寸信息
+ this.getSliderRect().then((size) => {
+ this.sliderRect = size
+ this.initX()
+ })
+ },
+ // 获取节点信息
+ // 获取slider尺寸
+ getSliderRect() {
+ // 获取滑块条的尺寸信息
+ // 通过nvue的dom模块,查询节点信息
+ return new Promise((resolve) => {
+ this.$nextTick(() => {
+ dom.getComponentRect(this.$refs.slider, (res) => {
+ resolve(res.size)
+ })
+ })
+ })
+ },
+ // 初始化按钮位置
+ initButtonStyle({
+ barStyle,
+ buttonWrapperStyle
+ }) {
+ this.barStyle = barStyle
+ this.buttonWrapperStyle = buttonWrapperStyle
+ },
+ emitEvent(event, value) {
+ this.$emit(event, value || this.value)
+ },
+ // 滑动开始
+ async onTouchStart(e) {
+ // if (this.disabled) return
+ // // 阻止页面滚动,可以保证在滑动过程中,不让页面可以上下滚动,造成不好的体验
+ // e.stopPropagation && e.stopPropagation()
+ // e.preventDefault && e.preventDefault()
+ // // 更新滑块的尺寸信息
+ // this.sliderRect = await this.getSliderRect()
+ // // 标记滑动过程中触摸点的信息
+ // this.touchStart(e)
+ // this.startValue = this.format(this.value)
+ // this.dragStatus = 'start'
+
+ // 标记滑动过程中触摸点的信息
+ // this.touchStart(e)
+ },
+ // 开始滑动
+ onTouchMove(e) {
+ // if (this.disabled) return;
+ // if (this.dragStatus === 'start') {
+ // this.$emit('drag-start')
+ // }
+ // // 标记当前滑动过程中的触点信息,此方法在touch mixin中
+ // this.touchMove(e)
+ // this.dragStatus = 'draging'
+ // const {
+ // width: sliderWidth
+ // } = this.sliderRect
+ // const diff = (this.deltaX / sliderWidth) * this.getRange()
+ // this.newValue = this.startValue + diff
+ // this.updateValue(this.newValue, false, true)
+ // 获取元素ref
+ // const button = this.$refs['nvue-button'].ref
+ // const gap = this.$refs['nvue-gap'].ref
+
+ // animation.transition(gap, {
+ // styles: {
+ // width: `${this.startX + this.deltaX}px`
+ // }
+ // })
+ // // console.log(this.startX + this.deltaX);
+ // animation.transition(button, {
+ // styles: {
+ // transform: `translateX(${this.startX + this.deltaX}px)`
+ // }
+ // })
+ // this.barStyle = {
+ // width: `${this.startX + this.deltaX}px`
+ // }
+ const {
+ x
+ } = this.getTouchPoint(e)
+ this.buttonWrapperStyle = {
+ transform: `translateX(${x}px)`
+ }
+ // this.buttonWrapperStyle = {
+ // transform: `translateX(${this.format(this.startX + this.deltaX)}px)`
+ // }
+ },
+ // onTouchEnd() {
+ // if (this.disabled) return;
+ // if (this.dragStatus === 'draging') {
+ // this.updateValue(this.newValue, true)
+ // this.$emit('drag-end');
+ // }
+ // },
+ updateValue(value, end, drag) {
+ value = this.format(value)
+ const {
+ width: sliderWidth
+ } = this.sliderRect
+ const width = `${((value - this.min) * sliderWidth) / this.getRange()}`
+ this.value = value
+ this.barStyle = {
+ width: `${width}px`
+ }
+ // console.log('width', width);
+ if (drag) {
+ this.$emit('drag', {
+ value
+ })
+ }
+ if (end) {
+ this.$emit('change', value)
+ }
+ if ((drag || end)) {
+ this.changeFromInside = true
+ this.$emit('update', value)
+ }
+ },
+ // 从value的变化,倒推得出x的值该为多少
+ initX() {
+ const {
+ left,
+ width
+ } = this.sliderRect
+ // 得出x的初始偏移值,之所以需要这么做,是因为在bindingX中,触摸滑动时,只能的值本次移动的偏移值
+ // 而无法的值准确的前后移动的两个点的坐标值,weex纯粹为阿里巴巴的KPI(部门业绩考核)产物,也就这样了
+ this.x = this.value / 100 * width
+ // 设置移动的值
+ const barStyle = {
+ width: `${this.x}px`
+ }
+ // 按钮的初始值
+ const buttonWrapperStyle = {
+ transform: `translateX(${this.x - this.blockHeight / 2}px)`
+ }
+ this.initButtonStyle({
+ barStyle,
+ buttonWrapperStyle
+ })
+ },
+ // 移动点占总长度的百分比,此处需要先除以step,是为了保证step大于1时,比如10,那么在滑动11,12px这样的
+ // 距离时,实际上滑块是不会滑动的,到了16,17px,经过四舍五入后,就变成了20px,进行了下一个跳变
+ format(value) {
+ return Math.round(range(this.min, this.max, value) / this.step) * this.step
+ },
+ getRange() {
+ const {
+ max,
+ min
+ } = this
+ return max - min
+ }
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-slider/props.js b/uni_modules/uview-plus/components/u-slider/props.js
index 84c4d66..be1e74e 100644
--- a/uni_modules/uview-plus/components/u-slider/props.js
+++ b/uni_modules/uview-plus/components/u-slider/props.js
@@ -1,112 +1,91 @@
-import { defineMixin } from '../../libs/vue'
-import SliderDefaultProps from './slider'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SliderDefaultProps)
-export const props = defineMixin({
- props: {
- // 最小可选值
- min: {
- type: [Number, String],
- default: () => defProps.slider.min
- },
- // 最大可选值
- max: {
- type: [Number, String],
- default: () => defProps.slider.max
- },
- // 步长,取值必须大于 0,并且可被(max - min)整除
- step: {
- type: [Number, String],
- default: () => defProps.slider.step
- },
- // #ifdef VUE3
- // 当前取值
- modelValue: {
- type: [String, Number],
- default: () => defProps.slider.value
- },
- // #endif
- // #ifdef VUE2
- // 当前取值
- value: {
- type: [String, Number],
- default: () => defProps.slider.value
- },
- // #endif
- // 是否区间模式
- isRange: {
- type: Boolean,
- default: false
- },
- // 双滑块时值
- rangeValue: {
- type: [Array],
- default: [0, 0]
- },
- // 滑块右侧已选择部分的背景色
- activeColor: {
- type: String,
- default: () => defProps.slider.activeColor
- },
- // 滑块左侧未选择部分的背景色
- inactiveColor: {
- type: String,
- default: () => defProps.slider.inactiveColor
- },
- // 滑块的大小,取值范围为 12 - 28
- blockSize: {
- type: [Number, String],
- default: () => defProps.slider.blockSize
- },
- // 滑块的颜色
- blockColor: {
- type: String,
- default: () => defProps.slider.blockColor
- },
- // 用户对滑块的自定义颜色
- blockStyle: {
- type: Object,
- default: () => defProps.slider.blockStyle
- },
- // 禁用状态
- disabled: {
- type: Boolean,
- default: () => defProps.slider.disabled
- },
- // 是否显示当前的选择值
- showValue: {
- type: Boolean,
- default: () => defProps.slider.showValue
- },
- // 是否渲染uni-app框架内置组件
- useNative: {
- type: Boolean,
- default: () => defProps.slider.useNative
- },
- // 滑块厚度
- height: {
- type: String,
- default: () => defProps.slider.height
- },
- innerStyle: {
- type: Object,
- default: () => defProps.slider.innerStyle
- },
- // 是否垂直方向
- vertical: {
- type: Boolean,
- default: defProps.slider.vertical
- },
- // 滑块粗细,为了支持垂直模式下统一粗细参数,用size代替height。
- size: {
- type: [Number, String],
- default: () => defProps.slider.size
- },
- // 滑块长度,水平和垂直模式的长度。
- length: {
- type: [Number, String],
- default: 'auto'
- }
- }
-})
\ No newline at end of file
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
+ props: {
+ // 最小可选值
+ min: {
+ type: [Number, String],
+ default: () => defProps.slider.min
+ },
+ // 最大可选值
+ max: {
+ type: [Number, String],
+ default: () => defProps.slider.max
+ },
+ // 步长,取值必须大于 0,并且可被(max - min)整除
+ step: {
+ type: [Number, String],
+ default: () => defProps.slider.step
+ },
+ // #ifdef VUE3
+ // 当前取值
+ modelValue: {
+ type: [String, Number],
+ default: () => defProps.slider.value
+ },
+ // #endif
+ // #ifdef VUE2
+ // 当前取值
+ value: {
+ type: [String, Number],
+ default: () => defProps.slider.value
+ },
+ // #endif
+ // 是否区间模式
+ isRange: {
+ type: Boolean,
+ default: false
+ },
+ // 双滑块时值
+ rangeValue: {
+ type: [Array],
+ default: [0, 0]
+ },
+ // 滑块右侧已选择部分的背景色
+ activeColor: {
+ type: String,
+ default: () => defProps.slider.activeColor
+ },
+ // 滑块左侧未选择部分的背景色
+ inactiveColor: {
+ type: String,
+ default: () => defProps.slider.inactiveColor
+ },
+ // 滑块的大小,取值范围为 12 - 28
+ blockSize: {
+ type: [Number, String],
+ default: () => defProps.slider.blockSize
+ },
+ // 滑块的颜色
+ blockColor: {
+ type: String,
+ default: () => defProps.slider.blockColor
+ },
+ // 用户对滑块的自定义颜色
+ blockStyle: {
+ type: Object,
+ default: () => defProps.slider.blockStyle
+ },
+ // 禁用状态
+ disabled: {
+ type: Boolean,
+ default: () => defProps.slider.disabled
+ },
+ // 是否显示当前的选择值
+ showValue: {
+ type: Boolean,
+ default: () => defProps.slider.showValue
+ },
+ // 是否渲染uni-app框架内置组件
+ useNative: {
+ type: Boolean,
+ default: () => defProps.slider.useNative
+ },
+ // 滑块高度
+ height: {
+ type: String,
+ default: () => defProps.slider.height
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-slider/slider.js b/uni_modules/uview-plus/components/u-slider/slider.js
index 05a0716..9e80ee0 100644
--- a/uni_modules/uview-plus/components/u-slider/slider.js
+++ b/uni_modules/uview-plus/components/u-slider/slider.js
@@ -1,31 +1,27 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/slider.js
- */
-export default {
- // slider组件
- slider: {
- value: 0,
- blockSize: 18,
- min: 0,
- max: 100,
- step: 1,
- activeColor: '#2979ff',
- inactiveColor: '#c0c4cc',
- blockColor: '#ffffff',
- showValue: false,
- disabled:false,
- blockStyle: {},
- useNative: false,
- height: '',
- innerStyle: {},
- vertical: false,
- size: '2px',
- length: 'auto'
- }
-}
\ No newline at end of file
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:08:25
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/slider.js
+ */
+export default {
+ // slider组件
+ slider: {
+ value: 0,
+ blockSize: 18,
+ min: 0,
+ max: 100,
+ step: 1,
+ activeColor: '#2979ff',
+ inactiveColor: '#c0c4cc',
+ blockColor: '#ffffff',
+ showValue: false,
+ disabled:false,
+ blockStyle: {},
+ useNative: false,
+ height: '2px'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-slider/u-slider.vue b/uni_modules/uview-plus/components/u-slider/u-slider.vue
index e8127a9..f63884f 100644
--- a/uni_modules/uview-plus/components/u-slider/u-slider.vue
+++ b/uni_modules/uview-plus/components/u-slider/u-slider.vue
@@ -1,189 +1,176 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ this.rangeValue[0] }}
-
-
- {{ this.rangeValue[1] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ modelValue }}
-
-
-
-
-
-
-
-
-
+ }
+ },
+ methods: {
+ addStyle,
+ getPx,
+ init() {
+ if (this.isRange) {
+ this.updateValue(this.rangeValue[0], false, 0);
+ this.updateValue(this.rangeValue[1], false, 1);
+ } else {
+ // #ifdef VUE3
+ this.updateValue(this.modelValue, false);
+ // #endif
+ // #ifdef VUE2
+ this.updateValue(this.value, false);
+ // #endif
+ }
+ },
+ // native拖动过程中触发
+ changingHandler(e) {
+ const {
+ value
+ } = e.detail
+ // 更新v-model的值
+ // #ifdef VUE3
+ this.$emit("update:modelValue", value);
+ // #endif
+ // #ifdef VUE2
+ this.$emit("input", value);
+ // #endif
+ // 触发事件
+ this.$emit('changing', value)
+ },
+ // native滑动结束时触发
+ changeHandler(e) {
+ const {
+ value
+ } = e.detail
+ // 更新v-model的值
+ // #ifdef VUE3
+ this.$emit("update:modelValue", value);
+ // #endif
+ // #ifdef VUE2
+ this.$emit("input", value);
+ // #endif
+ // 触发事件
+ this.$emit('change', value);
+ },
+ onTouchStart(event, index = 1) {
+ if (this.disabled) return;
+ this.startX = 0;
+ // 触摸点集
+ let touches = event.touches[0];
+ // 触摸点到屏幕左边的距离
+ this.startX = touches.clientX;
+ // 此处的this.modelValue虽为props值,但是通过$emit('update:modelValue')进行了修改
+ if (this.isRange) {
+ this.startValue0 = this.format(this.rangeValue[0], 0);
+ this.startValue = this.format(this.rangeValue[1], 1);
+ } else {
+ // #ifdef VUE3
+ this.startValue = this.format(this.modelValue);
+ // #endif
+ // #ifdef VUE2
+ this.startValue = this.format(this.value);
+ // #endif
+ }
+ // 标示当前的状态为开始触摸滑动
+ this.status = 'start';
+
+ let clientX = 0;
+ // #ifndef APP-NVUE
+ clientX = touches.clientX;
+ // #endif
+ // #ifdef APP-NVUE
+ clientX = touches.screenX;
+ // #endif
+ this.distanceX = clientX - this.sliderRect.left;
+ // 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
+ // 否则造成通信阻塞,需要每改变一个step值时修改一次视图
+ this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
+ this.status = 'moving';
+ // 发出moving事件
+ let $crtFmtValue = this.updateValue(this.newValue, true, index);
+ this.$emit('changing', $crtFmtValue);
+ },
+ onTouchMove(event, index = 1) {
+ if (this.disabled) return;
+ // 连续触摸的过程会一直触发本方法,但只有手指触发且移动了才被认为是拖动了,才发出事件
+ // 触摸后第一次移动已经将status设置为moving状态,故触摸第二次移动不会触发本事件
+ if (this.status == 'start') this.$emit('start');
+ let touches = event.touches[0];
+ // console.log('touchs', touches)
+ // 滑块的左边不一定跟屏幕左边接壤,所以需要减去最外层父元素的左边值
+ let clientX = 0;
+ // #ifndef APP-NVUE
+ clientX = touches.clientX;
+ // #endif
+ // #ifdef APP-NVUE
+ clientX = touches.screenX;
+ // #endif
+ this.distanceX = clientX - this.sliderRect.left;
+ // 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
+ // 否则造成通信阻塞,需要每改变一个step值时修改一次视图
+ this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
+ this.status = 'moving';
+ // 发出moving事件
+ let $crtFmtValue = this.updateValue(this.newValue, true, index);
+ this.$emit('changing', $crtFmtValue);
+ },
+ onTouchEnd(event, index = 1) {
+ if (this.disabled) return;
+ if (this.status === 'moving') {
+ let $crtFmtValue = this.updateValue(this.newValue, false, index);
+ this.$emit('change', $crtFmtValue);
+ }
+ this.status = 'end';
+ },
+ onTouchStart2(event, index = 1) {
+ if (!this.isRange) {
+ // this.onChangeStart(event, index);
+ }
+ },
+ onTouchMove2(event, index = 1) {
+ if (!this.isRange) {
+ // this.onTouchMove(event, index);
+ }
+ },
+ onTouchEnd2(event, index = 1) {
+ if (!this.isRange) {
+ // this.onTouchEnd(event, index);
+ }
+ },
+ onClick(event) {
+ // if (this.isRange) return;
+ if (this.disabled) return;
+ // 直接点击滑块的情况,计算方式与onTouchMove方法相同
+ // console.log('click', event)
+ // #ifndef APP-NVUE
+ // nvue下暂时无法获取坐标
+ let clientX = event.detail.x - this.sliderRect.left
+ this.newValue = ((clientX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
+ this.updateValue(this.newValue, false, 1);
+ // #endif
+ },
+ updateValue(value, drag, index = 1) {
+ // 去掉小数部分,同时也是对step步进的处理
+ let valueFormat = this.format(value, index);
+ // 不允许滑动的值超过max最大值
+ if(valueFormat > this.max ) {
+ valueFormat = this.max
+ }
+ // 设置移动的距离,不能用百分比,因为NVUE不支持。
+ let width = Math.min((valueFormat - this.min) / (this.max - this.min) * this.sliderRect.width, this.sliderRect.width)
+ let barStyle = {
+ width: width + 'px'
+ };
+ // 移动期间无需过渡动画
+ if (drag == true) {
+ barStyle.transition = 'none';
+ } else {
+ // 非移动期间,删掉对过渡为空的声明,让css中的声明起效
+ delete barStyle.transition;
+ }
+ // 修改value值
+ if (this.isRange) {
+ this.rangeValue[index] = valueFormat;
+ this.$emit("update:modelValue", this.rangeValue);
+ } else {
+ // #ifdef VUE3
+ this.$emit("update:modelValue", valueFormat);
+ // #endif
+ // #ifdef VUE2
+ this.$emit("input", valueFormat);
+ // #endif
+ }
+
+ switch (index) {
+ case 0:
+ this.barStyle0 = {...barStyle};
+ break;
+ case 1:
+ this.barStyle = {...barStyle};
+ break;
+ default:
+ break;
+ }
+ if (this.isRange) {
+ return this.rangeValue
+ } else {
+ return valueFormat
+ }
+ },
+ format(value, index = 1) {
+ // 将小数变成整数,为了减少对视图的更新,造成视图层与逻辑层的阻塞
+ if (this.isRange) {
+ switch (index) {
+ case 0:
+ return Math.round(
+ Math.max(this.min, Math.min(value, this.rangeValue[1] - parseInt(this.step),this.max))
+ / parseInt(this.step)
+ ) * parseInt(this.step);
+ break;
+ case 1:
+ return Math.round(
+ Math.max(this.min, this.rangeValue[0] + parseInt(this.step), Math.min(value, this.max))
+ / parseInt(this.step)
+ ) * parseInt(this.step);
+ break;
+ default:
+ break;
+ }
+ } else {
+ return Math.round(
+ Math.max(this.min, Math.min(value, this.max))
+ / parseInt(this.step)
+ ) * parseInt(this.step);
+ }
+ }
+ }
+ }
+
+
+
diff --git a/uni_modules/uview-plus/components/u-status-bar/props.js b/uni_modules/uview-plus/components/u-status-bar/props.js
index 19a08f3..ab91a6d 100644
--- a/uni_modules/uview-plus/components/u-status-bar/props.js
+++ b/uni_modules/uview-plus/components/u-status-bar/props.js
@@ -1,18 +1,10 @@
-import { defineMixin } from '../../libs/vue'
-import StatusBarDefaultProps from './statusBar'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(StatusBarDefaultProps)
-export const props = defineMixin({
- props: {
- bgColor: {
- type: String,
- default: () => defProps.statusBar.bgColor
- },
- // 状态栏获取得高度
- height: {
- type: Number,
- default: () => defProps.statusBar.height
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ bgColor: {
+ type: String,
+ default: () => defProps.statusBar.bgColor
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-status-bar/statusBar.js b/uni_modules/uview-plus/components/u-status-bar/statusBar.js
index d5ad536..2023373 100644
--- a/uni_modules/uview-plus/components/u-status-bar/statusBar.js
+++ b/uni_modules/uview-plus/components/u-status-bar/statusBar.js
@@ -1,16 +1,15 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/statusBar.js
- */
-export default {
- // statusBar
- statusBar: {
- bgColor: 'transparent',
- height: 0
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:20:39
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/statusBar.js
+ */
+export default {
+ // statusBar
+ statusBar: {
+ bgColor: 'transparent'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue b/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue
index 582ba6a..37a2508 100644
--- a/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue
+++ b/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue
@@ -1,63 +1,61 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-steps-item/props.js b/uni_modules/uview-plus/components/u-steps-item/props.js
index 85821a2..95613bb 100644
--- a/uni_modules/uview-plus/components/u-steps-item/props.js
+++ b/uni_modules/uview-plus/components/u-steps-item/props.js
@@ -1,34 +1,31 @@
-import { defineMixin } from '../../libs/vue'
-import StepsItemDefaultProps from './stepsItem'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(StepsItemDefaultProps)
-export const props = defineMixin({
- props: {
- // 标题
- title: {
- type: [String, Number],
- default: () => defProps.stepsItem.title
- },
- // 描述文本
- desc: {
- type: [String, Number],
- default: () => defProps.stepsItem.desc
- },
- // 图标大小
- iconSize: {
- type: [String, Number],
- default: () => defProps.stepsItem.iconSize
- },
- // 当前步骤是否处于失败状态
- error: {
- type: Boolean,
- default: () => defProps.stepsItem.error
- },
- // 自定义样式
- itemStyle: {
- type: [Object],
- default: {}
- },
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 标题
+ title: {
+ type: [String, Number],
+ default: () => defProps.stepsItem.title
+ },
+ // 描述文本
+ desc: {
+ type: [String, Number],
+ default: () => defProps.stepsItem.desc
+ },
+ // 图标大小
+ iconSize: {
+ type: [String, Number],
+ default: () => defProps.stepsItem.iconSize
+ },
+ // 当前步骤是否处于失败状态
+ error: {
+ type: Boolean,
+ default: () => defProps.stepsItem.error
+ },
+ // 自定义样式
+ itemStyle: {
+ type: [Object],
+ default: {}
+ },
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-steps-item/stepsItem.js b/uni_modules/uview-plus/components/u-steps-item/stepsItem.js
index 0f82a1c..17921cf 100644
--- a/uni_modules/uview-plus/components/u-steps-item/stepsItem.js
+++ b/uni_modules/uview-plus/components/u-steps-item/stepsItem.js
@@ -1,18 +1,18 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/stepsItem.js
- */
-export default {
- // steps-item组件
- stepsItem: {
- title: '',
- desc: '',
- iconSize: 17,
- error: false
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:12:55
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/stepsItem.js
+ */
+export default {
+ // steps-item组件
+ stepsItem: {
+ title: '',
+ desc: '',
+ iconSize: 17,
+ error: false
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue b/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue
index 7b6d767..9609032 100644
--- a/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue
+++ b/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue
@@ -12,42 +12,34 @@
-
-
+
- {{ index + 1}}
-
+ {{ index + 1}}
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-swipe-action-item/wxs.js b/uni_modules/uview-plus/components/u-swipe-action-item/wxs.js
index ee49c10..8a7bba3 100644
--- a/uni_modules/uview-plus/components/u-swipe-action-item/wxs.js
+++ b/uni_modules/uview-plus/components/u-swipe-action-item/wxs.js
@@ -1,15 +1,15 @@
-export default {
- methods: {
- // 关闭时执行
- closeHandler() {
- this.status = 'close'
- },
- setState(status) {
- this.status = status
- },
- closeOther() {
- // 尝试关闭其他打开的单元格
- this.parent && this.parent.closeOther(this)
- }
- }
-}
+export default {
+ methods: {
+ // 关闭时执行
+ closeHandler() {
+ this.status = 'close'
+ },
+ setState(status) {
+ this.status = status
+ },
+ closeOther() {
+ // 尝试关闭其他打开的单元格
+ this.parent && this.parent.closeOther(this)
+ }
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-swipe-action/props.js b/uni_modules/uview-plus/components/u-swipe-action/props.js
index fd8fdfe..e9acfe6 100644
--- a/uni_modules/uview-plus/components/u-swipe-action/props.js
+++ b/uni_modules/uview-plus/components/u-swipe-action/props.js
@@ -1,19 +1,16 @@
-import { defineMixin } from '../../libs/vue'
-import SwipeActionDefaultProps from './swipeAction'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SwipeActionDefaultProps)
-export const props = defineMixin({
- props: {
- // 是否自动关闭其他swipe按钮组
- autoClose: {
- type: Boolean,
- default: () => defProps.swipeAction.autoClose
- },
- // 是否存在打开的按钮组
- opendItem: {
- type: Boolean,
- default: false
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 是否自动关闭其他swipe按钮组
+ autoClose: {
+ type: Boolean,
+ default: () => defProps.swipeAction.autoClose
+ },
+ // 是否存在打开的按钮组
+ opendItem: {
+ type: Boolean,
+ default: false
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-swipe-action/swipeAction.js b/uni_modules/uview-plus/components/u-swipe-action/swipeAction.js
index 253fbfc..acb74f0 100644
--- a/uni_modules/uview-plus/components/u-swipe-action/swipeAction.js
+++ b/uni_modules/uview-plus/components/u-swipe-action/swipeAction.js
@@ -1,15 +1,15 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/swipeAction.js
- */
-export default {
- // swipe-action组件
- swipeAction: {
- autoClose: true
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:00:42
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeAction.js
+ */
+export default {
+ // swipe-action组件
+ swipeAction: {
+ autoClose: true
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue b/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue
index 6f0f5ae..b58f539 100644
--- a/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue
+++ b/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue
@@ -1,84 +1,84 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-swiper-indicator/props.js b/uni_modules/uview-plus/components/u-swiper-indicator/props.js
index 80a083e..553bbf5 100644
--- a/uni_modules/uview-plus/components/u-swiper-indicator/props.js
+++ b/uni_modules/uview-plus/components/u-swiper-indicator/props.js
@@ -1,34 +1,31 @@
-import { defineMixin } from '../../libs/vue'
-import SwiperIndicatorDefaultProps from './swipterIndicator'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SwiperIndicatorDefaultProps)
-export const props = defineMixin({
- props: {
- // 轮播的长度
- length: {
- type: [String, Number],
- default: () => defProps.swiperIndicator.length
- },
- // 当前处于活动状态的轮播的索引
- current: {
- type: [String, Number],
- default: () => defProps.swiperIndicator.current
- },
- // 指示器非激活颜色
- indicatorActiveColor: {
- type: String,
- default: () => defProps.swiperIndicator.indicatorActiveColor
- },
- // 指示器的激活颜色
- indicatorInactiveColor: {
- type: String,
- default: () => defProps.swiperIndicator.indicatorInactiveColor
- },
- // 指示器模式,line-线型,dot-点型
- indicatorMode: {
- type: String,
- default: () => defProps.swiperIndicator.indicatorMode
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 轮播的长度
+ length: {
+ type: [String, Number],
+ default: () => defProps.swiperIndicator.length
+ },
+ // 当前处于活动状态的轮播的索引
+ current: {
+ type: [String, Number],
+ default: () => defProps.swiperIndicator.current
+ },
+ // 指示器非激活颜色
+ indicatorActiveColor: {
+ type: String,
+ default: () => defProps.swiperIndicator.indicatorActiveColor
+ },
+ // 指示器的激活颜色
+ indicatorInactiveColor: {
+ type: String,
+ default: () => defProps.swiperIndicator.indicatorInactiveColor
+ },
+ // 指示器模式,line-线型,dot-点型
+ indicatorMode: {
+ type: String,
+ default: () => defProps.swiperIndicator.indicatorMode
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-swiper-indicator/swipterIndicator.js b/uni_modules/uview-plus/components/u-swiper-indicator/swipterIndicator.js
index c474f1c..1404fbd 100644
--- a/uni_modules/uview-plus/components/u-swiper-indicator/swipterIndicator.js
+++ b/uni_modules/uview-plus/components/u-swiper-indicator/swipterIndicator.js
@@ -1,19 +1,19 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/swiperIndicator.js
- */
-export default {
- // swiperIndicator 组件
- swiperIndicator: {
- length: 0,
- current: 0,
- indicatorActiveColor: '',
- indicatorInactiveColor: '',
- indicatorMode: 'line'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:22:07
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiperIndicator.js
+ */
+export default {
+ // swiperIndicator 组件
+ swiperIndicator: {
+ length: 0,
+ current: 0,
+ indicatorActiveColor: '',
+ indicatorInactiveColor: '',
+ indicatorMode: 'line'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue b/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
index f485153..97d7731 100644
--- a/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
+++ b/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue
@@ -1,114 +1,115 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-swiper/props.js b/uni_modules/uview-plus/components/u-swiper/props.js
index a6f340b..3f7deec 100644
--- a/uni_modules/uview-plus/components/u-swiper/props.js
+++ b/uni_modules/uview-plus/components/u-swiper/props.js
@@ -1,130 +1,127 @@
-import { defineMixin } from '../../libs/vue'
-import SwiperDefaultProps from './swiper'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SwiperDefaultProps)
-export const props = defineMixin({
- props: {
- // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
- list: {
- type: Array,
- default: () => defProps.swiper.list
- },
- // 是否显示面板指示器
- indicator: {
- type: Boolean,
- default: () => defProps.swiper.indicator
- },
- // 指示器非激活颜色
- indicatorActiveColor: {
- type: String,
- default: () => defProps.swiper.indicatorActiveColor
- },
- // 指示器的激活颜色
- indicatorInactiveColor: {
- type: String,
- default: () => defProps.swiper.indicatorInactiveColor
- },
- // 指示器样式,可通过bottom,left,right进行定位
- indicatorStyle: {
- type: [String, Object],
- default: () => defProps.swiper.indicatorStyle
- },
- // 指示器模式,line-线型,dot-点型
- indicatorMode: {
- type: String,
- default: () => defProps.swiper.indicatorMode
- },
- // 是否自动切换
- autoplay: {
- type: Boolean,
- default: () => defProps.swiper.autoplay
- },
- // 当前所在滑块的 index
- current: {
- type: [String, Number],
- default: () => defProps.swiper.current
- },
- // 当前所在滑块的 item-id ,不能与 current 被同时指定
- currentItemId: {
- type: String,
- default: () => defProps.swiper.currentItemId
- },
- // 滑块自动切换时间间隔
- interval: {
- type: [String, Number],
- default: () => defProps.swiper.interval
- },
- // 滑块切换过程所需时间
- duration: {
- type: [String, Number],
- default: () => defProps.swiper.duration
- },
- // 播放到末尾后是否重新回到开头
- circular: {
- type: Boolean,
- default: () => defProps.swiper.circular
- },
- // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
- previousMargin: {
- type: [String, Number],
- default: () => defProps.swiper.previousMargin
- },
- // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
- nextMargin: {
- type: [String, Number],
- default: () => defProps.swiper.nextMargin
- },
- // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
- acceleration: {
- type: Boolean,
- default: () => defProps.swiper.acceleration
- },
- // 同时显示的滑块数量,nvue、支付宝小程序不支持
- displayMultipleItems: {
- type: Number,
- default: () => defProps.swiper.displayMultipleItems
- },
- // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
- // 只对微信小程序有效
- easingFunction: {
- type: String,
- default: () => defProps.swiper.easingFunction
- },
- // list数组中指定对象的目标属性名
- keyName: {
- type: String,
- default: () => defProps.swiper.keyName
- },
- // 图片的裁剪模式
- imgMode: {
- type: String,
- default: () => defProps.swiper.imgMode
- },
- // 组件高度
- height: {
- type: [String, Number],
- default: () => defProps.swiper.height
- },
- // 背景颜色
- bgColor: {
- type: String,
- default: () => defProps.swiper.bgColor
- },
- // 组件圆角,数值或带单位的字符串
- radius: {
- type: [String, Number],
- default: () => defProps.swiper.radius
- },
- // 是否加载中
- loading: {
- type: Boolean,
- default: () => defProps.swiper.loading
- },
- // 是否显示标题,要求数组对象中有title属性
- showTitle: {
- type: Boolean,
- default: () => defProps.swiper.showTitle
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
+ list: {
+ type: Array,
+ default: () => defProps.swiper.list
+ },
+ // 是否显示面板指示器
+ indicator: {
+ type: Boolean,
+ default: () => defProps.swiper.indicator
+ },
+ // 指示器非激活颜色
+ indicatorActiveColor: {
+ type: String,
+ default: () => defProps.swiper.indicatorActiveColor
+ },
+ // 指示器的激活颜色
+ indicatorInactiveColor: {
+ type: String,
+ default: () => defProps.swiper.indicatorInactiveColor
+ },
+ // 指示器样式,可通过bottom,left,right进行定位
+ indicatorStyle: {
+ type: [String, Object],
+ default: () => defProps.swiper.indicatorStyle
+ },
+ // 指示器模式,line-线型,dot-点型
+ indicatorMode: {
+ type: String,
+ default: () => defProps.swiper.indicatorMode
+ },
+ // 是否自动切换
+ autoplay: {
+ type: Boolean,
+ default: () => defProps.swiper.autoplay
+ },
+ // 当前所在滑块的 index
+ current: {
+ type: [String, Number],
+ default: () => defProps.swiper.current
+ },
+ // 当前所在滑块的 item-id ,不能与 current 被同时指定
+ currentItemId: {
+ type: String,
+ default: () => defProps.swiper.currentItemId
+ },
+ // 滑块自动切换时间间隔
+ interval: {
+ type: [String, Number],
+ default: () => defProps.swiper.interval
+ },
+ // 滑块切换过程所需时间
+ duration: {
+ type: [String, Number],
+ default: () => defProps.swiper.duration
+ },
+ // 播放到末尾后是否重新回到开头
+ circular: {
+ type: Boolean,
+ default: () => defProps.swiper.circular
+ },
+ // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
+ previousMargin: {
+ type: [String, Number],
+ default: () => defProps.swiper.previousMargin
+ },
+ // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
+ nextMargin: {
+ type: [String, Number],
+ default: () => defProps.swiper.nextMargin
+ },
+ // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
+ acceleration: {
+ type: Boolean,
+ default: () => defProps.swiper.acceleration
+ },
+ // 同时显示的滑块数量,nvue、支付宝小程序不支持
+ displayMultipleItems: {
+ type: Number,
+ default: () => defProps.swiper.displayMultipleItems
+ },
+ // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
+ // 只对微信小程序有效
+ easingFunction: {
+ type: String,
+ default: () => defProps.swiper.easingFunction
+ },
+ // list数组中指定对象的目标属性名
+ keyName: {
+ type: String,
+ default: () => defProps.swiper.keyName
+ },
+ // 图片的裁剪模式
+ imgMode: {
+ type: String,
+ default: () => defProps.swiper.imgMode
+ },
+ // 组件高度
+ height: {
+ type: [String, Number],
+ default: () => defProps.swiper.height
+ },
+ // 背景颜色
+ bgColor: {
+ type: String,
+ default: () => defProps.swiper.bgColor
+ },
+ // 组件圆角,数值或带单位的字符串
+ radius: {
+ type: [String, Number],
+ default: () => defProps.swiper.radius
+ },
+ // 是否加载中
+ loading: {
+ type: Boolean,
+ default: () => defProps.swiper.loading
+ },
+ // 是否显示标题,要求数组对象中有title属性
+ showTitle: {
+ type: Boolean,
+ default: () => defProps.swiper.showTitle
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-swiper/swiper.js b/uni_modules/uview-plus/components/u-swiper/swiper.js
index 2574c75..129bc04 100644
--- a/uni_modules/uview-plus/components/u-swiper/swiper.js
+++ b/uni_modules/uview-plus/components/u-swiper/swiper.js
@@ -1,39 +1,39 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/swiper.js
- */
-export default {
- // swiper 组件
- swiper: {
- list: [],
- indicator: false,
- indicatorActiveColor: '#FFFFFF',
- indicatorInactiveColor: 'rgba(255, 255, 255, 0.35)',
- indicatorStyle: '',
- indicatorMode: 'line',
- autoplay: true,
- current: 0,
- currentItemId: '',
- interval: 3000,
- duration: 300,
- circular: false,
- previousMargin: 0,
- nextMargin: 0,
- acceleration: false,
- displayMultipleItems: 1,
- easingFunction: 'default',
- keyName: 'url',
- imgMode: 'aspectFill',
- height: 130,
- bgColor: '#f3f4f6',
- radius: 4,
- loading: false,
- showTitle: false
- }
-
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:21:38
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiper.js
+ */
+export default {
+ // swiper 组件
+ swiper: {
+ list: [],
+ indicator: false,
+ indicatorActiveColor: '#FFFFFF',
+ indicatorInactiveColor: 'rgba(255, 255, 255, 0.35)',
+ indicatorStyle: '',
+ indicatorMode: 'line',
+ autoplay: true,
+ current: 0,
+ currentItemId: '',
+ interval: 3000,
+ duration: 300,
+ circular: false,
+ previousMargin: 0,
+ nextMargin: 0,
+ acceleration: false,
+ displayMultipleItems: 1,
+ easingFunction: 'default',
+ keyName: 'url',
+ imgMode: 'aspectFill',
+ height: 130,
+ bgColor: '#f3f4f6',
+ radius: 4,
+ loading: false,
+ showTitle: false
+ }
+
+}
diff --git a/uni_modules/uview-plus/components/u-swiper/u-swiper.vue b/uni_modules/uview-plus/components/u-swiper/u-swiper.vue
index a872ba7..9cd0f73 100644
--- a/uni_modules/uview-plus/components/u-swiper/u-swiper.vue
+++ b/uni_modules/uview-plus/components/u-swiper/u-swiper.vue
@@ -1,269 +1,270 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-switch/props.js b/uni_modules/uview-plus/components/u-switch/props.js
index 868968a..96e943f 100644
--- a/uni_modules/uview-plus/components/u-switch/props.js
+++ b/uni_modules/uview-plus/components/u-switch/props.js
@@ -1,77 +1,64 @@
-import { defineMixin } from '../../libs/vue'
-import SwitchDefaultProps from './switch'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(SwitchDefaultProps)
-export const props = defineMixin({
- props: {
- // 是否为加载中状态
- loading: {
- type: Boolean,
- default: () => defProps.switch.loading
- },
- // 是否为禁用装填
- disabled: {
- type: Boolean,
- default: () => defProps.switch.disabled
- },
- // 开关尺寸,单位px
- size: {
- type: [String, Number],
- default: () => defProps.switch.size
- },
- // 打开时的背景颜色
- activeColor: {
- type: String,
- default: () => defProps.switch.activeColor
- },
- // 关闭时的背景颜色
- inactiveColor: {
- type: String,
- default: () => defProps.switch.inactiveColor
- },
- // 打开时圆点的颜色
- dotActiveColor: {
- type: String,
- default: () => defProps.switch.dotActiveColor
- },
- // 关闭时圆点的颜色
- dotInactiveColor: {
- type: String,
- default: () => defProps.switch.dotInactiveColor
- },
- // 通过v-model双向绑定的值
- // #ifdef VUE3
- modelValue: {
- type: [Boolean, String, Number],
- default: () => defProps.switch.value
- },
- // #endif
- // #ifdef VUE2
- value: {
- type: [Boolean, String, Number],
- default: () => defProps.switch.value
- },
- // #endif
- // switch打开时的值
- activeValue: {
- type: [String, Number, Boolean],
- default: () => defProps.switch.activeValue
- },
- // switch关闭时的值
- inactiveValue: {
- type: [String, Number, Boolean],
- default: () => defProps.switch.inactiveValue
- },
- // 是否开启异步变更,开启后需要手动控制输入值
- asyncChange: {
- type: Boolean,
- default: () => defProps.switch.asyncChange
- },
- // 圆点与外边框的距离
- space: {
- type: [String, Number],
- default: () => defProps.switch.space
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 是否为加载中状态
+ loading: {
+ type: Boolean,
+ default: () => defProps.switch.loading
+ },
+ // 是否为禁用装填
+ disabled: {
+ type: Boolean,
+ default: () => defProps.switch.disabled
+ },
+ // 开关尺寸,单位px
+ size: {
+ type: [String, Number],
+ default: () => defProps.switch.size
+ },
+ // 打开时的背景颜色
+ activeColor: {
+ type: String,
+ default: () => defProps.switch.activeColor
+ },
+ // 关闭时的背景颜色
+ inactiveColor: {
+ type: String,
+ default: () => defProps.switch.inactiveColor
+ },
+ // 通过v-model双向绑定的值
+ // #ifdef VUE3
+ modelValue: {
+ type: [Boolean, String, Number],
+ default: () => defProps.switch.value
+ },
+ // #endif
+ // #ifdef VUE2
+ value: {
+ type: [Boolean, String, Number],
+ default: () => defProps.switch.value
+ },
+ // #endif
+ // switch打开时的值
+ activeValue: {
+ type: [String, Number, Boolean],
+ default: () => defProps.switch.activeValue
+ },
+ // switch关闭时的值
+ inactiveValue: {
+ type: [String, Number, Boolean],
+ default: () => defProps.switch.inactiveValue
+ },
+ // 是否开启异步变更,开启后需要手动控制输入值
+ asyncChange: {
+ type: Boolean,
+ default: () => defProps.switch.asyncChange
+ },
+ // 圆点与外边框的距离
+ space: {
+ type: [String, Number],
+ default: () => defProps.switch.space
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-switch/switch.js b/uni_modules/uview-plus/components/u-switch/switch.js
index 4326ad6..1d72641 100644
--- a/uni_modules/uview-plus/components/u-switch/switch.js
+++ b/uni_modules/uview-plus/components/u-switch/switch.js
@@ -1,26 +1,24 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/switch.js
- */
-export default {
- // switch
- switch: {
- loading: false,
- disabled: false,
- size: 25,
- activeColor: '#2979ff',
- inactiveColor: '#ffffff',
- dotActiveColor: '#ffffff',
- dotInactiveColor: '#ffffff',
- value: false,
- activeValue: true,
- inactiveValue: false,
- asyncChange: false,
- space: 0
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:22:24
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/switch.js
+ */
+export default {
+ // switch
+ switch: {
+ loading: false,
+ disabled: false,
+ size: 25,
+ activeColor: '#2979ff',
+ inactiveColor: '#ffffff',
+ value: false,
+ activeValue: true,
+ inactiveValue: false,
+ asyncChange: false,
+ space: 0
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-switch/theme-vars.scss b/uni_modules/uview-plus/components/u-switch/theme-vars.scss
deleted file mode 100644
index 1ca7595..0000000
--- a/uni_modules/uview-plus/components/u-switch/theme-vars.scss
+++ /dev/null
@@ -1,41 +0,0 @@
-:root,
-page,
-body {
- --up-switch-active-color: #3c9cff;
- --up-switch-inactive-color: #ffffff;
- --up-switch-dot-active-color: #ffffff;
- --up-switch-dot-inactive-color: #ffffff;
- --up-switch-loading-inactive-color: #aaabad;
- --up-switch-border-color: rgba(0, 0, 0, 0.12);
-}
-
-@media (prefers-color-scheme: dark) {
- :root,
- page,
- body {
- --up-switch-active-color: #3c9cff;
- --up-switch-inactive-color: #3a3a3c;
- --up-switch-dot-active-color: #ffffff;
- --up-switch-dot-inactive-color: #d1d5db;
- --up-switch-loading-inactive-color: #9ca3af;
- --up-switch-border-color: #4b5563;
- }
-}
-
-[data-up-theme='light'] {
- --up-switch-active-color: #3c9cff;
- --up-switch-inactive-color: #ffffff;
- --up-switch-dot-active-color: #ffffff;
- --up-switch-dot-inactive-color: #ffffff;
- --up-switch-loading-inactive-color: #aaabad;
- --up-switch-border-color: rgba(0, 0, 0, 0.12);
-}
-
-[data-up-theme='dark'] {
- --up-switch-active-color: #3c9cff;
- --up-switch-inactive-color: #3a3a3c;
- --up-switch-dot-active-color: #ffffff;
- --up-switch-dot-inactive-color: #d1d5db;
- --up-switch-loading-inactive-color: #9ca3af;
- --up-switch-border-color: #4b5563;
-}
diff --git a/uni_modules/uview-plus/components/u-switch/u-switch.vue b/uni_modules/uview-plus/components/u-switch/u-switch.vue
index 619e90b..3200b45 100644
--- a/uni_modules/uview-plus/components/u-switch/u-switch.vue
+++ b/uni_modules/uview-plus/components/u-switch/u-switch.vue
@@ -1,246 +1,216 @@
-
-
-
-
-
- :class="[modelValue && 'u-switch__node--on']"
-
-
- :class="[value && 'u-switch__node--on']"
-
- :style="[nodeStyle]"
- ref="u-switch__node"
- >
-
- :color="modelValue ? resolvedActiveColor : resolvedLoadingInactiveColor"
-
-
- :color="value ? resolvedActiveColor : resolvedLoadingInactiveColor"
-
- :size="size * 0.6"
- />
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ :class="[modelValue && 'u-switch__node--on']"
+
+
+ :class="[value && 'u-switch__node--on']"
+
+ :style="[nodeStyle]"
+ ref="u-switch__node"
+ >
+
+ :color="modelValue ? activeColor : '#AAABAD'"
+
+
+ :color="value ? activeColor : '#AAABAD'"
+
+ :size="size * 0.6"
+ />
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tabbar-item/props.js b/uni_modules/uview-plus/components/u-tabbar-item/props.js
index 1d7851a..bd878e7 100644
--- a/uni_modules/uview-plus/components/u-tabbar-item/props.js
+++ b/uni_modules/uview-plus/components/u-tabbar-item/props.js
@@ -1,94 +1,37 @@
-import { defineMixin } from '../../libs/vue'
-import TabbarItemDefaultProps from './tabbarItem'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TabbarItemDefaultProps)
-export const props = defineMixin({
- props: {
- // item标签的名称,作为与u-tabbar的value参数匹配的标识符
- name: {
- type: [String, Number, null],
- default: () => defProps.tabbarItem.name
- },
- // uview-plus内置图标或者绝对路径的图片
- icon: {
- type: String,
- default: () => defProps.tabbarItem.icon
- },
- // 激活态图标
- activeIcon: {
- type: String,
- default: () => defProps.tabbarItem.activeIcon
- },
- // 未激活态图标
- inactiveIcon: {
- type: String,
- default: () => defProps.tabbarItem.inactiveIcon
- },
- // 右上角的角标提示信息
- badge: {
- type: [String, Number, null],
- default: () => defProps.tabbarItem.badge
- },
- // 是否显示圆点,将会覆盖badge参数
- dot: {
- type: Boolean,
- default: () => defProps.tabbarItem.dot
- },
- // 描述文本
- text: {
- type: String,
- default: () => defProps.tabbarItem.text
- },
- // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
- badgeStyle: {
- type: [Object, String],
- default: () => defProps.tabbarItem.badgeStyle
- },
- // 模式,默认普通模式,midButton中间按钮模式
- mode: {
- type: String,
- default: () => defProps.tabbarItem.mode
- },
- // 激活态附加类名
- activeClass: {
- type: String,
- default: () => defProps.tabbarItem.activeClass
- },
- // 未激活态附加类名
- inactiveClass: {
- type: String,
- default: () => defProps.tabbarItem.inactiveClass
- },
- // 中间按钮背景色
- midButtonBgColor: {
- type: String,
- default: () => defProps.tabbarItem.midButtonBgColor
- },
- // 中间按钮图标颜色
- midButtonIconColor: {
- type: String,
- default: () => defProps.tabbarItem.midButtonIconColor
- },
- // 中间按钮图标大小
- midButtonIconSize: {
- type: [String, Number],
- default: () => defProps.tabbarItem.midButtonIconSize
- },
- // 中间按钮阴影
- midButtonBoxShadow: {
- type: String,
- default: () => defProps.tabbarItem.midButtonBoxShadow
- },
- // 中间按钮内层阴影
- midButtonInnerBoxShadow: {
- type: String,
- default: () => defProps.tabbarItem.midButtonInnerBoxShadow
- },
- // 中间按钮垂直偏移(负值为上移)
- midButtonOffsetY: {
- type: [String, Number],
- default: () => defProps.tabbarItem.midButtonOffsetY
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // item标签的名称,作为与u-tabbar的value参数匹配的标识符
+ name: {
+ type: [String, Number, null],
+ default: () => defProps.tabbarItem.name
+ },
+ // uView内置图标或者绝对路径的图片
+ icon: {
+ icon: String,
+ default: () => defProps.tabbarItem.icon
+ },
+ // 右上角的角标提示信息
+ badge: {
+ type: [String, Number, null],
+ default: () => defProps.tabbarItem.badge
+ },
+ // 是否显示圆点,将会覆盖badge参数
+ dot: {
+ type: Boolean,
+ default: () => defProps.tabbarItem.dot
+ },
+ // 描述文本
+ text: {
+ type: String,
+ default: () => defProps.tabbarItem.text
+ },
+ // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
+ badgeStyle: {
+ type: [Object, String],
+ default: () => defProps.tabbarItem.badgeStyle
+ }
+
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tabbar-item/tabbarItem.js b/uni_modules/uview-plus/components/u-tabbar-item/tabbarItem.js
index e2c1acf..5ab92c2 100644
--- a/uni_modules/uview-plus/components/u-tabbar-item/tabbarItem.js
+++ b/uni_modules/uview-plus/components/u-tabbar-item/tabbarItem.js
@@ -1,31 +1,20 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/tabbarItem.js
- */
-export default {
- //
- tabbarItem: {
- name: null,
- icon: '',
- activeIcon: '',
- inactiveIcon: '',
- badge: null,
- dot: false,
- text: '',
- badgeStyle: 'top: 6px;right:2px;',
- mode: '',
- activeClass: '',
- inactiveClass: '',
- midButtonBgColor: '',
- midButtonIconColor: '',
- midButtonIconSize: 26,
- midButtonBoxShadow: '',
- midButtonInnerBoxShadow: '',
- midButtonOffsetY: -10
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:22:55
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbarItem.js
+ */
+export default {
+ //
+ tabbarItem: {
+ name: null,
+ icon: '',
+ badge: null,
+ dot: false,
+ text: '',
+ badgeStyle: 'top: 6px;right:2px;'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue b/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue
index 4ae2d54..cf31b8a 100644
--- a/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue
+++ b/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue
@@ -1,477 +1,158 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ text }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tabbar/props.js b/uni_modules/uview-plus/components/u-tabbar/props.js
index 04edd84..8235107 100644
--- a/uni_modules/uview-plus/components/u-tabbar/props.js
+++ b/uni_modules/uview-plus/components/u-tabbar/props.js
@@ -1,94 +1,47 @@
-import { defineMixin } from '../../libs/vue'
-import TabbarDefaultProps from './tabbar'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TabbarDefaultProps)
-export const props = defineMixin({
- props: {
- // 当前匹配项的name
- value: {
- type: [String, Number, null],
- default: () => defProps.tabbar.value
- },
- // 是否为iPhoneX留出底部安全距离
- safeAreaInsetBottom: {
- type: Boolean,
- default: () => defProps.tabbar.safeAreaInsetBottom
- },
- // 是否显示上方边框
- border: {
- type: Boolean,
- default: () => defProps.tabbar.border
- },
- // 上方边框颜色
- borderColor: {
- type: String,
- default: () => defProps.tabbar.borderColor
- },
- // 元素层级z-index
- zIndex: {
- type: [String, Number],
- default: () => defProps.tabbar.zIndex
- },
- // 选中标签的颜色
- activeColor: {
- type: String,
- default: () => defProps.tabbar.activeColor
- },
- // 未选中标签的颜色
- inactiveColor: {
- type: String,
- default: () => defProps.tabbar.inactiveColor
- },
- // 是否固定在底部
- fixed: {
- type: Boolean,
- default: () => defProps.tabbar.fixed
- },
- // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
- placeholder: {
- type: Boolean,
- default: () => defProps.tabbar.placeholder
- },
- // 背景色
- backgroundColor: {
- type: String,
- default: () => defProps.tabbar.backgroundColor
- },
- // 风格类型
- styleType: {
- type: String,
- default: () => defProps.tabbar.styleType
- },
- // 激活动画类型
- animationType: {
- type: String,
- default: () => defProps.tabbar.animationType
- },
- // 选中项背景色
- activeBackgroundColor: {
- type: String,
- default: () => defProps.tabbar.activeBackgroundColor
- },
- // 未选中项背景色
- inactiveBackgroundColor: {
- type: String,
- default: () => defProps.tabbar.inactiveBackgroundColor
- },
- // item 形状
- itemShape: {
- type: String,
- default: () => defProps.tabbar.itemShape
- },
- // 图标缩放比例
- iconScale: {
- type: [String, Number],
- default: () => defProps.tabbar.iconScale
- },
- // 文本显示模式
- textMode: {
- type: String,
- default: () => defProps.tabbar.textMode
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+
+export const props = defineMixin({
+ props: {
+ // 当前匹配项的name
+ value: {
+ type: [String, Number, null],
+ default: () => defProps.tabbar.value
+ },
+ // 是否为iPhoneX留出底部安全距离
+ safeAreaInsetBottom: {
+ type: Boolean,
+ default: () => defProps.tabbar.safeAreaInsetBottom
+ },
+ // 是否显示上方边框
+ border: {
+ type: Boolean,
+ default: () => defProps.tabbar.border
+ },
+ // 元素层级z-index
+ zIndex: {
+ type: [String, Number],
+ default: () => defProps.tabbar.zIndex
+ },
+ // 选中标签的颜色
+ activeColor: {
+ type: String,
+ default: () => defProps.tabbar.activeColor
+ },
+ // 未选中标签的颜色
+ inactiveColor: {
+ type: String,
+ default: () => defProps.tabbar.inactiveColor
+ },
+ // 是否固定在底部
+ fixed: {
+ type: Boolean,
+ default: () => defProps.tabbar.fixed
+ },
+ // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
+ placeholder: {
+ type: Boolean,
+ default: () => defProps.tabbar.placeholder
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tabbar/tabbar.js b/uni_modules/uview-plus/components/u-tabbar/tabbar.js
index df74475..ad149f4 100644
--- a/uni_modules/uview-plus/components/u-tabbar/tabbar.js
+++ b/uni_modules/uview-plus/components/u-tabbar/tabbar.js
@@ -1,31 +1,22 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/tabbar.js
- */
-export default {
- // tabbar
- tabbar: {
- value: null,
- safeAreaInsetBottom: true,
- border: true,
- zIndex: 1,
- activeColor: '#1989fa',
- inactiveColor: '#7d7e80',
- fixed: true,
- placeholder: true,
- borderColor: '',
- backgroundColor: '',
- styleType: 'default',
- animationType: 'none',
- activeBackgroundColor: '',
- inactiveBackgroundColor: '',
- itemShape: 'default',
- iconScale: 1.1,
- textMode: 'always'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:22:40
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js
+ */
+export default {
+ // tabbar
+ tabbar: {
+ value: null,
+ safeAreaInsetBottom: true,
+ border: true,
+ zIndex: 1,
+ activeColor: '#1989fa',
+ inactiveColor: '#7d7e80',
+ fixed: true,
+ placeholder: true
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue b/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue
index 7824f86..3070d69 100644
--- a/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue
+++ b/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue
@@ -1,229 +1,145 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-table/props.js b/uni_modules/uview-plus/components/u-table/props.js
index 7bc975c..e993b5b 100644
--- a/uni_modules/uview-plus/components/u-table/props.js
+++ b/uni_modules/uview-plus/components/u-table/props.js
@@ -1,9 +1,7 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ table: {} })
-export const props = defineMixin({
- props: {
-
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-table/u-table.vue b/uni_modules/uview-plus/components/u-table/u-table.vue
index 767e92b..fe9e35b 100644
--- a/uni_modules/uview-plus/components/u-table/u-table.vue
+++ b/uni_modules/uview-plus/components/u-table/u-table.vue
@@ -1,119 +1,31 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-table2/tableRow.vue b/uni_modules/uview-plus/components/u-table2/tableRow.vue
deleted file mode 100644
index ddfc1a5..0000000
--- a/uni_modules/uview-plus/components/u-table2/tableRow.vue
+++ /dev/null
@@ -1,416 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ isLazyLoading(row) ? '...' : (isExpanded(row) ? '▼' : '▶') }}
-
-
-
-
-
- {{ row[col.key] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row[scope.column.key] }}
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-table2/u-table2.vue b/uni_modules/uview-plus/components/u-table2/u-table2.vue
deleted file mode 100644
index 42a786e..0000000
--- a/uni_modules/uview-plus/components/u-table2/u-table2.vue
+++ /dev/null
@@ -1,1106 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ isLazyLoading(item.row) ? '...' : (isExpanded(item.row) ? '▼' : '▶') }}
-
-
-
-
-
- {{ item.row[col.key] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row[scope.column.key] }}
-
-
-
-
-
-
-
-
-
- {{ emptyText }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ isLazyLoading(item.row) ? '...' : (isExpanded(item.row) ? '▼' : '▶') }}
-
-
-
-
-
- {{ item.row[col.key] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row[scope.column.key] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-tabs-item/props.js b/uni_modules/uview-plus/components/u-tabs-item/props.js
index c36ba87..e993b5b 100644
--- a/uni_modules/uview-plus/components/u-tabs-item/props.js
+++ b/uni_modules/uview-plus/components/u-tabs-item/props.js
@@ -1,9 +1,7 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ tabsItem: {} })
-export const props = defineMixin({
- props: {
-
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue b/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue
index 58d9cc5..8534f7b 100644
--- a/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue
+++ b/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue
@@ -1,31 +1,31 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tabs/props.js b/uni_modules/uview-plus/components/u-tabs/props.js
index 4f20cf9..2bab6b4 100644
--- a/uni_modules/uview-plus/components/u-tabs/props.js
+++ b/uni_modules/uview-plus/components/u-tabs/props.js
@@ -1,8 +1,5 @@
import { defineMixin } from '../../libs/vue'
-import TabsDefaultProps from './tabs'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TabsDefaultProps)
+import defProps from '../../libs/config/props.js'
export const props = defineMixin({
props: {
// 滑块的移动过渡时间,单位ms
@@ -66,14 +63,9 @@ export const props = defineMixin({
default: () => defProps.tabs.keyName
},
// 左侧图标样式
- iconStyle: {
- type: [String, Object],
- default: () => defProps.tabs.iconStyle
- },
- // 形态模式,可选:capsule/card/pill-arrow/tag
- shapeMode: {
- type: String,
- default: () => defProps.tabs.shapeMode
- }
- }
-})
+ iconStyle: {
+ type: [String, Object],
+ default: () => defProps.tabs.iconStyle
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tabs/tabs.js b/uni_modules/uview-plus/components/u-tabs/tabs.js
index 12bbe3e..3a0d399 100644
--- a/uni_modules/uview-plus/components/u-tabs/tabs.js
+++ b/uni_modules/uview-plus/components/u-tabs/tabs.js
@@ -1,18 +1,18 @@
/*
* @Author : LQ
* @Description :
- * @version : 3.0
+ * @version : 1.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/tabs.js
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:23:14
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabs.js
*/
export default {
//
tabs: {
duration: 300,
list: [],
- lineColor: '',
+ lineColor: '#3c9cff',
activeStyle: {
color: '#303133'
},
@@ -25,10 +25,9 @@ export default {
itemStyle: {
height: '44px'
},
- scrollable: true,
- current: 0,
- keyName: 'name',
- iconStyle: {},
- shapeMode: ''
- }
-}
+ scrollable: true,
+ current: 0,
+ keyName: 'name',
+ iconStyle: {}
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-tabs/u-tabs.vue b/uni_modules/uview-plus/components/u-tabs/u-tabs.vue
index 46caac2..c3951cb 100644
--- a/uni_modules/uview-plus/components/u-tabs/u-tabs.vue
+++ b/uni_modules/uview-plus/components/u-tabs/u-tabs.vue
@@ -1,554 +1,403 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item[keyName] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item[keyName] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tag/props.js b/uni_modules/uview-plus/components/u-tag/props.js
index 2e83532..43796bf 100644
--- a/uni_modules/uview-plus/components/u-tag/props.js
+++ b/uni_modules/uview-plus/components/u-tag/props.js
@@ -1,119 +1,90 @@
-import { defineMixin } from '../../libs/vue'
-import TagDefaultProps from './tag'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TagDefaultProps)
-export const props = defineMixin({
- props: {
- // 标签类型info、primary、success、warning、error
- type: {
- type: String,
- default: () => defProps.tag.type
- },
- // 不可用
- disabled: {
- type: [Boolean, String],
- default: () => defProps.tag.disabled
- },
- // 标签的大小,large,medium,mini
- size: {
- type: String,
- default: () => defProps.tag.size
- },
- // tag的形状,circle(两边半圆形), square(方形,带圆角)
- shape: {
- type: String,
- default: () => defProps.tag.shape
- },
- // 标签文字
- text: {
- type: [String, Number],
- default: () => defProps.tag.text
- },
- // 背景颜色,默认为空字符串,即不处理
- bgColor: {
- type: String,
- default: () => defProps.tag.bgColor
- },
- // 标签字体颜色,默认为空字符串,即不处理
- color: {
- type: String,
- default: () => defProps.tag.color
- },
- // 标签的边框颜色
- borderColor: {
- type: String,
- default: () => defProps.tag.borderColor
- },
- // 关闭按钮图标的颜色
- closeColor: {
- type: String,
- default: () => defProps.tag.closeColor
- },
- // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
- name: {
- type: [String, Number],
- default: () => defProps.tag.name
- },
- // // 模式选择,dark|light|plain
- // mode: {
- // type: String,
- // default: 'light'
- // },
- // 镂空时是否填充背景色
- plainFill: {
- type: Boolean,
- default: () => defProps.tag.plainFill
- },
- // 是否镂空
- plain: {
- type: Boolean,
- default: () => defProps.tag.plain
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: () => defProps.tag.closable
- },
- // 是否显示
- show: {
- type: Boolean,
- default: () => defProps.tag.show
- },
- // 内置图标,或绝对路径的图片
- icon: {
- type: String,
- default: () => defProps.tag.icon,
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: () => defProps.tag.iconColor,
- },
- // 自定义尺寸字体大小
- textSize: {
- type: String,
- default: () => defProps.tag.textSize
- },
- // 自定义尺寸高度
- height: {
- type: String,
- default: () => defProps.tag.height
- },
- // 自定义尺寸padding
- padding: {
- type: String,
- default: () => defProps.tag.padding
- },
- // 自定义尺寸
- borderRadius: {
- type: String,
- default: () => defProps.tag.borderRadius
- },
- // 自动计算背景色
- autoBgColor: {
- type: Number,
- default: () => defProps.tag.autoBgColor
- },
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 标签类型info、primary、success、warning、error
+ type: {
+ type: String,
+ default: () => defProps.tag.type
+ },
+ // 不可用
+ disabled: {
+ type: [Boolean, String],
+ default: () => defProps.tag.disabled
+ },
+ // 标签的大小,large,medium,mini
+ size: {
+ type: String,
+ default: () => defProps.tag.size
+ },
+ // tag的形状,circle(两边半圆形), square(方形,带圆角)
+ shape: {
+ type: String,
+ default: () => defProps.tag.shape
+ },
+ // 标签文字
+ text: {
+ type: [String, Number],
+ default: () => defProps.tag.text
+ },
+ // 背景颜色,默认为空字符串,即不处理
+ bgColor: {
+ type: String,
+ default: () => defProps.tag.bgColor
+ },
+ // 标签字体颜色,默认为空字符串,即不处理
+ color: {
+ type: String,
+ default: () => defProps.tag.color
+ },
+ // 标签的边框颜色
+ borderColor: {
+ type: String,
+ default: () => defProps.tag.borderColor
+ },
+ // 关闭按钮图标的颜色
+ closeColor: {
+ type: String,
+ default: () => defProps.tag.closeColor
+ },
+ // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
+ name: {
+ type: [String, Number],
+ default: () => defProps.tag.name
+ },
+ // // 模式选择,dark|light|plain
+ // mode: {
+ // type: String,
+ // default: 'light'
+ // },
+ // 镂空时是否填充背景色
+ plainFill: {
+ type: Boolean,
+ default: () => defProps.tag.plainFill
+ },
+ // 是否镂空
+ plain: {
+ type: Boolean,
+ default: () => defProps.tag.plain
+ },
+ // 是否可关闭
+ closable: {
+ type: Boolean,
+ default: () => defProps.tag.closable
+ },
+ // 是否显示
+ show: {
+ type: Boolean,
+ default: () => defProps.tag.show
+ },
+ // 内置图标,或绝对路径的图片
+ icon: {
+ type: String,
+ default: () => defProps.tag.icon,
+ },
+ iconColor: {
+ type: String,
+ default: () => defProps.tag.iconColor
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tag/tag.js b/uni_modules/uview-plus/components/u-tag/tag.js
index e35bb79..3b047c5 100644
--- a/uni_modules/uview-plus/components/u-tag/tag.js
+++ b/uni_modules/uview-plus/components/u-tag/tag.js
@@ -1,11 +1,11 @@
/*
* @Author : LQ
* @Description :
- * @version : 3.0
+ * @version : 1.0
* @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/tag.js
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:23:37
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js
*/
export default {
// tag 组件
@@ -25,11 +25,6 @@ export default {
closable: false,
show: true,
icon: '',
- iconColor: '',
- textSize: '',
- height: '',
- padding: '',
- borderRadius: '',
- autoBgColor: 0
+ iconColor: ''
}
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/components/u-tag/theme-vars.scss b/uni_modules/uview-plus/components/u-tag/theme-vars.scss
deleted file mode 100644
index bf38484..0000000
--- a/uni_modules/uview-plus/components/u-tag/theme-vars.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-:root,
-page,
-body {
- --up-tag-close-bg-color: #c8c9cc;
-}
-
-@media (prefers-color-scheme: dark) {
- :root,
- page,
- body {
- --up-tag-close-bg-color: #4b5563;
- }
-}
-
-[data-up-theme='light'] {
- --up-tag-close-bg-color: #c8c9cc;
-}
-
-[data-up-theme='dark'] {
- --up-tag-close-bg-color: #4b5563;
-}
diff --git a/uni_modules/uview-plus/components/u-tag/u-tag.vue b/uni_modules/uview-plus/components/u-tag/u-tag.vue
index 49cac37..6055cb2 100644
--- a/uni_modules/uview-plus/components/u-tag/u-tag.vue
+++ b/uni_modules/uview-plus/components/u-tag/u-tag.vue
@@ -1,412 +1,368 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ text }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-td/props.js b/uni_modules/uview-plus/components/u-td/props.js
index faa853c..e993b5b 100644
--- a/uni_modules/uview-plus/components/u-td/props.js
+++ b/uni_modules/uview-plus/components/u-td/props.js
@@ -1,9 +1,7 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ td: {} })
-export const props = defineMixin({
- props: {
-
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-td/u-td.vue b/uni_modules/uview-plus/components/u-td/u-td.vue
index 76b46ca..be021d7 100644
--- a/uni_modules/uview-plus/components/u-td/u-td.vue
+++ b/uni_modules/uview-plus/components/u-td/u-td.vue
@@ -1,100 +1,33 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-text/props.js b/uni_modules/uview-plus/components/u-text/props.js
index a8d8dde..5229412 100644
--- a/uni_modules/uview-plus/components/u-text/props.js
+++ b/uni_modules/uview-plus/components/u-text/props.js
@@ -1,120 +1,117 @@
-import { defineMixin } from '../../libs/vue'
-import TextDefaultProps from './text'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TextDefaultProps)
-export const props = defineMixin({
- props: {
- // 主题颜色
- type: {
- type: String,
- default: () => defProps.text.type
- },
- // 是否显示
- show: {
- type: Boolean,
- default: () => defProps.text.show
- },
- // 显示的值
- text: {
- type: [String, Number],
- default: () => defProps.text.text
- },
- // 前置图标
- prefixIcon: {
- type: String,
- default: () => defProps.text.prefixIcon
- },
- // 后置图标
- suffixIcon: {
- type: String,
- default: () => defProps.text.suffixIcon
- },
- // 文本处理的匹配模式
- // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
- mode: {
- type: String,
- default: () => defProps.text.mode
- },
- // mode=link下,配置的链接
- href: {
- type: String,
- default: () => defProps.text.href
- },
- // 格式化规则
- format: {
- type: [String, Function],
- default: () => defProps.text.format
- },
- // mode=phone时,点击文本是否拨打电话
- call: {
- type: Boolean,
- default: () => defProps.text.call
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: () => defProps.text.openType
- },
- // 是否粗体,默认normal
- bold: {
- type: Boolean,
- default: () => defProps.text.bold
- },
- // 是否块状
- block: {
- type: Boolean,
- default: () => defProps.text.block
- },
- // 文本显示的行数,如果设置,超出此行数,将会显示省略号
- lines: {
- type: [String, Number],
- default: () => defProps.text.lines
- },
- // 文本颜色
- color: {
- type: String,
- default: () => defProps.text.color
- },
- // 字体大小
- size: {
- type: [String, Number],
- default: () => defProps.text.size
- },
- // 图标的样式
- iconStyle: {
- type: [Object, String],
- default: () => defProps.text.iconStyle
- },
- // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
- decoration: {
- tepe: String,
- default: () => defProps.text.decoration
- },
- // 外边距,对象、字符串,数值形式均可
- margin: {
- type: [Object, String, Number],
- default: () => defProps.text.margin
- },
- // 文本行高
- lineHeight: {
- type: [String, Number],
- default: () => defProps.text.lineHeight
- },
- // 文本对齐方式,可选值left|center|right
- align: {
- type: String,
- default: () => defProps.text.align
- },
- // 文字换行,可选值break-word|normal|anywhere
- wordWrap: {
- type: String,
- default: () => defProps.text.wordWrap
- },
- // 占满剩余空间
- flex1: {
- type: Boolean,
- default: () => defProps.text.flex1
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 主题颜色
+ type: {
+ type: String,
+ default: () => defProps.text.type
+ },
+ // 是否显示
+ show: {
+ type: Boolean,
+ default: () => defProps.text.show
+ },
+ // 显示的值
+ text: {
+ type: [String, Number],
+ default: () => defProps.text.text
+ },
+ // 前置图标
+ prefixIcon: {
+ type: String,
+ default: () => defProps.text.prefixIcon
+ },
+ // 后置图标
+ suffixIcon: {
+ type: String,
+ default: () => defProps.text.suffixIcon
+ },
+ // 文本处理的匹配模式
+ // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
+ mode: {
+ type: String,
+ default: () => defProps.text.mode
+ },
+ // mode=link下,配置的链接
+ href: {
+ type: String,
+ default: () => defProps.text.href
+ },
+ // 格式化规则
+ format: {
+ type: [String, Function],
+ default: () => defProps.text.format
+ },
+ // mode=phone时,点击文本是否拨打电话
+ call: {
+ type: Boolean,
+ default: () => defProps.text.call
+ },
+ // 小程序的打开方式
+ openType: {
+ type: String,
+ default: () => defProps.text.openType
+ },
+ // 是否粗体,默认normal
+ bold: {
+ type: Boolean,
+ default: () => defProps.text.bold
+ },
+ // 是否块状
+ block: {
+ type: Boolean,
+ default: () => defProps.text.block
+ },
+ // 文本显示的行数,如果设置,超出此行数,将会显示省略号
+ lines: {
+ type: [String, Number],
+ default: () => defProps.text.lines
+ },
+ // 文本颜色
+ color: {
+ type: String,
+ default: () => defProps.text.color
+ },
+ // 字体大小
+ size: {
+ type: [String, Number],
+ default: () => defProps.text.size
+ },
+ // 图标的样式
+ iconStyle: {
+ type: [Object, String],
+ default: () => defProps.text.iconStyle
+ },
+ // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
+ decoration: {
+ tepe: String,
+ default: () => defProps.text.decoration
+ },
+ // 外边距,对象、字符串,数值形式均可
+ margin: {
+ type: [Object, String, Number],
+ default: () => defProps.text.margin
+ },
+ // 文本行高
+ lineHeight: {
+ type: [String, Number],
+ default: () => defProps.text.lineHeight
+ },
+ // 文本对齐方式,可选值left|center|right
+ align: {
+ type: String,
+ default: () => defProps.text.align
+ },
+ // 文字换行,可选值break-word|normal|anywhere
+ wordWrap: {
+ type: String,
+ default: () => defProps.text.wordWrap
+ },
+ // 占满剩余空间
+ flex1: {
+ type: Boolean,
+ default: () => defProps.text.flex1
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-text/text.js b/uni_modules/uview-plus/components/u-text/text.js
index 6950ccd..2c8efe3 100644
--- a/uni_modules/uview-plus/components/u-text/text.js
+++ b/uni_modules/uview-plus/components/u-text/text.js
@@ -1,39 +1,39 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/text.js
- */
-export default {
- // text 组件
- text: {
- type: '',
- show: true,
- text: '',
- prefixIcon: '',
- suffixIcon: '',
- mode: '',
- href: '',
- format: '',
- call: false,
- openType: '',
- bold: false,
- block: false,
- lines: '',
- color: '',
- size: 15,
- iconStyle: {
- fontSize: '15px'
- },
- decoration: 'none',
- margin: 0,
- lineHeight: '',
- align: 'left',
- wordWrap: 'normal',
- flex1: true
- }
-
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:23:58
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js
+ */
+export default {
+ // text 组件
+ text: {
+ type: '',
+ show: true,
+ text: '',
+ prefixIcon: '',
+ suffixIcon: '',
+ mode: '',
+ href: '',
+ format: '',
+ call: false,
+ openType: '',
+ bold: false,
+ block: false,
+ lines: '',
+ color: '#303133',
+ size: 15,
+ iconStyle: {
+ fontSize: '15px'
+ },
+ decoration: 'none',
+ margin: 0,
+ lineHeight: '',
+ align: 'left',
+ wordWrap: 'normal',
+ flex1: true
+ }
+
+}
diff --git a/uni_modules/uview-plus/components/u-text/u-text.vue b/uni_modules/uview-plus/components/u-text/u-text.vue
index d1d74f5..81628ad 100644
--- a/uni_modules/uview-plus/components/u-text/u-text.vue
+++ b/uni_modules/uview-plus/components/u-text/u-text.vue
@@ -13,10 +13,10 @@
>¥
-
+ >
{{ value }}
-
+ >
@@ -78,7 +78,7 @@ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
/**
* Text 文本
* @description 此组件集成了文本类在项目中的常用功能,包括状态,拨打电话,格式化日期,*替换,超链接...等功能。 您大可不必在使用特殊文本时自己定义,text组件几乎涵盖您能使用的大部分场景。
- * @tutorial https://uview-plus.jiangruyi.com/components/loading.html
+ * @tutorial https://ijry.github.io/uview-plus/components/loading.html
* @property {String} type 主题颜色
* @property {Boolean} show 是否显示(默认 true )
* @property {String | Number} text 显示的值
@@ -120,28 +120,26 @@ export default {
}
// 占满剩余空间
if (this.flex1) {
- style.flex = 1;
- // #ifndef APP-NVUE
- style.width = '100%';
+ style.flex = 1;
+ // #ifndef APP-NVUE
+ style.width = '100%';
// #endif
- }
+ }
return style;
},
- valueStyle() {
- const style = {
- textDecoration: this.decoration,
- fontWeight: this.bold ? 'bold' : 'normal',
- wordWrap: this.wordWrap,
- fontSize: addUnit(this.size)
- }
- if (!this.type) {
- style.color = this.color || this.upThemeVar('--up-content-color', this.$u?.color?.contentColor || '#606266')
- }
- this.isNvue && this.lines && (style.lines = this.lines)
- this.lineHeight &&
- (style.lineHeight = addUnit(this.lineHeight))
- !this.isNvue && this.block && (style.display = 'block')
- return deepMerge(style, addStyle(this.customStyle))
+ valueStyle() {
+ const style = {
+ textDecoration: this.decoration,
+ fontWeight: this.bold ? 'bold' : 'normal',
+ wordWrap: this.wordWrap,
+ fontSize: addUnit(this.size)
+ }
+ !this.type && (style.color = this.color)
+ this.isNvue && this.lines && (style.lines = this.lines)
+ this.lineHeight &&
+ (style.lineHeight = addUnit(this.lineHeight))
+ !this.isNvue && this.block && (style.display = 'block')
+ return deepMerge(style, addStyle(this.customStyle))
},
isNvue() {
let nvue = false
@@ -177,6 +175,8 @@ export default {
diff --git a/uni_modules/uview-plus/components/u-th/props.js b/uni_modules/uview-plus/components/u-th/props.js
deleted file mode 100644
index e0b0ed0..0000000
--- a/uni_modules/uview-plus/components/u-th/props.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ th: {} })
-export const props = defineMixin({
- props: {
-
- }
-})
diff --git a/uni_modules/uview-plus/components/u-th/u-th.vue b/uni_modules/uview-plus/components/u-th/u-th.vue
deleted file mode 100644
index 01b04bf..0000000
--- a/uni_modules/uview-plus/components/u-th/u-th.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-title/u-title.vue b/uni_modules/uview-plus/components/u-title/u-title.vue
deleted file mode 100644
index 38dba72..0000000
--- a/uni_modules/uview-plus/components/u-title/u-title.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-toast/toast.js b/uni_modules/uview-plus/components/u-toast/toast.js
index 19134b7..108773a 100644
--- a/uni_modules/uview-plus/components/u-toast/toast.js
+++ b/uni_modules/uview-plus/components/u-toast/toast.js
@@ -1,30 +1,30 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/toast.js
- */
-export default {
- // toast组件
- toast: {
- zIndex: 10090,
- loading: false,
- message: '',
- icon: '',
- type: '',
- loadingMode: '',
- show: '',
- overlay: false,
- position: 'center',
- params: {},
- duration: 2000,
- isTab: false,
- url: '',
- callback: null,
- back: false
- }
-
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:07:07
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js
+ */
+export default {
+ // toast组件
+ toast: {
+ zIndex: 10090,
+ loading: false,
+ text: '',
+ icon: '',
+ type: '',
+ loadingMode: '',
+ show: '',
+ overlay: false,
+ position: 'center',
+ params: {},
+ duration: 2000,
+ isTab: false,
+ url: '',
+ callback: null,
+ back: false
+ }
+
+}
diff --git a/uni_modules/uview-plus/components/u-toast/u-toast.vue b/uni_modules/uview-plus/components/u-toast/u-toast.vue
index 8348e55..563d9b0 100644
--- a/uni_modules/uview-plus/components/u-toast/u-toast.vue
+++ b/uni_modules/uview-plus/components/u-toast/u-toast.vue
@@ -1,308 +1,304 @@
-
-
-
-
-
-
-
- {{ tmpConfig.message }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ tmpConfig.message }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-toolbar/props.js b/uni_modules/uview-plus/components/u-toolbar/props.js
index 89481a4..a723b50 100644
--- a/uni_modules/uview-plus/components/u-toolbar/props.js
+++ b/uni_modules/uview-plus/components/u-toolbar/props.js
@@ -1,44 +1,41 @@
-import { defineMixin } from '../../libs/vue'
-import ToolbarDefaultProps from './toolbar'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(ToolbarDefaultProps)
-export const props = defineMixin({
- props: {
- // 是否展示工具条
- show: {
- type: Boolean,
- default: () => defProps.toolbar.show
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: () => defProps.toolbar.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: () => defProps.toolbar.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: () => defProps.toolbar.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: () => defProps.toolbar.confirmColor
- },
- // 标题文字
- title: {
- type: String,
- default: () => defProps.toolbar.title
- },
- // 开启右侧插槽
- rightSlot: {
- type: Boolean,
- default: false
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 是否展示工具条
+ show: {
+ type: Boolean,
+ default: () => defProps.toolbar.show
+ },
+ // 取消按钮的文字
+ cancelText: {
+ type: String,
+ default: () => defProps.toolbar.cancelText
+ },
+ // 确认按钮的文字
+ confirmText: {
+ type: String,
+ default: () => defProps.toolbar.confirmText
+ },
+ // 取消按钮的颜色
+ cancelColor: {
+ type: String,
+ default: () => defProps.toolbar.cancelColor
+ },
+ // 确认按钮的颜色
+ confirmColor: {
+ type: String,
+ default: () => defProps.toolbar.confirmColor
+ },
+ // 标题文字
+ title: {
+ type: String,
+ default: () => defProps.toolbar.title
+ },
+ // 开启右侧插槽
+ rightSlot: {
+ type: Boolean,
+ default: false
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-toolbar/toolbar.js b/uni_modules/uview-plus/components/u-toolbar/toolbar.js
index 3b5a188..d098a17 100644
--- a/uni_modules/uview-plus/components/u-toolbar/toolbar.js
+++ b/uni_modules/uview-plus/components/u-toolbar/toolbar.js
@@ -1,22 +1,21 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/toolbar.js
- */
-import { t } from '../../libs/i18n'
-export default {
- // toolbar 组件
- toolbar: {
- show: true,
- cancelText: t('up.common.cancel'),
- confirmText: t('up.common.confirm'),
- cancelColor: '#909193',
- confirmColor: '',
- title: ''
- }
-
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:24:55
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/toolbar.js
+ */
+export default {
+ // toolbar 组件
+ toolbar: {
+ show: true,
+ cancelText: '取消',
+ confirmText: '确认',
+ cancelColor: '#909193',
+ confirmColor: '#3c9cff',
+ title: ''
+ }
+
+}
diff --git a/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue b/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue
index aabf43d..5e1af96 100644
--- a/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue
+++ b/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue
@@ -1,125 +1,125 @@
-
-
-
-
- {{ cancelText }}
-
-
- {{ title }}
-
-
- {{ confirmText }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ cancelText }}
+
+
+ {{ title }}
+
+
+ {{ confirmText }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tooltip/props.js b/uni_modules/uview-plus/components/u-tooltip/props.js
index bcef988..7dffa1e 100644
--- a/uni_modules/uview-plus/components/u-tooltip/props.js
+++ b/uni_modules/uview-plus/components/u-tooltip/props.js
@@ -1,89 +1,61 @@
-import { defineMixin } from '../../libs/vue'
-import TooltipDefaultProps from './tooltip'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TooltipDefaultProps)
-export const props = defineMixin({
- props: {
- // 需要显示的提示文字
- text: {
- type: [String, Number],
- default: () => defProps.tooltip.text
- },
- // 点击复制按钮时,复制的文本,为空则使用text值
- copyText: {
- type: [String, Number],
- default: () => defProps.tooltip.copyText
- },
- // 文本大小
- size: {
- type: [String, Number],
- default: () => defProps.tooltip.size
- },
- // 字体颜色
- color: {
- type: String,
- default: () => defProps.tooltip.color
- },
- // 弹出提示框时,文本的背景色
- bgColor: {
- type: String,
- default: () => defProps.tooltip.bgColor
- },
- // 弹出提示框的背景色
- popupBgColor: {
- type: String,
- default: () => defProps.tooltip.popupBgColor
- },
- // 弹出提示的方向,top-上方,bottom-下方,left-左方,right-右方
- direction: {
- type: String,
- default: () => defProps.tooltip.direction
- },
- // 弹出提示的z-index,nvue无效
- zIndex: {
- type: [String, Number],
- default: () => defProps.tooltip.zIndex
- },
- // 是否显示复制按钮
- showCopy: {
- type: Boolean,
- default: () => defProps.tooltip.showCopy
- },
- // 扩展的按钮组
- buttons: {
- type: Array,
- default: () => defProps.tooltip.buttons
- },
- // 是否显示透明遮罩以防止触摸穿透
- overlay: {
- type: Boolean,
- default: () => defProps.tooltip.overlay
- },
- // 是否显示复制成功或者失败的toast
- showToast: {
- type: Boolean,
- default: () => defProps.tooltip.showToast
- },
- // 触发方式,可选值:longpress/click
- triggerMode: {
- type: String,
- default: () => defProps.tooltip.triggerMode
- },
- // 强制定位
- forcePosition: {
- type: Object,
- default: () => defProps.tooltip.forcePosition
- },
- // 是否显示,triggerMode为manual时使用
- show: {
- type: Boolean,
- default: () => defProps.tooltip.show
- },
- // 是否开启单例模式,开启该属性的tooltip同一页面同时只显示一个
- singleton: {
- type: Boolean,
- default: () => defProps.tooltip.singleton
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 需要显示的提示文字
+ text: {
+ type: [String, Number],
+ default: () => defProps.tooltip.text
+ },
+ // 点击复制按钮时,复制的文本,为空则使用text值
+ copyText: {
+ type: [String, Number],
+ default: () => defProps.tooltip.copyText
+ },
+ // 文本大小
+ size: {
+ type: [String, Number],
+ default: () => defProps.tooltip.size
+ },
+ // 字体颜色
+ color: {
+ type: String,
+ default: () => defProps.tooltip.color
+ },
+ // 弹出提示框时,文本的背景色
+ bgColor: {
+ type: String,
+ default: () => defProps.tooltip.bgColor
+ },
+ // 弹出提示的方向,top-上方,bottom-下方
+ direction: {
+ type: String,
+ default: () => defProps.tooltip.direction
+ },
+ // 弹出提示的z-index,nvue无效
+ zIndex: {
+ type: [String, Number],
+ default: () => defProps.tooltip.zIndex
+ },
+ // 是否显示复制按钮
+ showCopy: {
+ type: Boolean,
+ default: () => defProps.tooltip.showCopy
+ },
+ // 扩展的按钮组
+ buttons: {
+ type: Array,
+ default: () => defProps.tooltip.buttons
+ },
+ // 是否显示透明遮罩以防止触摸穿透
+ overlay: {
+ type: Boolean,
+ default: () => defProps.tooltip.overlay
+ },
+ // 是否显示复制成功或者失败的toast
+ showToast: {
+ type: Boolean,
+ default: () => defProps.tooltip.showToast
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tooltip/tooltip.js b/uni_modules/uview-plus/components/u-tooltip/tooltip.js
index 39a2766..7a7fb33 100644
--- a/uni_modules/uview-plus/components/u-tooltip/tooltip.js
+++ b/uni_modules/uview-plus/components/u-tooltip/tooltip.js
@@ -1,30 +1,25 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/tooltip.js
- */
-export default {
- // tooltip 组件
- tooltip: {
- text: '',
- copyText: '',
- size: 14,
- color: '#606266',
- bgColor: 'transparent',
- direction: 'top',
- zIndex: 10071,
- showCopy: true,
- buttons: [],
- overlay: true,
- showToast: true,
- popupBgColor: '',
- triggerMode: 'longpress',
- forcePosition: {},
- show: false,
- singleton: false
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:25:14
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js
+ */
+export default {
+ // tooltip 组件
+ tooltip: {
+ text: '',
+ copyText: '',
+ size: 14,
+ color: '#606266',
+ bgColor: 'transparent',
+ direction: 'top',
+ zIndex: 10071,
+ showCopy: true,
+ buttons: [],
+ overlay: true,
+ showToast: true
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue b/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue
index 9061150..b13dcb1 100644
--- a/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue
+++ b/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue
@@ -1,436 +1,342 @@
-
-
-
-
-
-
- {{ text }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tr/props.js b/uni_modules/uview-plus/components/u-tr/props.js
index 5b13a79..e993b5b 100644
--- a/uni_modules/uview-plus/components/u-tr/props.js
+++ b/uni_modules/uview-plus/components/u-tr/props.js
@@ -1,9 +1,7 @@
-import { defineMixin } from '../../libs/vue'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps({ tr: {} })
-export const props = defineMixin({
- props: {
-
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-tr/u-tr.vue b/uni_modules/uview-plus/components/u-tr/u-tr.vue
index 23f13b4..85dca90 100644
--- a/uni_modules/uview-plus/components/u-tr/u-tr.vue
+++ b/uni_modules/uview-plus/components/u-tr/u-tr.vue
@@ -1,34 +1,33 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-transition/nvue-ani-map.js b/uni_modules/uview-plus/components/u-transition/nvue-ani-map.js
index d8db1a1..d0ea68b 100644
--- a/uni_modules/uview-plus/components/u-transition/nvue-ani-map.js
+++ b/uni_modules/uview-plus/components/u-transition/nvue-ani-map.js
@@ -1,75 +1,68 @@
-export default {
- // 无动画模式:直接显示/隐藏,供 pageInline 等常驻场景使用
- none: {
- enter: { opacity: 1 },
- 'enter-to': { opacity: 1 },
- leave: { opacity: 1 },
- 'leave-to': { opacity: 0 }
- },
- fade: {
- enter: { opacity: 0 },
- 'enter-to': { opacity: 1 },
- leave: { opacity: 1 },
- 'leave-to': { opacity: 0 }
- },
- 'fade-up': {
- enter: { opacity: 0, transform: 'translateY(100%)' },
- 'enter-to': { opacity: 1, transform: 'translateY(0)' },
- leave: { opacity: 1, transform: 'translateY(0)' },
- 'leave-to': { opacity: 0, transform: 'translateY(100%)' }
- },
- 'fade-down': {
- enter: { opacity: 0, transform: 'translateY(-100%)' },
- 'enter-to': { opacity: 1, transform: 'translateY(0)' },
- leave: { opacity: 1, transform: 'translateY(0)' },
- 'leave-to': { opacity: 0, transform: 'translateY(-100%)' }
- },
- 'fade-left': {
- enter: { opacity: 0, transform: 'translateX(-100%)' },
- 'enter-to': { opacity: 1, transform: 'translateY(0)' },
- leave: { opacity: 1, transform: 'translateY(0)' },
- 'leave-to': { opacity: 0, transform: 'translateX(-100%)' }
- },
- 'fade-right': {
- enter: { opacity: 0, transform: 'translateX(100%)' },
- 'enter-to': { opacity: 1, transform: 'translateY(0)' },
- leave: { opacity: 1, transform: 'translateY(0)' },
- 'leave-to': { opacity: 0, transform: 'translateX(100%)' }
- },
- 'slide-up': {
- enter: { transform: 'translateY(100%)' },
- 'enter-to': { transform: 'translateY(0)' },
- leave: { transform: 'translateY(0)' },
- 'leave-to': { transform: 'translateY(100%)' }
- },
- 'slide-down': {
- enter: { transform: 'translateY(-100%)' },
- 'enter-to': { transform: 'translateY(0)' },
- leave: { transform: 'translateY(0)' },
- 'leave-to': { transform: 'translateY(-100%)' }
- },
- 'slide-left': {
- enter: { transform: 'translateX(-100%)' },
- 'enter-to': { transform: 'translateY(0)' },
- leave: { transform: 'translateY(0)' },
- 'leave-to': { transform: 'translateX(-100%)' }
- },
- 'slide-right': {
- enter: { transform: 'translateX(100%)' },
- 'enter-to': { transform: 'translateY(0)' },
- leave: { transform: 'translateY(0)' },
- 'leave-to': { transform: 'translateX(100%)' }
- },
- zoom: {
- enter: { transform: 'scale(0.95)' },
- 'enter-to': { transform: 'scale(1)' },
- leave: { transform: 'scale(1)' },
- 'leave-to': { transform: 'scale(0.95)' }
- },
- 'fade-zoom': {
- enter: { opacity: 0, transform: 'scale(0.95)' },
- 'enter-to': { opacity: 1, transform: 'scale(1)' },
- leave: { opacity: 1, transform: 'scale(1)' },
- 'leave-to': { opacity: 0, transform: 'scale(0.95)' }
- }
-}
+export default {
+ fade: {
+ enter: { opacity: 0 },
+ 'enter-to': { opacity: 1 },
+ leave: { opacity: 1 },
+ 'leave-to': { opacity: 0 }
+ },
+ 'fade-up': {
+ enter: { opacity: 0, transform: 'translateY(100%)' },
+ 'enter-to': { opacity: 1, transform: 'translateY(0)' },
+ leave: { opacity: 1, transform: 'translateY(0)' },
+ 'leave-to': { opacity: 0, transform: 'translateY(100%)' }
+ },
+ 'fade-down': {
+ enter: { opacity: 0, transform: 'translateY(-100%)' },
+ 'enter-to': { opacity: 1, transform: 'translateY(0)' },
+ leave: { opacity: 1, transform: 'translateY(0)' },
+ 'leave-to': { opacity: 0, transform: 'translateY(-100%)' }
+ },
+ 'fade-left': {
+ enter: { opacity: 0, transform: 'translateX(-100%)' },
+ 'enter-to': { opacity: 1, transform: 'translateY(0)' },
+ leave: { opacity: 1, transform: 'translateY(0)' },
+ 'leave-to': { opacity: 0, transform: 'translateX(-100%)' }
+ },
+ 'fade-right': {
+ enter: { opacity: 0, transform: 'translateX(100%)' },
+ 'enter-to': { opacity: 1, transform: 'translateY(0)' },
+ leave: { opacity: 1, transform: 'translateY(0)' },
+ 'leave-to': { opacity: 0, transform: 'translateX(100%)' }
+ },
+ 'slide-up': {
+ enter: { transform: 'translateY(100%)' },
+ 'enter-to': { transform: 'translateY(0)' },
+ leave: { transform: 'translateY(0)' },
+ 'leave-to': { transform: 'translateY(100%)' }
+ },
+ 'slide-down': {
+ enter: { transform: 'translateY(-100%)' },
+ 'enter-to': { transform: 'translateY(0)' },
+ leave: { transform: 'translateY(0)' },
+ 'leave-to': { transform: 'translateY(-100%)' }
+ },
+ 'slide-left': {
+ enter: { transform: 'translateX(-100%)' },
+ 'enter-to': { transform: 'translateY(0)' },
+ leave: { transform: 'translateY(0)' },
+ 'leave-to': { transform: 'translateX(-100%)' }
+ },
+ 'slide-right': {
+ enter: { transform: 'translateX(100%)' },
+ 'enter-to': { transform: 'translateY(0)' },
+ leave: { transform: 'translateY(0)' },
+ 'leave-to': { transform: 'translateX(100%)' }
+ },
+ zoom: {
+ enter: { transform: 'scale(0.95)' },
+ 'enter-to': { transform: 'scale(1)' },
+ leave: { transform: 'scale(1)' },
+ 'leave-to': { transform: 'scale(0.95)' }
+ },
+ 'fade-zoom': {
+ enter: { opacity: 0, transform: 'scale(0.95)' },
+ 'enter-to': { opacity: 1, transform: 'scale(1)' },
+ leave: { opacity: 1, transform: 'scale(1)' },
+ 'leave-to': { opacity: 0, transform: 'scale(0.95)' }
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-transition/props.js b/uni_modules/uview-plus/components/u-transition/props.js
index c5e4dd1..8b36ee4 100644
--- a/uni_modules/uview-plus/components/u-transition/props.js
+++ b/uni_modules/uview-plus/components/u-transition/props.js
@@ -1,29 +1,26 @@
-import { defineMixin } from '../../libs/vue'
-import TransitionDefaultProps from './transition'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(TransitionDefaultProps)
-export const props = defineMixin({
- props: {
- // 是否展示组件
- show: {
- type: Boolean,
- default: () => defProps.transition.show
- },
- // 使用的动画模式
- mode: {
- type: String,
- default: () => defProps.transition.mode
- },
- // 动画的执行时间,单位ms
- duration: {
- type: [String, Number],
- default: () => defProps.transition.duration
- },
- // 使用的动画过渡函数
- timingFunction: {
- type: String,
- default: () => defProps.transition.timingFunction
- }
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 是否展示组件
+ show: {
+ type: Boolean,
+ default: () => defProps.transition.show
+ },
+ // 使用的动画模式
+ mode: {
+ type: String,
+ default: () => defProps.transition.mode
+ },
+ // 动画的执行时间,单位ms
+ duration: {
+ type: [String, Number],
+ default: () => defProps.transition.duration
+ },
+ // 使用的动画过渡函数
+ timingFunction: {
+ type: String,
+ default: () => defProps.transition.timingFunction
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-transition/transition.js b/uni_modules/uview-plus/components/u-transition/transition.js
index 7d2bd5d..6e08120 100644
--- a/uni_modules/uview-plus/components/u-transition/transition.js
+++ b/uni_modules/uview-plus/components/u-transition/transition.js
@@ -1,18 +1,18 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/transition.js
- */
-export default {
- // transition动画组件的props
- transition: {
- show: false,
- mode: 'fade',
- duration: '300',
- timingFunction: 'ease-out'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 16:59:00
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
+ */
+export default {
+ // transition动画组件的props
+ transition: {
+ show: false,
+ mode: 'fade',
+ duration: '300',
+ timingFunction: 'ease-out'
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-transition/transitionMixin.js b/uni_modules/uview-plus/components/u-transition/transitionMixin.js
index 0aa5b3b..a51f3d1 100644
--- a/uni_modules/uview-plus/components/u-transition/transitionMixin.js
+++ b/uni_modules/uview-plus/components/u-transition/transitionMixin.js
@@ -1,164 +1,163 @@
-// 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
-const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
-// nvue动画模块实现细节抽离在外部文件
-// #ifdef APP-NVUE
-import animationMap from './nvue-ani-map.js'
-// #endif
-
-// #ifndef APP-NVUE
-// 定义类名,通过给元素动态切换类名,赋予元素一定的css动画样式
-const getClassNames = (name) => ({
- enter: `u-${name}-enter u-${name}-enter-active`,
- 'enter-to': `u-${name}-enter-to u-${name}-enter-active`,
- leave: `u-${name}-leave u-${name}-leave-active`,
- 'leave-to': `u-${name}-leave-to u-${name}-leave-active`
-})
-// #endif
-
-// #ifdef APP-NVUE
-// 引入nvue(weex)的animation动画模块,文档见:
-// https://weex.apache.org/zh/docs/modules/animation.html#transition
-const animation = uni.requireNativePlugin('animation')
-const getStyle = (name) => animationMap[name]
-// #endif
-
-import { nextTick } from 'vue'
-import { sleep } from '../../libs/function/index';
-export default {
- methods: {
- // 组件被点击发出事件
- clickHandler() {
- this.$emit('click')
- },
- // #ifndef APP-NVUE
- // vue版本的组件进场处理
- async vueEnter() {
- // 动画进入时的类名
- const classNames = getClassNames(this.mode)
- // 定义状态和发出动画进入前事件
- this.status = 'enter'
- this.$emit('beforeEnter')
- this.inited = true
- this.display = true
- this.classes = classNames.enter
- await nextTick();
- {
- // https://github.com/umicro/uView2.0/issues/545
- await sleep(20)
- // 标识动画尚未结束
- this.$emit('enter')
- this.transitionEnded = false
- // 组件动画进入后触发的事件
- this.$emit('afterEnter')
- // 赋予组件enter-to类名
- this.classes = classNames['enter-to']
- }
- },
- // 动画离场处理
- async vueLeave() {
- // 如果不是展示状态,无需执行逻辑
- if (!this.display) return
- const classNames = getClassNames(this.mode)
- // 标记离开状态和发出事件
- this.status = 'leave'
- this.$emit('beforeLeave')
- // 获得类名
- this.classes = classNames.leave
-
- await nextTick();
- {
- // 动画正在离场的状态
- this.transitionEnded = false
- this.$emit('leave')
- // 组件执行动画,到了执行的执行时间后,执行一些额外处理
- setTimeout(this.onTransitionEnd, this.duration)
- this.classes = classNames['leave-to']
- }
- },
- // #endif
- // #ifdef APP-NVUE
- // nvue版本动画进场
- async nvueEnter() {
- // 获得样式的名称
- const currentStyle = getStyle(this.mode) || getStyle('none')
- // 组件动画状态和发出事件
- this.status = 'enter'
- this.$emit('beforeEnter')
- // 展示生成组件元素
- this.inited = true
- this.display = true
- // 在nvue安卓上,由于渲染速度慢,在弹窗,键盘,日历等组件中,渲染其中的内容需要时间
- // 导致出现弹窗卡顿,这里让其一开始为透明状态,等一定时间渲染完成后,再让其隐藏起来,再让其按正常逻辑出现
- // none 模式为页面内常驻展示,不需要预置透明
- this.viewStyle = this.mode === 'none' ? { opacity: 1 } : {
- opacity: 0
- }
- // 等待弹窗内容渲染完成
- await nextTick();
- {
- // 合并样式
- this.viewStyle = currentStyle.enter
- Promise.resolve()
- .then(waitTick)
- .then(() => {
- // 组件开始进入前的事件
- this.$emit('enter')
- // nvue的transition动画模块需要通过ref调用组件,注意此处的ref不同于vue的this.$refs['u-transition']用法
- animation.transition(this.$refs['u-transition'].ref, {
- styles: currentStyle['enter-to'],
- duration: this.mode === 'none' ? 0 : this.duration,
- timingFunction: this.timingFunction,
- needLayout: false,
- delay: 0
- }, () => {
- // 动画执行完毕,发出事件
- this.$emit('afterEnter')
- })
- })
- .catch(() => {})
- }
- },
- nvueLeave() {
- if (!this.display) {
- return
- }
- const currentStyle = getStyle(this.mode) || getStyle('none')
- // 定义状态和事件
- this.status = 'leave'
- this.$emit('beforeLeave')
- // 合并样式
- this.viewStyle = currentStyle.leave
- // 放到promise中处理执行过程
- Promise.resolve()
- .then(waitTick) // 等待几十ms
- .then(() => {
- this.transitionEnded = false
- // 动画正在离场的状态
- this.$emit('leave')
- animation.transition(this.$refs['u-transition'].ref, {
- styles: currentStyle['leave-to'],
- duration: this.mode === 'none' ? 0 : this.duration,
- timingFunction: this.timingFunction,
- needLayout: false,
- delay: 0
- }, () => {
- this.onTransitionEnd()
- })
- })
- .catch(() => {})
- },
- // #endif
- // 完成过渡后触发
- onTransitionEnd() {
- // 如果已经是结束的状态,无需再处理
- if (this.transitionEnded) return
- this.transitionEnded = true
- // 发出组件动画执行后的事件
- this.$emit(this.status === 'leave' ? 'afterLeave' : 'afterEnter')
- if (!this.show && this.display) {
- this.display = false
- this.inited = false
- }
- }
- }
-}
+// 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
+const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
+// nvue动画模块实现细节抽离在外部文件
+// #ifdef APP-NVUE
+import animationMap from './nvue-ani-map.js'
+// #endif
+
+// #ifndef APP-NVUE
+// 定义类名,通过给元素动态切换类名,赋予元素一定的css动画样式
+const getClassNames = (name) => ({
+ enter: `u-${name}-enter u-${name}-enter-active`,
+ 'enter-to': `u-${name}-enter-to u-${name}-enter-active`,
+ leave: `u-${name}-leave u-${name}-leave-active`,
+ 'leave-to': `u-${name}-leave-to u-${name}-leave-active`
+})
+// #endif
+
+// #ifdef APP-NVUE
+// 引入nvue(weex)的animation动画模块,文档见:
+// https://weex.apache.org/zh/docs/modules/animation.html#transition
+const animation = uni.requireNativePlugin('animation')
+const getStyle = (name) => animationMap[name]
+// #endif
+
+import { nextTick } from 'vue'
+import { sleep } from '../../libs/function/index';
+export default {
+ methods: {
+ // 组件被点击发出事件
+ clickHandler() {
+ this.$emit('click')
+ },
+ // #ifndef APP-NVUE
+ // vue版本的组件进场处理
+ async vueEnter() {
+ // 动画进入时的类名
+ const classNames = getClassNames(this.mode)
+ // 定义状态和发出动画进入前事件
+ this.status = 'enter'
+ this.$emit('beforeEnter')
+ this.inited = true
+ this.display = true
+ this.classes = classNames.enter
+ await nextTick();
+ {
+ // https://github.com/umicro/uView2.0/issues/545
+ await sleep(20)
+ // 标识动画尚未结束
+ this.$emit('enter')
+ this.transitionEnded = false
+ // 组件动画进入后触发的事件
+ this.$emit('afterEnter')
+ // 赋予组件enter-to类名
+ this.classes = classNames['enter-to']
+ }
+ },
+ // 动画离场处理
+ async vueLeave() {
+ // 如果不是展示状态,无需执行逻辑
+ if (!this.display) return
+ const classNames = getClassNames(this.mode)
+ // 标记离开状态和发出事件
+ this.status = 'leave'
+ this.$emit('beforeLeave')
+ // 获得类名
+ this.classes = classNames.leave
+
+ await nextTick();
+ {
+ // 动画正在离场的状态
+ this.transitionEnded = false
+ this.$emit('leave')
+ // 组件执行动画,到了执行的执行时间后,执行一些额外处理
+ setTimeout(this.onTransitionEnd, this.duration)
+ this.classes = classNames['leave-to']
+ }
+ },
+ // #endif
+ // #ifdef APP-NVUE
+ // nvue版本动画进场
+ async nvueEnter() {
+ // 获得样式的名称
+ const currentStyle = getStyle(this.mode)
+ // 组件动画状态和发出事件
+ this.status = 'enter'
+ this.$emit('beforeEnter')
+ // 展示生成组件元素
+ this.inited = true
+ this.display = true
+ // 在nvue安卓上,由于渲染速度慢,在弹窗,键盘,日历等组件中,渲染其中的内容需要时间
+ // 导致出现弹窗卡顿,这里让其一开始为透明状态,等一定时间渲染完成后,再让其隐藏起来,再让其按正常逻辑出现
+ this.viewStyle = {
+ opacity: 0
+ }
+ // 等待弹窗内容渲染完成
+ await nextTick();
+ {
+ // 合并样式
+ this.viewStyle = currentStyle.enter
+ Promise.resolve()
+ .then(waitTick)
+ .then(() => {
+ // 组件开始进入前的事件
+ this.$emit('enter')
+ // nvue的transition动画模块需要通过ref调用组件,注意此处的ref不同于vue的this.$refs['u-transition']用法
+ animation.transition(this.$refs['u-transition'].ref, {
+ styles: currentStyle['enter-to'],
+ duration: this.duration,
+ timingFunction: this.timingFunction,
+ needLayout: false,
+ delay: 0
+ }, () => {
+ // 动画执行完毕,发出事件
+ this.$emit('afterEnter')
+ })
+ })
+ .catch(() => {})
+ }
+ },
+ nvueLeave() {
+ if (!this.display) {
+ return
+ }
+ const currentStyle = getStyle(this.mode)
+ // 定义状态和事件
+ this.status = 'leave'
+ this.$emit('beforeLeave')
+ // 合并样式
+ this.viewStyle = currentStyle.leave
+ // 放到promise中处理执行过程
+ Promise.resolve()
+ .then(waitTick) // 等待几十ms
+ .then(() => {
+ this.transitionEnded = false
+ // 动画正在离场的状态
+ this.$emit('leave')
+ animation.transition(this.$refs['u-transition'].ref, {
+ styles: currentStyle['leave-to'],
+ duration: this.duration,
+ timingFunction: this.timingFunction,
+ needLayout: false,
+ delay: 0
+ }, () => {
+ this.onTransitionEnd()
+ })
+ })
+ .catch(() => {})
+ },
+ // #endif
+ // 完成过渡后触发
+ onTransitionEnd() {
+ // 如果已经是结束的状态,无需再处理
+ if (this.transitionEnded) return
+ this.transitionEnded = true
+ // 发出组件动画执行后的事件
+ this.$emit(this.status === 'leave' ? 'afterLeave' : 'afterEnter')
+ if (!this.show && this.display) {
+ this.display = false
+ this.inited = false
+ }
+ }
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-transition/u-transition.vue b/uni_modules/uview-plus/components/u-transition/u-transition.vue
index 8e0551b..5738cd7 100644
--- a/uni_modules/uview-plus/components/u-transition/u-transition.vue
+++ b/uni_modules/uview-plus/components/u-transition/u-transition.vue
@@ -1,207 +1,96 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-tree/tree-node.vue b/uni_modules/uview-plus/components/u-tree/tree-node.vue
deleted file mode 100644
index f82d9e3..0000000
--- a/uni_modules/uview-plus/components/u-tree/tree-node.vue
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
- {{ node[props.label] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni_modules/uview-plus/components/u-tree/u-tree.vue b/uni_modules/uview-plus/components/u-tree/u-tree.vue
deleted file mode 100644
index 41b8fab..0000000
--- a/uni_modules/uview-plus/components/u-tree/u-tree.vue
+++ /dev/null
@@ -1,557 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ getNodeLabel(item.node) }}
-
-
-
- {{ getNodeLabel(item.node) }}
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/components/u-upload/props.js b/uni_modules/uview-plus/components/u-upload/props.js
index bef499e..744e3e1 100644
--- a/uni_modules/uview-plus/components/u-upload/props.js
+++ b/uni_modules/uview-plus/components/u-upload/props.js
@@ -1,179 +1,130 @@
-import { defineMixin } from '../../libs/vue'
-import UploadDefaultProps from './upload'
-import { registerComponentProps } from '../../libs/config/props.js'
-
-const defProps = registerComponentProps(UploadDefaultProps)
-export const props = defineMixin({
- props: {
- // 接受的文件类型, 可选值为all media image file video
- accept: {
- type: String,
- default: () => defProps.upload.accept
- },
- extension: {
- type: Array,
- default: () => defProps.upload.extension
- },
- // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
- capture: {
- type: [String, Array],
- default: () => defProps.upload.capture
- },
- // 当accept为video时生效,是否压缩视频,默认为true
- compressed: {
- type: Boolean,
- default: () => defProps.upload.compressed
- },
- // 当accept为video时生效,可选值为back或front
- camera: {
- type: String,
- default: () => defProps.upload.camera
- },
- // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
- maxDuration: {
- type: Number,
- default: () => defProps.upload.maxDuration
- },
- // 上传区域的图标,只能内置图标
- uploadIcon: {
- type: String,
- default: () => defProps.upload.uploadIcon
- },
- // 上传区域的图标的颜色,默认
- uploadIconColor: {
- type: String,
- default: () => defProps.upload.uploadIconColor
- },
- // 是否开启文件读取前事件
- useBeforeRead: {
- type: Boolean,
- default: () => defProps.upload.useBeforeRead
- },
- // 读取后的处理函数
- afterRead: {
- type: Function,
- default: null
- },
- // 读取前的处理函数
- beforeRead: {
- type: Function,
- default: null
- },
- // 是否显示组件自带的图片&视频预览功能
- previewFullImage: {
- type: Boolean,
- default: () => defProps.upload.previewFullImage
- },
- // 最大上传数量
- maxCount: {
- type: [String, Number],
- default: () => defProps.upload.maxCount
- },
- // 是否启用
- disabled: {
- type: Boolean,
- default: () => defProps.upload.disabled
- },
- // 预览上传的图片时的裁剪模式,和image组件mode属性一致
- imageMode: {
- type: String,
- default: () => defProps.upload.imageMode
- },
- // 标识符,可以在回调函数的第二项参数中获取
- name: {
- type: String,
- default: () => defProps.upload.name
- },
- // 所选的图片的尺寸, 可选值为original compressed
- sizeType: {
- type: Array,
- default: () => defProps.upload.sizeType
- },
- // 是否开启图片多选,部分安卓机型不支持
- multiple: {
- type: Boolean,
- default: () => defProps.upload.multiple
- },
- // 是否展示删除按钮
- deletable: {
- type: Boolean,
- default: () => defProps.upload.deletable
- },
- // 文件大小限制,单位为byte
- maxSize: {
- type: [String, Number],
- default: () => defProps.upload.maxSize
- },
- // 显示已上传的文件列表
- fileList: {
- type: Array,
- default: () => defProps.upload.fileList
- },
- // 上传区域的提示文字
- uploadText: {
- type: String,
- default: () => defProps.upload.uploadText
- },
- // 内部预览图片区域和选择图片按钮的区域宽度
- width: {
- type: [String, Number],
- default: () => defProps.upload.width
- },
- // 内部预览图片区域和选择图片按钮的区域高度
- height: {
- type: [String, Number],
- default: () => defProps.upload.height
- },
- // 是否在上传完成后展示预览图
- previewImage: {
- type: Boolean,
- default: () => defProps.upload.previewImage
- },
- // 是否自动删除
- autoDelete: {
- type: Boolean,
- default: () => defProps.upload.autoDelete
- },
- // 是否自动上传需要传递action指定地址
- autoUpload: {
- type: Boolean,
- default: () => defProps.upload.autoUpload
- },
- // 自动上传接口地址
- autoUploadApi: {
- type: String,
- default: () => defProps.upload.autoUploadApi
- },
- // 自动上传驱动,local/oss/cos/kodo
- autoUploadDriver: {
- type: String,
- default: () => defProps.upload.autoUploadDriver
- },
- // 自动上传授权接口,比如oss的签名接口。
- autoUploadAuthUrl: {
- type: String,
- default: () => defProps.upload.autoUploadAuthUrl
- },
- // 自动上传携带的header
- autoUploadHeader: {
- type: Object,
- default: () => {
- return defProps.upload.autoUploadHeader
- }
- },
- // 本地计算视频封面
- getVideoThumb: {
- type: Boolean,
- default: () => defProps.upload.getVideoThumb
- },
- // 自定义自动上传后处理
- customAfterAutoUpload: {
- type: Boolean,
- default: () => defProps.upload.customAfterAutoUpload
- },
- videoPreviewObjectFit: {
- type: String,
- default: () => defProps.upload.videoPreviewObjectFit
- },
- }
-})
+import { defineMixin } from '../../libs/vue'
+import defProps from '../../libs/config/props.js'
+export const props = defineMixin({
+ props: {
+ // 接受的文件类型, 可选值为all media image file video
+ accept: {
+ type: String,
+ default: () => defProps.upload.accept
+ },
+ extension: {
+ type: Array,
+ default: () => defProps.upload.extension
+ },
+ // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
+ capture: {
+ type: [String, Array],
+ default: () => defProps.upload.capture
+ },
+ // 当accept为video时生效,是否压缩视频,默认为true
+ compressed: {
+ type: Boolean,
+ default: () => defProps.upload.compressed
+ },
+ // 当accept为video时生效,可选值为back或front
+ camera: {
+ type: String,
+ default: () => defProps.upload.camera
+ },
+ // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
+ maxDuration: {
+ type: Number,
+ default: () => defProps.upload.maxDuration
+ },
+ // 上传区域的图标,只能内置图标
+ uploadIcon: {
+ type: String,
+ default: () => defProps.upload.uploadIcon
+ },
+ // 上传区域的图标的颜色,默认
+ uploadIconColor: {
+ type: String,
+ default: () => defProps.upload.uploadIconColor
+ },
+ // 是否开启文件读取前事件
+ useBeforeRead: {
+ type: Boolean,
+ default: () => defProps.upload.useBeforeRead
+ },
+ // 读取后的处理函数
+ afterRead: {
+ type: Function,
+ default: null
+ },
+ // 读取前的处理函数
+ beforeRead: {
+ type: Function,
+ default: null
+ },
+ // 是否显示组件自带的图片预览功能
+ previewFullImage: {
+ type: Boolean,
+ default: () => defProps.upload.previewFullImage
+ },
+ // 最大上传数量
+ maxCount: {
+ type: [String, Number],
+ default: () => defProps.upload.maxCount
+ },
+ // 是否启用
+ disabled: {
+ type: Boolean,
+ default: () => defProps.upload.disabled
+ },
+ // 预览上传的图片时的裁剪模式,和image组件mode属性一致
+ imageMode: {
+ type: String,
+ default: () => defProps.upload.imageMode
+ },
+ // 标识符,可以在回调函数的第二项参数中获取
+ name: {
+ type: String,
+ default: () => defProps.upload.name
+ },
+ // 所选的图片的尺寸, 可选值为original compressed
+ sizeType: {
+ type: Array,
+ default: () => defProps.upload.sizeType
+ },
+ // 是否开启图片多选,部分安卓机型不支持
+ multiple: {
+ type: Boolean,
+ default: () => defProps.upload.multiple
+ },
+ // 是否展示删除按钮
+ deletable: {
+ type: Boolean,
+ default: () => defProps.upload.deletable
+ },
+ // 文件大小限制,单位为byte
+ maxSize: {
+ type: [String, Number],
+ default: () => defProps.upload.maxSize
+ },
+ // 显示已上传的文件列表
+ fileList: {
+ type: Array,
+ default: () => defProps.upload.fileList
+ },
+ // 上传区域的提示文字
+ uploadText: {
+ type: String,
+ default: () => defProps.upload.uploadText
+ },
+ // 内部预览图片区域和选择图片按钮的区域宽度
+ width: {
+ type: [String, Number],
+ default: () => defProps.upload.width
+ },
+ // 内部预览图片区域和选择图片按钮的区域高度
+ height: {
+ type: [String, Number],
+ default: () => defProps.upload.height
+ },
+ // 是否在上传完成后展示预览图
+ previewImage: {
+ type: Boolean,
+ default: () => defProps.upload.previewImage
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/components/u-upload/u-upload.vue b/uni_modules/uview-plus/components/u-upload/u-upload.vue
index 4176cf0..400d77a 100644
--- a/uni_modules/uview-plus/components/u-upload/u-upload.vue
+++ b/uni_modules/uview-plus/components/u-upload/u-upload.vue
@@ -1,962 +1,612 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.isVideo || (item.type && item.type === 'video') ? item.name || t("up.common.video") : item.name || t("up.common.file")}}
-
-
-
-
-
-
-
- {{ item.message }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ uploadText }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{item.isVideo || (item.type && item.type === 'video') ? '视频' : '文件'}}
+
+
+
+
+
+
+
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ uploadText }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/u-upload/upload.js b/uni_modules/uview-plus/components/u-upload/upload.js
index 74a0835..defa94a 100644
--- a/uni_modules/uview-plus/components/u-upload/upload.js
+++ b/uni_modules/uview-plus/components/u-upload/upload.js
@@ -1,46 +1,37 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 3.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : jry
- * @lastTime : 2025-12-19 08:55:21
- * @FilePath : /uview-plus/libs/config/props/upload.js
- */
-export default {
- // upload组件
- upload: {
- accept: 'image',
- extension: [],
- capture: ['album', 'camera'],
- compressed: true,
- camera: 'back',
- maxDuration: 60,
- uploadIcon: 'camera-fill',
- uploadIconColor: '#D3D4D6',
- useBeforeRead: false,
- previewFullImage: true,
- maxCount: 52,
- disabled: false,
- imageMode: 'aspectFill',
- name: '',
- sizeType: ['original', 'compressed'],
- multiple: false,
- deletable: true,
- maxSize: Number.MAX_VALUE,
- fileList: [],
- uploadText: '',
- width: 80,
- height: 80,
- previewImage: true,
- autoDelete: false,
- autoUpload: false,
- autoUploadApi: '',
- autoUploadAuthUrl: '',
- autoUploadDriver: '',
- autoUploadHeader: {},
- getVideoThumb: false,
- customAfterAutoUpload: false,
- videoPreviewObjectFit: 'cover'
- }
-}
+/*
+ * @Author : LQ
+ * @Description :
+ * @version : 1.0
+ * @Date : 2021-08-20 16:44:21
+ * @LastAuthor : LQ
+ * @lastTime : 2021-08-20 17:09:50
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js
+ */
+export default {
+ // upload组件
+ upload: {
+ accept: 'image',
+ extension: [],
+ capture: ['album', 'camera'],
+ compressed: true,
+ camera: 'back',
+ maxDuration: 60,
+ uploadIcon: 'camera-fill',
+ uploadIconColor: '#D3D4D6',
+ useBeforeRead: false,
+ previewFullImage: true,
+ maxCount: 52,
+ disabled: false,
+ imageMode: 'aspectFill',
+ name: '',
+ sizeType: ['original', 'compressed'],
+ multiple: false,
+ deletable: true,
+ maxSize: Number.MAX_VALUE,
+ fileList: [],
+ uploadText: '',
+ width: 80,
+ height: 80,
+ previewImage: true
+ }
+}
diff --git a/uni_modules/uview-plus/components/u-upload/utils.js b/uni_modules/uview-plus/components/u-upload/utils.js
index 0b7007f..3df8b11 100644
--- a/uni_modules/uview-plus/components/u-upload/utils.js
+++ b/uni_modules/uview-plus/components/u-upload/utils.js
@@ -1,4 +1,3 @@
-import test from '../../libs/function/test'
function pickExclude(obj, keys) {
// 某些情况下,type可能会为
if (!['[object Object]', '[object File]'].includes(Object.prototype.toString.call(obj))) {
@@ -23,14 +22,10 @@ function formatImage(res) {
name: item.name,
file: item
// #endif
- // #ifndef H5
- name: item.path.split('/').pop() + '.png',
- // #endif
}))
}
function formatVideo(res) {
- // console.log(res)
return [
{
...pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg']),
@@ -38,15 +33,10 @@ function formatVideo(res) {
url: res.tempFilePath,
thumb: res.thumbTempFilePath,
size: res.size,
- width: res.width || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
- height: res.height || 0, // APP 2.1.0+、H5、微信小程序、京东小程序
// #ifdef H5
name: res.name,
file: res
// #endif
- // #ifndef H5
- name: res.tempFilePath.split('/').pop() + '.mp4',
- // #endif
}
]
}
@@ -61,9 +51,6 @@ function formatMedia(res) {
// #ifdef H5
file: item
// #endif
- // #ifndef H5
- name: item.tempFilePath.split('/').pop() + (res.type === 'video' ? '.mp4': '.png'),
- // #endif
}))
}
@@ -90,11 +77,6 @@ export function chooseFile({
maxCount,
extension
}) {
- try {
- capture = test.array(capture) ? capture : capture.split(',');
- } catch(e) {
- capture = [];
- }
return new Promise((resolve, reject) => {
switch (accept) {
case 'image':
@@ -130,28 +112,32 @@ export function chooseFile({
fail: reject
})
break
- // #ifdef MP-WEIXIN || H5
- // 只有微信小程序才支持chooseMessageFile接口
+ // #ifdef MP-WEIXIN || H5
+ // 只有微信小程序才支持chooseMessageFile接口
case 'file':
+ // #ifdef MP-WEIXIN
+ wx.chooseMessageFile({
+ count: multiple ? maxCount : 1,
+ type: accept,
+ success: (res) => resolve(formatFile(res)),
+ fail: reject
+ })
+ // #endif
+ // #ifdef H5
+ // 需要hx2.9.9以上才支持uni.chooseFile
let params = {
count: multiple ? maxCount : 1,
type: accept,
success: (res) => resolve(formatFile(res)),
fail: reject
}
- // Array根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。
if (extension.length && extension.length > 0) {
params.extension = extension
}
- // #ifdef MP-WEIXIN
- wx.chooseMessageFile(params)
- // #endif
- // #ifdef H5
- // 需要hx2.9.9以上才支持uni.chooseFile
uni.chooseFile(params)
// #endif
break
- // #endif
+ // #endif
default:
// 此为保底选项,在accept不为上面任意一项的时候选取全部文件
// #ifdef MP-WEIXIN
diff --git a/uni_modules/uview-plus/components/u-view/u-view.vue b/uni_modules/uview-plus/components/u-view/u-view.vue
index e080e64..c4d0c9b 100644
--- a/uni_modules/uview-plus/components/u-view/u-view.vue
+++ b/uni_modules/uview-plus/components/u-view/u-view.vue
@@ -23,7 +23,7 @@ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
/**
* View 视图
* @description 对View默认标签的封装
- * @tutorial https://uview-plus.jiangruyi.com/components/view.html
+ * @tutorial https://ijry.github.io/uview-plus/components/view.html
* @property {String} bgColor 背景颜色
* @event {Function} click 点击触发事件
* @example
@@ -66,6 +66,8 @@ export default {
diff --git a/uni_modules/uview-plus/components/u-virtual-list/u-virtual-list.vue b/uni_modules/uview-plus/components/u-virtual-list/u-virtual-list.vue
deleted file mode 100644
index c4dd8fa..0000000
--- a/uni_modules/uview-plus/components/u-virtual-list/u-virtual-list.vue
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue b/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue
index 64fec35..cc6c6b0 100644
--- a/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue
+++ b/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue
@@ -1,41 +1,25 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/components/uview-plus/uview-plus.vue b/uni_modules/uview-plus/components/uview-plus/uview-plus.vue
index bcd3662..7aa1015 100644
--- a/uni_modules/uview-plus/components/uview-plus/uview-plus.vue
+++ b/uni_modules/uview-plus/components/uview-plus/uview-plus.vue
@@ -1,15 +1,15 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uview-plus/index.js b/uni_modules/uview-plus/index.js
index e048b6c..fe78e8a 100644
--- a/uni_modules/uview-plus/index.js
+++ b/uni_modules/uview-plus/index.js
@@ -1,312 +1,131 @@
-// 补齐部分平台缺失的 uni API(如支付宝小程序的 onWindowResize)
-import { applyUniApiShims } from './libs/function/uni-api-shims.js'
-applyUniApiShims()
-
-// 看到此报错,是因为没有配置vite.config.js的【transpileDependencies】
-// const pleaseSetTranspileDependencies = {}, babelTest = pleaseSetTranspileDependencies?.test
-
-// 引入全局mixin
-import { mixin } from './libs/mixin/mixin.js'
-// 小程序特有的mixin
-import { mpMixin } from './libs/mixin/mpMixin.js'
-
-// 路由封装
-import route from './libs/util/route.js'
-// 颜色渐变相关,colorGradient-颜色渐变,hexToRgb-十六进制颜色转rgb颜色,rgbToHex-rgb转十六进制
-import colorGradient from './libs/function/colorGradient.js'
-
-// 规则检验
-import test from './libs/function/test.js'
-// 防抖方法
-import debounce from './libs/function/debounce.js'
-// 节流方法
-import throttle from './libs/function/throttle.js'
-// 浮点计算
-import calc from './libs/function/calc.js'
-// 浮点计算
-import digit from './libs/function/digit.js'
-// 公共文件写入的方法
-import index, { rpx2px } from './libs/function/index.js'
-
-// 配置信息
-import config from './libs/config/config.js'
-// props配置信息
-import props, { setPropsConfig } from './libs/config/props.js'
-// 各个需要fixed的地方的z-index配置文件
-import zIndex from './libs/config/zIndex.js'
-// 关于颜色的配置,特殊场景使用
-import color from './libs/config/color.js'
-// 平台
-import platform from './libs/function/platform'
-
-// http
-import http from './libs/function/http.js'
-
-// fontUtil
-import fontUtil from './components/u-icon/util.js';
-
-// i18n
-import i18n, { t } from './libs/i18n/index.js'
-import {
- themeState,
- setTheme,
- setThemePreference,
- getThemePreference,
- getSystemTheme,
- getThemeVars,
- initThemeSystem,
- refreshThemeFromConfig,
- syncThemeColorOverrideState
-} from './libs/theme/theme.js'
-import {
- applyNativeThemeUI,
- getThemeCardStyle,
- getThemeIsDark,
- getThemePageStyle,
- getThemeTabBarStyle,
- getThemeVar,
- getThemeVarsForStyle
-} from './libs/theme/runtime.js'
-
-const rootToastState = {
- ref: null
-}
-const rootNotifyState = {
- ref: null
-}
-
-function normalizeRootToastOptions(options = {}) {
- const toastOptions = typeof options === 'string'
- ? { message: options }
- : (options && typeof options === 'object' ? { ...options } : {})
- if (!toastOptions.message && toastOptions.title) {
- toastOptions.message = toastOptions.title
- }
- return toastOptions
-}
-
-function setRootToastRef(ref = null) {
- rootToastState.ref = ref || null
-}
-
-function rootToast(options = {}) {
- const toastOptions = normalizeRootToastOptions(options)
- const toastRef = rootToastState.ref
- if (toastRef && typeof toastRef.show === 'function') {
- toastRef.show(toastOptions)
- return
- }
- if (!toastOptions.message) return
- if (typeof uni !== 'undefined' && typeof uni.showToast === 'function') {
- uni.showToast({
- title: toastOptions.message,
- icon: 'none',
- duration: Number(toastOptions.duration) || 2000,
- })
- }
-}
-
-function normalizeRootNotifyOptions(options = {}) {
- const notifyOptions = typeof options === 'string'
- ? { message: options }
- : (options && typeof options === 'object' ? { ...options } : {})
- if (!notifyOptions.message && notifyOptions.title) {
- notifyOptions.message = notifyOptions.title
- }
- return notifyOptions
-}
-
-function setRootNotifyRef(ref = null) {
- rootNotifyState.ref = ref || null
-}
-
-function rootNotify(options = {}) {
- const notifyOptions = normalizeRootNotifyOptions(options)
- const notifyRef = rootNotifyState.ref
- if (notifyRef && typeof notifyRef.show === 'function') {
- notifyRef.show(notifyOptions)
- return
- }
- if (!notifyOptions.message) return
- if (typeof uni !== 'undefined' && typeof uni.showToast === 'function') {
- uni.showToast({
- title: notifyOptions.message,
- icon: 'none',
- duration: Number(notifyOptions.duration) || 3000,
- })
- }
-}
-
-// 导出
-let themeType = ['primary', 'success', 'error', 'warning', 'info'];
-export { route, http, debounce, throttle, calc, digit, platform, themeType, mixin, mpMixin, props, color, test, zIndex, fontUtil, i18n , rpx2px, t}
-export * from './libs/function/index.js'
-export * from './libs/function/colorGradient.js'
-
-/**
- * @description 修改uView内置属性值
- * @param {object} props 修改内置props属性
- * @param {object} config 修改内置config属性
- * @param {object} color 修改内置color属性
- * @param {object} zIndex 修改内置zIndex属性
- */
-export function setConfig(configs) {
- const settings = configs || {}
- index.shallowMerge(config, settings.config || {})
- setPropsConfig(settings.props || {})
- index.shallowMerge(color, settings.color || {})
- index.shallowMerge(zIndex, settings.zIndex || {})
- syncThemeColorOverrideState({
- color: settings.color,
- configColor: settings?.config?.color
- })
- const shouldRefreshTheme = !!settings.color
- || !!settings?.config?.color
- || themeState.version > 0
- if (shouldRefreshTheme) {
- refreshThemeFromConfig()
- }
-}
-index.setConfig = setConfig
-
-const $u = {
- route,
- date: index.timeFormat, // 另名date
- colorGradient: colorGradient.colorGradient,
- hexToRgb: colorGradient.hexToRgb,
- rgbToHex: colorGradient.rgbToHex,
- colorToRgba: colorGradient.colorToRgba,
- test,
- type: themeType,
- http,
- config, // uview-plus配置信息相关,比如版本号
- zIndex,
- debounce,
- throttle,
- calc,
- mixin,
- mpMixin,
- props,
- ...index,
- color,
- platform,
- theme: themeState,
- setTheme,
- setThemePreference,
- getThemePreference,
- getSystemTheme,
- getThemeVars,
- getThemeTabBarStyle,
- applyNativeThemeUI,
- rootToast,
- setRootToastRef,
- rootNotify,
- setRootNotifyRef
-}
-
-export const mount$u = function() {
- uni.$u = $u
- initThemeSystem()
-}
-
-function defineGlobalThemeHelpers(Vue) {
- const globalProperties = Vue?.config?.globalProperties
- if (!globalProperties) return
- Object.defineProperty(globalProperties, 'upThemeIsDark', {
- configurable: true,
- get() {
- return getThemeIsDark()
- }
- })
- Object.defineProperty(globalProperties, 'upThemeVars', {
- configurable: true,
- get() {
- return getThemeVarsForStyle()
- }
- })
- Object.defineProperty(globalProperties, 'upThemePageStyle', {
- configurable: true,
- get() {
- return getThemePageStyle()
- }
- })
- Object.defineProperty(globalProperties, 'upThemeCardStyle', {
- configurable: true,
- get() {
- return getThemeCardStyle()
- }
- })
- globalProperties.upThemeVar = function(varName, fallbackColor) {
- return getThemeVar(varName, fallbackColor)
- }
- globalProperties.upApplyNativeThemeUI = function() {
- return applyNativeThemeUI()
- }
-}
-
-function toCamelCase(str) {
- return str.replace(/-([a-z])/g, function(match, group1) {
- return group1.toUpperCase();
- }).replace(/^[a-z]/, function(match) {
- return match.toUpperCase();
- });
-}
-
-let components = []
-
-function resolveComponents() {
- if (components.length) return components
- // #ifdef H5
- // import.meta.glob is a Vite compile-time macro; the runtime guard would
- // always fail in the browser and block component registration.
- const importFn = import.meta.glob('./components/u-*/u-*.vue', { eager: true })
- for (const key in importFn) {
- const component = importFn[key]?.default
- if (component?.name && component.name.indexOf('u--') !== 0) {
- components.push(component)
- }
- }
- // #endif
- return components
-}
-
-const install = (Vue, upuiParams = '') => {
- // #ifdef H5
- resolveComponents().forEach(function(component) {
- const name = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1');
- if (name != component.name) {
- Vue.component(component.name, component);
- }
- Vue.component(name, component);
- });
- // #endif
-
- // 初始化
- if (upuiParams) {
- uni.upuiParams = upuiParams
- let temp = upuiParams()
- if (temp.httpIns) {
- temp.httpIns(http)
- }
- if (temp.options) {
- setConfig(temp.options)
- }
- }
-
- // 同时挂载到uni和Vue.prototype中
- // $u挂载到uni对象上
- uni.$u = $u
- initThemeSystem()
-
- if (Vue && Vue.config && Vue.config.globalProperties) {
- Vue.config.globalProperties.$u = $u
- defineGlobalThemeHelpers(Vue)
- }
- if (Vue && typeof Vue.mixin === 'function') {
- Vue.mixin(mixin)
- }
-}
-
-export default {
- install
+// 看到此报错,是因为没有配置vite.config.js的【transpileDependencies】
+// const pleaseSetTranspileDependencies = {}, babelTest = pleaseSetTranspileDependencies?.test
+
+// 引入全局mixin
+import { mixin } from './libs/mixin/mixin.js'
+// 小程序特有的mixin
+import { mpMixin } from './libs/mixin/mpMixin.js'
+// 全局挂载引入http相关请求拦截插件
+import Request from './libs/luch-request'
+
+// 路由封装
+import route from './libs/util/route.js'
+// 颜色渐变相关,colorGradient-颜色渐变,hexToRgb-十六进制颜色转rgb颜色,rgbToHex-rgb转十六进制
+import colorGradient from './libs/function/colorGradient.js'
+
+// 规则检验
+import test from './libs/function/test.js'
+// 防抖方法
+import debounce from './libs/function/debounce.js'
+// 节流方法
+import throttle from './libs/function/throttle.js'
+// 公共文件写入的方法
+import index from './libs/function/index.js'
+
+// 配置信息
+import config from './libs/config/config.js'
+// props配置信息
+import props from './libs/config/props.js'
+// 各个需要fixed的地方的z-index配置文件
+import zIndex from './libs/config/zIndex.js'
+// 关于颜色的配置,特殊场景使用
+import color from './libs/config/color.js'
+// 平台
+import platform from './libs/function/platform'
+
+// 导出
+const http = new Request()
+let themeType = ['primary', 'success', 'error', 'warning', 'info'];
+export { route, http, debounce, throttle, platform, themeType, mixin, mpMixin, props, color, test, zIndex }
+export * from './libs/function/index.js'
+export * from './libs/function/colorGradient.js'
+
+/**
+ * @description 修改uView内置属性值
+ * @param {object} props 修改内置props属性
+ * @param {object} config 修改内置config属性
+ * @param {object} color 修改内置color属性
+ * @param {object} zIndex 修改内置zIndex属性
+ */
+export function setConfig(configs) {
+ index.shallowMerge(config, configs.config || {})
+ index.shallowMerge(props, configs.props || {})
+ index.shallowMerge(color, configs.color || {})
+ index.shallowMerge(zIndex, configs.zIndex || {})
+}
+index.setConfig = setConfig
+
+const $u = {
+ route,
+ date: index.timeFormat, // 另名date
+ colorGradient: colorGradient.colorGradient,
+ hexToRgb: colorGradient.hexToRgb,
+ rgbToHex: colorGradient.rgbToHex,
+ colorToRgba: colorGradient.colorToRgba,
+ test,
+ type: themeType,
+ http,
+ config, // uview-plus配置信息相关,比如版本号
+ zIndex,
+ debounce,
+ throttle,
+ mixin,
+ mpMixin,
+ props,
+ ...index,
+ color,
+ platform
+}
+
+export const mount$u = function() {
+ uni.$u = $u
+}
+
+// #ifdef H5
+const importFn = import.meta.glob('./components/u-*/u-*.vue', { eager: true })
+let components = [];
+
+// 批量注册全局组件
+for (const key in importFn) {
+ let component = importFn[key].default;
+ if (component.name && component.name.indexOf('u--') !== 0) {
+ component.install = function (Vue) {
+ Vue.component(name, component);
+ };
+
+ // 导入组件
+ components.push(component);
+ }
+}
+// #endif
+
+function toCamelCase(str) {
+ return str.replace(/-([a-z])/g, function(match, group1) {
+ return group1.toUpperCase();
+ }).replace(/^[a-z]/, function(match) {
+ return match.toUpperCase();
+ });
+}
+
+const install = (Vue) => {
+ // #ifdef H5
+ components.forEach(function(component) {
+ const name = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1');
+ Vue.component(name, component);
+ });
+ // #endif
+
+ // 同时挂载到uni和Vue.prototype中
+ // $u挂载到uni对象上
+ uni.$u = $u
+
+ // #ifndef APP-NVUE
+ // 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
+ Vue.config.globalProperties.$u = $u
+ Vue.mixin(mixin)
+ // #endif
+}
+
+export default {
+ install
}
diff --git a/uni_modules/uview-plus/index.scss b/uni_modules/uview-plus/index.scss
index 2a49b3b..9c10dfd 100644
--- a/uni_modules/uview-plus/index.scss
+++ b/uni_modules/uview-plus/index.scss
@@ -1,11 +1,5 @@
-/* #ifndef APP-NVUE */
-@import "./libs/css/theme-vars.scss";
-@import "./libs/css/theme-legacy-bridge.scss";
-/* #endif */
-
// 引入公共基础类
-@import "./libs/css/common.scss";
-@import "./libs/css/components.scss";
+@import "./libs/css/common.scss";
@import "./libs/css/flex.scss";
@import "./libs/css/color.scss";
@@ -27,4 +21,4 @@
// H5特有的样式
/* #ifdef H5 */
@import "./libs/css/h5.scss";
-/* #endif */
+/* #endif */
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/config/color.js b/uni_modules/uview-plus/libs/config/color.js
index b3ca6d4..0975c85 100644
--- a/uni_modules/uview-plus/libs/config/color.js
+++ b/uni_modules/uview-plus/libs/config/color.js
@@ -1,3 +1,4 @@
+// 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
// 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
const color = {
primary: '#3c9cff',
@@ -13,4 +14,4 @@ const color = {
borderColor: '#e4e7ed'
}
-export default color
+export default color
diff --git a/uni_modules/uview-plus/libs/config/config.js b/uni_modules/uview-plus/libs/config/config.js
index d9ea522..87c16d4 100644
--- a/uni_modules/uview-plus/libs/config/config.js
+++ b/uni_modules/uview-plus/libs/config/config.js
@@ -1,58 +1,46 @@
-const version = '3'
-
-// 开发环境才提示,生产环境不会提示
-if (process.env.NODE_ENV === 'development') {
- console.log(`\n %c uview-plus V${version} %c https://uview-plus.jiangruyi.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
-}
-
-export default {
- v: version,
- version,
- // 主题名称
- type: [
- 'primary',
- 'success',
- 'info',
- 'error',
- 'warning'
- ],
- // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
- color: {
- 'u-primary': '#2979ff',
- 'u-warning': '#ff9900',
- 'u-success': '#19be6b',
- 'u-error': '#fa3534',
- 'u-info': '#909399',
- 'u-main-color': '#303133',
- 'u-content-color': '#606266',
- 'u-tips-color': '#909399',
- 'u-light-color': '#c0c4cc',
- 'up-primary': '#2979ff',
- 'up-warning': '#ff9900',
- 'up-success': '#19be6b',
- 'up-error': '#fa3534',
- 'up-info': '#909399',
- 'up-main-color': '#303133',
- 'up-content-color': '#606266',
- 'up-tips-color': '#909399',
- 'up-light-color': '#c0c4cc'
- },
- // 字体图标地址
- iconUrl: 'https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf',
- // 自定义图标
- customIcon: {
- family: '',
- url: ''
- },
- customIcons: {}, // 自定义图标与unicode对应关系
- // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
- unit: 'px',
- // 是否由运行时主题同步原生导航栏、页面背景、tabBar等全局UI
- nativeThemeSync: false,
- // 拦截器
- interceptor: {
- navbarLeftClick: null
- },
- // 只加载一次字体
- loadFontOnce: false
-}
+const version = '3'
+
+// 开发环境才提示,生产环境不会提示
+if (process.env.NODE_ENV === 'development') {
+ console.log(`\n %c uview-plus V${version} %c https://ijry.github.io/uview-plus/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
+}
+
+export default {
+ v: version,
+ version,
+ // 主题名称
+ type: [
+ 'primary',
+ 'success',
+ 'info',
+ 'error',
+ 'warning'
+ ],
+ // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
+ color: {
+ 'u-primary': '#2979ff',
+ 'u-warning': '#ff9900',
+ 'u-success': '#19be6b',
+ 'u-error': '#fa3534',
+ 'u-info': '#909399',
+ 'u-main-color': '#303133',
+ 'u-content-color': '#606266',
+ 'u-tips-color': '#909399',
+ 'u-light-color': '#c0c4cc',
+ 'up-primary': '#2979ff',
+ 'up-warning': '#ff9900',
+ 'up-success': '#19be6b',
+ 'up-error': '#fa3534',
+ 'up-info': '#909399',
+ 'up-main-color': '#303133',
+ 'up-content-color': '#606266',
+ 'up-tips-color': '#909399',
+ 'up-light-color': '#c0c4cc'
+ },
+ // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
+ unit: 'px',
+ // 拦截器
+ interceptor: {
+ navbarLeftClick: null
+ }
+}
diff --git a/uni_modules/uview-plus/libs/config/props.js b/uni_modules/uview-plus/libs/config/props.js
index 1db14e9..94a65ca 100644
--- a/uni_modules/uview-plus/libs/config/props.js
+++ b/uni_modules/uview-plus/libs/config/props.js
@@ -1,195 +1,190 @@
-/**
- * Shared props configuration store.
- *
- * Component defaults are registered lazily by each component props.js file so
- * importing one component no longer pulls defaults for every component.
- */
-import config from './config'
-import zIndex from './zIndex.js'
-import color from './color.js'
-import http from '../function/http.js'
-import { shallowMerge } from '../function/index.js'
-
-const componentKeys = [
- 'actionSheet',
- 'album',
- 'alert',
- 'avatar',
- 'avatarGroup',
- 'backtop',
- 'badge',
- 'box',
- 'button',
- 'calendar',
- 'calendarStrip',
- 'carKeyboard',
- 'card',
- 'cell',
- 'cellGroup',
- 'checkbox',
- 'checkboxGroup',
- 'circleProgress',
- 'code',
- 'codeInput',
- 'col',
- 'collapse',
- 'collapseItem',
- 'columnNotice',
- 'countDown',
- 'countTo',
- 'datetimePicker',
- 'divider',
- 'dropdown',
- 'dropdownItem',
- 'empty',
- 'form',
- 'formItem',
- 'gap',
- 'grid',
- 'gridItem',
- 'guide',
- 'icon',
- 'image',
- 'indexAnchor',
- 'indexItem',
- 'indexList',
- 'input',
- 'keyboard',
- 'line',
- 'lineProgress',
- 'link',
- 'list',
- 'listItem',
- 'loadingIcon',
- 'loadingPage',
- 'loadmore',
- 'modal',
- 'navbar',
- 'navbarMini',
- 'noNetwork',
- 'noticeBar',
- 'notify',
- 'numberBox',
- 'numberKeyboard',
- 'overlay',
- 'parse',
- 'pdfReader',
- 'picker',
- 'pickerColumn',
- 'popover',
- 'popup',
- 'radio',
- 'radioGroup',
- 'rate',
- 'readMore',
- 'row',
- 'rowNotice',
- 'safeBottom',
- 'scrollList',
- 'search',
- 'section',
- 'skeleton',
- 'slider',
- 'statusBar',
- 'steps',
- 'stepsItem',
- 'sticky',
- 'subsection',
- 'swipeAction',
- 'swipeActionItem',
- 'swiper',
- 'swiperIndicator',
- 'switch',
- 'tabbar',
- 'tabbarItem',
- 'table',
- 'tabs',
- 'tabsItem',
- 'tag',
- 'td',
- 'text',
- 'textarea',
- 'th',
- 'toast',
- 'toolbar',
- 'tooltip',
- 'tr',
- 'transition',
- 'upload'
-]
-
-const props = {}
-
-function ensureComponentProps(key) {
- if (!props[key] || typeof props[key] !== 'object') {
- props[key] = {}
- }
- return props[key]
-}
-
-function isPlainObject(value) {
- return Object.prototype.toString.call(value) === '[object Object]'
-}
-
-function cloneDefaultValue(value) {
- if (Array.isArray(value)) {
- return value.slice()
- }
- if (isPlainObject(value)) {
- return mergeDefaults({}, value)
- }
- return value
-}
-
-function mergeDefaults(target, defaults = {}) {
- if (!target || typeof target !== 'object' || !defaults || typeof defaults !== 'object') {
- return target
- }
- Object.keys(defaults).forEach((key) => {
- const defaultValue = defaults[key]
- const targetValue = target[key]
- if (targetValue === undefined) {
- target[key] = cloneDefaultValue(defaultValue)
- } else if (isPlainObject(targetValue) && isPlainObject(defaultValue)) {
- mergeDefaults(targetValue, defaultValue)
- }
- })
- return target
-}
-
-componentKeys.forEach(ensureComponentProps)
-
-export function registerComponentProps(defaultProps = {}) {
- Object.keys(defaultProps || {}).forEach((key) => {
- const componentProps = ensureComponentProps(key)
- mergeDefaults(componentProps, defaultProps[key])
- })
- return props
-}
-
-export function setPropsConfig(configProps = {}) {
- Object.keys(configProps || {}).forEach((key) => {
- shallowMerge(ensureComponentProps(key), configProps[key])
- })
- return props
-}
-
-function setConfig(configs = {}) {
- shallowMerge(config, configs.config || {})
- setPropsConfig(configs.props || {})
- shallowMerge(color, configs.color || {})
- shallowMerge(zIndex, configs.zIndex || {})
-}
-
-if (typeof uni !== 'undefined' && uni && uni.upuiParams) {
- console.log('setting uview-plus')
- let temp = uni.upuiParams()
- if (temp.httpIns) {
- temp.httpIns(http)
- }
- if (temp.options) {
- setConfig(temp.options)
- }
-}
-
-export default props
+/**
+ * 此文件的作用为统一配置所有组件的props参数
+ * 借此用户可以全局覆盖组件的props默认值
+ * 无需在每个引入组件的页面中都配置一次
+ */
+import config from './config'
+
+import ActionSheet from '../../components/u-action-sheet/actionSheet'
+import Album from '../../components/u-album/album'
+import Alert from '../../components/u-alert/alert'
+import Avatar from '../../components/u-avatar/avatar'
+import AvatarGroup from '../../components/u-avatar-group/avatarGroup'
+import Backtop from '../../components/u-back-top/backtop'
+import Badge from '../../components/u-badge/badge'
+import Button from '../../components/u-button/button'
+import Calendar from '../../components/u-calendar/calendar'
+import CarKeyboard from '../../components/u-car-keyboard/carKeyboard'
+import Cell from '../../components/u-cell/cell'
+import CellGroup from '../../components/u-cell-group/cellGroup'
+import Checkbox from '../../components/u-checkbox/checkbox'
+import CheckboxGroup from '../../components/u-checkbox-group/checkboxGroup'
+import CircleProgress from '../../components/u-circle-progress/circleProgress'
+import Code from '../../components/u-code/code'
+import CodeInput from '../../components/u-code-input/codeInput'
+import Col from '../../components/u-col/col'
+import Collapse from '../../components/u-collapse/collapse'
+import CollapseItem from '../../components/u-collapse-item/collapseItem'
+import ColumnNotice from '../../components/u-column-notice/columnNotice'
+import CountDown from '../../components/u-count-down/countDown'
+import CountTo from '../../components/u-count-to/countTo'
+import DatetimePicker from '../../components/u-datetime-picker/datetimePicker'
+import Divider from '../../components/u-divider/divider'
+import Empty from '../../components/u-empty/empty'
+import Form from '../../components/u-form/form'
+import GormItem from '../../components/u-form-item/formItem'
+import Gap from '../../components/u-gap/gap'
+import Grid from '../../components/u-grid/grid'
+import GridItem from '../../components/u-grid-item/gridItem'
+import Icon from '../../components/u-icon/icon'
+import Image from '../../components/u-image/image'
+import IndexAnchor from '../../components/u-index-anchor/indexAnchor'
+import IndexList from '../../components/u-index-list/indexList'
+import Input from '../../components/u-input/input'
+import Keyboard from '../../components/u-keyboard/keyboard'
+import Line from '../../components/u-line/line'
+import LineProgress from '../../components/u-line-progress/lineProgress'
+import Link from '../../components/u-link/link'
+import List from '../../components/u-list/list'
+import ListItem from '../../components/u-list-item/listItem'
+import LoadingIcon from '../../components/u-loading-icon/loadingIcon'
+import LoadingPage from '../../components/u-loading-page/loadingPage'
+import Loadmore from '../../components/u-loadmore/loadmore'
+import Modal from '../../components/u-modal/modal'
+import Navbar from '../../components/u-navbar/navbar'
+import NoNetwork from '../../components/u-no-network/noNetwork'
+import NoticeBar from '../../components/u-notice-bar/noticeBar'
+import Notify from '../../components/u-notify/notify'
+import NumberBox from '../../components/u-number-box/numberBox'
+import NumberKeyboard from '../../components/u-number-keyboard/numberKeyboard'
+import Overlay from '../../components/u-overlay/overlay'
+import Parse from '../../components/u-parse/parse'
+import Picker from '../../components/u-picker/picker'
+import Popup from '../../components/u-popup/popup'
+import Radio from '../../components/u-radio/radio'
+import RadioGroup from '../../components/u-radio-group/radioGroup'
+import Rate from '../../components/u-rate/rate'
+import ReadMore from '../../components/u-read-more/readMore'
+import Row from '../../components/u-row/row'
+import RowNotice from '../../components/u-row-notice/rowNotice'
+import ScrollList from '../../components/u-scroll-list/scrollList'
+import Search from '../../components/u-search/search'
+import Section from '../../components/u-section/section'
+import Skeleton from '../../components/u-skeleton/skeleton'
+import Slider from '../../components/u-slider/slider'
+import StatusBar from '../../components/u-status-bar/statusBar'
+import Steps from '../../components/u-steps/steps'
+import StepsItem from '../../components/u-steps-item/stepsItem'
+import Sticky from '../../components/u-sticky/sticky'
+import Subsection from '../../components/u-subsection/subsection'
+import SwipeAction from '../../components/u-swipe-action/swipeAction'
+import SwipeActionItem from '../../components/u-swipe-action-item/swipeActionItem'
+import Swiper from '../../components/u-swiper/swiper'
+import SwipterIndicator from '../../components/u-swiper-indicator/swipterIndicator'
+import Switch from '../../components/u-switch/switch'
+import Tabbar from '../../components/u-tabbar/tabbar'
+import TabbarItem from '../../components/u-tabbar-item/tabbarItem'
+import Tabs from '../../components/u-tabs/tabs'
+import Tag from '../../components/u-tag/tag'
+import Text from '../../components/u-text/text'
+import Textarea from '../../components/u-textarea/textarea'
+import Toast from '../../components/u-toast/toast'
+import Toolbar from '../../components/u-toolbar/toolbar'
+import Tooltip from '../../components/u-tooltip/tooltip'
+import Transition from '../../components/u-transition/transition'
+import Upload from '../../components/u-upload/upload'
+
+const {
+ color
+} = config
+
+export default {
+ ...ActionSheet,
+ ...Album,
+ ...Alert,
+ ...Avatar,
+ ...AvatarGroup,
+ ...Backtop,
+ ...Badge,
+ ...Button,
+ ...Calendar,
+ ...CarKeyboard,
+ ...Cell,
+ ...CellGroup,
+ ...Checkbox,
+ ...CheckboxGroup,
+ ...CircleProgress,
+ ...Code,
+ ...CodeInput,
+ ...Col,
+ ...Collapse,
+ ...CollapseItem,
+ ...ColumnNotice,
+ ...CountDown,
+ ...CountTo,
+ ...DatetimePicker,
+ ...Divider,
+ ...Empty,
+ ...Form,
+ ...GormItem,
+ ...Gap,
+ ...Grid,
+ ...GridItem,
+ ...Icon,
+ ...Image,
+ ...IndexAnchor,
+ ...IndexList,
+ ...Input,
+ ...Keyboard,
+ ...Line,
+ ...LineProgress,
+ ...Link,
+ ...List,
+ ...ListItem,
+ ...LoadingIcon,
+ ...LoadingPage,
+ ...Loadmore,
+ ...Modal,
+ ...Navbar,
+ ...NoNetwork,
+ ...NoticeBar,
+ ...Notify,
+ ...NumberBox,
+ ...NumberKeyboard,
+ ...Overlay,
+ ...Parse,
+ ...Picker,
+ ...Popup,
+ ...Radio,
+ ...RadioGroup,
+ ...Rate,
+ ...ReadMore,
+ ...Row,
+ ...RowNotice,
+ ...ScrollList,
+ ...Search,
+ ...Section,
+ ...Skeleton,
+ ...Slider,
+ ...StatusBar,
+ ...Steps,
+ ...StepsItem,
+ ...Sticky,
+ ...Subsection,
+ ...SwipeAction,
+ ...SwipeActionItem,
+ ...Swiper,
+ ...SwipterIndicator,
+ ...Switch,
+ ...Tabbar,
+ ...TabbarItem,
+ ...Tabs,
+ ...Tag,
+ ...Text,
+ ...Textarea,
+ ...Toast,
+ ...Toolbar,
+ ...Tooltip,
+ ...Transition,
+ ...Upload
+}
diff --git a/uni_modules/uview-plus/libs/css/color.scss b/uni_modules/uview-plus/libs/css/color.scss
index e930261..b0df4f4 100644
--- a/uni_modules/uview-plus/libs/css/color.scss
+++ b/uni_modules/uview-plus/libs/css/color.scss
@@ -1,311 +1,311 @@
-.u-primary-light {
- color: $u-primary-light;
-}
-
-.u-warning-light {
- color: $u-warning-light;
-}
-
-.u-success-light {
- color: $u-success-light;
-}
-
-.u-error-light {
- color: $u-error-light;
-}
-
-.u-info-light {
- color: $u-info-light;
-}
-
-.u-primary-light-bg {
- background-color: $u-primary-light;
-}
-
-.u-warning-light-bg {
- background-color: $u-warning-light;
-}
-
-.u-success-light-bg {
- background-color: $u-success-light;
-}
-
-.u-error-light-bg {
- background-color: $u-error-light;
-}
-
-.u-info-light-bg {
- background-color: $u-info-light;
-}
-
-.u-primary-dark {
- color: $u-primary-dark;
-}
-
-.u-warning-dark {
- color: $u-warning-dark;
-}
-
-.u-success-dark {
- color: $u-success-dark;
-}
-
-.u-error-dark {
- color: $u-error-dark;
-}
-
-.u-info-dark {
- color: $u-info-dark;
-}
-
-.u-primary-dark-bg {
- background-color: $u-primary-dark;
-}
-
-.u-warning-dark-bg {
- background-color: $u-warning-dark;
-}
-
-.u-success-dark-bg {
- background-color: $u-success-dark;
-}
-
-.u-error-dark-bg {
- background-color: $u-error-dark;
-}
-
-.u-info-dark-bg {
- background-color: $u-info-dark;
-}
-
-.u-primary-disabled {
- color: $u-primary-disabled;
-}
-
-.u-warning-disabled {
- color: $u-warning-disabled;
-}
-
-.u-success-disabled {
- color: $u-success-disabled;
-}
-
-.u-error-disabled {
- color: $u-error-disabled;
-}
-
-.u-info-disabled {
- color: $u-info-disabled;
-}
-
-.u-primary {
- color: $u-primary;
-}
-
-.u-warning {
- color: $u-warning;
-}
-
-.u-success {
- color: $u-success;
-}
-
-.u-error {
- color: $u-error;
-}
-
-.u-info {
- color: $u-info;
-}
-
-.u-primary-bg {
- background-color: $u-primary;
-}
-
-.u-warning-bg {
- background-color: $u-warning;
-}
-
-.u-success-bg {
- background-color: $u-success;
-}
-
-.u-error-bg {
- background-color: $u-error;
-}
-
-.u-info-bg {
- background-color: $u-info;
-}
-
-.u-main-color {
- color: $u-main-color;
-}
-
-.u-content-color {
- color: $u-content-color;
-}
-
-.u-tips-color {
- color: $u-tips-color;
-}
-
-.u-light-color {
- color: $u-light-color;
-}
-
-.up-primary-light {
- color: $u-primary-light;
-}
-
-.up-warning-light {
- color: $u-warning-light;
-}
-
-.up-success-light {
- color: $u-success-light;
-}
-
-.up-error-light {
- color: $u-error-light;
-}
-
-.up-info-light {
- color: $u-info-light;
-}
-
-.up-primary-light-bg {
- background-color: $u-primary-light;
-}
-
-.up-warning-light-bg {
- background-color: $u-warning-light;
-}
-
-.up-success-light-bg {
- background-color: $u-success-light;
-}
-
-.up-error-light-bg {
- background-color: $u-error-light;
-}
-
-.up-info-light-bg {
- background-color: $u-info-light;
-}
-
-.up-primary-dark {
- color: $u-primary-dark;
-}
-
-.up-warning-dark {
- color: $u-warning-dark;
-}
-
-.up-success-dark {
- color: $u-success-dark;
-}
-
-.up-error-dark {
- color: $u-error-dark;
-}
-
-.up-info-dark {
- color: $u-info-dark;
-}
-
-.up-primary-dark-bg {
- background-color: $u-primary-dark;
-}
-
-.up-warning-dark-bg {
- background-color: $u-warning-dark;
-}
-
-.up-success-dark-bg {
- background-color: $u-success-dark;
-}
-
-.up-error-dark-bg {
- background-color: $u-error-dark;
-}
-
-.up-info-dark-bg {
- background-color: $u-info-dark;
-}
-
-.up-primary-disabled {
- color: $u-primary-disabled;
-}
-
-.up-warning-disabled {
- color: $u-warning-disabled;
-}
-
-.up-success-disabled {
- color: $u-success-disabled;
-}
-
-.up-error-disabled {
- color: $u-error-disabled;
-}
-
-.up-info-disabled {
- color: $u-info-disabled;
-}
-
-.up-primary {
- color: $u-primary;
-}
-
-.up-warning {
- color: $u-warning;
-}
-
-.up-success {
- color: $u-success;
-}
-
-.up-error {
- color: $u-error;
-}
-
-.up-info {
- color: $u-info;
-}
-
-.up-primary-bg {
- background-color: $u-primary;
-}
-
-.up-warning-bg {
- background-color: $u-warning;
-}
-
-.up-success-bg {
- background-color: $u-success;
-}
-
-.up-error-bg {
- background-color: $u-error;
-}
-
-.up-info-bg {
- background-color: $u-info;
-}
-
-.up-main-color {
- color: $u-main-color;
-}
-
-.up-content-color {
- color: $u-content-color;
-}
-
-.up-tips-color {
- color: $u-tips-color;
-}
-
-.up-light-color {
- color: $u-light-color;
-}
+.u-primary-light {
+ color: $u-primary-light;
+}
+
+.u-warning-light {
+ color: $u-warning-light;
+}
+
+.u-success-light {
+ color: $u-success-light;
+}
+
+.u-error-light {
+ color: $u-error-light;
+}
+
+.u-info-light {
+ color: $u-info-light;
+}
+
+.u-primary-light-bg {
+ background-color: $u-primary-light;
+}
+
+.u-warning-light-bg {
+ background-color: $u-warning-light;
+}
+
+.u-success-light-bg {
+ background-color: $u-success-light;
+}
+
+.u-error-light-bg {
+ background-color: $u-error-light;
+}
+
+.u-info-light-bg {
+ background-color: $u-info-light;
+}
+
+.u-primary-dark {
+ color: $u-primary-dark;
+}
+
+.u-warning-dark {
+ color: $u-warning-dark;
+}
+
+.u-success-dark {
+ color: $u-success-dark;
+}
+
+.u-error-dark {
+ color: $u-error-dark;
+}
+
+.u-info-dark {
+ color: $u-info-dark;
+}
+
+.u-primary-dark-bg {
+ background-color: $u-primary-dark;
+}
+
+.u-warning-dark-bg {
+ background-color: $u-warning-dark;
+}
+
+.u-success-dark-bg {
+ background-color: $u-success-dark;
+}
+
+.u-error-dark-bg {
+ background-color: $u-error-dark;
+}
+
+.u-info-dark-bg {
+ background-color: $u-info-dark;
+}
+
+.u-primary-disabled {
+ color: $u-primary-disabled;
+}
+
+.u-warning-disabled {
+ color: $u-warning-disabled;
+}
+
+.u-success-disabled {
+ color: $u-success-disabled;
+}
+
+.u-error-disabled {
+ color: $u-error-disabled;
+}
+
+.u-info-disabled {
+ color: $u-info-disabled;
+}
+
+.u-primary {
+ color: $u-primary;
+}
+
+.u-warning {
+ color: $u-warning;
+}
+
+.u-success {
+ color: $u-success;
+}
+
+.u-error {
+ color: $u-error;
+}
+
+.u-info {
+ color: $u-info;
+}
+
+.u-primary-bg {
+ background-color: $u-primary;
+}
+
+.u-warning-bg {
+ background-color: $u-warning;
+}
+
+.u-success-bg {
+ background-color: $u-success;
+}
+
+.u-error-bg {
+ background-color: $u-error;
+}
+
+.u-info-bg {
+ background-color: $u-info;
+}
+
+.u-main-color {
+ color: $u-main-color;
+}
+
+.u-content-color {
+ color: $u-content-color;
+}
+
+.u-tips-color {
+ color: $u-tips-color;
+}
+
+.u-light-color {
+ color: $u-light-color;
+}
+
+.up-primary-light {
+ color: $u-primary-light;
+}
+
+.up-warning-light {
+ color: $u-warning-light;
+}
+
+.up-success-light {
+ color: $u-success-light;
+}
+
+.up-error-light {
+ color: $u-error-light;
+}
+
+.up-info-light {
+ color: $u-info-light;
+}
+
+.up-primary-light-bg {
+ background-color: $u-primary-light;
+}
+
+.up-warning-light-bg {
+ background-color: $u-warning-light;
+}
+
+.up-success-light-bg {
+ background-color: $u-success-light;
+}
+
+.up-error-light-bg {
+ background-color: $u-error-light;
+}
+
+.up-info-light-bg {
+ background-color: $u-info-light;
+}
+
+.up-primary-dark {
+ color: $u-primary-dark;
+}
+
+.up-warning-dark {
+ color: $u-warning-dark;
+}
+
+.up-success-dark {
+ color: $u-success-dark;
+}
+
+.up-error-dark {
+ color: $u-error-dark;
+}
+
+.up-info-dark {
+ color: $u-info-dark;
+}
+
+.up-primary-dark-bg {
+ background-color: $u-primary-dark;
+}
+
+.up-warning-dark-bg {
+ background-color: $u-warning-dark;
+}
+
+.up-success-dark-bg {
+ background-color: $u-success-dark;
+}
+
+.up-error-dark-bg {
+ background-color: $u-error-dark;
+}
+
+.up-info-dark-bg {
+ background-color: $u-info-dark;
+}
+
+.up-primary-disabled {
+ color: $u-primary-disabled;
+}
+
+.up-warning-disabled {
+ color: $u-warning-disabled;
+}
+
+.up-success-disabled {
+ color: $u-success-disabled;
+}
+
+.up-error-disabled {
+ color: $u-error-disabled;
+}
+
+.up-info-disabled {
+ color: $u-info-disabled;
+}
+
+.up-primary {
+ color: $u-primary;
+}
+
+.up-warning {
+ color: $u-warning;
+}
+
+.up-success {
+ color: $u-success;
+}
+
+.up-error {
+ color: $u-error;
+}
+
+.up-info {
+ color: $u-info;
+}
+
+.up-primary-bg {
+ background-color: $u-primary;
+}
+
+.up-warning-bg {
+ background-color: $u-warning;
+}
+
+.up-success-bg {
+ background-color: $u-success;
+}
+
+.up-error-bg {
+ background-color: $u-error;
+}
+
+.up-info-bg {
+ background-color: $u-info;
+}
+
+.up-main-color {
+ color: $u-main-color;
+}
+
+.up-content-color {
+ color: $u-content-color;
+}
+
+.up-tips-color {
+ color: $u-tips-color;
+}
+
+.up-light-color {
+ color: $u-light-color;
+}
diff --git a/uni_modules/uview-plus/libs/css/common.scss b/uni_modules/uview-plus/libs/css/common.scss
index f6a3ae2..a558dfd 100644
--- a/uni_modules/uview-plus/libs/css/common.scss
+++ b/uni_modules/uview-plus/libs/css/common.scss
@@ -1,112 +1,112 @@
-// 超出行数,自动显示行尾省略号,最多5行
-// 来自uview-plus的温馨提示:当您在控制台看到此报错,说明需要在App.vue的style标签加上【lang="scss"】
-@for $i from 1 through 10 {
- .u-line-#{$i},
- .up-line-#{$i} {
- /* #ifdef APP-NVUE */
- // nvue下,可以直接使用lines属性,这是weex特有样式
- lines: $i;
- text-overflow: ellipsis;
- overflow: hidden;
- flex: 1;
- /* #endif */
-
- /* #ifndef APP-NVUE */
- // vue下,单行和多行显示省略号需要单独处理
- @if $i == 1 {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- } @else {
- display: -webkit-box!important;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- -webkit-line-clamp: $i;
- -webkit-box-orient: vertical!important;
- }
- /* #endif */
- }
-}
-
-
-// 此处加上!important并非随意乱用,而是因为目前*.nvue页面编译到H5时,
-// App.vue的样式会被uni-app的view元素的自带border属性覆盖,导致无效
-// 综上,这是uni-app的缺陷导致我们为了多端兼容,而必须要加上!important
-// 移动端兼容性较好,直接使用0.5px去实现细边框,不使用伪元素形式实现
-.u-border,
-.up-border {
- border-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-style: solid;
-}
-
-.u-border-top,
-.up-border-top {
- border-top-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-top-style: solid;
-}
-
-.u-border-left,
-.up-border-left {
- border-left-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-left-style: solid;
-}
-
-.u-border-right,
-.up-border-right {
- border-right-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-right-style: solid;
-}
-
-.u-border-bottom,
-.up-border-bottom {
- border-bottom-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-bottom-style: solid;
-}
-
-.u-border-top-bottom,
-.up-border-top-bottom {
- border-top-width: 0.5px!important;
- border-bottom-width: 0.5px!important;
- border-color: $u-border-color!important;
- border-top-style: solid;
- border-bottom-style: solid;
-}
-
-// 去除button的所有默认样式,让其表现跟普通的view、text元素一样
-.u-reset-button,
-.up-reset-button {
- padding: 0;
- background-color: transparent;
- /* #ifndef APP-PLUS */
- font-size: inherit;
- line-height: inherit;
- color: inherit;
- /* #endif */
- /* #ifdef APP-NVUE */
- border-width: 0;
- /* #endif */
-}
-
-/* #ifndef APP-NVUE */
-.u-reset-button::after,
-.up-reset-button::after {
- border: none;
-}
-/* #endif */
-
-.u-hover-class,
-.up-hover-class {
- opacity: 0.7;
-}
-
-.cursor-pointer {
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
-}
+// 超出行数,自动显示行尾省略号,最多5行
+// 来自uview-plus的温馨提示:当您在控制台看到此报错,说明需要在App.vue的style标签加上【lang="scss"】
+@for $i from 1 through 10 {
+ .u-line-#{$i},
+ .up-line-#{$i} {
+ /* #ifdef APP-NVUE */
+ // nvue下,可以直接使用lines属性,这是weex特有样式
+ lines: $i;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ flex: 1;
+ /* #endif */
+
+ /* #ifndef APP-NVUE */
+ // vue下,单行和多行显示省略号需要单独处理
+ @if $i == '1' {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ } @else {
+ display: -webkit-box!important;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-break: break-all;
+ -webkit-line-clamp: $i;
+ -webkit-box-orient: vertical!important;
+ }
+ /* #endif */
+ }
+}
+
+
+// 此处加上!important并非随意乱用,而是因为目前*.nvue页面编译到H5时,
+// App.vue的样式会被uni-app的view元素的自带border属性覆盖,导致无效
+// 综上,这是uni-app的缺陷导致我们为了多端兼容,而必须要加上!important
+// 移动端兼容性较好,直接使用0.5px去实现细边框,不使用伪元素形式实现
+.u-border,
+.up-border {
+ border-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-style: solid;
+}
+
+.u-border-top,
+.up-border-top {
+ border-top-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-top-style: solid;
+}
+
+.u-border-left,
+.up-border-left {
+ border-left-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-left-style: solid;
+}
+
+.u-border-right,
+.up-border-right {
+ border-right-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-right-style: solid;
+}
+
+.u-border-bottom,
+.up-border-bottom {
+ border-bottom-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-bottom-style: solid;
+}
+
+.u-border-top-bottom,
+.up-border-top-bottom {
+ border-top-width: 0.5px!important;
+ border-bottom-width: 0.5px!important;
+ border-color: $u-border-color!important;
+ border-top-style: solid;
+ border-bottom-style: solid;
+}
+
+// 去除button的所有默认样式,让其表现跟普通的view、text元素一样
+.u-reset-button,
+.up-reset-button {
+ padding: 0;
+ background-color: transparent;
+ /* #ifndef APP-PLUS */
+ font-size: inherit;
+ line-height: inherit;
+ color: inherit;
+ /* #endif */
+ /* #ifdef APP-NVUE */
+ border-width: 0;
+ /* #endif */
+}
+
+/* #ifndef APP-NVUE */
+.u-reset-button::after,
+.up-reset-button::after {
+ border: none;
+}
+/* #endif */
+
+.u-hover-class,
+.up-hover-class {
+ opacity: 0.7;
+}
+
+.cursor-pointer {
+ /* #ifdef H5 */
+ cursor: pointer;
+ /* #endif */
+}
diff --git a/uni_modules/uview-plus/libs/css/components.scss b/uni_modules/uview-plus/libs/css/components.scss
index 6610774..79a54f1 100644
--- a/uni_modules/uview-plus/libs/css/components.scss
+++ b/uni_modules/uview-plus/libs/css/components.scss
@@ -1,36 +1,34 @@
-@import "./mixin.scss";
-
-/* #ifndef APP-NVUE */
-// 由于uview-plus是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column;
-// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常
-// 2024-04-09由于微信小程序会提示 Some selectors are not allowed in component wxss所以注释以下几行
-// view,
-// scroll-view,
-// swiper-item,
-.u-empty,
-.u-empty__wrap,
-.u-transition,
-.u-tabs,
-.u-tabs__wrapper,
-.u-tabs__wrapper__scroll-view-wrapper,
-.u-tabs__wrapper__scroll-view,
-.u-tabs__wrapper__nav,
-.u-tabs__wrapper__nav__line,
-.up-empty,
-.up-empty__wrap,
-.up-transition,
-.up-tabs,
-.up-tabs__wrapper,
-.up-tabs__wrapper__scroll-view-wrapper,
-.up-tabs__wrapper__scroll-view,
-.up-tabs__wrapper__nav,
-.up-tabs__wrapper__nav__line {
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- flex-grow: 0;
- flex-basis: auto;
- align-items: stretch;
- align-content: flex-start;
-}
-/* #endif */
+@import "./mixin.scss";
+
+/* #ifndef APP-NVUE */
+// 由于uview-plus是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column;
+// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常
+// 2024-04-09由于微信小程序会提示 Some selectors are not allowed in component wxss所以注释以下几行
+// view,
+// scroll-view,
+// swiper-item,
+.u-empty,
+.u-empty__wrap,
+.u-tabs,
+.u-tabs__wrapper,
+.u-tabs__wrapper__scroll-view-wrapper,
+.u-tabs__wrapper__scroll-view,
+.u-tabs__wrapper__nav,
+.u-tabs__wrapper__nav__line,
+.up-empty,
+.up-empty__wrap,
+.up-tabs,
+.up-tabs__wrapper,
+.up-tabs__wrapper__scroll-view-wrapper,
+.up-tabs__wrapper__scroll-view,
+.up-tabs__wrapper__nav,
+.up-tabs__wrapper__nav__line {
+ display: flex;
+ flex-direction: column;
+ flex-shrink: 0;
+ flex-grow: 0;
+ flex-basis: auto;
+ align-items: stretch;
+ align-content: flex-start;
+}
+/* #endif */
diff --git a/uni_modules/uview-plus/libs/css/flex.scss b/uni_modules/uview-plus/libs/css/flex.scss
index 0c21506..6dc046b 100644
--- a/uni_modules/uview-plus/libs/css/flex.scss
+++ b/uni_modules/uview-plus/libs/css/flex.scss
@@ -35,8 +35,6 @@
.up-flex-row,
.up-flex-x {
@include flex;
- display: flex !important;
- flex-direction: row !important;
}
.u-flex-y,
@@ -44,27 +42,25 @@
.up-flex-y,
.up-flex-column {
@include flex(column);
- display: flex !important;
- flex-direction: column !important;
}
.u-flex-x-center,
.up-flex-x-center {
@include flex;
- justify-content: center !important;
+ justify-content: center;
}
.u-flex-xy-center,
.up-flex-xy-center {
@include flex;
- justify-content: center !important;
- align-items: center !important;
+ justify-content: center;
+ align-items: center;
}
.u-flex-y-center,
.up-flex-y-center {
@include flex;
- align-items: center !important;
+ align-items: center;
}
.u-flex-x-left,
@@ -76,14 +72,14 @@
.u-flex-row-reverse,
.up-flex-x-reverse,
.up-flex-row-reverse {
- flex-direction: row-reverse !important;
+ flex-direction: row-reverse;
}
.u-flex-y-reverse,
.u-flex-column-reverse,
.up-flex-y-reverse,
.up-flex-column-reverse {
- flex-direction: column-reverse !important;
+ flex-direction: column-reverse;
}
/* #ifndef APP-NVUE */
@@ -95,20 +91,20 @@
.up-flex.up-flex-reverse,
.up-flex-row.up-flex-reverse,
.up-flex-x.up-flex-reverse {
- flex-direction: row-reverse !important;
+ flex-direction: row-reverse;
}
.u-flex-column.u-flex-reverse,
.u-flex-y.u-flex-reverse,
.up-flex-column.up-flex-reverse,
.up-flex-y.up-flex-reverse {
- flex-direction: column-reverse !important;
+ flex-direction: column-reverse;
}
// 自动伸缩
.u-flex-fill,
.up-flex-fill {
- flex: 1 1 auto !important;
+ flex: 1 1 auto;
}
// 边界自动伸缩
@@ -160,75 +156,75 @@
// 换行
.u-flex-wrap,
.up-flex-wrap {
- flex-wrap: wrap !important;
+ flex-wrap: wrap;
}
// 反向换行
.u-flex-wrap-reverse,
.up-flex-wrap-reverse {
- flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse;
}
// 主轴起点对齐
.u-flex-start,
.up-flex-start {
- justify-content: flex-start !important;
+ justify-content: flex-start;
}
// 主轴中间对齐
.u-flex-center,
.up-flex-center {
- justify-content: center !important;
+ justify-content: center;
}
// 主轴终点对齐
.u-flex-end,
.up-flex-end {
- justify-content: flex-end !important;
+ justify-content: flex-end;
}
// 主轴等比间距
.u-flex-between,
.up-flex-between {
- justify-content: space-between !important;
+ justify-content: space-between;
}
// 主轴均分间距
.u-flex-around,
.up-flex-around {
- justify-content: space-around !important;
+ justify-content: space-around;
}
// 交叉轴起点对齐
.u-flex-items-start,
.up-flex-items-start {
- align-items: flex-start !important;
+ align-items: flex-start;
}
// 交叉轴中间对齐
.u-flex-items-center,
.up-flex-items-center {
- align-items: center !important;
+ align-items: center;
}
// 交叉轴终点对齐
.u-flex-items-end,
.up-flex-items-end {
- align-items: flex-end !important;
+ align-items: flex-end;
}
// 交叉轴第一行文字基线对齐
.u-flex-items-baseline,
.up-flex-items-baseline {
/* #ifndef APP-NVUE */
- align-items: baseline !important;
+ align-items: baseline;
/* #endif */
}
// 交叉轴方向拉伸对齐
.u-flex-items-stretch,
.up-flex-items-stretch {
- align-items: stretch !important;
+ align-items: stretch;
}
@@ -238,31 +234,31 @@
/* #ifndef APP-NVUE */
.u-flex-self-start,
.up-flex-self-start {
- align-self: flex-start !important;
+ align-self: flex-start;
}
// 子元素交叉轴居中对齐
.u-flex-self-center,
.up-flex-self-center {
- align-self: center !important;
+ align-self: center;
}
// 子元素交叉轴终点对齐
.u-flex-self-end,
.up-flex-self-end {
- align-self: flex-end !important;
+ align-self: flex-end;
}
// 子元素交叉轴第一行文字基线对齐
.u-flex-self-baseline,
.up-flex-self-baseline {
- align-self: baseline !important;
+ align-self: baseline;
}
// 子元素交叉轴方向拉伸对齐
.u-flex-self-stretch,
.up-flex-self-stretch {
- align-self: stretch !important;
+ align-self: stretch;
}
/* #endif */
// 多轴交叉时的对齐方式
@@ -271,52 +267,52 @@
/* #ifndef APP-NVUE */
.u-flex-content-start,
.up-flex-content-start {
- align-content: flex-start !important;
+ align-content: flex-start;
}
// 居中对齐
.u-flex-content-center,
.up-flex-content-center {
- align-content: center !important;
+ align-content: center;
}
// 终点对齐
.u-flex-content-end,
.up-flex-content-end {
- align-content: flex-end !important;
+ align-content: flex-end;
}
// 两端对齐
.u-flex-content-between,
.up-flex-content-between {
- align-content: space-between !important;
+ align-content: space-between;
}
// 均分间距
.u-flex-content-around,
.up-flex-content-around {
- align-content: space-around !important;
+ align-content: space-around;
}
// 全部居中对齐
.u-flex-middle,
.up-flex-middle {
- justify-content: center !important;
- align-items: center !important;
- align-self: center !important;
- align-content: center !important;
+ justify-content: center;
+ align-items: center;
+ align-self: center;
+ align-content: center;
}
// 是否可以放大
.u-flex-grow,
.up-flex-grow {
- flex-grow: 1 !important;
+ flex-grow: 1;
}
// 是否可以缩小
.u-flex-shrink,
.up-flex-shrink {
- flex-shrink: 1 !important;
+ flex-shrink: 1;
}
/* #endif */
@@ -366,4 +362,3 @@
}
}
}
-
diff --git a/uni_modules/uview-plus/libs/css/theme-legacy-bridge.scss b/uni_modules/uview-plus/libs/css/theme-legacy-bridge.scss
deleted file mode 100644
index f1ed817..0000000
--- a/uni_modules/uview-plus/libs/css/theme-legacy-bridge.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-@import "../../theme.scss";
-
-@include up-export-legacy-light-vars(':root');
-@include up-export-legacy-light-vars('page');
-@include up-export-legacy-light-vars('body');
-@include up-export-legacy-light-vars("[data-up-theme='light']");
diff --git a/uni_modules/uview-plus/libs/css/theme-vars-core.scss b/uni_modules/uview-plus/libs/css/theme-vars-core.scss
deleted file mode 100644
index b5f6476..0000000
--- a/uni_modules/uview-plus/libs/css/theme-vars-core.scss
+++ /dev/null
@@ -1,201 +0,0 @@
-:root,
-page,
-body {
- --up-main-color: var(--up-light-main-color, #303133);
- --up-content-color: var(--up-light-content-color, #606266);
- --up-tips-color: var(--up-light-tips-color, #909193);
- --up-light-color: var(--up-light-light-color, #c0c4cc);
- --up-border-color: var(--up-light-border-color, #dadbde);
- --up-bg-color: var(--up-light-bg-color, #f3f4f6);
- --up-hover-bg-color: #e7ebf0;
- --up-page-bg-color: #f3f4f6;
- --up-card-bg-color: #ffffff;
- --up-navbar-bg-color: #ffffff;
- --up-disabled-color: var(--up-light-disabled-color, #c8c9cc);
-
- --up-primary: var(--up-light-primary, #3c9cff);
- --up-primary-dark: var(--up-light-primary-dark, #398ade);
- --up-primary-disabled: var(--up-light-primary-disabled, #9acafc);
- --up-primary-light: var(--up-light-primary-light, #ecf5ff);
-
- --up-warning: var(--up-light-warning, #f9ae3d);
- --up-warning-dark: var(--up-light-warning-dark, #f1a532);
- --up-warning-disabled: var(--up-light-warning-disabled, #f9d39b);
- --up-warning-light: var(--up-light-warning-light, #fdf6ec);
-
- --up-success: var(--up-light-success, #5ac725);
- --up-success-dark: var(--up-light-success-dark, #53c21d);
- --up-success-disabled: var(--up-light-success-disabled, #a9e08f);
- --up-success-light: var(--up-light-success-light, #f5fff0);
-
- --up-error: var(--up-light-error, #f56c6c);
- --up-error-dark: var(--up-light-error-dark, #e45656);
- --up-error-disabled: var(--up-light-error-disabled, #f7b2b2);
- --up-error-light: var(--up-light-error-light, #fef0f0);
-
- --up-info: var(--up-light-info, #909399);
- --up-info-dark: var(--up-light-info-dark, #767a82);
- --up-info-disabled: var(--up-light-info-disabled, #c4c6c9);
- --up-info-light: var(--up-light-info-light, #f4f4f5);
-
- --up-table2-header-bg-color: #f5f7fa;
- --up-table2-zebra-bg-color: #fafafa;
- --up-table2-highlight-bg-color: #f5f7fa;
- --up-gap-bg-color: #f3f4f6;
- --up-skeleton-bg-color: #f1f2f4;
- --up-skeleton-shimmer-color: #e6e6e6;
- --up-swipe-action-button-bg-color: #c7c6cd;
- --up-index-list-indicator-bg-color: #c9c9c9;
- --up-calendar-month-mark-color: rgba(231, 232, 234, 0.83);
-}
-
-@media (prefers-color-scheme: dark) {
- :root,
- page,
- body {
- --up-main-color: #f5f5f5;
- --up-content-color: #d1d5db;
- --up-tips-color: #9ca3af;
- --up-light-color: #6b7280;
- --up-border-color: #3a3a3c;
- --up-bg-color: #1f1f1f;
- --up-hover-bg-color: #343741;
- --up-page-bg-color: #1f1f1f;
- --up-card-bg-color: #1c1c1e;
- --up-navbar-bg-color: #1c1c1e;
- --up-disabled-color: #4b5563;
-
- --up-primary: #3c9cff;
- --up-primary-dark: #5aa8ff;
- --up-primary-disabled: #4c6f92;
- --up-primary-light: #10243a;
-
- --up-warning: #f9ae3d;
- --up-warning-dark: #ffbf66;
- --up-warning-disabled: #8a6a3a;
- --up-warning-light: #3d2f1b;
-
- --up-success: #5ac725;
- --up-success-dark: #7ad94b;
- --up-success-disabled: #5f7f4f;
- --up-success-light: #1f3316;
-
- --up-error: #f56c6c;
- --up-error-dark: #ff8a8a;
- --up-error-disabled: #8d5858;
- --up-error-light: #3a2222;
-
- --up-info: #909399;
- --up-info-dark: #b0b3b8;
- --up-info-disabled: #5f6368;
- --up-info-light: #2f3238;
-
- --up-table2-header-bg-color: #2a2d33;
- --up-table2-zebra-bg-color: #23262b;
- --up-table2-highlight-bg-color: #2f3440;
- --up-gap-bg-color: #111111;
- --up-skeleton-bg-color: #2f3135;
- --up-skeleton-shimmer-color: rgba(255, 255, 255, 0.12);
- --up-swipe-action-button-bg-color: #4b5563;
- --up-index-list-indicator-bg-color: #4b5563;
- --up-calendar-month-mark-color: rgba(255, 255, 255, 0.04);
- }
-}
-
-[data-up-theme='light'] {
- --up-main-color: var(--up-light-main-color, #303133);
- --up-content-color: var(--up-light-content-color, #606266);
- --up-tips-color: var(--up-light-tips-color, #909193);
- --up-light-color: var(--up-light-light-color, #c0c4cc);
- --up-border-color: var(--up-light-border-color, #dadbde);
- --up-bg-color: var(--up-light-bg-color, #f3f4f6);
- --up-hover-bg-color: #e7ebf0;
- --up-page-bg-color: #f3f4f6;
- --up-card-bg-color: #ffffff;
- --up-navbar-bg-color: #ffffff;
- --up-disabled-color: var(--up-light-disabled-color, #c8c9cc);
-
- --up-primary: var(--up-light-primary, #3c9cff);
- --up-primary-dark: var(--up-light-primary-dark, #398ade);
- --up-primary-disabled: var(--up-light-primary-disabled, #9acafc);
- --up-primary-light: var(--up-light-primary-light, #ecf5ff);
-
- --up-warning: var(--up-light-warning, #f9ae3d);
- --up-warning-dark: var(--up-light-warning-dark, #f1a532);
- --up-warning-disabled: var(--up-light-warning-disabled, #f9d39b);
- --up-warning-light: var(--up-light-warning-light, #fdf6ec);
-
- --up-success: var(--up-light-success, #5ac725);
- --up-success-dark: var(--up-light-success-dark, #53c21d);
- --up-success-disabled: var(--up-light-success-disabled, #a9e08f);
- --up-success-light: var(--up-light-success-light, #f5fff0);
-
- --up-error: var(--up-light-error, #f56c6c);
- --up-error-dark: var(--up-light-error-dark, #e45656);
- --up-error-disabled: var(--up-light-error-disabled, #f7b2b2);
- --up-error-light: var(--up-light-error-light, #fef0f0);
-
- --up-info: var(--up-light-info, #909399);
- --up-info-dark: var(--up-light-info-dark, #767a82);
- --up-info-disabled: var(--up-light-info-disabled, #c4c6c9);
- --up-info-light: var(--up-light-info-light, #f4f4f5);
-
- --up-table2-header-bg-color: #f5f7fa;
- --up-table2-zebra-bg-color: #fafafa;
- --up-table2-highlight-bg-color: #f5f7fa;
- --up-gap-bg-color: #f3f4f6;
- --up-skeleton-bg-color: #f1f2f4;
- --up-skeleton-shimmer-color: #e6e6e6;
- --up-swipe-action-button-bg-color: #c7c6cd;
- --up-index-list-indicator-bg-color: #c9c9c9;
- --up-calendar-month-mark-color: rgba(231, 232, 234, 0.83);
-}
-
-[data-up-theme='dark'] {
- --up-main-color: #f5f5f5;
- --up-content-color: #d1d5db;
- --up-tips-color: #9ca3af;
- --up-light-color: #6b7280;
- --up-border-color: #3a3a3c;
- --up-bg-color: #1f1f1f;
- --up-hover-bg-color: #343741;
- --up-page-bg-color: #1f1f1f;
- --up-card-bg-color: #1c1c1e;
- --up-navbar-bg-color: #1c1c1e;
- --up-disabled-color: #4b5563;
-
- --up-primary: #3c9cff;
- --up-primary-dark: #5aa8ff;
- --up-primary-disabled: #4c6f92;
- --up-primary-light: #10243a;
-
- --up-warning: #f9ae3d;
- --up-warning-dark: #ffbf66;
- --up-warning-disabled: #8a6a3a;
- --up-warning-light: #3d2f1b;
-
- --up-success: #5ac725;
- --up-success-dark: #7ad94b;
- --up-success-disabled: #5f7f4f;
- --up-success-light: #1f3316;
-
- --up-error: #f56c6c;
- --up-error-dark: #ff8a8a;
- --up-error-disabled: #8d5858;
- --up-error-light: #3a2222;
-
- --up-info: #909399;
- --up-info-dark: #b0b3b8;
- --up-info-disabled: #5f6368;
- --up-info-light: #2f3238;
-
- --up-table2-header-bg-color: #2a2d33;
- --up-table2-zebra-bg-color: #23262b;
- --up-table2-highlight-bg-color: #2f3440;
- --up-gap-bg-color: #111111;
- --up-skeleton-bg-color: #2f3135;
- --up-skeleton-shimmer-color: rgba(255, 255, 255, 0.12);
- --up-swipe-action-button-bg-color: #4b5563;
- --up-index-list-indicator-bg-color: #4b5563;
- --up-calendar-month-mark-color: rgba(255, 255, 255, 0.04);
-}
diff --git a/uni_modules/uview-plus/libs/css/theme-vars.scss b/uni_modules/uview-plus/libs/css/theme-vars.scss
deleted file mode 100644
index f468926..0000000
--- a/uni_modules/uview-plus/libs/css/theme-vars.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "./theme-vars-core.scss";
diff --git a/uni_modules/uview-plus/libs/css/vue.scss b/uni_modules/uview-plus/libs/css/vue.scss
index 32949e0..e169fcd 100644
--- a/uni_modules/uview-plus/libs/css/vue.scss
+++ b/uni_modules/uview-plus/libs/css/vue.scss
@@ -1,28 +1,28 @@
-// 历遍生成4个方向的底部安全区
-@each $d in top, right, bottom, left {
- .u-safe-area-inset-#{$d},
- .up-safe-area-inset-#{$d} {
- padding-#{$d}: 0;
- padding-#{$d}: constant(safe-area-inset-#{$d});
- padding-#{$d}: env(safe-area-inset-#{$d});
- }
-}
-
-//提升H5端uni.toast()的层级,避免被uview-plus的modal等遮盖
-/* #ifdef H5 */
-uni-toast {
- z-index: 10090;
-}
-uni-toast .uni-toast {
- z-index: 10090;
-}
-/* #endif */
-
-// 隐藏scroll-view的滚动条
-::-webkit-scrollbar {
- display: none;
- width: 0 !important;
- height: 0 !important;
- -webkit-appearance: none;
- background: transparent;
-}
+// 历遍生成4个方向的底部安全区
+@each $d in top, right, bottom, left {
+ .u-safe-area-inset-#{$d},
+ .up-safe-area-inset-#{$d} {
+ padding-#{$d}: 0;
+ padding-#{$d}: constant(safe-area-inset-#{$d});
+ padding-#{$d}: env(safe-area-inset-#{$d});
+ }
+}
+
+//提升H5端uni.toast()的层级,避免被uview-plus的modal等遮盖
+/* #ifdef H5 */
+uni-toast {
+ z-index: 10090;
+}
+uni-toast .uni-toast {
+ z-index: 10090;
+}
+/* #endif */
+
+// 隐藏scroll-view的滚动条
+::-webkit-scrollbar {
+ display: none;
+ width: 0 !important;
+ height: 0 !important;
+ -webkit-appearance: none;
+ background: transparent;
+}
diff --git a/uni_modules/uview-plus/libs/function/calc.js b/uni_modules/uview-plus/libs/function/calc.js
deleted file mode 100644
index 3cd9288..0000000
--- a/uni_modules/uview-plus/libs/function/calc.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// 浮点数加法
-export function add (arg1, arg2) {
- var r1, r2, m
- try {
- r1 = arg1.toString().split('.')[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split('.')[1].length
- } catch (e) {
- r2 = 0
- }
- m = Math.pow(10, Math.max(r1, r2))
- return (arg1 * m + arg2 * m) / m
-}
-// 浮点数减法
-export function sub (arg1, arg2) {
- var r1, r2, m, n
- try {
- r1 = arg1.toString().split('.')[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split('.')[1].length
- } catch (e) {
- r2 = 0
- }
- m = Math.pow(10, Math.max(r1, r2))
- n = (r1 >= r2) ? r1 : r2
- return Math.abs(((arg1 * m - arg2 * m) / m).toFixed(n))
-}
-//浮点乘法
-export function mul (a, b) {
- var c = 0,
- d = a.toString(),
- e = b.toString();
- try {
- c += d.split(".")[1].length;
- } catch (f) {}
- try {
- c += e.split(".")[1].length;
- } catch (f) {}
- return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
-}
-//浮点除法
-export function div (a, b) {
- var c, d, e = 0,
- f = 0;
- try {
- e = a.toString().split(".")[1].length;
- } catch (g) {}
- try {
- f = b.toString().split(".")[1].length;
- } catch (g) {}
- return c = Number(a.toString().replace(".", "")), d = Number(b.toString().replace(".", "")), xyutil.mul(c / d, Math.pow(10, f - e));
-}
-export default {
- add,
- sub,
- mul,
- div
-}
diff --git a/uni_modules/uview-plus/libs/function/digit.js b/uni_modules/uview-plus/libs/function/digit.js
index 470bea6..c13f91c 100644
--- a/uni_modules/uview-plus/libs/function/digit.js
+++ b/uni_modules/uview-plus/libs/function/digit.js
@@ -1,167 +1,167 @@
-let _boundaryCheckingState = true; // 是否进行越界检查的全局开关
-
-/**
- * 把错误的数据转正
- * @private
- * @example strip(0.09999999999999998)=0.1
- */
-export function strip(num, precision = 15) {
- return +parseFloat(Number(num).toPrecision(precision));
-}
-
-/**
- * Return digits length of a number
- * @private
- * @param {*number} num Input number
- */
-export function digitLength(num) {
- // Get digit length of e
- const eSplit = num.toString().split(/[eE]/);
- const len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);
- return len > 0 ? len : 0;
-}
-
-/**
- * 把小数转成整数,如果是小数则放大成整数
- * @private
- * @param {*number} num 输入数
- */
-export function float2Fixed(num) {
- if (num.toString().indexOf('e') === -1) {
- return Number(num.toString().replace('.', ''));
- }
- const dLen = digitLength(num);
- return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
-}
-
-/**
- * 检测数字是否越界,如果越界给出提示
- * @private
- * @param {*number} num 输入数
- */
-export function checkBoundary(num) {
- if (_boundaryCheckingState) {
- if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
- console.warn(`${num} 超出了精度限制,结果可能不正确`);
- }
- }
-}
-
-/**
- * 把递归操作扁平迭代化
- * @param {number[]} arr 要操作的数字数组
- * @param {function} operation 迭代操作
- * @private
- */
-export function iteratorOperation(arr, operation) {
- const [num1, num2, ...others] = arr;
- let res = operation(num1, num2);
-
- others.forEach((num) => {
- res = operation(res, num);
- });
-
- return res;
-}
-
-/**
- * 高精度乘法
- * @export
- */
-export function times(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, times);
- }
-
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- const baseNum = digitLength(num1) + digitLength(num2);
- const leftValue = num1Changed * num2Changed;
-
- checkBoundary(leftValue);
-
- return leftValue / Math.pow(10, baseNum);
-}
-
-/**
- * 高精度加法
- * @export
- */
-export function plus(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, plus);
- }
-
- const [num1, num2] = nums;
- // 取最大的小数位
- const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
- // 把小数都转为整数然后再计算
- return (times(num1, baseNum) + times(num2, baseNum)) / baseNum;
-}
-
-/**
- * 高精度减法
- * @export
- */
-export function minus(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, minus);
- }
-
- const [num1, num2] = nums;
- const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
- return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
-}
-
-/**
- * 高精度除法
- * @export
- */
-export function divide(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, divide);
- }
-
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- checkBoundary(num1Changed);
- checkBoundary(num2Changed);
- // 重要,这里必须用strip进行修正
- return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
-}
-
-/**
- * 四舍五入
- * @export
- */
-export function round(num, ratio) {
- const base = Math.pow(10, ratio);
- let result = divide(Math.round(Math.abs(times(num, base))), base);
- if (num < 0 && result !== 0) {
- result = times(result, -1);
- }
- // 位数不足则补0
- return result;
-}
-
-/**
- * 是否进行边界检查,默认开启
- * @param flag 标记开关,true 为开启,false 为关闭,默认为 true
- * @export
- */
-export function enableBoundaryChecking(flag = true) {
- _boundaryCheckingState = flag;
-}
-
-
-export default {
- times,
- plus,
- minus,
- divide,
- round,
- enableBoundaryChecking,
-};
-
+let _boundaryCheckingState = true; // 是否进行越界检查的全局开关
+
+/**
+ * 把错误的数据转正
+ * @private
+ * @example strip(0.09999999999999998)=0.1
+ */
+export function strip(num, precision = 15) {
+ return +parseFloat(Number(num).toPrecision(precision));
+}
+
+/**
+ * Return digits length of a number
+ * @private
+ * @param {*number} num Input number
+ */
+export function digitLength(num) {
+ // Get digit length of e
+ const eSplit = num.toString().split(/[eE]/);
+ const len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);
+ return len > 0 ? len : 0;
+}
+
+/**
+ * 把小数转成整数,如果是小数则放大成整数
+ * @private
+ * @param {*number} num 输入数
+ */
+export function float2Fixed(num) {
+ if (num.toString().indexOf('e') === -1) {
+ return Number(num.toString().replace('.', ''));
+ }
+ const dLen = digitLength(num);
+ return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
+}
+
+/**
+ * 检测数字是否越界,如果越界给出提示
+ * @private
+ * @param {*number} num 输入数
+ */
+export function checkBoundary(num) {
+ if (_boundaryCheckingState) {
+ if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
+ console.warn(`${num} 超出了精度限制,结果可能不正确`);
+ }
+ }
+}
+
+/**
+ * 把递归操作扁平迭代化
+ * @param {number[]} arr 要操作的数字数组
+ * @param {function} operation 迭代操作
+ * @private
+ */
+export function iteratorOperation(arr, operation) {
+ const [num1, num2, ...others] = arr;
+ let res = operation(num1, num2);
+
+ others.forEach((num) => {
+ res = operation(res, num);
+ });
+
+ return res;
+}
+
+/**
+ * 高精度乘法
+ * @export
+ */
+export function times(...nums) {
+ if (nums.length > 2) {
+ return iteratorOperation(nums, times);
+ }
+
+ const [num1, num2] = nums;
+ const num1Changed = float2Fixed(num1);
+ const num2Changed = float2Fixed(num2);
+ const baseNum = digitLength(num1) + digitLength(num2);
+ const leftValue = num1Changed * num2Changed;
+
+ checkBoundary(leftValue);
+
+ return leftValue / Math.pow(10, baseNum);
+}
+
+/**
+ * 高精度加法
+ * @export
+ */
+export function plus(...nums) {
+ if (nums.length > 2) {
+ return iteratorOperation(nums, plus);
+ }
+
+ const [num1, num2] = nums;
+ // 取最大的小数位
+ const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
+ // 把小数都转为整数然后再计算
+ return (times(num1, baseNum) + times(num2, baseNum)) / baseNum;
+}
+
+/**
+ * 高精度减法
+ * @export
+ */
+export function minus(...nums) {
+ if (nums.length > 2) {
+ return iteratorOperation(nums, minus);
+ }
+
+ const [num1, num2] = nums;
+ const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
+ return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
+}
+
+/**
+ * 高精度除法
+ * @export
+ */
+export function divide(...nums) {
+ if (nums.length > 2) {
+ return iteratorOperation(nums, divide);
+ }
+
+ const [num1, num2] = nums;
+ const num1Changed = float2Fixed(num1);
+ const num2Changed = float2Fixed(num2);
+ checkBoundary(num1Changed);
+ checkBoundary(num2Changed);
+ // 重要,这里必须用strip进行修正
+ return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
+}
+
+/**
+ * 四舍五入
+ * @export
+ */
+export function round(num, ratio) {
+ const base = Math.pow(10, ratio);
+ let result = divide(Math.round(Math.abs(times(num, base))), base);
+ if (num < 0 && result !== 0) {
+ result = times(result, -1);
+ }
+ // 位数不足则补0
+ return result;
+}
+
+/**
+ * 是否进行边界检查,默认开启
+ * @param flag 标记开关,true 为开启,false 为关闭,默认为 true
+ * @export
+ */
+export function enableBoundaryChecking(flag = true) {
+ _boundaryCheckingState = flag;
+}
+
+
+export default {
+ times,
+ plus,
+ minus,
+ divide,
+ round,
+ enableBoundaryChecking,
+};
+
diff --git a/uni_modules/uview-plus/libs/function/http.js b/uni_modules/uview-plus/libs/function/http.js
deleted file mode 100644
index f4e8f66..0000000
--- a/uni_modules/uview-plus/libs/function/http.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// 全局挂载引入http相关请求拦截插件
-import Request from '../luch-request'
-const http = new Request()
-export default http
diff --git a/uni_modules/uview-plus/libs/function/index.js b/uni_modules/uview-plus/libs/function/index.js
index 6be6953..d432172 100644
--- a/uni_modules/uview-plus/libs/function/index.js
+++ b/uni_modules/uview-plus/libs/function/index.js
@@ -1,10 +1,10 @@
-import {
- number as testNumber,
- array as testArray,
- empty as testEmpty
-} from './test.js'
-import { round } from './digit.js'
-import config from '../config/config.js'
+import {
+ number as testNumber,
+ array as testArray,
+ empty as testEmpty
+} from './test'
+import { round } from './digit.js'
+import config from '../config/config';
/**
* @description 如果value小于min,取min;如果value大于max,取max
* @param {number} min
@@ -32,20 +32,6 @@ export function getPx(value, unit = false) {
return unit ? `${parseInt(value)}px` : parseInt(value)
}
-/**
- * @description 用于统一rpx2px方法,因uni-app现有API未统一。
- * @param {number} value 用户传递值的rpx值
- * @returns {number}
- */
-export function rpx2px(value) {
- // #ifdef APP
- return uni.upx2px(value)
- // #endif
- // #ifndef APP
- return uni.rpx2px(value)
- // #endif
-}
-
/**
* @description 进行延时,以达到可以简写代码的目的 比如: await uni.$u.sleep(20)将会阻塞20ms
* @param {number} value 堵塞时间 单位ms 毫秒
@@ -63,12 +49,12 @@ export function sleep(value = 30) {
* @returns {string} 返回所在平台(小写)
* @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
*/
-export function os() {
- // #ifdef APP || H5 || MP-WEIXIN
- return uni.getDeviceInfo().platform.toLowerCase()
- // #endif
- // #ifndef APP || H5 || MP-WEIXIN
- return uni.getSystemInfoSync().platform.toLowerCase()
+export function os() {
+ // #ifdef APP || H5 || MP-WEIXIN
+ return uni.getDeviceInfo().platform.toLowerCase()
+ // #endif
+ // #ifndef APP || H5 || MP-WEIXIN
+ return uni.getSystemInfoSync().platform.toLowerCase()
// #endif
}
/**
@@ -77,26 +63,26 @@ export function os() {
*/
export function sys() {
return uni.getSystemInfoSync()
-}
-export function getWindowInfo() {
- let ret = {}
- // #ifdef APP || H5 || MP-WEIXIN
- ret = uni.getWindowInfo()
- // #endif
- // #ifndef APP || H5 || MP-WEIXIN
- ret = sys()
- // #endif
- return ret
-}
-export function getDeviceInfo() {
- let ret = {}
- // #ifdef APP || H5 || MP-WEIXIN
- ret = uni.getDeviceInfo()
- // #endif
- // #ifndef APP || H5 || MP-WEIXIN
- ret = sys()
- // #endif
- return ret
+}
+export function getWindowInfo() {
+ let ret = {}
+ // #ifdef APP || H5 || MP-WEIXIN
+ ret = uni.getWindowInfo()
+ // #endif
+ // #ifndef APP || H5 || MP-WEIXIN
+ ret = sys()
+ // #endif
+ return ret
+}
+export function getDeviceInfo() {
+ let ret = {}
+ // #ifdef APP || H5 || MP-WEIXIN
+ ret = uni.getDeviceInfo()
+ // #endif
+ // #ifndef APP || H5 || MP-WEIXIN
+ ret = sys()
+ // #endif
+ return ret
}
/**
@@ -157,14 +143,9 @@ export function $parent(name = undefined) {
let parent = this.$parent
// 通过while历遍,这里主要是为了H5需要多层解析的问题
while (parent) {
- // 父组件
- let name2 = ''
- if (name.startsWith('up-')) {
- name2 = name.replace(/up-([a-zA-Z0-9-_]+)/g, 'u-$1')
- } else if (name.startsWith('u-')) {
- name2 = name.replace(/u-([a-zA-Z0-9-_]+)/g, 'up-$1')
- }
- if (parent.$options && parent.$options.name !== name && parent.$options.name !== name2) {
+ // 父组件
+ name = name.replace(/up-([a-zA-Z0-9-_]+)/g, 'u-$1')
+ if (parent.$options && parent.$options.name !== name) {
// 如果组件的name不相等,继续上一级寻找
parent = parent.$parent
} else {
@@ -380,10 +361,6 @@ export function timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
date = new Date(Number(dateTime))
}
- // 检查是否为UTC格式的时间字符串 (2024-12-18T02:25:31.432Z)
- else if (typeof dateTime === 'string' && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-]\d{2}:\d{2})?$/.test(dateTime)) {
- date = new Date(dateTime)
- }
// 其他都认为符合 RFC 2822 规范
else {
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
@@ -650,8 +627,8 @@ export function padZero(value) {
* @param {*} event
*/
export function formValidate(instance, event) {
- const formItem = $parent.call(instance, 'up-form-item')
- const form = $parent.call(instance, 'up-form')
+ const formItem = $parent.call(instance, 'u-form-item')
+ const form = $parent.call(instance, 'u-form')
// 如果发生变化的input或者textarea等,其父组件中有u-form-item或者u-form等,就执行form的validate方法
// 同时将form-item的pros传递给form,让其进行精确对象验证
if (formItem && form) {
@@ -753,99 +730,12 @@ export function getValueByPath(obj, path) {
}, obj);
}
-/**
- * 生成同色系浅色背景色
- * @param {string} textColor - 支持 #RGB、#RRGGBB、rgb()、rgba() 格式
- * @param {number} [lightness=85] - 目标亮度百分比(默认85%)
- * @returns {string} 十六进制颜色值
- */
-export function genLightColor(textColor, lightness = 95) {
- // 手动解析颜色值(避免使用document)
- const rgb = parseColorWithoutDOM(textColor);
-
- // RGB转HSL色域
- const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
-
- // 生成浅色背景
- const bgHsl = {
- h: hsl.h,
- s: hsl.s,
- l: Math.min(lightness, 95)
- };
-
- return hslToHex(bgHsl.h, bgHsl.s, bgHsl.l);
- }
-
- /* 手动解析颜色字符串(兼容uni-app环境) */
- function parseColorWithoutDOM(colorStr) {
- // 统一转小写处理
- const str = colorStr.toLowerCase().trim();
-
- // 处理十六进制格式
- if (str.startsWith('#')) {
- const hex = str.replace('#', '');
- const fullHex = hex.length === 3 ?
- hex.split('').map(c => c + c).join('') : hex;
-
- return {
- r: parseInt(fullHex.substring(0,2), 16),
- g: parseInt(fullHex.substring(2,4), 16),
- b: parseInt(fullHex.substring(4,6), 16)
- };
- }
-
- // 处理rgb/rgba格式
- const rgbMatch = str.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
- if (rgbMatch) {
- return {
- r: +rgbMatch[1],
- g: +rgbMatch[2],
- b: +rgbMatch[3]
- };
- }
-
- throw new Error('Invalid color format');
- }
-
-// 辅助函数:RGB 转 HSL(色相、饱和度、亮度)
-function rgbToHsl(r, g, b) {
- r /= 255, g /= 255, b /= 255;
- const max = Math.max(r, g, b), min = Math.min(r, g, b);
- let h, s, l = (max + min) / 2;
-
- if (max === min) {
- h = s = 0; // achromatic
- } else {
- const d = max - min;
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
- switch (max) {
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
- case g: h = (b - r) / d + 2; break;
- case b: h = (r - g) / d + 4; break;
- }
- h = (h * 60).toFixed(1);
- }
- return { h: +h, s: +(s * 100).toFixed(1), l: +(l * 100).toFixed(1) };
-}
-
-// 辅助函数:HSL 转十六进制
-function hslToHex(h, s, l) {
- l /= 100;
- const a = s * Math.min(l, 1 - l) / 100;
- const f = n => {
- const k = (n + h / 30) % 12;
- const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
- return Math.round(255 * color).toString(16).padStart(2, '0');
- };
- return `#${f(0)}${f(8)}${f(4)}`;
-}
-
export default {
range,
getPx,
sleep,
os,
- sys,
+ sys,
getWindowInfo,
random,
guid,
@@ -872,7 +762,5 @@ export default {
page,
pages,
getValueByPath,
- genLightColor,
- rpx2px
+ // setConfig
}
-
diff --git a/uni_modules/uview-plus/libs/function/platform.js b/uni_modules/uview-plus/libs/function/platform.js
index 904fccc..3813a26 100644
--- a/uni_modules/uview-plus/libs/function/platform.js
+++ b/uni_modules/uview-plus/libs/function/platform.js
@@ -1,75 +1,75 @@
-/**
- * 注意:
- * 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效:
- * module.exports = {
- * transpileDependencies: ['uview-v2']
- * }
- */
-
-let platform = 'none'
-
-// #ifdef VUE3
-platform = 'vue3'
-// #endif
-
-// #ifdef VUE2
-platform = 'vue2'
-// #endif
-
-// #ifdef APP-PLUS
-platform = 'plus'
-// #endif
-
-// #ifdef APP-NVUE
-platform = 'nvue'
-// #endif
-
-// #ifdef H5
-platform = 'h5'
-// #endif
-
-// #ifdef MP
-platform = 'mp'
-// #endif
-
-// #ifdef MP-WEIXIN
-platform = 'weixin'
-// #endif
-
-// #ifdef MP-ALIPAY
-platform = 'alipay'
-// #endif
-
-// #ifdef MP-BAIDU
-platform = 'baidu'
-// #endif
-
-// #ifdef MP-TOUTIAO
-platform = 'toutiao'
-// #endif
-
-// #ifdef MP-QQ
-platform = 'qq'
-// #endif
-
-// #ifdef MP-KUAISHOU
-platform = 'kuaishou'
-// #endif
-
-// #ifdef MP-360
-platform = '360'
-// #endif
-
-// #ifdef QUICKAPP-WEBVIEW
-platform = 'quickapp-webview'
-// #endif
-
-// #ifdef QUICKAPP-WEBVIEW-HUAWEI
-platform = 'quickapp-webview-huawei'
-// #endif
-
-// #ifdef QUICKAPP-WEBVIEW-UNION
-platform = 'quckapp-webview-union'
-// #endif
-
-export default platform
+/**
+ * 注意:
+ * 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效:
+ * module.exports = {
+ * transpileDependencies: ['uview-v2']
+ * }
+ */
+
+let platform = 'none'
+
+// #ifdef VUE3
+platform = 'vue3'
+// #endif
+
+// #ifdef VUE2
+platform = 'vue2'
+// #endif
+
+// #ifdef APP-PLUS
+platform = 'plus'
+// #endif
+
+// #ifdef APP-NVUE
+platform = 'nvue'
+// #endif
+
+// #ifdef H5
+platform = 'h5'
+// #endif
+
+// #ifdef MP
+platform = 'mp'
+// #endif
+
+// #ifdef MP-WEIXIN
+platform = 'weixin'
+// #endif
+
+// #ifdef MP-ALIPAY
+platform = 'alipay'
+// #endif
+
+// #ifdef MP-BAIDU
+platform = 'baidu'
+// #endif
+
+// #ifdef MP-TOUTIAO
+platform = 'toutiao'
+// #endif
+
+// #ifdef MP-QQ
+platform = 'qq'
+// #endif
+
+// #ifdef MP-KUAISHOU
+platform = 'kuaishou'
+// #endif
+
+// #ifdef MP-360
+platform = '360'
+// #endif
+
+// #ifdef QUICKAPP-WEBVIEW
+platform = 'quickapp-webview'
+// #endif
+
+// #ifdef QUICKAPP-WEBVIEW-HUAWEI
+platform = 'quickapp-webview-huawei'
+// #endif
+
+// #ifdef QUICKAPP-WEBVIEW-UNION
+platform = 'quckapp-webview-union'
+// #endif
+
+export default platform
diff --git a/uni_modules/uview-plus/libs/function/test.js b/uni_modules/uview-plus/libs/function/test.js
index 9428da6..6de03dd 100644
--- a/uni_modules/uview-plus/libs/function/test.js
+++ b/uni_modules/uview-plus/libs/function/test.js
@@ -237,13 +237,6 @@ export function object(value) {
return Object.prototype.toString.call(value) === '[object Object]'
}
-/**
- * 是否是Promise对象
- */
-export function objectPromise(value) {
- return Object.prototype.toString.call(value) === '[object Promise]';
-}
-
/**
* 是否短信验证码
*/
@@ -264,7 +257,7 @@ export function func(value) {
* @param {Object} value
*/
export function promise(value) {
- return objectPromise(value) && func(value.then) && func(value.catch)
+ return object(value) && func(value.then) && func(value.catch)
}
/** 是否图片格式
diff --git a/uni_modules/uview-plus/libs/function/uni-api-shims.js b/uni_modules/uview-plus/libs/function/uni-api-shims.js
deleted file mode 100644
index fd70083..0000000
--- a/uni_modules/uview-plus/libs/function/uni-api-shims.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * uni API shims
- *
- * 部分小程序平台(如支付宝)不支持某些 uni API,直接调用会抛出 TypeError。
- * 本模块在库初始化时检测缺失的 API 并自动补齐空实现,防止运行时报错。
- *
- * 扩展方式:在 needShims 数组中追加 { name, fallback } 即可。
- */
-
-const needShims = [
- {
- name: 'onWindowResize',
- fallback: function (_callback) { /* no-op */ }
- },
- {
- name: 'offWindowResize',
- fallback: function (_callback) { /* no-op */ }
- }
-]
-
-export function applyUniApiShims() {
- if (typeof uni === 'undefined') return
-
- for (const { name, fallback } of needShims) {
- if (typeof uni[name] !== 'function') {
- uni[name] = fallback
- }
- }
-}
diff --git a/uni_modules/uview-plus/libs/i18n/index.js b/uni_modules/uview-plus/libs/i18n/index.js
deleted file mode 100644
index 09234cf..0000000
--- a/uni_modules/uview-plus/libs/i18n/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import zhHans from './locales/zh-Hans.json'
-import zhHant from './locales/zh-Hant.json'
-import en from './locales/en.json'
-import es from './locales/es.json'
-import fr from './locales/fr.json'
-import de from './locales/de.json'
-import ko from './locales/ko.json'
-import ja from './locales/ja.json'
-import ru from './locales/ru.json'
-
-let settings = {
- lang: uni.getLocale(),
- locales: {
- en,
- es,
- fr,
- de,
- ko,
- ja,
- ru,
- 'zh-Hant': zhHant,
- 'zh-Hans': zhHans
- }
-};
-
-uni.onLocaleChange((locale) => {
- settings.lang = locale;
-})
-
-/**
- * 多语言方法
- */
-export function t(value, params = {}) {
- // console.log(settings.locales[settings.lang])
- if (value) {
- let lang = settings.lang
- if (!settings.locales[settings.lang]) {
- lang = 'zh-Hans'
- }
- let result = settings.locales[lang][value] || value;
- // 替换{xxx}格式的变量
- Object.keys(params).forEach(key => {
- const reg = new RegExp(`{${key}}`, 'g');
- result = result.replace(reg, params[key]);
- });
- return result;
- } else {
- return value;
- }
-}
-
-export default {
- settings: settings
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/de.json b/uni_modules/uview-plus/libs/i18n/locales/de.json
deleted file mode 100644
index 5d9fad5..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/de.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "Abbrechen",
- "up.common.confirm": "Bestätigen",
- "up.common.start": "Start",
- "up.common.end": "Ende",
- "up.common.stop": "Stopp",
- "up.common.copy": "Kopieren",
- "up.common.none": "Keine",
- "up.common.tip": "Hinweis",
- "up.common.success": "Erfolg",
- "up.common.fail": "Fehlgeschlagen",
- "up.common.close": "Schließen",
- "up.common.preview": "Vorschau",
- "up.common.re-select": "Erneut auswählen",
- "up.common.rotate": "Drehen",
- "up.common.pleaseChoose": "Bitte wählen",
- "up.common.loading": "Laden",
- "up.common.loading2": "Wird geladen",
- "up.common.inOperation": "In Bearbeitung",
- "up.common.settings": "Einstellungen",
- "up.common.retry": "Wiederholen",
- "up.common.search": "Suchen",
- "up.common.more": "Mehr",
- "up.common.video": "Video",
- "up.common.file": "Datei",
- "up.week.one": "Mo",
- "up.week.two": "Di",
- "up.week.three": "Mi",
- "up.week.four": "Do",
- "up.week.five": "Fr",
- "up.week.six": "Sa",
- "up.week.seven": "So",
- "up.barcode.error": "Barcode-Generierung fehlgeschlagen",
- "up.calendar.chooseDates": "Datumsauswahl",
- "up.calendar.disabled": "Dieses Datum ist deaktiviert",
- "up.calendar.daysExceed": "Die Anzahl der ausgewählten Tage darf {days} Tage nicht überschreiten",
- "up.calendar.today": "Heute",
- "up.cityLocate.locateCity": "Stadt lokalisieren",
- "up.cityLocate.fail": "Lokalisierung fehlgeschlagen, bitte klicken Sie zum Wiederholen.",
- "up.cityLocate.locating": "Lokalisierung läuft",
- "up.code.send": "Bestätigungscode erhalten",
- "up.code.resendAfter": "Erneut senden in X Sekunden",
- "up.code.resend": "Erneut senden",
- "up.cropper.emptyWidhtOrHeight": "Breite oder Höhe des Zuschneidebereichs nicht festgelegt",
- "up.empty.car": "Warenkorb ist leer",
- "up.empty.page": "Seite existiert nicht",
- "up.empty.search": "Keine Suchergebnisse",
- "up.empty.address": "Keine Lieferadresse",
- "up.empty.wifi": "Kein WLAN",
- "up.empty.order": "Bestellungen sind leer",
- "up.empty.coupon": "Keine Gutscheine",
- "up.empty.favor": "Keine Favoriten",
- "up.empty.permission": "Keine Berechtigung",
- "up.empty.history": "Kein Verlauf",
- "up.empty.news": "Keine Nachrichtenliste",
- "up.empty.message": "Nachrichtenliste ist leer",
- "up.empty.list": "Liste ist leer",
- "up.empty.data": "Daten sind leer",
- "up.empty.comment": "Keine Kommentare",
- "up.link.copyed": "Link kopiert, bitte im Browser öffnen",
- "up.loadmoe.loadmore": "Mehr laden",
- "up.loadmoe.nomore": "Keine weiteren Daten",
- "up.noNetwork.text": "Ups, Netzwerksignal verloren",
- "up.noNetwork.pleaseCheck": "Bitte überprüfen Sie das Netzwerk oder gehen Sie zu",
- "up.noNetwork.connect": "Netzwerk verbunden",
- "up.noNetwork.disconnect": "Keine Netzwerkverbindung",
- "up.pagination.previous": "Vorherige Seite",
- "up.pagination.next": "Nächste Seite",
- "up.pullRefresh.pull": "Zum Aktualisieren nach unten ziehen",
- "up.pullRefresh.release": "Loslassen zum Aktualisieren",
- "up.pullRefresh.refreshing": "Aktualisierung läuft",
- "up.readMore.expand": "Erweitern zum vollständigen Lesen",
- "up.readMore.fold": "Einklappen",
- "up.search.placeholder": "Bitte Schlüsselwort eingeben",
- "up.signature.penSize": "Strichstärke",
- "up.signature.penColor": "Strichfarbe",
- "up.upload.sizeExceed": "Größenbegrenzung überschritten",
- "up.upload.uploading": "Upload läuft",
- "up.upload.previewImageFail": "Bildvorschau fehlgeschlagen",
- "up.upload.previewVideoFail": "Videovorschau fehlgeschlagen",
- "up.goodsSku.stock": "Lagerbestand",
- "up.goodsSku.price": "Preis",
- "up.goodsSku.amount": "Stück",
- "up.goodsSku.choosed": "Ausgewählt",
- "up.goodsSku.buyAmount": "Anzahl"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/en.json b/uni_modules/uview-plus/libs/i18n/locales/en.json
deleted file mode 100644
index 5962f4c..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/en.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "Cancel",
- "up.common.confirm": "Confirm",
- "up.common.start": "Start",
- "up.common.end": "End",
- "up.common.stop": "Stop",
- "up.common.copy": "Copy",
- "up.common.none": "None",
- "up.common.tip": "Tip",
- "up.common.success": "Success",
- "up.common.fail": "Fail",
- "up.common.close": "Close",
- "up.common.preview": "Preview",
- "up.common.re-select": "Re-select",
- "up.common.rotate": "Rotate",
- "up.common.pleaseChoose": "Please choose",
- "up.common.loading": "Loading",
- "up.common.loading2": "Loading",
- "up.common.inOperation": "In operation",
- "up.common.settings": "Settings",
- "up.common.retry": "Retry",
- "up.common.search": "Search",
- "up.common.more": "More",
- "up.common.video": "Video",
- "up.common.file": "File",
- "up.week.one": "Mon",
- "up.week.two": "Tue",
- "up.week.three": "Wed",
- "up.week.four": "Thu",
- "up.week.five": "Fri",
- "up.week.six": "Sat",
- "up.week.seven": "Sun",
- "up.barcode.error": "Failed to generate barcode",
- "up.calendar.chooseDates": "Date selection",
- "up.calendar.disabled": "This date is disabled",
- "up.calendar.daysExceed": "The number of selected days cannot exceed {days} days",
- "up.calendar.today": "Today",
- "up.cityLocate.locateCity": "Locate city",
- "up.cityLocate.fail": "Location failed, please click to retry.",
- "up.cityLocate.locating": "Locating",
- "up.code.send": "Get verification code",
- "up.code.resendAfter": "Resend after X seconds",
- "up.code.resend": "Resend",
- "up.cropper.emptyWidhtOrHeight": "The width or height of the cropping box is not set",
- "up.empty.car": "Shopping cart is empty",
- "up.empty.page": "Page not found",
- "up.empty.search": "No search results",
- "up.empty.address": "No shipping address",
- "up.empty.wifi": "No WiFi",
- "up.empty.order": "Order is empty",
- "up.empty.coupon": "No coupons",
- "up.empty.favor": "No favorites",
- "up.empty.permission": "No permission",
- "up.empty.history": "No history",
- "up.empty.news": "No news list",
- "up.empty.message": "Message list is empty",
- "up.empty.list": "List is empty",
- "up.empty.data": "Data is empty",
- "up.empty.comment": "No comments",
- "up.link.copyed": "Link copied, please open in browser",
- "up.loadmoe.loadmore": "Load more",
- "up.loadmoe.nomore": "No more",
- "up.noNetwork.text": "Oops, network signal lost",
- "up.noNetwork.pleaseCheck": "Please check the network, or go to",
- "up.noNetwork.connect": "Network connected",
- "up.noNetwork.disconnect": "No network connection",
- "up.pagination.previous": "Previous",
- "up.pagination.next": "Next",
- "up.pullRefresh.pull": "Pull to refresh",
- "up.pullRefresh.release": "Release to refresh",
- "up.pullRefresh.refreshing": "Refreshing",
- "up.readMore.expand": "Expand to read more",
- "up.readMore.fold": "Collapse",
- "up.search.placeholder": "Please enter keywords",
- "up.signature.penSize": "Stroke size",
- "up.signature.penColor": "Stroke color",
- "up.upload.sizeExceed": "Size limit exceeded",
- "up.upload.uploading": "Uploading",
- "up.upload.previewImageFail": "Failed to preview image",
- "up.upload.previewVideoFail": "Failed to preview video",
- "up.goodsSku.stock": "Stock",
- "up.goodsSku.price": "Price",
- "up.goodsSku.amount": "Items",
- "up.goodsSku.choosed": "Selected",
- "up.goodsSku.buyAmount": "Quantity"
-}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/i18n/locales/es.json b/uni_modules/uview-plus/libs/i18n/locales/es.json
deleted file mode 100644
index 14ba923..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/es.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "Cancelar",
- "up.common.confirm": "Confirmar",
- "up.common.start": "Iniciar",
- "up.common.end": "Finalizar",
- "up.common.stop": "Detener",
- "up.common.copy": "Copiar",
- "up.common.none": "Ninguno",
- "up.common.tip": "Consejo",
- "up.common.success": "Éxito",
- "up.common.fail": "Fallido",
- "up.common.close": "Cerrar",
- "up.common.preview": "Vista previa",
- "up.common.re-select": "Re seleccionar",
- "up.common.rotate": "Rotar",
- "up.common.pleaseChoose": "Por favor seleccione",
- "up.common.loading": "Cargando",
- "up.common.loading2": "Cargando",
- "up.common.inOperation": "En operación",
- "up.common.settings": "Configuración",
- "up.common.retry": "Reintentar",
- "up.common.search": "Buscar",
- "up.common.more": "Más",
- "up.common.video": "Vídeo",
- "up.common.file": "Archivo",
- "up.week.one": "Lun",
- "up.week.two": "Mar",
- "up.week.three": "Mié",
- "up.week.four": "Jue",
- "up.week.five": "Vie",
- "up.week.six": "Sáb",
- "up.week.seven": "Dom",
- "up.barcode.error": "Error al generar código de barras",
- "up.calendar.chooseDates": "Selección de fecha",
- "up.calendar.disabled": "Esta fecha está deshabilitada",
- "up.calendar.daysExceed": "Los días seleccionados no pueden exceder {days} días",
- "up.calendar.today": "Hoy",
- "up.cityLocate.locateCity": "Localizar ciudad",
- "up.cityLocate.fail": "Error de localización, haga clic para reintentar.",
- "up.cityLocate.locating": "Localizando",
- "up.code.send": "Obtener código de verificación",
- "up.code.resendAfter": "Reenviar en X segundos",
- "up.code.resend": "Reenviar",
- "up.cropper.emptyWidhtOrHeight": "El ancho o alto del recorte no está configurado",
- "up.empty.car": "Carrito de compras vacío",
- "up.empty.page": "Página no encontrada",
- "up.empty.search": "Sin resultados de búsqueda",
- "up.empty.address": "Sin dirección de envío",
- "up.empty.wifi": "Sin WiFi",
- "up.empty.order": "Pedido vacío",
- "up.empty.coupon": "Sin cupones",
- "up.empty.favor": "Sin favoritos",
- "up.empty.permission": "Sin permisos",
- "up.empty.history": "Sin historial",
- "up.empty.news": "Sin noticias",
- "up.empty.message": "Lista de mensajes vacía",
- "up.empty.list": "Lista vacía",
- "up.empty.data": "Datos vacíos",
- "up.empty.comment": "Sin comentarios",
- "up.link.copyed": "Enlace copiado, por favor abra en el navegador",
- "up.loadmoe.loadmore": "Cargar más",
- "up.loadmoe.nomore": "No hay más",
- "up.noNetwork.text": "¡Ups! Se perdió la señal de red",
- "up.noNetwork.pleaseCheck": "Por favor verifique la red, o vaya a",
- "up.noNetwork.connect": "Red conectada",
- "up.noNetwork.disconnect": "Sin conexión a internet",
- "up.pagination.previous": "Página anterior",
- "up.pagination.next": "Página siguiente",
- "up.pullRefresh.pull": "Deslizar hacia abajo para actualizar",
- "up.pullRefresh.release": "Soltar para actualizar",
- "up.pullRefresh.refreshing": "Actualizando",
- "up.readMore.expand": "Expandir para leer más",
- "up.readMore.fold": "Contraer",
- "up.search.placeholder": "Ingrese palabra clave",
- "up.signature.penSize": "Tamaño del trazo",
- "up.signature.penColor": "Color del trazo",
- "up.upload.sizeExceed": "Excede el límite de tamaño",
- "up.upload.uploading": "Subiendo",
- "up.upload.previewImageFail": "Error al previsualizar imagen",
- "up.upload.previewVideoFail": "Error al previsualizar vídeo",
- "up.goodsSku.stock": "Inventario",
- "up.goodsSku.price": "Precio",
- "up.goodsSku.amount": "Piezas",
- "up.goodsSku.choosed": "Seleccionado",
- "up.goodsSku.buyAmount": "Cantidad"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/fr.json b/uni_modules/uview-plus/libs/i18n/locales/fr.json
deleted file mode 100644
index 85e262c..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/fr.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "Annuler",
- "up.common.confirm": "Confirmer",
- "up.common.start": "Démarrer",
- "up.common.end": "Terminer",
- "up.common.stop": "Arrêter",
- "up.common.copy": "Copier",
- "up.common.none": "Aucun",
- "up.common.tip": "Conseil",
- "up.common.success": "Succès",
- "up.common.fail": "Échec",
- "up.common.close": "Fermer",
- "up.common.preview": "Aperçu",
- "up.common.re-select": "Resélectionner",
- "up.common.rotate": "Rotation",
- "up.common.pleaseChoose": "Veuillez choisir",
- "up.common.loading": "Chargement",
- "up.common.loading2": "Chargement en cours",
- "up.common.inOperation": "En cours d'opération",
- "up.common.settings": "Paramètres",
- "up.common.retry": "Réessayer",
- "up.common.search": "Rechercher",
- "up.common.more": "Plus",
- "up.common.video": "Vidéo",
- "up.common.file": "Fichier",
- "up.week.one": "Lun",
- "up.week.two": "Mar",
- "up.week.three": "Mer",
- "up.week.four": "Jeu",
- "up.week.five": "Ven",
- "up.week.six": "Sam",
- "up.week.seven": "Dim",
- "up.barcode.error": "Échec de génération du code-barres",
- "up.calendar.chooseDates": "Sélection de dates",
- "up.calendar.disabled": "Cette date est désactivée",
- "up.calendar.daysExceed": "Le nombre de jours sélectionnés ne peut pas dépasser {days} jours",
- "up.calendar.today": "Aujourd'hui",
- "up.cityLocate.locateCity": "Localiser la ville",
- "up.cityLocate.fail": "Échec de localisation, veuillez cliquer pour réessayer.",
- "up.cityLocate.locating": "Localisation en cours",
- "up.code.send": "Obtenir le code de vérification",
- "up.code.resendAfter": "Renvoyer dans X secondes",
- "up.code.resend": "Renvoyer",
- "up.cropper.emptyWidhtOrHeight": "La largeur ou la hauteur de recadrage n'est pas définie",
- "up.empty.car": "Panier vide",
- "up.empty.page": "Page introuvable",
- "up.empty.search": "Aucun résultat de recherche",
- "up.empty.address": "Aucune adresse de livraison",
- "up.empty.wifi": "Aucun Wi-Fi",
- "up.empty.order": "Commande vide",
- "up.empty.coupon": "Aucun coupon",
- "up.empty.favor": "Aucun favori",
- "up.empty.permission": "Aucune autorisation",
- "up.empty.history": "Aucun historique",
- "up.empty.news": "Aucune actualité",
- "up.empty.message": "Liste de messages vide",
- "up.empty.list": "Liste vide",
- "up.empty.data": "Données vides",
- "up.empty.comment": "Aucun commentaire",
- "up.link.copyed": "Lien copié, veuillez ouvrir dans le navigateur",
- "up.loadmoe.loadmore": "Charger plus",
- "up.loadmoe.nomore": "Plus de contenu",
- "up.noNetwork.text": "Oups, le signal réseau est perdu",
- "up.noNetwork.pleaseCheck": "Veuillez vérifier le réseau, ou aller à",
- "up.noNetwork.connect": "Réseau connecté",
- "up.noNetwork.disconnect": "Aucune connexion réseau",
- "up.pagination.previous": "Page précédente",
- "up.pagination.next": "Page suivante",
- "up.pullRefresh.pull": "Tirer pour actualiser",
- "up.pullRefresh.release": "Relâcher pour actualiser",
- "up.pullRefresh.refreshing": "Actualisation en cours",
- "up.readMore.expand": "Développer pour lire la suite",
- "up.readMore.fold": "Réduire",
- "up.search.placeholder": "Veuillez saisir un mot-clé",
- "up.signature.penSize": "Taille du trait",
- "up.signature.penColor": "Couleur du trait",
- "up.upload.sizeExceed": "Dépassement de la limite de taille",
- "up.upload.uploading": "Téléchargement en cours",
- "up.upload.previewImageFail": "Échec de l'aperçu de l'image",
- "up.upload.previewVideoFail": "Échec de l'aperçu de la vidéo",
- "up.goodsSku.stock": "Stock",
- "up.goodsSku.price": "Prix",
- "up.goodsSku.amount": "Pièces",
- "up.goodsSku.choosed": "Sélectionné",
- "up.goodsSku.buyAmount": "Quantité"
-}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/i18n/locales/ja.json b/uni_modules/uview-plus/libs/i18n/locales/ja.json
deleted file mode 100644
index a6c7551..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/ja.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "キャンセル",
- "up.common.confirm": "確認",
- "up.common.start": "開始",
- "up.common.end": "終了",
- "up.common.stop": "停止",
- "up.common.copy": "コピー",
- "up.common.none": "なし",
- "up.common.tip": "ヒント",
- "up.common.success": "成功",
- "up.common.fail": "失敗",
- "up.common.close": "閉じる",
- "up.common.preview": "プレビュー",
- "up.common.re-select": "再選択",
- "up.common.rotate": "回転",
- "up.common.pleaseChoose": "選択してください",
- "up.common.loading": "読み込み中",
- "up.common.loading2": "読み込み中",
- "up.common.inOperation": "操作中",
- "up.common.settings": "設定",
- "up.common.retry": "再試行",
- "up.common.search": "検索",
- "up.common.more": "もっと見る",
- "up.common.video": "ビデオ",
- "up.common.file": "ファイル",
- "up.week.one": "月",
- "up.week.two": "火",
- "up.week.three": "水",
- "up.week.four": "木",
- "up.week.five": "金",
- "up.week.six": "土",
- "up.week.seven": "日",
- "up.barcode.error": "バーコードの生成に失敗しました",
- "up.calendar.chooseDates": "日付選択",
- "up.calendar.disabled": "この日付は無効です",
- "up.calendar.daysExceed": "選択日数は{days}日を超えることはできません",
- "up.calendar.today": "今日",
- "up.cityLocate.locateCity": "都市の位置を特定",
- "up.cityLocate.fail": "位置特定に失敗しました。再試行するにはクリックしてください。",
- "up.cityLocate.locating": "位置特定中",
- "up.code.send": "認証コードを取得",
- "up.code.resendAfter": "X秒後に再送信",
- "up.code.resend": "再送信",
- "up.cropper.emptyWidhtOrHeight": "切り抜き枠の幅または高さが設定されていません",
- "up.empty.car": "ショッピングカートは空です",
- "up.empty.page": "ページが存在しません",
- "up.empty.search": "検索結果がありません",
- "up.empty.address": "配送先住所がありません",
- "up.empty.wifi": "Wi-Fiがありません",
- "up.empty.order": "注文がありません",
- "up.empty.coupon": "クーポンがありません",
- "up.empty.favor": "お気に入りがありません",
- "up.empty.permission": "権限がありません",
- "up.empty.history": "履歴がありません",
- "up.empty.news": "ニュースがありません",
- "up.empty.message": "メッセージがありません",
- "up.empty.list": "リストが空です",
- "up.empty.data": "データがありません",
- "up.empty.comment": "コメントがありません",
- "up.link.copyed": "リンクがコピーされました。ブラウザで開いてください",
- "up.loadmoe.loadmore": "さらに読み込む",
- "up.loadmoe.nomore": "これ以上データがありません",
- "up.noNetwork.text": "ネットワーク信号が失われました",
- "up.noNetwork.pleaseCheck": "ネットワークを確認するか、移動してください",
- "up.noNetwork.connect": "ネットワーク接続済み",
- "up.noNetwork.disconnect": "ネットワーク未接続",
- "up.pagination.previous": "前へ",
- "up.pagination.next": "次へ",
- "up.pullRefresh.pull": "引き下げて更新",
- "up.pullRefresh.release": "指を離して更新",
- "up.pullRefresh.refreshing": "更新中",
- "up.readMore.expand": "全文表示",
- "up.readMore.fold": "折りたたむ",
- "up.search.placeholder": "キーワードを入力してください",
- "up.signature.penSize": "線の太さ",
- "up.signature.penColor": "線の色",
- "up.upload.sizeExceed": "サイズ制限を超えています",
- "up.upload.uploading": "アップロード中",
- "up.upload.previewImageFail": "画像プレビュー失敗",
- "up.upload.previewVideoFail": "ビデオプレビュー失敗",
- "up.goodsSku.stock": "在庫",
- "up.goodsSku.price": "価格",
- "up.goodsSku.amount": "個",
- "up.goodsSku.choosed": "選択済み",
- "up.goodsSku.buyAmount": "購入数量"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/ko.json b/uni_modules/uview-plus/libs/i18n/locales/ko.json
deleted file mode 100644
index cd1f66d..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/ko.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "취소",
- "up.common.confirm": "확인",
- "up.common.start": "시작",
- "up.common.end": "종료",
- "up.common.stop": "정지",
- "up.common.copy": "복사",
- "up.common.none": "없음",
- "up.common.tip": "팁",
- "up.common.success": "성공",
- "up.common.fail": "실패",
- "up.common.close": "닫기",
- "up.common.preview": "미리보기",
- "up.common.re-select": "재선택",
- "up.common.rotate": "회전",
- "up.common.pleaseChoose": "선택해주세요",
- "up.common.loading": "로딩중",
- "up.common.loading2": "로딩중",
- "up.common.inOperation": "작업중",
- "up.common.settings": "설정",
- "up.common.retry": "재시도",
- "up.common.search": "검색",
- "up.common.more": "더보기",
- "up.common.video": "비디오",
- "up.common.file": "파일",
- "up.week.one": "월",
- "up.week.two": "화",
- "up.week.three": "수",
- "up.week.four": "목",
- "up.week.five": "금",
- "up.week.six": "토",
- "up.week.seven": "일",
- "up.barcode.error": "바코드 생성 실패",
- "up.calendar.chooseDates": "날짜 선택",
- "up.calendar.disabled": "해당 날짜는 사용할 수 없습니다",
- "up.calendar.daysExceed": "선택한 날짜 수가 {days}일을 초과할 수 없습니다",
- "up.calendar.today": "오늘",
- "up.cityLocate.locateCity": "도시 위치 찾기",
- "up.cityLocate.fail": "위치 찾기 실패, 다시 시도하려면 클릭하세요.",
- "up.cityLocate.locating": "위치 찾는 중",
- "up.code.send": "인증코드 받기",
- "up.code.resendAfter": "X초 후 재전송",
- "up.code.resend": "재전송",
- "up.cropper.emptyWidhtOrHeight": "자르기 영역의 너비 또는 높이가 설정되지 않았습니다",
- "up.empty.car": "장바구니가 비어 있습니다",
- "up.empty.page": "페이지가 존재하지 않습니다",
- "up.empty.search": "검색 결과가 없습니다",
- "up.empty.address": "배송 주소가 없습니다",
- "up.empty.wifi": "Wi-Fi가 없습니다",
- "up.empty.order": "주문이 없습니다",
- "up.empty.coupon": "쿠폰이 없습니다",
- "up.empty.favor": "즐겨찾기가 없습니다",
- "up.empty.permission": "권한이 없습니다",
- "up.empty.history": "기록이 없습니다",
- "up.empty.news": "뉴스가 없습니다",
- "up.empty.message": "메시지가 없습니다",
- "up.empty.list": "목록이 비어 있습니다",
- "up.empty.data": "데이터가 없습니다",
- "up.empty.comment": "댓글이 없습니다",
- "up.link.copyed": "링크가 복사되었습니다. 브라우저에서 열어주세요",
- "up.loadmoe.loadmore": "더 불러오기",
- "up.loadmoe.nomore": "더 이상 데이터가 없습니다",
- "up.noNetwork.text": "네트워크 신호가 없습니다",
- "up.noNetwork.pleaseCheck": "네트워크를 확인하거나 이동하세요",
- "up.noNetwork.connect": "네트워크 연결됨",
- "up.noNetwork.disconnect": "네트워크 연결 끊김",
- "up.pagination.previous": "이전 페이지",
- "up.pagination.next": "다음 페이지",
- "up.pullRefresh.pull": "당겨서 새로고침",
- "up.pullRefresh.release": "놓아서 새로고침",
- "up.pullRefresh.refreshing": "새로고침 중",
- "up.readMore.expand": "펼쳐서 전체 보기",
- "up.readMore.fold": "접기",
- "up.search.placeholder": "키워드를 입력하세요",
- "up.signature.penSize": "선 굵기",
- "up.signature.penColor": "선 색상",
- "up.upload.sizeExceed": "용량 제한 초과",
- "up.upload.uploading": "업로드 중",
- "up.upload.previewImageFail": "이미지 미리보기 실패",
- "up.upload.previewVideoFail": "비디오 미리보기 실패",
- "up.goodsSku.stock": "재고",
- "up.goodsSku.price": "가격",
- "up.goodsSku.amount": "개",
- "up.goodsSku.choosed": "선택됨",
- "up.goodsSku.buyAmount": "구매 수량"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/ru.json b/uni_modules/uview-plus/libs/i18n/locales/ru.json
deleted file mode 100644
index 1ba1f6c..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/ru.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "Отмена",
- "up.common.confirm": "Подтвердить",
- "up.common.start": "Начало",
- "up.common.end": "Конец",
- "up.common.stop": "Стоп",
- "up.common.copy": "Копировать",
- "up.common.none": "Нет",
- "up.common.tip": "Подсказка",
- "up.common.success": "Успех",
- "up.common.fail": "Ошибка",
- "up.common.close": "Закрыть",
- "up.common.preview": "Предпросмотр",
- "up.common.re-select": "Выбрать снова",
- "up.common.rotate": "Повернуть",
- "up.common.pleaseChoose": "Пожалуйста, выберите",
- "up.common.loading": "Загрузка",
- "up.common.loading2": "Загружается",
- "up.common.inOperation": "В процессе",
- "up.common.settings": "Настройки",
- "up.common.retry": "Повторить",
- "up.common.search": "Поиск",
- "up.common.more": "Больше",
- "up.common.video": "Видео",
- "up.common.file": "Файл",
- "up.week.one": "Пн",
- "up.week.two": "Вт",
- "up.week.three": "Ср",
- "up.week.four": "Чт",
- "up.week.five": "Пт",
- "up.week.six": "Сб",
- "up.week.seven": "Вс",
- "up.barcode.error": "Ошибка генерации штрихкода",
- "up.calendar.chooseDates": "Выбор даты",
- "up.calendar.disabled": "Эта дата отключена",
- "up.calendar.daysExceed": "Количество выбранных дней не может превышать {days} дней",
- "up.calendar.today": "Сегодня",
- "up.cityLocate.locateCity": "Определение города",
- "up.cityLocate.fail": "Ошибка определения местоположения, нажмите для повтора.",
- "up.cityLocate.locating": "Определение местоположения",
- "up.code.send": "Получить код подтверждения",
- "up.code.resendAfter": "Повторная отправка через X секунд",
- "up.code.resend": "Отправить снова",
- "up.cropper.emptyWidhtOrHeight": "Ширина или высота области обрезки не задана",
- "up.empty.car": "Корзина пуста",
- "up.empty.page": "Страница не существует",
- "up.empty.search": "Нет результатов поиска",
- "up.empty.address": "Нет адреса доставки",
- "up.empty.wifi": "Нет Wi-Fi",
- "up.empty.order": "Заказы отсутствуют",
- "up.empty.coupon": "Нет купонов",
- "up.empty.favor": "Нет избранного",
- "up.empty.permission": "Нет разрешения",
- "up.empty.history": "Нет истории",
- "up.empty.news": "Нет новостей",
- "up.empty.message": "Список сообщений пуст",
- "up.empty.list": "Список пуст",
- "up.empty.data": "Нет данных",
- "up.empty.comment": "Нет комментариев",
- "up.link.copyed": "Ссылка скопирована, откройте в браузере",
- "up.loadmoe.loadmore": "Загрузить еще",
- "up.loadmoe.nomore": "Больше нет данных",
- "up.noNetwork.text": "Ой, потеряно сетевое соединение",
- "up.noNetwork.pleaseCheck": "Проверьте сеть или перейдите к",
- "up.noNetwork.connect": "Сеть подключена",
- "up.noNetwork.disconnect": "Нет сетевого подключения",
- "up.pagination.previous": "Предыдущая страница",
- "up.pagination.next": "Следующая страница",
- "up.pullRefresh.pull": "Потяните вниз для обновления",
- "up.pullRefresh.release": "Отпустите для обновления",
- "up.pullRefresh.refreshing": "Обновление",
- "up.readMore.expand": "Развернуть для полного чтения",
- "up.readMore.fold": "Свернуть",
- "up.search.placeholder": "Введите ключевое слово",
- "up.signature.penSize": "Размер штриха",
- "up.signature.penColor": "Цвет штриха",
- "up.upload.sizeExceed": "Превышен лимит размера",
- "up.upload.uploading": "Загрузка",
- "up.upload.previewImageFail": "Ошибка предпросмотра изображения",
- "up.upload.previewVideoFail": "Ошибка предпросмотра видео",
- "up.goodsSku.stock": "Запас",
- "up.goodsSku.price": "Цена",
- "up.goodsSku.amount": "Штук",
- "up.goodsSku.choosed": "Выбрано",
- "up.goodsSku.buyAmount": "Количество"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/th.json b/uni_modules/uview-plus/libs/i18n/locales/th.json
deleted file mode 100644
index 49678b6..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/th.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "ยกเลิก",
- "up.common.confirm": "ยืนยัน",
- "up.common.start": "เริ่มต้น",
- "up.common.end": "สิ้นสุด",
- "up.common.stop": "หยุด",
- "up.common.copy": "คัดลอก",
- "up.common.none": "ไม่มี",
- "up.common.tip": "คำแนะนำ",
- "up.common.success": "สำเร็จ",
- "up.common.fail": "ล้มเหลว",
- "up.common.close": "ปิด",
- "up.common.preview": "ดูตัวอย่าง",
- "up.common.re-select": "เลือกใหม่",
- "up.common.rotate": "หมุน",
- "up.common.pleaseChoose": "กรุณาเลือก",
- "up.common.loading": "กำลังโหลด",
- "up.common.loading2": "กำลังโหลด",
- "up.common.inOperation": "กำลังดำเนินการ",
- "up.common.settings": "การตั้งค่า",
- "up.common.retry": "ลองใหม่",
- "up.common.search": "ค้นหา",
- "up.common.more": "เพิ่มเติม",
- "up.common.video": "วิดีโอ",
- "up.common.file": "ไฟล์",
- "up.week.one": "จันทร์",
- "up.week.two": "อังคาร",
- "up.week.three": "พุธ",
- "up.week.four": "พฤหัสบดี",
- "up.week.five": "ศุกร์",
- "up.week.six": "เสาร์",
- "up.week.seven": "อาทิตย์",
- "up.barcode.error": "สร้างบาร์โค้ดไม่สำเร็จ",
- "up.calendar.chooseDates": "เลือกวันที่",
- "up.calendar.disabled": "วันที่นี้ถูกปิดการใช้งาน",
- "up.calendar.daysExceed": "จำนวนวันที่เลือกต้องไม่เกิน {days} วัน",
- "up.calendar.today": "วันนี้",
- "up.cityLocate.locateCity": "ระบุตำแหน่งเมือง",
- "up.cityLocate.fail": "การระบุตำแหน่งล้มเหลว กรุณาคลิกเพื่อลองใหม่",
- "up.cityLocate.locating": "กำลังระบุตำแหน่ง",
- "up.code.send": "รับรหัสยืนยัน",
- "up.code.resendAfter": "ส่งใหม่ใน X วินาที",
- "up.code.resend": "ส่งใหม่",
- "up.cropper.emptyWidhtOrHeight": "ไม่ได้ตั้งค่าความกว้างหรือความสูงของกรอบตัดภาพ",
- "up.empty.car": "รถเข็นว่างเปล่า",
- "up.empty.page": "ไม่มีหน้านี้",
- "up.empty.search": "ไม่มีผลลัพธ์การค้นหา",
- "up.empty.address": "ไม่มีที่อยู่จัดส่ง",
- "up.empty.wifi": "ไม่มี WiFi",
- "up.empty.order": "ไม่มีคำสั่งซื้อ",
- "up.empty.coupon": "ไม่มีคูปอง",
- "up.empty.favor": "ไม่มีรายการโปรด",
- "up.empty.permission": "ไม่มีสิทธิ์",
- "up.empty.history": "ไม่มีประวัติ",
- "up.empty.news": "ไม่มีรายการข่าว",
- "up.empty.message": "รายการข้อความว่างเปล่า",
- "up.empty.list": "รายการว่างเปล่า",
- "up.empty.data": "ข้อมูลว่างเปล่า",
- "up.empty.comment": "ไม่มีความคิดเห็น",
- "up.link.copyed": "คัดลอกลิงก์แล้ว กรุณาเปิดในเบราว์เซอร์",
- "up.loadmoe.loadmore": "โหลดเพิ่มเติม",
- "up.loadmoe.nomore": "ไม่มีข้อมูลเพิ่มเติม",
- "up.noNetwork.text": "อ๊ะ ขาดการเชื่อมต่อเครือข่าย",
- "up.noNetwork.pleaseCheck": "กรุณาตรวจสอบเครือข่าย หรือไปที่",
- "up.noNetwork.connect": "เชื่อมต่อเครือข่ายแล้ว",
- "up.noNetwork.disconnect": "ไม่มีการเชื่อมต่อเครือข่าย",
- "up.pagination.previous": "หน้าก่อนหน้า",
- "up.pagination.next": "หน้าถัดไป",
- "up.pullRefresh.pull": "ดึงเพื่อรีเฟรช",
- "up.pullRefresh.release": "ปล่อยเพื่อรีเฟรช",
- "up.pullRefresh.refreshing": "กำลังรีเฟรช",
- "up.readMore.expand": "ขยายเพื่ออ่านทั้งหมด",
- "up.readMore.fold": "ย่อ",
- "up.search.placeholder": "กรุณาใส่คำสำคัญ",
- "up.signature.penSize": "ขนาดเส้น",
- "up.signature.penColor": "สีเส้น",
- "up.upload.sizeExceed": "เกินขนาดที่กำหนด",
- "up.upload.uploading": "กำลังอัปโหลด",
- "up.upload.previewImageFail": "ดูตัวอย่างภาพไม่สำเร็จ",
- "up.upload.previewVideoFail": "ดูตัวอย่างวิดีโอไม่สำเร็จ",
- "up.goodsSku.stock": "สินค้าคงคลัง",
- "up.goodsSku.price": "ราคา",
- "up.goodsSku.amount": "ชิ้น",
- "up.goodsSku.choosed": "เลือกแล้ว",
- "up.goodsSku.buyAmount": "จำนวน"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/zh-Hans.json b/uni_modules/uview-plus/libs/i18n/locales/zh-Hans.json
deleted file mode 100644
index b0ea5bb..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/zh-Hans.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "取消",
- "up.common.confirm": "确定",
- "up.common.start": "开始",
- "up.common.end": "结束",
- "up.common.stop": "停止",
- "up.common.copy": "复制",
- "up.common.none": "暂无",
- "up.common.tip": "提示",
- "up.common.success": "成功",
- "up.common.fail": "失败",
- "up.common.close": "关闭",
- "up.common.preview": "预览",
- "up.common.re-select": "重选",
- "up.common.rotate": "旋转",
- "up.common.pleaseChoose": "请选择",
- "up.common.loading": "加载中",
- "up.common.loading2": "正在加载",
- "up.common.inOperation": "操作中",
- "up.common.settings": "设置",
- "up.common.retry": "重试",
- "up.common.search": "搜索",
- "up.common.more": "更多",
- "up.common.video": "视频",
- "up.common.file": "文件",
- "up.week.one": "一",
- "up.week.two": "二",
- "up.week.three": "三",
- "up.week.four": "四",
- "up.week.five": "五",
- "up.week.six": "六",
- "up.week.seven": "日",
- "up.barcode.error": "生成条码失败",
- "up.calendar.chooseDates": "日期选择",
- "up.calendar.disabled": "该日期已禁用",
- "up.calendar.daysExceed": "选择天数不能超过{days}天",
- "up.calendar.today": "今天",
- "up.cityLocate.locateCity": "定位城市",
- "up.cityLocate.fail": "定位失败,请点击重试。",
- "up.cityLocate.locating": "定位中",
- "up.code.send": "获取验证码",
- "up.code.resendAfter": "X秒重新获取",
- "up.code.resend": "重新获取",
- "up.cropper.emptyWidhtOrHeight": "裁剪框的宽或高没有设置",
- "up.empty.car": "购物车为空",
- "up.empty.page": "页面不存在",
- "up.empty.search": "没有搜索结果",
- "up.empty.address": "没有收货地址",
- "up.empty.wifi": "没有WiFi",
- "up.empty.order": "订单为空",
- "up.empty.coupon": "没有优惠券",
- "up.empty.favor": "暂无收藏",
- "up.empty.permission": "无权限",
- "up.empty.history": "无历史记录",
- "up.empty.news": "无新闻列表",
- "up.empty.message": "消息列表为空",
- "up.empty.list": "列表为空",
- "up.empty.data": "数据为空",
- "up.empty.comment": "暂无评论",
- "up.link.copyed": "链接已复制,请在浏览器打开",
- "up.loadmoe.loadmore": "加载更多",
- "up.loadmoe.nomore": "没有更多了",
- "up.noNetwork.text": "哎呀,网络信号丢失",
- "up.noNetwork.pleaseCheck": "请检查网络,或前往",
- "up.noNetwork.connect": "网络已连接",
- "up.noNetwork.disconnect": "无网络连接",
- "up.pagination.previous": "上一页",
- "up.pagination.next": "下一页",
- "up.pullRefresh.pull": "下拉刷新",
- "up.pullRefresh.release": "释放刷新",
- "up.pullRefresh.refreshing": "正在刷新",
- "up.readMore.expand": "展开阅读全文",
- "up.readMore.fold": "收起",
- "up.search.placeholder": "请输入关键字",
- "up.signature.penSize": "笔画大小",
- "up.signature.penColor": "笔画颜色",
- "up.upload.sizeExceed": "超过大小限制",
- "up.upload.uploading": "上传中",
- "up.upload.previewImageFail": "预览图片失败",
- "up.upload.previewVideoFail": "预览视频失败",
- "up.goodsSku.stock": "库存",
- "up.goodsSku.price": "价格",
- "up.goodsSku.amount": "件",
- "up.goodsSku.choosed": "已选",
- "up.goodsSku.buyAmount": "购买数量"
-}
diff --git a/uni_modules/uview-plus/libs/i18n/locales/zh-Hant.json b/uni_modules/uview-plus/libs/i18n/locales/zh-Hant.json
deleted file mode 100644
index bbd71f4..0000000
--- a/uni_modules/uview-plus/libs/i18n/locales/zh-Hant.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "up.common.cancel": "取消",
- "up.common.confirm": "確定",
- "up.common.start": "開始",
- "up.common.end": "結束",
- "up.common.stop": "停止",
- "up.common.copy": "複製",
- "up.common.none": "暫無",
- "up.common.tip": "提示",
- "up.common.success": "成功",
- "up.common.fail": "失敗",
- "up.common.close": "關閉",
- "up.common.preview": "預覽",
- "up.common.re-select": "重選",
- "up.common.rotate": "旋轉",
- "up.common.pleaseChoose": "請選擇",
- "up.common.loading": "加載中",
- "up.common.loading2": "正在加載",
- "up.common.inOperation": "操作中",
- "up.common.settings": "設置",
- "up.common.retry": "重試",
- "up.common.search": "搜索",
- "up.common.more": "更多",
- "up.common.video": "視頻",
- "up.common.file": "文件",
- "up.week.one": "一",
- "up.week.two": "二",
- "up.week.three": "三",
- "up.week.four": "四",
- "up.week.five": "五",
- "up.week.six": "六",
- "up.week.seven": "日",
- "up.barcode.error": "生成條碼失敗",
- "up.calendar.chooseDates": "日期選擇",
- "up.calendar.disabled": "該日期已禁用",
- "up.calendar.daysExceed": "選擇天數不能超過{days}天",
- "up.calendar.today": "今天",
- "up.cityLocate.locateCity": "定位城市",
- "up.cityLocate.fail": "定位失敗,請點擊重試。",
- "up.cityLocate.locating": "定位中",
- "up.code.send": "獲取驗證碼",
- "up.code.resendAfter": "X秒重新獲取",
- "up.code.resend": "重新獲取",
- "up.cropper.emptyWidhtOrHeight": "裁剪框的寬或高沒有設置",
- "up.empty.car": "購物車為空",
- "up.empty.page": "頁面不存在",
- "up.empty.search": "沒有搜索結果",
- "up.empty.address": "沒有收貨地址",
- "up.empty.wifi": "沒有WiFi",
- "up.empty.order": "訂單為空",
- "up.empty.coupon": "沒有優惠券",
- "up.empty.favor": "暫無收藏",
- "up.empty.permission": "無權限",
- "up.empty.history": "無歷史記錄",
- "up.empty.news": "無新聞列表",
- "up.empty.message": "消息列表為空",
- "up.empty.list": "列表為空",
- "up.empty.data": "數據為空",
- "up.empty.comment": "暫無評論",
- "up.link.copyed": "鏈接已複製,請在瀏覽器打開",
- "up.loadmoe.loadmore": "加載更多",
- "up.loadmoe.nomore": "沒有更多了",
- "up.noNetwork.text": "哎呀,網絡信號丟失",
- "up.noNetwork.pleaseCheck": "請檢查網絡,或前往",
- "up.noNetwork.connect": "網絡已連接",
- "up.noNetwork.disconnect": "無網絡連接",
- "up.pagination.previous": "上一頁",
- "up.pagination.next": "下一頁",
- "up.pullRefresh.pull": "下拉刷新",
- "up.pullRefresh.release": "釋放刷新",
- "up.pullRefresh.refreshing": "正在刷新",
- "up.readMore.expand": "展開閱讀全文",
- "up.readMore.fold": "收起",
- "up.search.placeholder": "請輸入關鍵字",
- "up.signature.penSize": "筆畫大小",
- "up.signature.penColor": "筆畫顏色",
- "up.upload.sizeExceed": "超過大小限制",
- "up.upload.uploading": "上傳中",
- "up.upload.previewImageFail": "預覽圖片失敗",
- "up.upload.previewVideoFail": "預覽視頻失敗",
- "up.goodsSku.stock": "庫存",
- "up.goodsSku.price": "價格",
- "up.goodsSku.amount": "件",
- "up.goodsSku.choosed": "已選",
- "up.goodsSku.buyAmount": "購買數量"
-}
diff --git a/uni_modules/uview-plus/libs/luch-request/core/Request.js b/uni_modules/uview-plus/libs/luch-request/core/Request.js
index 4ddce76..f7a22dd 100644
--- a/uni_modules/uview-plus/libs/luch-request/core/Request.js
+++ b/uni_modules/uview-plus/libs/luch-request/core/Request.js
@@ -33,8 +33,7 @@ export default class Request {
* @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
* @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
*/
- constructor(arg = {}) {
- // console.info('初始化luch-request')
+ constructor(arg = {}) {
if (!isPlainObject(arg)) {
arg = {}
console.warn('设置全局参数必须接收一个Object')
diff --git a/uni_modules/uview-plus/libs/mixin/mixin.js b/uni_modules/uview-plus/libs/mixin/mixin.js
index 8657ec4..7166ec3 100644
--- a/uni_modules/uview-plus/libs/mixin/mixin.js
+++ b/uni_modules/uview-plus/libs/mixin/mixin.js
@@ -1,323 +1,201 @@
-import { defineMixin } from '../vue'
-import { deepMerge, $parent, sleep } from '../function/index'
-import test from '../function/test'
-import route from '../util/route'
-import {
- applyNativeThemeUI,
- applyNativeThemeUIDeferred,
- getThemeCardStyle,
- getThemeIsDark,
- getThemePageStyle,
- getThemeVar,
- getThemeVarsForStyle,
- syncThemeRuntimeFromStorage
-} from '../theme/runtime'
-// #ifdef APP-NVUE
-// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
-const dom = (typeof uni !== 'undefined' && uni && typeof uni.requireNativePlugin === 'function')
- ? uni.requireNativePlugin('dom')
- : null
-// #endif
-
-export const mixin = defineMixin({
- // 定义每个组件都可能需要用到的外部样式以及类名
- props: {
- // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
- customStyle: {
- type: [Object, String],
- default: () => ({})
- },
- customClass: {
- type: String,
- default: ''
- },
- // 跳转的页面路径
- url: {
- type: String,
- default: ''
- },
- // 页面跳转的类型
- linkType: {
- type: String,
- default: 'navigateTo'
- }
- },
- data() {
- return {
- __upPageThemeChangeHandler: null,
- upThemeVersion: 0
- }
- },
- onLoad() {
- // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
- this.upBindGetRect()
- this.upInitThemeVersion()
- if (this.upIsPageScope()) {
- this.upApplyNativeThemeUI()
- if (typeof uni !== 'undefined' && typeof uni.$on === 'function' && !this.__upPageThemeChangeHandler) {
- this.__upPageThemeChangeHandler = () => {
- this.upApplyNativeThemeUI()
- }
- uni.$on('uThemeChange', this.__upPageThemeChangeHandler)
- }
- }
- },
- onShow() {
- if (this.upIsPageScope()) {
- this.upApplyNativeThemeUI()
- }
- },
- created() {
- // 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u
- this.upBindGetRect()
- this.upInitThemeVersion()
- if (typeof uni !== 'undefined' && typeof uni.$on === 'function') {
- this.__uThemeChangeHandler = (payload = {}) => {
- this.upSyncThemeVersion(payload)
- this.upClearUCache()
- if (typeof this.$forceUpdate === 'function') {
- this.$forceUpdate()
- }
- }
- uni.$on('uThemeChange', this.__uThemeChangeHandler)
- }
- },
- computed: {
- // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
- // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
- // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
- $u() {
- this.upThemeVersion
- // #ifndef APP-NVUE
- const instance = this.$
- if (instance?.__upUCache) {
- return instance.__upUCache
- }
- // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
- let mergeU = deepMerge(uni.$u, {
- props: undefined,
- http: undefined,
- mixin: undefined
- })
- // 缓存结果避免每次计算
- if (instance) {
- instance.__upUCache = mergeU
- return instance.__upUCache
- }
- return mergeU
- // #endif
- // #ifdef APP-NVUE
- return uni.$u
- // #endif
- },
- upThemeIsDark() {
- this.upThemeVersion
- return getThemeIsDark(this.$u)
- },
- upThemeVars() {
- this.upThemeVersion
- return getThemeVarsForStyle(this.$u)
- },
- upThemePageStyle() {
- this.upThemeVersion
- return getThemePageStyle(this.$u)
- },
- upThemeCardStyle() {
- this.upThemeVersion
- return getThemeCardStyle(this.$u)
- },
- /**
- * 生成bem规则类名
- * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
- * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
- * @param {String} name 组件名称
- * @param {Array} fixed 一直会存在的类名
- * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
- * @returns {Array|string}
- */
- bem() {
- return function (name, fixed, change) {
- // 类名前缀
- const prefix = `u-${name}--`
- const classes = {}
- if (fixed) {
- fixed.map((item) => {
- // 这里的类名,会一直存在
- classes[prefix + this[item]] = true
- })
- }
- if (change) {
- change.map((item) => {
- // 这里的类名,会根据this[item]的值为true或者false,而进行添加或者移除某一个类
- this[item] ? (classes[prefix + item] = this[item]) : (delete classes[prefix + item])
- })
- }
- return Object.keys(classes)
- // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
- // #ifdef MP-ALIPAY || MP-TOUTIAO || MP-LARK
- .join(' ')
- // #endif
- }
- }
- },
- methods: {
- upClearUCache() {
- if (this.$) {
- this.$.__upUCache = null
- }
- },
- upBindGetRect() {
- const upU = this.$u || (typeof uni !== 'undefined' ? uni.$u : null)
- if (upU) {
- upU.getRect = this.$uGetRect
- } else if (typeof uni !== 'undefined') {
- uni.$u = {
- getRect: this.$uGetRect
- }
- }
- },
- upReadThemeVersion() {
- return Number((typeof uni !== 'undefined' && uni.$u && uni.$u.theme && uni.$u.theme.version) || 0)
- },
- upInitThemeVersion() {
- const version = this.upReadThemeVersion()
- if (version) {
- this.upThemeVersion = version
- }
- },
- upSyncThemeVersion(payload = {}) {
- const version = Number(payload.version || this.upReadThemeVersion() || 0)
- this.upThemeVersion = version || Number(this.upThemeVersion || 0) + 1
- },
- upIsPageScope() {
- return !!(this.$page || this.route || this.$options?.mpType === 'page')
- },
- upHasProp(propName) {
- const vnodeProps = this.$?.vnode?.props || {}
- const kebabName = propName.replace(/[A-Z]/g, (s) => `-${s.toLowerCase()}`)
- return Object.prototype.hasOwnProperty.call(vnodeProps, propName)
- || Object.prototype.hasOwnProperty.call(vnodeProps, kebabName)
- },
- upThemeVar(varName, fallbackColor) {
- this.upThemeVersion
- return getThemeVar(varName, fallbackColor, this.$u)
- },
- upApplyNativeThemeUI() {
- syncThemeRuntimeFromStorage(this.$u)
- this.upSyncThemeVersion()
- applyNativeThemeUIDeferred(this.$u)
- },
- // 跳转某一个页面
- openPage(urlKey = 'url') {
- const url = this[urlKey]
- if (url) {
- // h5官方回应:发行h5会自动摇树优化,所有使用uni的地方,都会被直接转换成具体的API调用 https://ask.dcloud.net.cn/question/161523?notification_id-1201922__rf-false__item_id-226372
- // 使用封装的 route 进行跳转(直接调用方法),不使用 uni 对象
- route({ type: this.linkType, url })
- // 执行类似uni.navigateTo的方法
- // uni[this.linkType]({
- // url
- // })
- }
- },
- navTo(url = '', linkType = 'navigateTo') {
- route({ type: this.linkType, url })
- },
- // 查询节点信息
- // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
- // 解决办法为在组件根部再套一个没有任何作用的view元素
- $uGetRect(selector, all) {
- return new Promise((resolve) => {
- // #ifndef APP-NVUE
- uni.createSelectorQuery()
- .in(this)[all ? 'selectAll' : 'select'](selector)
- .boundingClientRect((rect) => {
- if (all && Array.isArray(rect) && rect.length) {
- resolve(rect)
- }
- if (!all && rect) {
- resolve(rect)
- }
- })
- .exec()
- // #endif
-
- // #ifdef APP-NVUE
- sleep(30).then(() => {
- let selectorNvue = selector.substring(1) // 去掉开头的#或者.
- let selectorRef = this.$refs[selectorNvue]
- if (!selectorRef) {
- // console.log('不存在元素,请检查是否设置了ref属性' + selectorNvue + '。')
- resolve({
- with: 0,
- height: 0,
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- })
- }
- dom.getComponentRect(selectorRef, res => {
- // console.log(res)
- resolve(res.size)
- })
- })
- // #endif
- })
- },
- getParentData(parentName = '') {
- // 避免在created中去定义parent变量
- if (!this.parent) this.parent = {}
- // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this)
- // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
- // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
- // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
- this.parent = $parent.call(this, parentName)
- if (this.parent.children) {
- // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
- this.parent.children.indexOf(this) === -1 && this.parent.children.push(this)
- }
- if (this.parent && this.parentData) {
- // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
- Object.keys(this.parentData).map((key) => {
- this.parentData[key] = this.parent[key]
- })
- }
- },
- // 阻止事件冒泡
- preventEvent(e) {
- e && typeof (e.stopPropagation) === 'function' && e.stopPropagation()
- },
- // 空操作
- noop(e) {
- this.preventEvent(e)
- }
- },
- onReachBottom() {
- uni.$emit('uOnReachBottom')
- },
- beforeUnmount() {
- // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
- // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
- if (this.parent && test.array(this.parent.children)) {
- // 组件销毁时,移除父组件中的children数组中对应的实例
- const childrenList = this.parent.children
- childrenList.map((child, index) => {
- // 如果相等,则移除
- if (child === this) {
- childrenList.splice(index, 1)
- }
- })
- }
- if (typeof uni !== 'undefined' && typeof uni.$off === 'function' && this.__uThemeChangeHandler) {
- uni.$off('uThemeChange', this.__uThemeChangeHandler)
- this.__uThemeChangeHandler = null
- }
- if (typeof uni !== 'undefined' && typeof uni.$off === 'function' && this.__upPageThemeChangeHandler) {
- uni.$off('uThemeChange', this.__upPageThemeChangeHandler)
- this.__upPageThemeChangeHandler = null
- }
- }
-})
-
-export default mixin
+import { defineMixin } from '../vue'
+import { deepMerge, $parent, sleep } from '../function/index'
+import test from '../function/test'
+import route from '../util/route'
+// #ifdef APP-NVUE
+// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
+const dom = uni.requireNativePlugin('dom')
+// #endif
+
+export const mixin = defineMixin({
+ // 定义每个组件都可能需要用到的外部样式以及类名
+ props: {
+ // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
+ customStyle: {
+ type: [Object, String],
+ default: () => ({})
+ },
+ customClass: {
+ type: String,
+ default: ''
+ },
+ // 跳转的页面路径
+ url: {
+ type: String,
+ default: ''
+ },
+ // 页面跳转的类型
+ linkType: {
+ type: String,
+ default: 'navigateTo'
+ }
+ },
+ data() {
+ return {}
+ },
+ onLoad() {
+ // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
+ this.$u.getRect = this.$uGetRect
+ },
+ created() {
+ // 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u
+ this.$u.getRect = this.$uGetRect
+ },
+ computed: {
+ // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
+ // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
+ // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
+ $u() {
+ // #ifndef APP-NVUE
+ // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
+ return deepMerge(uni.$u, {
+ props: undefined,
+ http: undefined,
+ mixin: undefined
+ })
+ // #endif
+ // #ifdef APP-NVUE
+ return uni.$u
+ // #endif
+ },
+ /**
+ * 生成bem规则类名
+ * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
+ * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
+ * @param {String} name 组件名称
+ * @param {Array} fixed 一直会存在的类名
+ * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
+ * @returns {Array|string}
+ */
+ bem() {
+ return function (name, fixed, change) {
+ // 类名前缀
+ const prefix = `u-${name}--`
+ const classes = {}
+ if (fixed) {
+ fixed.map((item) => {
+ // 这里的类名,会一直存在
+ classes[prefix + this[item]] = true
+ })
+ }
+ if (change) {
+ change.map((item) => {
+ // 这里的类名,会根据this[item]的值为true或者false,而进行添加或者移除某一个类
+ this[item] ? (classes[prefix + item] = this[item]) : (delete classes[prefix + item])
+ })
+ }
+ return Object.keys(classes)
+ // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
+ // #ifdef MP-ALIPAY || MP-TOUTIAO || MP-LARK
+ .join(' ')
+ // #endif
+ }
+ }
+ },
+ methods: {
+ // 跳转某一个页面
+ openPage(urlKey = 'url') {
+ const url = this[urlKey]
+ if (url) {
+ // h5官方回应:发行h5会自动摇树优化,所有使用uni的地方,都会被直接转换成具体的API调用 https://ask.dcloud.net.cn/question/161523?notification_id-1201922__rf-false__item_id-226372
+ // 使用封装的 route 进行跳转(直接调用方法),不使用 uni 对象
+ route({ type: this.linkType, url })
+ // 执行类似uni.navigateTo的方法
+ // uni[this.linkType]({
+ // url
+ // })
+ }
+ },
+ navTo(url = '', linkType = 'navigateTo') {
+ route({ type: this.linkType, url })
+ },
+ // 查询节点信息
+ // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
+ // 解决办法为在组件根部再套一个没有任何作用的view元素
+ $uGetRect(selector, all) {
+ return new Promise((resolve) => {
+ // #ifndef APP-NVUE
+ uni.createSelectorQuery()
+ .in(this)[all ? 'selectAll' : 'select'](selector)
+ .boundingClientRect((rect) => {
+ if (all && Array.isArray(rect) && rect.length) {
+ resolve(rect)
+ }
+ if (!all && rect) {
+ resolve(rect)
+ }
+ })
+ .exec()
+ // #endif
+
+ // #ifdef APP-NVUE
+ sleep(30).then(() => {
+ let selectorNvue = selector.substring(1) // 去掉开头的#或者.
+ let selectorRef = this.$refs[selectorNvue]
+ if (!selectorRef) {
+ // console.log('不存在元素,请检查是否设置了ref属性' + selectorNvue + '。')
+ resolve({
+ with: 0,
+ height: 0,
+ left: 0,
+ right: 0,
+ top: 0,
+ bottom: 0
+ })
+ }
+ dom.getComponentRect(selectorRef, res => {
+ // console.log(res)
+ resolve(res.size)
+ })
+ })
+ // #endif
+ })
+ },
+ getParentData(parentName = '') {
+ // 避免在created中去定义parent变量
+ if (!this.parent) this.parent = {}
+ // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this)
+ // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
+ // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
+ // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
+ this.parent = $parent.call(this, parentName)
+ if (this.parent.children) {
+ // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
+ this.parent.children.indexOf(this) === -1 && this.parent.children.push(this)
+ }
+ if (this.parent && this.parentData) {
+ // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
+ Object.keys(this.parentData).map((key) => {
+ this.parentData[key] = this.parent[key]
+ })
+ }
+ },
+ // 阻止事件冒泡
+ preventEvent(e) {
+ e && typeof (e.stopPropagation) === 'function' && e.stopPropagation()
+ },
+ // 空操作
+ noop(e) {
+ this.preventEvent(e)
+ }
+ },
+ onReachBottom() {
+ uni.$emit('uOnReachBottom')
+ },
+ beforeUnmount() {
+ // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
+ // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
+ if (this.parent && test.array(this.parent.children)) {
+ // 组件销毁时,移除父组件中的children数组中对应的实例
+ const childrenList = this.parent.children
+ childrenList.map((child, index) => {
+ // 如果相等,则移除
+ if (child === this) {
+ childrenList.splice(index, 1)
+ }
+ })
+ }
+ }
+})
+
+export default mixin
diff --git a/uni_modules/uview-plus/libs/mixin/mpMixin.js b/uni_modules/uview-plus/libs/mixin/mpMixin.js
index ff224c4..395936f 100644
--- a/uni_modules/uview-plus/libs/mixin/mpMixin.js
+++ b/uni_modules/uview-plus/libs/mixin/mpMixin.js
@@ -1,13 +1,13 @@
-import { defineMixin } from '../vue'
-
-export const mpMixin = defineMixin({
- // #ifdef MP-WEIXIN
- // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
- options: {
- virtualHost: true
- }
- // #endif
-})
-
-export default mpMixin
-
+import { defineMixin } from '../vue'
+
+export const mpMixin = defineMixin({
+ // #ifdef MP-WEIXIN
+ // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
+ options: {
+ virtualHost: true
+ }
+ // #endif
+})
+
+export default mpMixin
+
diff --git a/uni_modules/uview-plus/libs/mixin/mpShare.js b/uni_modules/uview-plus/libs/mixin/mpShare.js
index caf53c3..3f60ccf 100644
--- a/uni_modules/uview-plus/libs/mixin/mpShare.js
+++ b/uni_modules/uview-plus/libs/mixin/mpShare.js
@@ -1,26 +1,26 @@
-import { defineMixin } from '../vue'
-import { queryParams } from '../function/index'
-export const mpShare = defineMixin({
- data() {
- return {
- mpShare: {
- title: '', // 默认为小程序名称
- path: '', // 默认为当前页面路径
- imageUrl: '' // 默认为当前页面的截图
- }
- }
- },
- async onLoad(options) {
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- this.mpShare.path = page.route + queryParams(options);
- },
- onShareAppMessage(res) {
- if (res.from === 'button') {// 来自页面内分享按钮
- console.log(res.target)
- }
- return this.mpShare;
- }
-})
-
-export default mpShare
+import { defineMixin } from '../vue'
+import { queryParams } from '../function/index'
+export const mpShare = defineMixin({
+ data() {
+ return {
+ mpShare: {
+ title: '', // 默认为小程序名称
+ path: '', // 默认为当前页面路径
+ imageUrl: '' // 默认为当前页面的截图
+ }
+ }
+ },
+ async onLoad(options) {
+ var pages = getCurrentPages();
+ var page = pages[pages.length - 1];
+ this.mpShare.path = page.route + queryParams(options);
+ },
+ onShareAppMessage(res) {
+ if (res.from === 'button') {// 来自页面内分享按钮
+ console.log(res.target)
+ }
+ return this.mpShare;
+ }
+})
+
+export default mpShare
diff --git a/uni_modules/uview-plus/libs/mixin/touch.js b/uni_modules/uview-plus/libs/mixin/touch.js
index 9dfc2c6..e45505a 100644
--- a/uni_modules/uview-plus/libs/mixin/touch.js
+++ b/uni_modules/uview-plus/libs/mixin/touch.js
@@ -1,61 +1,61 @@
-import { defineMixin } from '../vue'
-
-const MIN_DISTANCE = 10
-
-function getDirection(x, y) {
- if (x > y && x > MIN_DISTANCE) {
- return 'horizontal'
- }
- if (y > x && y > MIN_DISTANCE) {
- return 'vertical'
- }
- return ''
-}
-
-export const touchMixin = defineMixin({
- methods: {
- getTouchPoint(e) {
- if (!e) {
- return {
- x: 0,
- y: 0
- }
- } if (e.touches && e.touches[0]) {
- return {
- x: e.touches[0].pageX,
- y: e.touches[0].pageY
- }
- } if (e.changedTouches && e.changedTouches[0]) {
- return {
- x: e.changedTouches[0].pageX,
- y: e.changedTouches[0].pageY
- }
- }
- return {
- x: e.clientX || 0,
- y: e.clientY || 0
- }
- },
- resetTouchStatus() {
- this.direction = ''
- this.deltaX = 0
- this.deltaY = 0
- this.offsetX = 0
- this.offsetY = 0
- },
- touchStart(event) {
- this.resetTouchStatus()
- const touch = this.getTouchPoint(event)
- this.startX = touch.x
- this.startY = touch.y
- },
- touchMove(event) {
- const touch = this.getTouchPoint(event)
- this.deltaX = touch.x - this.startX
- this.deltaY = touch.y - this.startY
- this.offsetX = Math.abs(this.deltaX)
- this.offsetY = Math.abs(this.deltaY)
- this.direction = this.direction || getDirection(this.offsetX, this.offsetY)
- }
- }
-})
+import { defineMixin } from '../vue'
+
+const MIN_DISTANCE = 10
+
+function getDirection(x, y) {
+ if (x > y && x > MIN_DISTANCE) {
+ return 'horizontal'
+ }
+ if (y > x && y > MIN_DISTANCE) {
+ return 'vertical'
+ }
+ return ''
+}
+
+export const touchMixin = defineMixin({
+ methods: {
+ getTouchPoint(e) {
+ if (!e) {
+ return {
+ x: 0,
+ y: 0
+ }
+ } if (e.touches && e.touches[0]) {
+ return {
+ x: e.touches[0].pageX,
+ y: e.touches[0].pageY
+ }
+ } if (e.changedTouches && e.changedTouches[0]) {
+ return {
+ x: e.changedTouches[0].pageX,
+ y: e.changedTouches[0].pageY
+ }
+ }
+ return {
+ x: e.clientX || 0,
+ y: e.clientY || 0
+ }
+ },
+ resetTouchStatus() {
+ this.direction = ''
+ this.deltaX = 0
+ this.deltaY = 0
+ this.offsetX = 0
+ this.offsetY = 0
+ },
+ touchStart(event) {
+ this.resetTouchStatus()
+ const touch = this.getTouchPoint(event)
+ this.startX = touch.x
+ this.startY = touch.y
+ },
+ touchMove(event) {
+ const touch = this.getTouchPoint(event)
+ this.deltaX = touch.x - this.startX
+ this.deltaY = touch.y - this.startY
+ this.offsetX = Math.abs(this.deltaX)
+ this.offsetY = Math.abs(this.deltaY)
+ this.direction = this.direction || getDirection(this.offsetX, this.offsetY)
+ }
+ }
+})
diff --git a/uni_modules/uview-plus/libs/root/LICENSE b/uni_modules/uview-plus/libs/root/LICENSE
deleted file mode 100644
index d5dd02b..0000000
--- a/uni_modules/uview-plus/libs/root/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2024-present, Skiyee (Sky)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/uni_modules/uview-plus/libs/root/index.js b/uni_modules/uview-plus/libs/root/index.js
deleted file mode 100644
index a5afb25..0000000
--- a/uni_modules/uview-plus/libs/root/index.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import { dirname, relative, resolve } from 'node:path'
-import { fileURLToPath } from 'node:url'
-import process from 'node:process'
-import { existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs'
-
-import { createFilter, normalizePath } from 'vite'
-
-import { transformNvuePage, transformPage } from './page.js'
-import { rebuildUpApp, registerUpApp } from './root.js'
-import { loadPagesJson, normalizePlatformPath, toArray } from './utils.js'
-
-const rootLibPath = normalizePath(dirname(fileURLToPath(import.meta.url)))
-
-export default function UniUpRoot(options = {}) {
- const rootOptions = {
- enabledVirtualHost: false,
- enabledGlobalRef: false,
- rootFileName: 'App.up',
- autoCreateRootFile: true,
- excludePages: [],
- ...options,
- }
- const rootFileName = String(rootOptions.rootFileName || 'App.up').replace(/\.vue$/i, '')
-
- const detectProjectRoot = () => {
- const cwd = normalizePath(process.env.INIT_CWD || process.cwd())
- const envInputDir = process.env.UNI_INPUT_DIR ? normalizePath(process.env.UNI_INPUT_DIR) : ''
- const cliRootPath = normalizePath(resolve(cwd, 'src'))
- const hbuilderRootPath = cwd
-
- const isPageRoot = (path) => existsSync(resolve(path, 'pages.json'))
-
- if (envInputDir && isPageRoot(envInputDir)) {
- const projectType = envInputDir.endsWith('/src') ? 'cli' : 'hbuilder'
- return { rootPath: envInputDir, projectType }
- }
-
- if (isPageRoot(cliRootPath)) {
- return { rootPath: cliRootPath, projectType: 'cli' }
- }
-
- if (isPageRoot(hbuilderRootPath)) {
- return { rootPath: hbuilderRootPath, projectType: 'hbuilder' }
- }
-
- return {
- rootPath: envInputDir || cliRootPath,
- projectType: envInputDir && !envInputDir.endsWith('/src') ? 'hbuilder' : 'cli',
- }
- }
-
- const projectInfo = detectProjectRoot()
- const rootPath = normalizePath(projectInfo.rootPath)
- const appUpPath = normalizePath(resolve(rootPath, `${rootFileName}.vue`))
- const rootToastHostPath = normalizePath(resolve(rootLibPath, 'root-toast-host.vue'))
- const nvueRootPath = normalizePath(resolve(rootPath, 'uni_modules/uview-plus/libs/root/nvue-root.vue'))
- const themeRuntimePath = normalizePath(resolve(rootPath, 'uni_modules/uview-plus/libs/theme/runtime.js'))
- const pagesPath = normalizePath(resolve(rootPath, 'pages.json'))
- const excludedPaths = toArray(rootOptions.excludePages)
- .filter(Boolean)
- .map(path => normalizePath(resolve(rootPath, path)))
-
- const mainFiles = [
- normalizePath(resolve(rootPath, 'main.ts')),
- normalizePath(resolve(rootPath, 'main.js')),
- ]
-
- const getRelativeImportPath = (fromFile, toFile) => {
- let importPath = normalizePath(relative(dirname(fromFile), toFile))
- if (!importPath.startsWith('.')) {
- importPath = `./${importPath}`
- }
- return importPath
- }
-
- let pagesJson = []
- let pagesJsonMtimeMs = 0
- let hasPlatformPlugin = false
-
- const ensureRootFile = () => {
- if (!rootOptions.autoCreateRootFile) return
- if (existsSync(appUpPath)) return
-
- const defaultRootSfc = `
-\t
-
-`
-
- mkdirSync(dirname(appUpPath), { recursive: true })
- writeFileSync(appUpPath, defaultRootSfc, 'utf-8')
- }
-
- const refreshPagesJson = () => {
- if (!existsSync(pagesPath)) return
- const mtimeMs = statSync(pagesPath).mtimeMs
- if (mtimeMs === pagesJsonMtimeMs && pagesJson.length) return
- pagesJson = loadPagesJson(pagesPath, rootPath)
- pagesJsonMtimeMs = mtimeMs
- }
-
- return {
- name: 'vite-plugin-uni-up-root',
- enforce: 'pre',
- configResolved({ plugins }) {
- hasPlatformPlugin = plugins.some(v => v.name === 'vite-plugin-uni-platform')
- },
- buildStart() {
- ensureRootFile()
- refreshPagesJson()
- },
- async transform(code, id) {
- let ms = null
- const isSfcBlock = id.includes('?')
- const cleanId = normalizePath(id.split('?')[0])
-
- const filterMain = createFilter(mainFiles)
- if (filterMain(cleanId)) {
- ms = await registerUpApp(code, rootFileName, getRelativeImportPath(cleanId, rootToastHostPath))
- }
-
- const filterUpRoot = createFilter(appUpPath)
- if (filterUpRoot(cleanId)) {
- ms = await rebuildUpApp(code, rootOptions.enabledVirtualHost)
- }
-
- refreshPagesJson()
- const pageId = hasPlatformPlugin ? normalizePlatformPath(cleanId) : cleanId
- const filterPage = createFilter(pagesJson, excludedPaths)
- if (!isSfcBlock && filterPage(pageId)) {
- if (cleanId.endsWith('.nvue')) {
- ms = await transformNvuePage(
- code,
- getRelativeImportPath(cleanId, nvueRootPath),
- getRelativeImportPath(cleanId, themeRuntimePath),
- rootOptions.enabledGlobalRef
- )
- } else {
- ms = await transformPage(code, rootOptions.enabledGlobalRef)
- }
- }
-
- if (ms) {
- return {
- code: ms.toString(),
- map: ms.generateMap({ hires: true }),
- }
- }
- return null
- },
- }
-}
diff --git a/uni_modules/uview-plus/libs/root/nvue-root.vue b/uni_modules/uview-plus/libs/root/nvue-root.vue
deleted file mode 100644
index 030b58a..0000000
--- a/uni_modules/uview-plus/libs/root/nvue-root.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/libs/root/page.js b/uni_modules/uview-plus/libs/root/page.js
deleted file mode 100644
index b829185..0000000
--- a/uni_modules/uview-plus/libs/root/page.js
+++ /dev/null
@@ -1,269 +0,0 @@
-import { MagicString } from 'vue/compiler-sfc'
-
-import { findNode, parseSFC } from './utils.js'
-
-function getPageRootRefSource(sfc, enabledGlobalRef = false) {
- const pageTempAttrs = sfc.template?.attrs
- if (pageTempAttrs && pageTempAttrs.root) {
- return `ref="${pageTempAttrs.root}"`
- }
- return enabledGlobalRef ? 'ref="uniUpRoot"' : ''
-}
-
-function ensureNvueNavigationBar(pageMetaSource) {
- const navigationBarSource = ''
- if (!pageMetaSource) return `${navigationBarSource}`
- if (pageMetaSource.indexOf('navigation-bar') > -1 || pageMetaSource.indexOf('NavigationBar') > -1) {
- return pageMetaSource
- }
- return pageMetaSource.replace(/]*)>/i, `${navigationBarSource}`)
-}
-
-function wrapTemplate(ms, sfc, tagName, rootRefSource = '', withNvueNavigationBar = false) {
- const pageTempStart = sfc.template?.loc.start.offset
- const pageTempEnd = sfc.template?.loc.end.offset
-
- let pageMetaSource = ''
- const pageMetaNode = findNode(sfc, 'PageMeta')
-
- if (pageMetaNode) {
- pageMetaSource = pageMetaNode.loc.source
- const metaTempStart = pageMetaNode.loc.start.offset
- const metaTempEnd = pageMetaNode.loc.end.offset
- ms.remove(metaTempStart, metaTempEnd)
- }
-
- if (withNvueNavigationBar) {
- pageMetaSource = ensureNvueNavigationBar(pageMetaSource)
- }
-
- if (pageTempStart != null && pageTempEnd != null) {
- ms.appendLeft(pageTempStart, `\n${pageMetaSource}\n<${tagName} ${rootRefSource}>`)
- ms.appendRight(pageTempEnd, `\n${tagName}>\n`)
- }
-}
-
-export async function transformPage(code, enabledGlobalRef = false) {
- const sfc = await parseSFC(code)
- const ms = new MagicString(code)
-
- wrapTemplate(ms, sfc, 'global-up-root', getPageRootRefSource(sfc, enabledGlobalRef))
-
- return ms
-}
-
-function ensureOptionsComponent(ms, scriptContent) {
- if (scriptContent.includes('UpNvueRoot')) return
-
- const componentsMatch = scriptContent.match(/components\s*:\s*\{/)
- if (componentsMatch) {
- ms.appendLeft(componentsMatch.index + componentsMatch[0].length, ' UpNvueRoot,')
- return
- }
-
- const exportDefaultMatch = scriptContent.match(/export\s+default\s+(?:defineComponent\s*\()?\s*\{/)
- if (exportDefaultMatch) {
- ms.appendLeft(
- exportDefaultMatch.index + exportDefaultMatch[0].length,
- '\n components: { UpNvueRoot },'
- )
- }
-}
-
-function ensureOptionsThemeMixin(ms, scriptContent) {
- if (scriptContent.includes('__upNvueThemeMixin')) return
-
- const mixinsMatch = scriptContent.match(/mixins\s*:\s*\[/)
- if (mixinsMatch) {
- ms.appendLeft(mixinsMatch.index + mixinsMatch[0].length, ' __upNvueThemeMixin,')
- return
- }
-
- const exportDefaultMatch = scriptContent.match(/export\s+default\s+(?:defineComponent\s*\()?\s*\{/)
- if (exportDefaultMatch) {
- ms.appendLeft(
- exportDefaultMatch.index + exportDefaultMatch[0].length,
- '\n mixins: [__upNvueThemeMixin],'
- )
- }
-}
-
-function getScriptSetupImports(componentImportPath, runtimeImportPath) {
- return `import UpNvueRoot from '${componentImportPath}'
-import { computed as __upComputed, onBeforeUnmount as __upOnBeforeUnmount, onMounted as __upOnMounted, ref as __upRef } from 'vue'
-import { onShow as __upOnShow } from '@dcloudio/uni-app'
-import {
- applyNativeThemeUI as __upApplyNativeThemeUI,
- applyNativeThemeUIDeferred as __upApplyNativeThemeUIDeferred,
- getThemeCardStyle as __upGetThemeCardStyle,
- getThemeIsDark as __upGetThemeIsDark,
- getThemePageStyle as __upGetThemePageStyle,
- getThemeVar as __upThemeVar,
- syncThemeRuntimeFromStorage as __upSyncThemeRuntimeFromStorage
-} from '${runtimeImportPath}'
-
-const __upThemeVersion = __upRef(0)
-let __upThemeChangeHandler = null
-const __upReadThemeVersion = () => Number((typeof uni !== 'undefined' && uni.$u && uni.$u.theme && uni.$u.theme.version) || 0)
-const __upSyncThemeVersion = (payload = {}) => {
- const version = Number(payload.version || __upReadThemeVersion() || 0)
- __upThemeVersion.value = version || Number(__upThemeVersion.value || 0) + 1
-}
-__upOnMounted(() => {
- __upSyncThemeRuntimeFromStorage()
- __upSyncThemeVersion()
- __upApplyNativeThemeUI()
- if (typeof uni !== 'undefined' && typeof uni.$on === 'function') {
- __upThemeChangeHandler = (payload = {}) => {
- __upSyncThemeRuntimeFromStorage()
- __upSyncThemeVersion(payload)
- __upApplyNativeThemeUI()
- }
- uni.$on('uThemeChange', __upThemeChangeHandler)
- }
-})
-__upOnShow(() => {
- __upSyncThemeRuntimeFromStorage()
- __upSyncThemeVersion()
- __upApplyNativeThemeUIDeferred()
-})
-__upOnBeforeUnmount(() => {
- if (typeof uni !== 'undefined' && typeof uni.$off === 'function' && __upThemeChangeHandler) {
- uni.$off('uThemeChange', __upThemeChangeHandler)
- __upThemeChangeHandler = null
- }
-})
-const upThemeVar = (varName, fallbackColor) => {
- __upThemeVersion.value
- return __upThemeVar(varName, fallbackColor)
-}
-const upThemeCardStyle = __upComputed(() => {
- __upThemeVersion.value
- return __upGetThemeCardStyle()
-})
-const upThemePageStyle = __upComputed(() => {
- __upThemeVersion.value
- return __upGetThemePageStyle()
-})
-const upThemeIsDark = __upComputed(() => {
- __upThemeVersion.value
- return __upGetThemeIsDark()
-})
-const upThemeNavFrontColor = __upComputed(() => {
- __upThemeVersion.value
- return __upGetThemeIsDark() ? '#ffffff' : '#000000'
-})
-const upThemeNavBgColor = __upComputed(() => {
- __upThemeVersion.value
- return __upThemeVar('--up-navbar-bg-color', __upGetThemeIsDark() ? '#1c1c1e' : '#ffffff')
-})
-`
-}
-
-function getOptionsImports(componentImportPath, runtimeImportPath) {
- return `import UpNvueRoot from '${componentImportPath}'
-import {
- applyNativeThemeUI as __upApplyNativeThemeUI,
- applyNativeThemeUIDeferred as __upApplyNativeThemeUIDeferred,
- getThemeCardStyle as __upGetThemeCardStyle,
- getThemeIsDark as __upGetThemeIsDark,
- getThemePageStyle as __upGetThemePageStyle,
- getThemeVar as __upThemeVar,
- syncThemeRuntimeFromStorage as __upSyncThemeRuntimeFromStorage
-} from '${runtimeImportPath}'
-
-const __upNvueThemeMixin = {
- data() {
- return {
- __upNvueThemeVersion: 0,
- __upNvueThemeChangeHandler: null
- }
- },
- created() {
- __upSyncThemeRuntimeFromStorage()
- this.__upSyncNvueThemeVersion()
- __upApplyNativeThemeUI()
- if (typeof uni !== 'undefined' && typeof uni.$on === 'function') {
- this.__upNvueThemeChangeHandler = (payload = {}) => {
- __upSyncThemeRuntimeFromStorage()
- this.__upSyncNvueThemeVersion(payload)
- __upApplyNativeThemeUI()
- }
- uni.$on('uThemeChange', this.__upNvueThemeChangeHandler)
- }
- },
- onShow() {
- __upSyncThemeRuntimeFromStorage()
- this.__upSyncNvueThemeVersion()
- __upApplyNativeThemeUIDeferred()
- },
- beforeUnmount() {
- if (typeof uni !== 'undefined' && typeof uni.$off === 'function' && this.__upNvueThemeChangeHandler) {
- uni.$off('uThemeChange', this.__upNvueThemeChangeHandler)
- this.__upNvueThemeChangeHandler = null
- }
- },
- computed: {
- upThemeCardStyle() {
- this.__upNvueThemeVersion
- return __upGetThemeCardStyle()
- },
- upThemePageStyle() {
- this.__upNvueThemeVersion
- return __upGetThemePageStyle()
- },
- upThemeIsDark() {
- this.__upNvueThemeVersion
- return __upGetThemeIsDark()
- },
- upThemeNavFrontColor() {
- this.__upNvueThemeVersion
- return __upGetThemeIsDark() ? '#ffffff' : '#000000'
- },
- upThemeNavBgColor() {
- this.__upNvueThemeVersion
- return __upThemeVar('--up-navbar-bg-color', __upGetThemeIsDark() ? '#1c1c1e' : '#ffffff')
- }
- },
- methods: {
- __upReadNvueThemeVersion() {
- return Number((typeof uni !== 'undefined' && uni.$u && uni.$u.theme && uni.$u.theme.version) || 0)
- },
- __upSyncNvueThemeVersion(payload = {}) {
- const version = Number(payload.version || this.__upReadNvueThemeVersion() || 0)
- this.__upNvueThemeVersion = version || Number(this.__upNvueThemeVersion || 0) + 1
- },
- upThemeVar(varName, fallbackColor) {
- this.__upNvueThemeVersion
- return __upThemeVar(varName, fallbackColor)
- }
- }
-}
-`
-}
-
-export async function transformNvuePage(
- code,
- componentImportPath,
- runtimeImportPath,
- enabledGlobalRef = false
-) {
- const sfc = await parseSFC(code)
- const ms = new MagicString(code)
-
- wrapTemplate(ms, sfc, 'UpNvueRoot', getPageRootRefSource(sfc, enabledGlobalRef), true)
-
- if (sfc.scriptSetup) {
- ms.appendLeft(sfc.scriptSetup.loc.start.offset, getScriptSetupImports(componentImportPath, runtimeImportPath))
- } else if (sfc.script) {
- ms.appendLeft(sfc.script.loc.start.offset, getOptionsImports(componentImportPath, runtimeImportPath))
- ensureOptionsComponent(ms, sfc.script.content)
- ensureOptionsThemeMixin(ms, sfc.script.content)
- } else {
- ms.append(
- `\n\n`
- )
- }
-
- return ms
-}
diff --git a/uni_modules/uview-plus/libs/root/root-toast-host.vue b/uni_modules/uview-plus/libs/root/root-toast-host.vue
deleted file mode 100644
index 8861fb7..0000000
--- a/uni_modules/uview-plus/libs/root/root-toast-host.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
diff --git a/uni_modules/uview-plus/libs/root/root.js b/uni_modules/uview-plus/libs/root/root.js
deleted file mode 100644
index 3e5662d..0000000
--- a/uni_modules/uview-plus/libs/root/root.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import { MagicString } from 'vue/compiler-sfc'
-
-import { parseSFC } from './utils.js'
-
-export async function registerUpApp(
- code,
- fileName = 'App.up',
- rootToastHostPath = './uni_modules/uview-plus/libs/root/root-toast-host.vue'
-) {
- const ms = new MagicString(code)
-
- const importCode = `import GlobalUpRoot from "./${fileName}.vue";
-import UpRootToastHost from "${rootToastHostPath}";`
- const vueUseComponentCode = 'app.component("global-up-root", GlobalUpRoot);\napp.component("ku-root-toast-host", UpRootToastHost);'
-
- ms.prepend(`${importCode}\n`).replace(
- /(createApp[\s\S]*?)(return\s\{\s*app)/,
- `$1${vueUseComponentCode}\n$2`,
- )
-
- return ms
-}
-
-export async function rebuildUpApp(code, enabledVirtualHost = false) {
- const ms = new MagicString(code)
- const rootTagNameRE = /<(UpRootView|up-root-view)(?:\s*\/>|><\/\1>)/
- ms.replace(rootTagNameRE, '\n ')
-
- if (enabledVirtualHost) {
- const sfc = await parseSFC(code)
- if (sfc.script) {
- return ms
- }
- const langType = sfc.scriptSetup?.lang
- ms.append(``)
- }
-
- return ms
-}
diff --git a/uni_modules/uview-plus/libs/root/runtime.js b/uni_modules/uview-plus/libs/root/runtime.js
deleted file mode 100644
index 632cb4d..0000000
--- a/uni_modules/uview-plus/libs/root/runtime.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Compatibility shim for stale incremental build caches.
-// New root integration no longer depends on this file.
-
-export function createGlobalUpRoot(AppRootComponent) {
- return AppRootComponent
-}
-
-export default {
- createGlobalUpRoot,
-}
-
diff --git a/uni_modules/uview-plus/libs/root/utils.js b/uni_modules/uview-plus/libs/root/utils.js
deleted file mode 100644
index 0685a34..0000000
--- a/uni_modules/uview-plus/libs/root/utils.js
+++ /dev/null
@@ -1,115 +0,0 @@
-import { existsSync, readFileSync } from 'node:fs'
-import { extname, join } from 'node:path'
-import process from 'node:process'
-
-import { parse as VueParser } from 'vue/compiler-sfc'
-import { normalizePath } from 'vite'
-
-function stripJsonComments(jsonText) {
- return jsonText
- .replace(/\/\*[\s\S]*?\*\//g, '')
- .replace(/(^|[^:\\])\/\/.*$/gm, '$1')
-}
-
-function parseJsonc(jsonText) {
- const withoutComments = stripJsonComments(jsonText)
- const withoutTrailingComma = withoutComments.replace(/,\s*([}\]])/g, '$1')
- return JSON.parse(withoutTrailingComma)
-}
-
-export async function parseSFC(code) {
- try {
- return VueParser(code, { pad: 'space' }).descriptor
- } catch {
- throw new Error('[@up-root] Vue version must support compiler-sfc parser.')
- }
-}
-
-const PAGE_FILE_EXTS = ['.vue', '.nvue', '.uvue']
-
-export function formatPagePath(root, path) {
- const joinedPath = join(root, path)
- const pathExt = extname(joinedPath)
-
- if (pathExt) {
- return normalizePath(joinedPath)
- }
-
- const pageFilePath = PAGE_FILE_EXTS
- .map(fileExt => `${joinedPath}${fileExt}`)
- .find(filePath => existsSync(filePath))
-
- return normalizePath(pageFilePath || `${joinedPath}.vue`)
-}
-
-export function loadPagesJson(path, rootPath) {
- const pagesJsonRaw = readFileSync(path, 'utf-8')
- const parsed = parseJsonc(pagesJsonRaw) || {}
- const pages = parsed.pages || []
- const subPackages = parsed.subPackages || []
-
- return [
- ...pages.map((page) => formatPagePath(rootPath, page.path)),
- ...subPackages
- .map(({ pages: subPages = [], root = '' }) => {
- return subPages.map((page) => formatPagePath(join(rootPath, root), page.path))
- })
- .flat(),
- ]
-}
-
-export function toKebabCase(str) {
- return str
- .replace(/([a-z])([A-Z])/g, '$1-$2')
- .replace(/[_\s]+/g, '-')
- .toLowerCase()
-}
-
-export function toPascalCase(str) {
- return str
- .replace(/(^\w|-+\w)/g, (match) => match.toUpperCase().replace(/-/g, ''))
-}
-
-export function findNode(sfc, rawTagName) {
- const templateSource = sfc.template?.content
- if (!templateSource) return
-
- let tagName = ''
- if (templateSource.includes(`<${toKebabCase(rawTagName)}`)) {
- tagName = toKebabCase(rawTagName)
- } else if (templateSource.includes(`<${toPascalCase(rawTagName)}`)) {
- tagName = toPascalCase(rawTagName)
- }
- if (!tagName) return
-
- const nodeAst = sfc.template?.ast
- if (!nodeAst) return
-
- const traverse = (nodes) => {
- for (const node of nodes) {
- if (node.type === 1) {
- if (node.tag === tagName) return node
- if (node.children?.length) {
- const found = traverse(node.children)
- if (found) return found
- }
- }
- }
- }
-
- return traverse(nodeAst.children)
-}
-
-const platform = process.env.UNI_PLATFORM
-
-export function normalizePlatformPath(id) {
- const idExt = extname(id)
- if (idExt !== '.vue') return id
- if (!id.includes(`.${platform}.`)) return id
- return id.replace(`.${platform}.`, '.')
-}
-
-export function toArray(value) {
- if (!value) return []
- return Array.isArray(value) ? value : [value]
-}
diff --git a/uni_modules/uview-plus/libs/theme/runtime.js b/uni_modules/uview-plus/libs/theme/runtime.js
deleted file mode 100644
index e5d629e..0000000
--- a/uni_modules/uview-plus/libs/theme/runtime.js
+++ /dev/null
@@ -1,440 +0,0 @@
-const THEME_MODE_STORAGE_KEY = 'u-theme-mode'
-
-const FALLBACK_THEME_VARS = {
- light: {
- '--up-main-color': 'var(--up-light-main-color, #303133)',
- '--up-content-color': 'var(--up-light-content-color, #606266)',
- '--up-tips-color': 'var(--up-light-tips-color, #909193)',
- '--up-light-color': 'var(--up-light-light-color, #c0c4cc)',
- '--up-border-color': 'var(--up-light-border-color, #dadbde)',
- '--up-bg-color': 'var(--up-light-bg-color, #f3f4f6)',
- '--up-hover-bg-color': '#e7ebf0',
- '--up-page-bg-color': '#f3f4f6',
- '--up-card-bg-color': '#ffffff',
- '--up-navbar-bg-color': '#ffffff',
- '--up-table2-header-bg-color': '#f5f7fa',
- '--up-table2-zebra-bg-color': '#fafafa',
- '--up-table2-highlight-bg-color': '#f5f7fa',
- '--up-gap-bg-color': '#f3f4f6',
- '--up-skeleton-bg-color': '#f1f2f4',
- '--up-skeleton-shimmer-color': '#e6e6e6',
- '--up-swipe-action-button-bg-color': '#c7c6cd',
- '--up-index-list-indicator-bg-color': '#c9c9c9',
- '--up-calendar-month-mark-color': 'rgba(231, 232, 234, 0.83)',
- '--up-disabled-color': 'var(--up-light-disabled-color, #c8c9cc)',
- '--up-primary': 'var(--up-light-primary, #3c9cff)',
- '--up-primary-dark': 'var(--up-light-primary-dark, #398ade)',
- '--up-primary-disabled': 'var(--up-light-primary-disabled, #9acafc)',
- '--up-primary-light': 'var(--up-light-primary-light, #ecf5ff)',
- '--up-warning': 'var(--up-light-warning, #f9ae3d)',
- '--up-warning-dark': 'var(--up-light-warning-dark, #f1a532)',
- '--up-warning-disabled': 'var(--up-light-warning-disabled, #f9d39b)',
- '--up-warning-light': 'var(--up-light-warning-light, #fdf6ec)',
- '--up-success': 'var(--up-light-success, #5ac725)',
- '--up-success-dark': 'var(--up-light-success-dark, #53c21d)',
- '--up-success-disabled': 'var(--up-light-success-disabled, #a9e08f)',
- '--up-success-light': 'var(--up-light-success-light, #f5fff0)',
- '--up-error': 'var(--up-light-error, #f56c6c)',
- '--up-error-dark': 'var(--up-light-error-dark, #e45656)',
- '--up-error-disabled': 'var(--up-light-error-disabled, #f7b2b2)',
- '--up-error-light': 'var(--up-light-error-light, #fef0f0)',
- '--up-info': 'var(--up-light-info, #909399)',
- '--up-info-dark': 'var(--up-light-info-dark, #767a82)',
- '--up-info-disabled': 'var(--up-light-info-disabled, #c4c6c9)',
- '--up-info-light': 'var(--up-light-info-light, #f4f4f5)'
- },
- dark: {
- '--up-main-color': '#f5f5f5',
- '--up-content-color': '#d1d5db',
- '--up-tips-color': '#9ca3af',
- '--up-light-color': '#6b7280',
- '--up-border-color': '#3a3a3c',
- '--up-bg-color': '#1f1f1f',
- '--up-hover-bg-color': '#343741',
- '--up-page-bg-color': '#1f1f1f',
- '--up-card-bg-color': '#1c1c1e',
- '--up-navbar-bg-color': '#1c1c1e',
- '--up-table2-header-bg-color': '#2a2d33',
- '--up-table2-zebra-bg-color': '#23262b',
- '--up-table2-highlight-bg-color': '#2f3440',
- '--up-gap-bg-color': '#111111',
- '--up-skeleton-bg-color': '#2f3135',
- '--up-skeleton-shimmer-color': 'rgba(255, 255, 255, 0.12)',
- '--up-swipe-action-button-bg-color': '#4b5563',
- '--up-index-list-indicator-bg-color': '#4b5563',
- '--up-calendar-month-mark-color': 'rgba(255, 255, 255, 0.04)',
- '--up-disabled-color': '#4b5563',
- '--up-primary': '#3c9cff',
- '--up-primary-dark': '#5aa8ff',
- '--up-primary-disabled': '#4c6f92',
- '--up-primary-light': '#10243a',
- '--up-warning': '#f9ae3d',
- '--up-warning-dark': '#ffbf66',
- '--up-warning-disabled': '#8a6a3a',
- '--up-warning-light': '#3d2f1b',
- '--up-success': '#5ac725',
- '--up-success-dark': '#7ad94b',
- '--up-success-disabled': '#5f7f4f',
- '--up-success-light': '#1f3316',
- '--up-error': '#f56c6c',
- '--up-error-dark': '#ff8a8a',
- '--up-error-disabled': '#8d5858',
- '--up-error-light': '#3a2222',
- '--up-info': '#909399',
- '--up-info-dark': '#b0b3b8',
- '--up-info-disabled': '#5f6368',
- '--up-info-light': '#2f3238'
- }
-}
-
-const THEME_COLOR_SYNC_MAP = {
- '--up-main-color': 'mainColor',
- '--up-content-color': 'contentColor',
- '--up-tips-color': 'tipsColor',
- '--up-light-color': 'lightColor',
- '--up-border-color': 'borderColor',
- '--up-bg-color': 'bgColor',
- '--up-disabled-color': 'disabledColor',
- '--up-primary': 'primary',
- '--up-primary-dark': 'primaryDark',
- '--up-primary-disabled': 'primaryDisabled',
- '--up-primary-light': 'primaryLight',
- '--up-warning': 'warning',
- '--up-warning-dark': 'warningDark',
- '--up-warning-disabled': 'warningDisabled',
- '--up-warning-light': 'warningLight',
- '--up-success': 'success',
- '--up-success-dark': 'successDark',
- '--up-success-disabled': 'successDisabled',
- '--up-success-light': 'successLight',
- '--up-error': 'error',
- '--up-error-dark': 'errorDark',
- '--up-error-disabled': 'errorDisabled',
- '--up-error-light': 'errorLight',
- '--up-info': 'info',
- '--up-info-dark': 'infoDark',
- '--up-info-disabled': 'infoDisabled',
- '--up-info-light': 'infoLight'
-}
-
-function buildFallbackAliasVars(vars) {
- const aliasVars = {}
- Object.keys(vars).forEach((key) => {
- if (typeof key === 'string' && key.indexOf('--up-') === 0) {
- aliasVars[key.replace('--up-', '--u-')] = vars[key]
- }
- })
- return aliasVars
-}
-
-function getRuntimeU(upU) {
- if (upU) return upU
- if (typeof uni !== 'undefined') return uni.$u
- return null
-}
-
-function normalizeRuntimeRoute(route) {
- if (typeof route !== 'string') return ''
- return route.replace(/^\//, '').split('?')[0]
-}
-
-function getCurrentRuntimeRoute() {
- try {
- if (typeof getCurrentPages !== 'function') return ''
- const pages = getCurrentPages()
- if (!Array.isArray(pages) || pages.length === 0) return ''
- const page = pages[pages.length - 1] || {}
- return normalizeRuntimeRoute(page.route || page.path || '')
- } catch (e) {}
- return ''
-}
-
-function getRuntimeTabBarRoutes() {
- const routes = []
- try {
- const runtimeConfig = typeof __uniConfig !== 'undefined' ? __uniConfig : null
- const tabBarList = runtimeConfig?.tabBar?.list
- if (Array.isArray(tabBarList)) {
- tabBarList.forEach((item) => {
- const route = normalizeRuntimeRoute(item?.pagePath || '')
- if (route) routes.push(route)
- })
- }
- } catch (e) {}
- return routes
-}
-
-function hasActiveRuntimePage() {
- try {
- if (typeof getCurrentPages === 'function') {
- const pages = getCurrentPages()
- return Array.isArray(pages) && pages.length > 0
- }
- } catch (e) {}
- return false
-}
-
-function trySetNavigationBarColor(options) {
- if (typeof uni === 'undefined' || typeof uni.setNavigationBarColor !== 'function') return
- if (!hasActiveRuntimePage()) return
- try {
- const result = uni.setNavigationBarColor(options)
- if (result && typeof result.catch === 'function') {
- result.catch(() => {})
- }
- } catch (e) {}
-}
-
-export function isTabBarPage() {
- const route = getCurrentRuntimeRoute()
- if (!route) return false
- const tabBarRoutes = getRuntimeTabBarRoutes()
- if (!tabBarRoutes.length) return false
- return tabBarRoutes.includes(route)
-}
-
-export function trySetTabBarStyle(options) {
- if (typeof uni === 'undefined' || typeof uni.setTabBarStyle !== 'function') return
- if (!isTabBarPage()) return
- try {
- const result = uni.setTabBarStyle(options)
- if (result && typeof result.catch === 'function') {
- result.catch(() => {})
- }
- } catch (e) {}
-}
-
-function normalizeThemeMode(theme = 'light') {
- return theme === 'dark' ? 'dark' : 'light'
-}
-
-function normalizeThemePreference(mode = 'system') {
- return mode === 'dark' || mode === 'light' ? mode : 'system'
-}
-
-function getFallbackSystemTheme() {
- let theme = 'light'
- try {
- if (typeof uni !== 'undefined' && typeof uni.getAppBaseInfo === 'function') {
- const appBaseInfo = uni.getAppBaseInfo() || {}
- if (appBaseInfo.theme) theme = appBaseInfo.theme
- }
- if (typeof uni !== 'undefined' && typeof uni.getSystemInfoSync === 'function') {
- const systemInfo = uni.getSystemInfoSync() || {}
- if (systemInfo.theme) theme = systemInfo.theme
- }
- } catch (e) {
- theme = 'light'
- }
- return normalizeThemeMode(theme)
-}
-
-function getFallbackThemePreference() {
- try {
- if (typeof uni !== 'undefined' && typeof uni.getStorageSync === 'function') {
- const preference = uni.getStorageSync(THEME_MODE_STORAGE_KEY)
- return normalizeThemePreference(preference)
- }
- } catch (e) {}
- return 'system'
-}
-
-function getFallbackThemeMode() {
- const preference = getFallbackThemePreference()
- if (preference === 'dark' || preference === 'light') return preference
- return getFallbackSystemTheme()
-}
-
-function getFallbackThemeVarsByMode(mode) {
- const vars = FALLBACK_THEME_VARS[normalizeThemeMode(mode)] || FALLBACK_THEME_VARS.light
- return {
- ...vars,
- ...buildFallbackAliasVars(vars)
- }
-}
-
-function getFallbackThemeVars(upU) {
- const mode = getThemeIsDark(upU) ? 'dark' : 'light'
- return getFallbackThemeVarsByMode(mode)
-}
-
-function syncRuntimeColor(runtimeU, vars) {
- if (!runtimeU || !runtimeU.color) return
- Object.keys(THEME_COLOR_SYNC_MAP).forEach((token) => {
- const field = THEME_COLOR_SYNC_MAP[token]
- runtimeU.color[field] = vars[token]
- })
-}
-
-export function syncThemeRuntimeFromStorage(upU) {
- const runtimeU = getRuntimeU(upU)
- if (!runtimeU || !runtimeU.theme) return runtimeU?.theme
- const preference = getFallbackThemePreference()
- const mode = preference === 'system' ? getFallbackSystemTheme() : preference
- const vars = getFallbackThemeVarsByMode(mode)
- const shouldUpdate = runtimeU.theme.preference !== preference || runtimeU.theme.mode !== mode
- if (shouldUpdate && typeof runtimeU.setThemePreference === 'function') {
- return runtimeU.setThemePreference(preference) || runtimeU.theme
- }
- runtimeU.theme.preference = preference
- runtimeU.theme.mode = mode
- runtimeU.theme.vars = {
- ...vars,
- ...(runtimeU.theme.vars && !shouldUpdate ? runtimeU.theme.vars : {})
- }
- if (shouldUpdate) {
- runtimeU.theme.version = Number(runtimeU.theme.version || 0) + 1
- }
- syncRuntimeColor(runtimeU, runtimeU.theme.vars)
- return runtimeU.theme
-}
-
-export function getThemeIsDark(upU) {
- const runtimeMode = getRuntimeU(upU)?.theme?.mode
- if (runtimeMode) return runtimeMode === 'dark'
- return getFallbackThemeMode() === 'dark'
-}
-
-export function getThemeVarsForStyle(upU) {
- const runtimeU = getRuntimeU(upU)
- if (runtimeU && typeof runtimeU.getThemeVars === 'function') {
- return runtimeU.getThemeVars()
- }
- return getFallbackThemeVars(runtimeU)
-}
-
-export function getThemeVar(varName, fallbackColor, upU) {
- const runtimeU = getRuntimeU(upU)
- const themeVars = runtimeU?.theme?.vars
- if (themeVars && Object.prototype.hasOwnProperty.call(themeVars, varName)) {
- return themeVars[varName]
- }
- if (typeof varName === 'string') {
- const aliasVarName = varName.indexOf('--up-') === 0
- ? varName.replace('--up-', '--u-')
- : (varName.indexOf('--u-') === 0 ? varName.replace('--u-', '--up-') : '')
- if (aliasVarName && themeVars && Object.prototype.hasOwnProperty.call(themeVars, aliasVarName)) {
- return themeVars[aliasVarName]
- }
- const runtimeColorMap = runtimeU?.config?.color || {}
- const colorTokenKey = varName.indexOf('--') === 0 ? varName.slice(2) : varName
- if (Object.prototype.hasOwnProperty.call(runtimeColorMap, colorTokenKey)) {
- return runtimeColorMap[colorTokenKey]
- }
- const aliasColorTokenKey = colorTokenKey.indexOf('up-') === 0
- ? colorTokenKey.replace('up-', 'u-')
- : (colorTokenKey.indexOf('u-') === 0 ? colorTokenKey.replace('u-', 'up-') : '')
- if (aliasColorTokenKey && Object.prototype.hasOwnProperty.call(runtimeColorMap, aliasColorTokenKey)) {
- return runtimeColorMap[aliasColorTokenKey]
- }
- }
- if (runtimeU && typeof runtimeU.getThemeVars === 'function') {
- const vars = runtimeU.getThemeVars()
- if (vars && Object.prototype.hasOwnProperty.call(vars, varName)) {
- return vars[varName]
- }
- }
- const fallbackVars = getFallbackThemeVars(runtimeU)
- if (fallbackVars && Object.prototype.hasOwnProperty.call(fallbackVars, varName)) {
- return fallbackVars[varName]
- }
- return typeof fallbackColor !== 'undefined' ? fallbackColor : ''
-}
-
-export function getThemeCssVar(varName, fallbackColor) {
- if (typeof fallbackColor === 'undefined') {
- return `var(${varName})`
- }
- return `var(${varName}, ${fallbackColor})`
-}
-
-export function getThemePageStyle(upU, preferCssVars = false) {
- const runtimeU = getRuntimeU(upU)
- const isDark = getThemeIsDark(runtimeU)
- const fallbackBg = isDark ? '#1f1f1f' : (runtimeU?.color?.bgColor || '#f3f4f6')
- if (preferCssVars) {
- return {
- ...getThemeVarsForStyle(runtimeU),
- minHeight: '100vh',
- backgroundColor: `var(--up-page-bg-color, var(--up-bg-color, ${fallbackBg}))`
- }
- }
- return {
- backgroundColor: getThemeVar(
- '--up-page-bg-color',
- getThemeVar('--up-bg-color', fallbackBg, runtimeU),
- runtimeU
- )
- }
-}
-
-export function getThemeCardStyle(upU, preferCssVars = false) {
- const runtimeU = getRuntimeU(upU)
- const isDark = getThemeIsDark(runtimeU)
- const fallbackCard = isDark ? '#1c1c1e' : '#ffffff'
- const fallbackBorder = runtimeU?.color?.borderColor || '#dadbde'
- if (preferCssVars) {
- return {
- backgroundColor: `var(--up-card-bg-color, ${fallbackCard})`,
- borderColor: `var(--up-border-color, ${fallbackBorder})`
- }
- }
- return {
- backgroundColor: getThemeVar('--up-card-bg-color', fallbackCard, runtimeU),
- borderColor: getThemeVar('--up-border-color', fallbackBorder, runtimeU)
- }
-}
-
-export function getThemeTabBarStyle(upU) {
- const runtimeU = getRuntimeU(upU)
- const isDark = getThemeIsDark(runtimeU)
- return {
- color: isDark ? '#8e8e93' : '#909399',
- selectedColor: isDark ? '#f2f2f7' : '#303133',
- backgroundColor: isDark ? '#111111' : '#ffffff',
- borderStyle: isDark ? 'white' : 'black'
- }
-}
-
-export function applyNativeThemeUI(upU) {
- if (typeof uni === 'undefined') return
- const runtimeU = getRuntimeU(upU)
- if (runtimeU?.config?.nativeThemeSync !== true) return
- const isDark = getThemeIsDark(runtimeU)
- const fallbackBg = isDark ? '#1f1f1f' : (runtimeU?.color?.bgColor || '#f3f4f6')
- const pageBg = getThemeVar(
- '--up-page-bg-color',
- getThemeVar('--up-bg-color', fallbackBg, runtimeU),
- runtimeU
- )
- const navBg = getThemeVar(
- '--up-navbar-bg-color',
- isDark ? '#1c1c1e' : '#ffffff',
- runtimeU
- )
- trySetNavigationBarColor({
- frontColor: isDark ? '#ffffff' : '#000000',
- backgroundColor: navBg,
- animation: {
- duration: 0,
- timingFunc: 'linear'
- }
- })
- if (typeof uni.setBackgroundColor === 'function') {
- uni.setBackgroundColor({
- backgroundColor: pageBg,
- backgroundColorTop: pageBg,
- backgroundColorBottom: pageBg
- })
- }
- trySetTabBarStyle(getThemeTabBarStyle(runtimeU))
-}
-
-export function applyNativeThemeUIDeferred(upU, delay = 30) {
- applyNativeThemeUI(upU)
- if (typeof setTimeout === 'function') {
- setTimeout(() => {
- applyNativeThemeUI(upU)
- }, delay)
- }
-}
diff --git a/uni_modules/uview-plus/libs/theme/theme.js b/uni_modules/uview-plus/libs/theme/theme.js
deleted file mode 100644
index cfb2d08..0000000
--- a/uni_modules/uview-plus/libs/theme/theme.js
+++ /dev/null
@@ -1,681 +0,0 @@
-import config from '../config/config.js'
-import color from '../config/color.js'
-import index from '../function/index.js'
-import { trySetTabBarStyle } from './runtime.js'
-
-const DEFAULT_LIGHT_THEME_COLORS = Object.freeze({
- primary: '#3c9cff',
- info: '#909399',
- warning: '#f9ae3d',
- error: '#f56c6c',
- success: '#5ac725',
- mainColor: '#303133',
- contentColor: '#606266',
- tipsColor: '#909193',
- lightColor: '#c0c4cc',
- borderColor: '#dadbde',
- bgColor: '#f3f4f6',
- disabledColor: '#c8c9cc',
- primaryDark: '#398ade',
- primaryDisabled: '#9acafc',
- primaryLight: '#ecf5ff',
- warningDark: '#f1a532',
- warningDisabled: '#f9d39b',
- warningLight: '#fdf6ec',
- successDark: '#53c21d',
- successDisabled: '#a9e08f',
- successLight: '#f5fff0',
- errorDark: '#e45656',
- errorDisabled: '#f7b2b2',
- errorLight: '#fef0f0',
- infoDark: '#767a82',
- infoDisabled: '#c4c6c9',
- infoLight: '#f4f4f5'
-})
-
-const DEFAULT_DARK_THEME_COLORS = Object.freeze({
- primary: '#3c9cff',
- info: '#909399',
- warning: '#f9ae3d',
- error: '#f56c6c',
- success: '#5ac725',
- mainColor: '#f5f5f5',
- contentColor: '#d1d5db',
- tipsColor: '#9ca3af',
- lightColor: '#6b7280',
- borderColor: '#3a3a3c',
- bgColor: '#1f1f1f',
- disabledColor: '#4b5563',
- primaryDark: '#5aa8ff',
- primaryDisabled: '#4c6f92',
- primaryLight: '#10243a',
- warningDark: '#ffbf66',
- warningDisabled: '#8a6a3a',
- warningLight: '#3d2f1b',
- successDark: '#7ad94b',
- successDisabled: '#5f7f4f',
- successLight: '#1f3316',
- errorDark: '#ff8a8a',
- errorDisabled: '#8d5858',
- errorLight: '#3a2222',
- infoDark: '#b0b3b8',
- infoDisabled: '#5f6368',
- infoLight: '#2f3238'
-})
-
-const DEFAULT_THEME_EXTRA_VARS = Object.freeze({
- light: Object.freeze({
- '--up-table2-header-bg-color': '#f5f7fa',
- '--up-table2-zebra-bg-color': '#fafafa',
- '--up-table2-highlight-bg-color': '#f5f7fa',
- '--up-gap-bg-color': '#f3f4f6',
- '--up-skeleton-bg-color': '#f1f2f4',
- '--up-skeleton-shimmer-color': '#e6e6e6',
- '--up-swipe-action-button-bg-color': '#c7c6cd',
- '--up-index-list-indicator-bg-color': '#c9c9c9',
- '--up-calendar-month-mark-color': 'rgba(231, 232, 234, 0.83)'
- }),
- dark: Object.freeze({
- '--up-table2-header-bg-color': '#2a2d33',
- '--up-table2-zebra-bg-color': '#23262b',
- '--up-table2-highlight-bg-color': '#2f3440',
- '--up-gap-bg-color': '#111111',
- '--up-skeleton-bg-color': '#2f3135',
- '--up-skeleton-shimmer-color': 'rgba(255, 255, 255, 0.12)',
- '--up-swipe-action-button-bg-color': '#4b5563',
- '--up-index-list-indicator-bg-color': '#4b5563',
- '--up-calendar-month-mark-color': 'rgba(255, 255, 255, 0.04)'
- })
-})
-
-export const themeState = {
- preference: 'system',
- mode: 'light',
- version: 0,
- vars: {}
-}
-
-const THEME_MODE_STORAGE_KEY = 'u-theme-mode'
-const THEME_MODE_SYSTEM = 'system'
-const THEME_MODE_MANUAL = ['light', 'dark']
-const LIGHT_THEME_TOKEN_FIELD_MAP = Object.freeze({
- 'primary': 'primary',
- 'primary-dark': 'primaryDark',
- 'primary-disabled': 'primaryDisabled',
- 'primary-light': 'primaryLight',
- 'warning': 'warning',
- 'warning-dark': 'warningDark',
- 'warning-disabled': 'warningDisabled',
- 'warning-light': 'warningLight',
- 'success': 'success',
- 'success-dark': 'successDark',
- 'success-disabled': 'successDisabled',
- 'success-light': 'successLight',
- 'error': 'error',
- 'error-dark': 'errorDark',
- 'error-disabled': 'errorDisabled',
- 'error-light': 'errorLight',
- 'info': 'info',
- 'info-dark': 'infoDark',
- 'info-disabled': 'infoDisabled',
- 'info-light': 'infoLight',
- 'main-color': 'mainColor',
- 'content-color': 'contentColor',
- 'tips-color': 'tipsColor',
- 'light-color': 'lightColor',
- 'border-color': 'borderColor',
- 'bg-color': 'bgColor',
- 'disabled-color': 'disabledColor'
-})
-const LIGHT_THEME_FIELD_TOKEN_MAP = Object.freeze(
- Object.fromEntries(
- Object.entries(LIGHT_THEME_TOKEN_FIELD_MAP).map(([token, field]) => [field, token])
- )
-)
-
-const runtimeThemeOverrideState = {
- color: Object.create(null),
- configColor: Object.create(null)
-}
-
-let cachedLightThemeColors = null
-let hasRegisterThemeListener = false
-let currentThemePreference = THEME_MODE_SYSTEM
-
-function normalizeThemeMode(theme = 'light') {
- return theme === 'dark' ? 'dark' : 'light'
-}
-
-function normalizeThemePreference(mode = THEME_MODE_SYSTEM) {
- if (THEME_MODE_MANUAL.includes(mode)) return mode
- return THEME_MODE_SYSTEM
-}
-
-function getLightBridgeVar(token, fallback) {
- return `var(--up-light-${token}, ${fallback})`
-}
-
-function clearOverrideBucket(bucket) {
- Object.keys(bucket).forEach((key) => {
- delete bucket[key]
- })
-}
-
-function normalizeLightThemeToken(token = '') {
- if (typeof token !== 'string') return ''
- if (token.indexOf('up-') === 0) return token.slice(3)
- if (token.indexOf('u-') === 0) return token.slice(2)
- return token
-}
-
-function isLightThemeConfigColorKey(token = '') {
- return token.indexOf('up-') === 0 || token.indexOf('u-') === 0
-}
-
-export function syncThemeColorOverrideState({
- color: colorOverrides,
- configColor: configColorOverrides,
- reset = false
-} = {}) {
- if (reset) {
- clearOverrideBucket(runtimeThemeOverrideState.color)
- clearOverrideBucket(runtimeThemeOverrideState.configColor)
- }
- if (colorOverrides && typeof colorOverrides === 'object') {
- Object.keys(LIGHT_THEME_FIELD_TOKEN_MAP).forEach((field) => {
- if (!Object.prototype.hasOwnProperty.call(colorOverrides, field)) return
- const value = colorOverrides[field]
- if (typeof value === 'string' && value) {
- runtimeThemeOverrideState.color[field] = true
- return
- }
- delete runtimeThemeOverrideState.color[field]
- })
- }
- if (configColorOverrides && typeof configColorOverrides === 'object') {
- Object.keys(configColorOverrides).forEach((key) => {
- const token = normalizeLightThemeToken(key)
- if (!Object.prototype.hasOwnProperty.call(LIGHT_THEME_TOKEN_FIELD_MAP, token)) return
- const value = configColorOverrides[key]
- if (typeof value === 'string' && value) {
- const overrideKey = isLightThemeConfigColorKey(key) ? key : `up-${token}`
- runtimeThemeOverrideState.configColor[overrideKey] = true
- return
- }
- delete runtimeThemeOverrideState.configColor[key]
- delete runtimeThemeOverrideState.configColor[`u-${token}`]
- delete runtimeThemeOverrideState.configColor[`up-${token}`]
- })
- }
-}
-
-function getExplicitRuntimeColorValue(token, runtimeColorMap = {}) {
- const field = LIGHT_THEME_TOKEN_FIELD_MAP[token]
- if (!field) return ''
- if (runtimeThemeOverrideState.color[field]) {
- const value = color[field]
- if (typeof value === 'string' && value) return value
- }
- const upKey = `up-${token}`
- const uKey = `u-${token}`
- if (!runtimeThemeOverrideState.configColor[upKey] && !runtimeThemeOverrideState.configColor[uKey]) return ''
- const upValue = runtimeColorMap[upKey]
- const uValue = runtimeColorMap[uKey]
- if (runtimeThemeOverrideState.configColor[upKey] && typeof upValue === 'string' && upValue) return upValue
- if (runtimeThemeOverrideState.configColor[uKey] && typeof uValue === 'string' && uValue) return uValue
- return ''
-}
-
-function readThemePreferenceFromStorage() {
- try {
- if (typeof uni !== 'undefined' && typeof uni.getStorageSync === 'function') {
- const mode = uni.getStorageSync(THEME_MODE_STORAGE_KEY)
- return normalizeThemePreference(mode)
- }
- } catch (e) {}
- return THEME_MODE_SYSTEM
-}
-
-function writeThemePreferenceToStorage(mode) {
- try {
- if (typeof uni !== 'undefined' && typeof uni.setStorageSync === 'function') {
- uni.setStorageSync(THEME_MODE_STORAGE_KEY, mode)
- }
- } catch (e) {}
-}
-
-export function getSystemTheme() {
- let theme = 'light'
- try {
- if (typeof uni !== 'undefined' && typeof uni.getAppBaseInfo === 'function') {
- const appBaseInfo = uni.getAppBaseInfo() || {}
- if (appBaseInfo.theme) {
- theme = appBaseInfo.theme
- }
- }
- if (typeof uni !== 'undefined' && typeof uni.getSystemInfoSync === 'function') {
- const systemInfo = uni.getSystemInfoSync() || {}
- if (systemInfo.theme) {
- theme = systemInfo.theme
- }
- }
- } catch (e) {
- theme = 'light'
- }
- return normalizeThemeMode(theme)
-}
-
-function getCurrentLightThemeColors() {
- const runtimeColorMap = config.color || {}
- const lightThemeColors = {
- ...DEFAULT_LIGHT_THEME_COLORS
- }
- Object.keys(LIGHT_THEME_TOKEN_FIELD_MAP).forEach((token) => {
- const explicitValue = getExplicitRuntimeColorValue(token, runtimeColorMap)
- if (!explicitValue) return
- lightThemeColors[LIGHT_THEME_TOKEN_FIELD_MAP[token]] = explicitValue
- })
- return lightThemeColors
-}
-
-function getThemeColorsByMode(mode) {
- if (!cachedLightThemeColors) {
- cachedLightThemeColors = getCurrentLightThemeColors()
- }
- const themeMode = normalizeThemeMode(mode)
- if (themeMode === 'dark') {
- return {
- ...DEFAULT_DARK_THEME_COLORS,
- primary: cachedLightThemeColors.primary,
- info: cachedLightThemeColors.info,
- warning: cachedLightThemeColors.warning,
- error: cachedLightThemeColors.error,
- success: cachedLightThemeColors.success
- }
- }
- return {
- ...cachedLightThemeColors
- }
-}
-
-function buildConfigColorMap(themeColors) {
- return {
- 'u-primary': themeColors.primary,
- 'u-primary-dark': themeColors.primaryDark,
- 'u-primary-disabled': themeColors.primaryDisabled,
- 'u-primary-light': themeColors.primaryLight,
- 'u-warning': themeColors.warning,
- 'u-warning-dark': themeColors.warningDark,
- 'u-warning-disabled': themeColors.warningDisabled,
- 'u-warning-light': themeColors.warningLight,
- 'u-success': themeColors.success,
- 'u-success-dark': themeColors.successDark,
- 'u-success-disabled': themeColors.successDisabled,
- 'u-success-light': themeColors.successLight,
- 'u-error': themeColors.error,
- 'u-error-dark': themeColors.errorDark,
- 'u-error-disabled': themeColors.errorDisabled,
- 'u-error-light': themeColors.errorLight,
- 'u-info': themeColors.info,
- 'u-info-dark': themeColors.infoDark,
- 'u-info-disabled': themeColors.infoDisabled,
- 'u-info-light': themeColors.infoLight,
- 'u-main-color': themeColors.mainColor,
- 'u-content-color': themeColors.contentColor,
- 'u-tips-color': themeColors.tipsColor,
- 'u-light-color': themeColors.lightColor,
- 'u-border-color': themeColors.borderColor,
- 'u-bg-color': themeColors.bgColor,
- 'u-disabled-color': themeColors.disabledColor,
- 'up-primary': themeColors.primary,
- 'up-primary-dark': themeColors.primaryDark,
- 'up-primary-disabled': themeColors.primaryDisabled,
- 'up-primary-light': themeColors.primaryLight,
- 'up-warning': themeColors.warning,
- 'up-warning-dark': themeColors.warningDark,
- 'up-warning-disabled': themeColors.warningDisabled,
- 'up-warning-light': themeColors.warningLight,
- 'up-success': themeColors.success,
- 'up-success-dark': themeColors.successDark,
- 'up-success-disabled': themeColors.successDisabled,
- 'up-success-light': themeColors.successLight,
- 'up-error': themeColors.error,
- 'up-error-dark': themeColors.errorDark,
- 'up-error-disabled': themeColors.errorDisabled,
- 'up-error-light': themeColors.errorLight,
- 'up-info': themeColors.info,
- 'up-info-dark': themeColors.infoDark,
- 'up-info-disabled': themeColors.infoDisabled,
- 'up-info-light': themeColors.infoLight,
- 'up-main-color': themeColors.mainColor,
- 'up-content-color': themeColors.contentColor,
- 'up-tips-color': themeColors.tipsColor,
- 'up-light-color': themeColors.lightColor,
- 'up-border-color': themeColors.borderColor,
- 'up-bg-color': themeColors.bgColor,
- 'up-disabled-color': themeColors.disabledColor
- }
-}
-
-function buildAliasCssVars(vars = {}) {
- const aliasVars = {}
- Object.keys(vars).forEach((key) => {
- if (typeof key !== 'string') return
- if (key.indexOf('--up-') === 0) {
- aliasVars[key.replace('--up-', '--u-')] = vars[key]
- return
- }
- if (key.indexOf('--u-') === 0) {
- aliasVars[key.replace('--u-', '--up-')] = vars[key]
- }
- })
- return aliasVars
-}
-
-function buildThemeCssVars(themeColors, mode = 'light') {
- const themeMode = normalizeThemeMode(mode)
- const isDark = themeMode === 'dark'
- const useBridge = !isDark
- const runtimeColorMap = config.color || {}
- const defaultExtraVars = DEFAULT_THEME_EXTRA_VARS[themeMode] || DEFAULT_THEME_EXTRA_VARS.light
- const pageBgColor = themeColors.bgColor || (isDark ? '#1f1f1f' : '#f3f4f6')
- const hoverBgColor = runtimeColorMap['up-hover-bg-color']
- || runtimeColorMap['u-hover-bg-color']
- || (isDark ? '#343741' : '#e7ebf0')
- const navbarBgColor = runtimeColorMap['up-navbar-bg-color']
- || runtimeColorMap['u-navbar-bg-color']
- || (isDark ? '#1c1c1e' : '#ffffff')
- const resolveLightTokenValue = (token, fallback) => {
- if (!useBridge) return fallback
- const explicitValue = getExplicitRuntimeColorValue(token, runtimeColorMap)
- return explicitValue || getLightBridgeVar(token, fallback)
- }
- const resolvedMainColor = resolveLightTokenValue('main-color', themeColors.mainColor)
- const resolvedContentColor = resolveLightTokenValue('content-color', themeColors.contentColor)
- const resolvedTipsColor = resolveLightTokenValue('tips-color', themeColors.tipsColor)
- const resolvedLightColor = resolveLightTokenValue('light-color', themeColors.lightColor)
- const resolvedBorderColor = resolveLightTokenValue('border-color', themeColors.borderColor)
- const resolvedBgColor = resolveLightTokenValue('bg-color', themeColors.bgColor)
- const resolvedDisabledColor = resolveLightTokenValue('disabled-color', themeColors.disabledColor)
- const resolvedPrimary = resolveLightTokenValue('primary', themeColors.primary)
- const resolvedPrimaryDark = resolveLightTokenValue('primary-dark', themeColors.primaryDark)
- const resolvedPrimaryDisabled = resolveLightTokenValue('primary-disabled', themeColors.primaryDisabled)
- const resolvedPrimaryLight = resolveLightTokenValue('primary-light', themeColors.primaryLight)
- const resolvedWarning = resolveLightTokenValue('warning', themeColors.warning)
- const resolvedWarningDark = resolveLightTokenValue('warning-dark', themeColors.warningDark)
- const resolvedWarningDisabled = resolveLightTokenValue('warning-disabled', themeColors.warningDisabled)
- const resolvedWarningLight = resolveLightTokenValue('warning-light', themeColors.warningLight)
- const resolvedSuccess = resolveLightTokenValue('success', themeColors.success)
- const resolvedSuccessDark = resolveLightTokenValue('success-dark', themeColors.successDark)
- const resolvedSuccessDisabled = resolveLightTokenValue('success-disabled', themeColors.successDisabled)
- const resolvedSuccessLight = resolveLightTokenValue('success-light', themeColors.successLight)
- const resolvedError = resolveLightTokenValue('error', themeColors.error)
- const resolvedErrorDark = resolveLightTokenValue('error-dark', themeColors.errorDark)
- const resolvedErrorDisabled = resolveLightTokenValue('error-disabled', themeColors.errorDisabled)
- const resolvedErrorLight = resolveLightTokenValue('error-light', themeColors.errorLight)
- const resolvedInfo = resolveLightTokenValue('info', themeColors.info)
- const resolvedInfoDark = resolveLightTokenValue('info-dark', themeColors.infoDark)
- const resolvedInfoDisabled = resolveLightTokenValue('info-disabled', themeColors.infoDisabled)
- const resolvedInfoLight = resolveLightTokenValue('info-light', themeColors.infoLight)
- const coreVars = {
- '--u-main-color': resolvedMainColor,
- '--u-content-color': resolvedContentColor,
- '--u-tips-color': resolvedTipsColor,
- '--u-light-color': resolvedLightColor,
- '--u-border-color': resolvedBorderColor,
- '--u-bg-color': resolvedBgColor,
- '--u-hover-bg-color': hoverBgColor,
- '--u-disabled-color': resolvedDisabledColor,
- '--u-primary': resolvedPrimary,
- '--u-primary-dark': resolvedPrimaryDark,
- '--u-primary-disabled': resolvedPrimaryDisabled,
- '--u-primary-light': resolvedPrimaryLight,
- '--u-warning': resolvedWarning,
- '--u-warning-dark': resolvedWarningDark,
- '--u-warning-disabled': resolvedWarningDisabled,
- '--u-warning-light': resolvedWarningLight,
- '--u-success': resolvedSuccess,
- '--u-success-dark': resolvedSuccessDark,
- '--u-success-disabled': resolvedSuccessDisabled,
- '--u-success-light': resolvedSuccessLight,
- '--u-error': resolvedError,
- '--u-error-dark': resolvedErrorDark,
- '--u-error-disabled': resolvedErrorDisabled,
- '--u-error-light': resolvedErrorLight,
- '--u-info': resolvedInfo,
- '--u-info-dark': resolvedInfoDark,
- '--u-info-disabled': resolvedInfoDisabled,
- '--u-info-light': resolvedInfoLight,
- '--up-main-color': resolvedMainColor,
- '--up-content-color': resolvedContentColor,
- '--up-tips-color': resolvedTipsColor,
- '--up-light-color': resolvedLightColor,
- '--up-border-color': resolvedBorderColor,
- '--up-bg-color': resolvedBgColor,
- '--up-hover-bg-color': hoverBgColor,
- '--up-disabled-color': resolvedDisabledColor,
- '--up-primary': resolvedPrimary,
- '--up-primary-dark': resolvedPrimaryDark,
- '--up-primary-disabled': resolvedPrimaryDisabled,
- '--up-primary-light': resolvedPrimaryLight,
- '--up-warning': resolvedWarning,
- '--up-warning-dark': resolvedWarningDark,
- '--up-warning-disabled': resolvedWarningDisabled,
- '--up-warning-light': resolvedWarningLight,
- '--up-success': resolvedSuccess,
- '--up-success-dark': resolvedSuccessDark,
- '--up-success-disabled': resolvedSuccessDisabled,
- '--up-success-light': resolvedSuccessLight,
- '--up-error': resolvedError,
- '--up-error-dark': resolvedErrorDark,
- '--up-error-disabled': resolvedErrorDisabled,
- '--up-error-light': resolvedErrorLight,
- '--up-info': resolvedInfo,
- '--up-info-dark': resolvedInfoDark,
- '--up-info-disabled': resolvedInfoDisabled,
- '--up-info-light': resolvedInfoLight,
- '--up-page-bg-color': pageBgColor,
- '--up-card-bg-color': isDark ? '#1c1c1e' : '#ffffff',
- '--up-navbar-bg-color': navbarBgColor
- }
- const extraVars = {}
- Object.keys(runtimeColorMap).forEach((key) => {
- if (typeof key !== 'string') return
- const isThemeToken = key.indexOf('up-') === 0 || key.indexOf('u-') === 0
- if (!isThemeToken) return
- const cssVarName = `--${key}`
- if (Object.prototype.hasOwnProperty.call(coreVars, cssVarName)) return
- const value = runtimeColorMap[key]
- if (typeof value === 'string' && value) {
- extraVars[cssVarName] = value
- }
- })
- return {
- ...coreVars,
- ...defaultExtraVars,
- ...buildAliasCssVars(defaultExtraVars),
- ...extraVars,
- ...buildAliasCssVars(extraVars)
- }
-}
-
-export function getThemeVars(mode) {
- if (mode) {
- return buildThemeCssVars(getThemeColorsByMode(mode), mode)
- }
- if (themeState.vars && Object.keys(themeState.vars).length > 0) {
- return { ...themeState.vars }
- }
- return buildThemeCssVars(getThemeColorsByMode(themeState.mode), themeState.mode)
-}
-
-function syncThemeToH5(mode) {
- // #ifdef H5
- if (typeof document !== 'undefined' && document.documentElement) {
- document.documentElement.setAttribute('data-up-theme', mode)
- }
- // #endif
-}
-
-function hasActiveRuntimePage() {
- try {
- if (typeof getCurrentPages === 'function') {
- const pages = getCurrentPages()
- return Array.isArray(pages) && pages.length > 0
- }
- } catch (e) {}
- return false
-}
-
-function trySetNavigationBarColor(options) {
- if (typeof uni === 'undefined' || typeof uni.setNavigationBarColor !== 'function') return
- if (!hasActiveRuntimePage()) return
- try {
- const result = uni.setNavigationBarColor(options)
- if (result && typeof result.catch === 'function') {
- result.catch(() => {})
- }
- } catch (e) {}
-}
-
-function applyNativeThemeUI(mode, themeColors, themeVars = {}) {
- if (typeof uni === 'undefined') return
- if (config.nativeThemeSync !== true) return
- const isDark = normalizeThemeMode(mode) === 'dark'
- const pageBg = themeColors?.bgColor || (isDark ? '#1f1f1f' : '#f3f4f6')
- const navBg = themeVars?.['--up-navbar-bg-color']
- || themeVars?.['--u-navbar-bg-color']
- || config.color?.['up-navbar-bg-color']
- || config.color?.['u-navbar-bg-color']
- || (isDark ? '#1c1c1e' : '#ffffff')
- trySetNavigationBarColor({
- frontColor: isDark ? '#ffffff' : '#000000',
- backgroundColor: navBg,
- animation: {
- duration: 0,
- timingFunc: 'linear'
- }
- })
- if (typeof uni.setBackgroundColor === 'function') {
- uni.setBackgroundColor({
- backgroundColor: pageBg,
- backgroundColorTop: pageBg,
- backgroundColorBottom: pageBg
- })
- }
- trySetTabBarStyle({
- color: isDark ? '#8e8e93' : '#909399',
- selectedColor: isDark ? '#f2f2f7' : '#303133',
- backgroundColor: isDark ? '#111111' : '#ffffff',
- borderStyle: isDark ? 'white' : 'black'
- })
-}
-
-function applyTheme(mode = 'light') {
- const themeMode = normalizeThemeMode(mode)
- const themeColors = getThemeColorsByMode(themeMode)
- const themeVars = buildThemeCssVars(themeColors, themeMode)
- index.shallowMerge(color, {
- primary: themeColors.primary,
- primaryDark: themeColors.primaryDark,
- primaryDisabled: themeColors.primaryDisabled,
- primaryLight: themeColors.primaryLight,
- info: themeColors.info,
- infoDark: themeColors.infoDark,
- infoDisabled: themeColors.infoDisabled,
- infoLight: themeColors.infoLight,
- default: themeColors.info,
- warning: themeColors.warning,
- warningDark: themeColors.warningDark,
- warningDisabled: themeColors.warningDisabled,
- warningLight: themeColors.warningLight,
- error: themeColors.error,
- errorDark: themeColors.errorDark,
- errorDisabled: themeColors.errorDisabled,
- errorLight: themeColors.errorLight,
- success: themeColors.success,
- successDark: themeColors.successDark,
- successDisabled: themeColors.successDisabled,
- successLight: themeColors.successLight,
- mainColor: themeColors.mainColor,
- contentColor: themeColors.contentColor,
- tipsColor: themeColors.tipsColor,
- lightColor: themeColors.lightColor,
- borderColor: themeColors.borderColor,
- bgColor: themeColors.bgColor,
- disabledColor: themeColors.disabledColor
- })
- index.shallowMerge(config.color, buildConfigColorMap(themeColors))
- config.themeMode = themeMode
- themeState.preference = currentThemePreference
- themeState.mode = themeMode
- themeState.vars = { ...themeVars }
- themeState.version = Number(themeState.version || 0) + 1
- syncThemeToH5(themeMode)
- applyNativeThemeUI(themeMode, themeColors, themeVars)
-
- if (typeof uni !== 'undefined' && uni.$u && uni.$u.theme) {
- uni.$u.theme.mode = themeState.mode
- if (Object.prototype.hasOwnProperty.call(uni.$u.theme, 'colors')) {
- delete uni.$u.theme.colors
- }
- uni.$u.theme.vars = { ...themeState.vars }
- uni.$u.theme.version = themeState.version
- }
- if (typeof uni !== 'undefined' && typeof uni.$emit === 'function') {
- uni.$emit('uThemeChange', {
- mode: themeState.mode,
- colors: { ...themeColors },
- version: themeState.version,
- vars: { ...themeState.vars }
- })
- }
- return themeState
-}
-
-export function setTheme(mode = 'light') {
- currentThemePreference = normalizeThemeMode(mode)
- writeThemePreferenceToStorage(currentThemePreference)
- return applyTheme(currentThemePreference)
-}
-
-export function setThemePreference(mode = THEME_MODE_SYSTEM) {
- currentThemePreference = normalizeThemePreference(mode)
- writeThemePreferenceToStorage(currentThemePreference)
- if (currentThemePreference === THEME_MODE_SYSTEM) {
- return applyTheme(getSystemTheme())
- }
- return applyTheme(currentThemePreference)
-}
-
-export function getThemePreference() {
- return currentThemePreference
-}
-
-export function refreshThemeFromConfig() {
- cachedLightThemeColors = getCurrentLightThemeColors()
- if (themeState.version > 0) {
- applyTheme(themeState.mode)
- }
-}
-
-export function initThemeSystem() {
- if (typeof uni === 'undefined') return
- if (!cachedLightThemeColors) {
- cachedLightThemeColors = getCurrentLightThemeColors()
- }
- currentThemePreference = readThemePreferenceFromStorage()
- if (currentThemePreference === THEME_MODE_SYSTEM) {
- applyTheme(getSystemTheme())
- } else {
- applyTheme(currentThemePreference)
- }
- if (!hasRegisterThemeListener && typeof uni.onThemeChange === 'function') {
- uni.onThemeChange((res = {}) => {
- if (currentThemePreference === THEME_MODE_SYSTEM) {
- applyTheme(res.theme)
- }
- })
- hasRegisterThemeListener = true
- }
-}
diff --git a/uni_modules/uview-plus/libs/util/calendar.js b/uni_modules/uview-plus/libs/util/calendar.js
index 5afcd30..6b922fa 100644
--- a/uni_modules/uview-plus/libs/util/calendar.js
+++ b/uni_modules/uview-plus/libs/util/calendar.js
@@ -1,546 +1,546 @@
-/**
-* @1900-2100区间内的公历、农历互转
-* @charset UTF-8
-* @github https://github.com/jjonline/calendar.js
-* @Author Jea杨(JJonline@JJonline.Cn)
-* @Time 2014-7-21
-* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
-* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
-* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
-* @Version 1.0.3
-* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
-* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
-*/
-/* eslint-disable */
-var Calendar = {
-
- /**
- * 农历1900-2100的润大小信息表
- * @Array Of Property
- * @return Hex
- */
- lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
- 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
- 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
- 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
- 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
- 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
- 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
- 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
- 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
- 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
- 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
- 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
- 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
- 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
- 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
- /** Add By JJonline@JJonline.Cn**/
- 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
- 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
- 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
- 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
- 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
- 0x0d520], // 2100
-
- /**
- * 公历每个月份的天数普通表
- * @Array Of Property
- * @return Number
- */
- solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
-
- /**
- * 天干地支之天干速查表
- * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
- * @return Cn string
- */
- Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
-
- /**
- * 天干地支之地支速查表
- * @Array Of Property
- * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
- * @return Cn string
- */
- Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
-
- /**
- * 天干地支之地支速查表<=>生肖
- * @Array Of Property
- * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
- * @return Cn string
- */
- Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
-
- /**
- * 24节气速查表
- * @Array Of Property
- * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
- * @return Cn string
- */
- solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
-
- /**
- * 1900-2100各年的24节气日期速查表
- * @Array Of Property
- * @return 0x string For splice
- */
- sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
- '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
- 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
- '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
- '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
- '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
- '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
- '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
- '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
- '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
- '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
- '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
- '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
- '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
- '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
- '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
- '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
- '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
- '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
-
- /**
- * 数字转中文速查表
- * @Array Of Property
- * @trans ['日','一','二','三','四','五','六','七','八','九','十']
- * @return Cn string
- */
- nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
-
- /**
- * 日期转农历称呼速查表
- * @Array Of Property
- * @trans ['初','十','廿','卅']
- * @return Cn string
- */
- nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
-
- /**
- * 月份转农历称呼速查表
- * @Array Of Property
- * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
- * @return Cn string
- */
- nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
-
- /**
- * 返回农历y年一整年的总天数
- * @param lunar Year
- * @return Number
- * @eg:var count = calendar.lYearDays(1987) ;//count=387
- */
- lYearDays: function (y) {
- var i; var sum = 348
- for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
- return (sum + this.leapDays(y))
- },
-
- /**
- * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
- * @param lunar Year
- * @return Number (0-12)
- * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
- */
- leapMonth: function (y) { // 闰字编码 \u95f0
- return (this.lunarInfo[y - 1900] & 0xf)
- },
-
- /**
- * 返回农历y年闰月的天数 若该年没有闰月则返回0
- * @param lunar Year
- * @return Number (0、29、30)
- * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
- */
- leapDays: function (y) {
- if (this.leapMonth(y)) {
- return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
- }
- return (0)
- },
-
- /**
- * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
- * @param lunar Year
- * @return Number (-1、29、30)
- * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
- */
- monthDays: function (y, m) {
- if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
- return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
- },
-
- /**
- * 返回公历(!)y年m月的天数
- * @param solar Year
- * @return Number (-1、28、29、30、31)
- * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
- */
- solarDays: function (y, m) {
- if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
- var ms = m - 1
- if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
- return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
- } else {
- return (this.solarMonth[ms])
- }
- },
-
- /**
- * 农历年份转换为干支纪年
- * @param lYear 农历年的年份数
- * @return Cn string
- */
- toGanZhiYear: function (lYear) {
- var ganKey = (lYear - 3) % 10
- var zhiKey = (lYear - 3) % 12
- if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
- if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
- return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
- },
-
- /**
- * 公历月、日判断所属星座
- * @param cMonth [description]
- * @param cDay [description]
- * @return Cn string
- */
- toAstro: function (cMonth, cDay) {
- var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
- var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
- return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
- },
-
- /**
- * 传入offset偏移量返回干支
- * @param offset 相对甲子的偏移量
- * @return Cn string
- */
- toGanZhi: function (offset) {
- return this.Gan[offset % 10] + this.Zhi[offset % 12]
- },
-
- /**
- * 传入公历(!)y年获得该年第n个节气的公历日期
- * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
- * @return day Number
- * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
- */
- getTerm: function (y, n) {
- if (y < 1900 || y > 2100) { return -1 }
- if (n < 1 || n > 24) { return -1 }
- var _table = this.sTermInfo[y - 1900]
- var _info = [
- parseInt('0x' + _table.substr(0, 5)).toString(),
- parseInt('0x' + _table.substr(5, 5)).toString(),
- parseInt('0x' + _table.substr(10, 5)).toString(),
- parseInt('0x' + _table.substr(15, 5)).toString(),
- parseInt('0x' + _table.substr(20, 5)).toString(),
- parseInt('0x' + _table.substr(25, 5)).toString()
- ]
- var _calday = [
- _info[0].substr(0, 1),
- _info[0].substr(1, 2),
- _info[0].substr(3, 1),
- _info[0].substr(4, 2),
-
- _info[1].substr(0, 1),
- _info[1].substr(1, 2),
- _info[1].substr(3, 1),
- _info[1].substr(4, 2),
-
- _info[2].substr(0, 1),
- _info[2].substr(1, 2),
- _info[2].substr(3, 1),
- _info[2].substr(4, 2),
-
- _info[3].substr(0, 1),
- _info[3].substr(1, 2),
- _info[3].substr(3, 1),
- _info[3].substr(4, 2),
-
- _info[4].substr(0, 1),
- _info[4].substr(1, 2),
- _info[4].substr(3, 1),
- _info[4].substr(4, 2),
-
- _info[5].substr(0, 1),
- _info[5].substr(1, 2),
- _info[5].substr(3, 1),
- _info[5].substr(4, 2)
- ]
- return parseInt(_calday[n - 1])
- },
-
- /**
- * 传入农历数字月份返回汉语通俗表示法
- * @param lunar month
- * @return Cn string
- * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
- */
- toChinaMonth: function (m) { // 月 => \u6708
- if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
- var s = this.nStr3[m - 1]
- s += '\u6708'// 加上月字
- return s
- },
-
- /**
- * 传入农历日期数字返回汉字表示法
- * @param lunar day
- * @return Cn string
- * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
- */
- toChinaDay: function (d) { // 日 => \u65e5
- var s
- switch (d) {
- case 10:
- s = '\u521d\u5341'; break
- case 20:
- s = '\u4e8c\u5341'; break
- break
- case 30:
- s = '\u4e09\u5341'; break
- break
- default:
- s = this.nStr2[Math.floor(d / 10)]
- s += this.nStr1[d % 10]
- }
- return (s)
- },
-
- /**
- * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
- * @param y year
- * @return Cn string
- * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
- */
- getAnimal: function (y) {
- return this.Animals[(y - 4) % 12]
- },
-
- /**
- * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
- * @param y solar year
- * @param m solar month
- * @param d solar day
- * @return JSON object
- * @eg:console.log(calendar.solar2lunar(1987,11,01));
- */
- solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
- // 年份限定、上限
- if (y < 1900 || y > 2100) {
- return -1// undefined转换为数字变为NaN
- }
- // 公历传参最下限
- if (y == 1900 && m == 1 && d < 31) {
- return -1
- }
- // 未传参 获得当天
- if (!y) {
- var objDate = new Date()
- } else {
- var objDate = new Date(y, parseInt(m) - 1, d)
- }
- var i; var leap = 0; var temp = 0
- // 修正ymd参数
- var y = objDate.getFullYear()
- var m = objDate.getMonth() + 1
- var d = objDate.getDate()
- var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
- for (i = 1900; i < 2101 && offset > 0; i++) {
- temp = this.lYearDays(i)
- offset -= temp
- }
- if (offset < 0) {
- offset += temp; i--
- }
-
- // 是否今天
- var isTodayObj = new Date()
- var isToday = false
- if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
- isToday = true
- }
- // 星期几
- var nWeek = objDate.getDay()
- var cWeek = this.nStr1[nWeek]
- // 数字表示周几顺应天朝周一开始的惯例
- if (nWeek == 0) {
- nWeek = 7
- }
- // 农历年
- var year = i
- var leap = this.leapMonth(i) // 闰哪个月
- var isLeap = false
-
- // 效验闰月
- for (i = 1; i < 13 && offset > 0; i++) {
- // 闰月
- if (leap > 0 && i == (leap + 1) && isLeap == false) {
- --i
- isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
- } else {
- temp = this.monthDays(year, i)// 计算农历普通月天数
- }
- // 解除闰月
- if (isLeap == true && i == (leap + 1)) { isLeap = false }
- offset -= temp
- }
- // 闰月导致数组下标重叠取反
- if (offset == 0 && leap > 0 && i == leap + 1) {
- if (isLeap) {
- isLeap = false
- } else {
- isLeap = true; --i
- }
- }
- if (offset < 0) {
- offset += temp; --i
- }
- // 农历月
- var month = i
- // 农历日
- var day = offset + 1
- // 天干地支处理
- var sm = m - 1
- var gzY = this.toGanZhiYear(year)
-
- // 当月的两个节气
- // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
- var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
- var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
-
- // 依据12节气修正干支月
- var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
- if (d >= firstNode) {
- gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
- }
-
- // 传入的日期的节气与否
- var isTerm = false
- var Term = null
- if (firstNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 2]
- }
- if (secondNode == d) {
- isTerm = true
- Term = this.solarTerm[m * 2 - 1]
- }
- // 日柱 当月一日与 1900/1/1 相差天数
- var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
- var gzD = this.toGanZhi(dayCyclical + d - 1)
- // 该日期所属的星座
- var astro = this.toAstro(m, d)
-
- return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
- },
-
- /**
- * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
- * @param y lunar year
- * @param m lunar month
- * @param d lunar day
- * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
- * @return JSON object
- * @eg:console.log(calendar.lunar2solar(1987,9,10));
- */
- lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
- var isLeapMonth = !!isLeapMonth
- var leapOffset = 0
- var leapMonth = this.leapMonth(y)
- var leapDay = this.leapDays(y)
- if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
- if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
- var day = this.monthDays(y, m)
- var _day = day
- // bugFix 2016-9-25
- // if month is leap, _day use leapDays method
- if (isLeapMonth) {
- _day = this.leapDays(y, m)
- }
- if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
-
- // 计算农历的时间差
- var offset = 0
- for (var i = 1900; i < y; i++) {
- offset += this.lYearDays(i)
- }
- var leap = 0; var isAdd = false
- for (var i = 1; i < m; i++) {
- leap = this.leapMonth(y)
- if (!isAdd) { // 处理闰月
- if (leap <= i && leap > 0) {
- offset += this.leapDays(y); isAdd = true
- }
- }
- offset += this.monthDays(y, i)
- }
- // 转换闰月农历 需补充该年闰月的前一个月的时差
- if (isLeapMonth) { offset += day }
- // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
- var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
- var calObj = new Date((offset + d - 31) * 86400000 + stmap)
- var cY = calObj.getUTCFullYear()
- var cM = calObj.getUTCMonth() + 1
- var cD = calObj.getUTCDate()
-
- return this.solar2lunar(cY, cM, cD)
- }
-}
-
-export default Calendar
+/**
+* @1900-2100区间内的公历、农历互转
+* @charset UTF-8
+* @github https://github.com/jjonline/calendar.js
+* @Author Jea杨(JJonline@JJonline.Cn)
+* @Time 2014-7-21
+* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
+* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
+* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
+* @Version 1.0.3
+* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+*/
+/* eslint-disable */
+var Calendar = {
+
+ /**
+ * 农历1900-2100的润大小信息表
+ * @Array Of Property
+ * @return Hex
+ */
+ lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
+ 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
+ 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
+ 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
+ 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
+ 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
+ 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
+ 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
+ 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
+ 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
+ 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
+ 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
+ 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
+ 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
+ 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
+ /** Add By JJonline@JJonline.Cn**/
+ 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
+ 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
+ 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
+ 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
+ 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
+ 0x0d520], // 2100
+
+ /**
+ * 公历每个月份的天数普通表
+ * @Array Of Property
+ * @return Number
+ */
+ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+
+ /**
+ * 天干地支之天干速查表
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+ * @return Cn string
+ */
+ Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
+
+ /**
+ * 天干地支之地支速查表
+ * @Array Of Property
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+ * @return Cn string
+ */
+ Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
+
+ /**
+ * 天干地支之地支速查表<=>生肖
+ * @Array Of Property
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+ * @return Cn string
+ */
+ Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
+
+ /**
+ * 24节气速查表
+ * @Array Of Property
+ * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
+ * @return Cn string
+ */
+ solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
+
+ /**
+ * 1900-2100各年的24节气日期速查表
+ * @Array Of Property
+ * @return 0x string For splice
+ */
+ sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
+ '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
+ 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
+ '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
+ '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
+ '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
+ '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
+ '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+ '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+ '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+ '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+ '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
+ '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+ '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+ '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+ '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
+ '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
+ '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+ '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
+
+ /**
+ * 数字转中文速查表
+ * @Array Of Property
+ * @trans ['日','一','二','三','四','五','六','七','八','九','十']
+ * @return Cn string
+ */
+ nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
+
+ /**
+ * 日期转农历称呼速查表
+ * @Array Of Property
+ * @trans ['初','十','廿','卅']
+ * @return Cn string
+ */
+ nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
+
+ /**
+ * 月份转农历称呼速查表
+ * @Array Of Property
+ * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
+ * @return Cn string
+ */
+ nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
+
+ /**
+ * 返回农历y年一整年的总天数
+ * @param lunar Year
+ * @return Number
+ * @eg:var count = calendar.lYearDays(1987) ;//count=387
+ */
+ lYearDays: function (y) {
+ var i; var sum = 348
+ for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
+ return (sum + this.leapDays(y))
+ },
+
+ /**
+ * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
+ * @param lunar Year
+ * @return Number (0-12)
+ * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
+ */
+ leapMonth: function (y) { // 闰字编码 \u95f0
+ return (this.lunarInfo[y - 1900] & 0xf)
+ },
+
+ /**
+ * 返回农历y年闰月的天数 若该年没有闰月则返回0
+ * @param lunar Year
+ * @return Number (0、29、30)
+ * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
+ */
+ leapDays: function (y) {
+ if (this.leapMonth(y)) {
+ return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
+ }
+ return (0)
+ },
+
+ /**
+ * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
+ * @param lunar Year
+ * @return Number (-1、29、30)
+ * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
+ */
+ monthDays: function (y, m) {
+ if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
+ return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
+ },
+
+ /**
+ * 返回公历(!)y年m月的天数
+ * @param solar Year
+ * @return Number (-1、28、29、30、31)
+ * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
+ */
+ solarDays: function (y, m) {
+ if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
+ var ms = m - 1
+ if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
+ return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
+ } else {
+ return (this.solarMonth[ms])
+ }
+ },
+
+ /**
+ * 农历年份转换为干支纪年
+ * @param lYear 农历年的年份数
+ * @return Cn string
+ */
+ toGanZhiYear: function (lYear) {
+ var ganKey = (lYear - 3) % 10
+ var zhiKey = (lYear - 3) % 12
+ if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
+ if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
+ return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
+ },
+
+ /**
+ * 公历月、日判断所属星座
+ * @param cMonth [description]
+ * @param cDay [description]
+ * @return Cn string
+ */
+ toAstro: function (cMonth, cDay) {
+ var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
+ var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
+ return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
+ },
+
+ /**
+ * 传入offset偏移量返回干支
+ * @param offset 相对甲子的偏移量
+ * @return Cn string
+ */
+ toGanZhi: function (offset) {
+ return this.Gan[offset % 10] + this.Zhi[offset % 12]
+ },
+
+ /**
+ * 传入公历(!)y年获得该年第n个节气的公历日期
+ * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
+ * @return day Number
+ * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
+ */
+ getTerm: function (y, n) {
+ if (y < 1900 || y > 2100) { return -1 }
+ if (n < 1 || n > 24) { return -1 }
+ var _table = this.sTermInfo[y - 1900]
+ var _info = [
+ parseInt('0x' + _table.substr(0, 5)).toString(),
+ parseInt('0x' + _table.substr(5, 5)).toString(),
+ parseInt('0x' + _table.substr(10, 5)).toString(),
+ parseInt('0x' + _table.substr(15, 5)).toString(),
+ parseInt('0x' + _table.substr(20, 5)).toString(),
+ parseInt('0x' + _table.substr(25, 5)).toString()
+ ]
+ var _calday = [
+ _info[0].substr(0, 1),
+ _info[0].substr(1, 2),
+ _info[0].substr(3, 1),
+ _info[0].substr(4, 2),
+
+ _info[1].substr(0, 1),
+ _info[1].substr(1, 2),
+ _info[1].substr(3, 1),
+ _info[1].substr(4, 2),
+
+ _info[2].substr(0, 1),
+ _info[2].substr(1, 2),
+ _info[2].substr(3, 1),
+ _info[2].substr(4, 2),
+
+ _info[3].substr(0, 1),
+ _info[3].substr(1, 2),
+ _info[3].substr(3, 1),
+ _info[3].substr(4, 2),
+
+ _info[4].substr(0, 1),
+ _info[4].substr(1, 2),
+ _info[4].substr(3, 1),
+ _info[4].substr(4, 2),
+
+ _info[5].substr(0, 1),
+ _info[5].substr(1, 2),
+ _info[5].substr(3, 1),
+ _info[5].substr(4, 2)
+ ]
+ return parseInt(_calday[n - 1])
+ },
+
+ /**
+ * 传入农历数字月份返回汉语通俗表示法
+ * @param lunar month
+ * @return Cn string
+ * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
+ */
+ toChinaMonth: function (m) { // 月 => \u6708
+ if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
+ var s = this.nStr3[m - 1]
+ s += '\u6708'// 加上月字
+ return s
+ },
+
+ /**
+ * 传入农历日期数字返回汉字表示法
+ * @param lunar day
+ * @return Cn string
+ * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
+ */
+ toChinaDay: function (d) { // 日 => \u65e5
+ var s
+ switch (d) {
+ case 10:
+ s = '\u521d\u5341'; break
+ case 20:
+ s = '\u4e8c\u5341'; break
+ break
+ case 30:
+ s = '\u4e09\u5341'; break
+ break
+ default:
+ s = this.nStr2[Math.floor(d / 10)]
+ s += this.nStr1[d % 10]
+ }
+ return (s)
+ },
+
+ /**
+ * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
+ * @param y year
+ * @return Cn string
+ * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
+ */
+ getAnimal: function (y) {
+ return this.Animals[(y - 4) % 12]
+ },
+
+ /**
+ * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
+ * @param y solar year
+ * @param m solar month
+ * @param d solar day
+ * @return JSON object
+ * @eg:console.log(calendar.solar2lunar(1987,11,01));
+ */
+ solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
+ // 年份限定、上限
+ if (y < 1900 || y > 2100) {
+ return -1// undefined转换为数字变为NaN
+ }
+ // 公历传参最下限
+ if (y == 1900 && m == 1 && d < 31) {
+ return -1
+ }
+ // 未传参 获得当天
+ if (!y) {
+ var objDate = new Date()
+ } else {
+ var objDate = new Date(y, parseInt(m) - 1, d)
+ }
+ var i; var leap = 0; var temp = 0
+ // 修正ymd参数
+ var y = objDate.getFullYear()
+ var m = objDate.getMonth() + 1
+ var d = objDate.getDate()
+ var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
+ for (i = 1900; i < 2101 && offset > 0; i++) {
+ temp = this.lYearDays(i)
+ offset -= temp
+ }
+ if (offset < 0) {
+ offset += temp; i--
+ }
+
+ // 是否今天
+ var isTodayObj = new Date()
+ var isToday = false
+ if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
+ isToday = true
+ }
+ // 星期几
+ var nWeek = objDate.getDay()
+ var cWeek = this.nStr1[nWeek]
+ // 数字表示周几顺应天朝周一开始的惯例
+ if (nWeek == 0) {
+ nWeek = 7
+ }
+ // 农历年
+ var year = i
+ var leap = this.leapMonth(i) // 闰哪个月
+ var isLeap = false
+
+ // 效验闰月
+ for (i = 1; i < 13 && offset > 0; i++) {
+ // 闰月
+ if (leap > 0 && i == (leap + 1) && isLeap == false) {
+ --i
+ isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
+ } else {
+ temp = this.monthDays(year, i)// 计算农历普通月天数
+ }
+ // 解除闰月
+ if (isLeap == true && i == (leap + 1)) { isLeap = false }
+ offset -= temp
+ }
+ // 闰月导致数组下标重叠取反
+ if (offset == 0 && leap > 0 && i == leap + 1) {
+ if (isLeap) {
+ isLeap = false
+ } else {
+ isLeap = true; --i
+ }
+ }
+ if (offset < 0) {
+ offset += temp; --i
+ }
+ // 农历月
+ var month = i
+ // 农历日
+ var day = offset + 1
+ // 天干地支处理
+ var sm = m - 1
+ var gzY = this.toGanZhiYear(year)
+
+ // 当月的两个节气
+ // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
+ var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
+ var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
+
+ // 依据12节气修正干支月
+ var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
+ if (d >= firstNode) {
+ gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
+ }
+
+ // 传入的日期的节气与否
+ var isTerm = false
+ var Term = null
+ if (firstNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 2]
+ }
+ if (secondNode == d) {
+ isTerm = true
+ Term = this.solarTerm[m * 2 - 1]
+ }
+ // 日柱 当月一日与 1900/1/1 相差天数
+ var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
+ var gzD = this.toGanZhi(dayCyclical + d - 1)
+ // 该日期所属的星座
+ var astro = this.toAstro(m, d)
+
+ return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
+ },
+
+ /**
+ * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
+ * @param y lunar year
+ * @param m lunar month
+ * @param d lunar day
+ * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
+ * @return JSON object
+ * @eg:console.log(calendar.lunar2solar(1987,9,10));
+ */
+ lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
+ var isLeapMonth = !!isLeapMonth
+ var leapOffset = 0
+ var leapMonth = this.leapMonth(y)
+ var leapDay = this.leapDays(y)
+ if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
+ if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
+ var day = this.monthDays(y, m)
+ var _day = day
+ // bugFix 2016-9-25
+ // if month is leap, _day use leapDays method
+ if (isLeapMonth) {
+ _day = this.leapDays(y, m)
+ }
+ if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
+
+ // 计算农历的时间差
+ var offset = 0
+ for (var i = 1900; i < y; i++) {
+ offset += this.lYearDays(i)
+ }
+ var leap = 0; var isAdd = false
+ for (var i = 1; i < m; i++) {
+ leap = this.leapMonth(y)
+ if (!isAdd) { // 处理闰月
+ if (leap <= i && leap > 0) {
+ offset += this.leapDays(y); isAdd = true
+ }
+ }
+ offset += this.monthDays(y, i)
+ }
+ // 转换闰月农历 需补充该年闰月的前一个月的时差
+ if (isLeapMonth) { offset += day }
+ // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
+ var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
+ var calObj = new Date((offset + d - 31) * 86400000 + stmap)
+ var cY = calObj.getUTCFullYear()
+ var cM = calObj.getUTCMonth() + 1
+ var cD = calObj.getUTCDate()
+
+ return this.solar2lunar(cY, cM, cD)
+ }
+}
+
+export default Calendar
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/bridge/bridge-weex.js b/uni_modules/uview-plus/libs/util/gcanvas/bridge/bridge-weex.js
index c450239..cec30ab 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/bridge/bridge-weex.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/bridge/bridge-weex.js
@@ -1,247 +1,241 @@
-const isWeex = typeof WXEnvironment !== 'undefined';
-const weexPlatform = isWeex ? String(WXEnvironment.platform || '').toLowerCase() : '';
-const isWeexIOS = isWeex && weexPlatform.indexOf('ios') !== -1;
-// 显式识别鸿蒙,避免被静态检查判定为未适配,且防止仅按 !ios 归入 Android
-const isWeexHarmony = isWeex && (weexPlatform.indexOf('harmony') !== -1 || weexPlatform.indexOf('ohos') !== -1);
-const isWeexAndroid = isWeex && !isWeexIOS && !isWeexHarmony;
-// 鸿蒙 weex 与 Android 共用非 iOS native bridge 路径
-const isWeexAndroidLike = isWeexAndroid || isWeexHarmony;
-
-import GLmethod from '../context-webgl/GLmethod';
-
-const GCanvasModule =
- (typeof weex !== 'undefined' && weex.requireModule) ? (weex.requireModule('gcanvas')) :
- (typeof __weex_require__ !== 'undefined') ? (__weex_require__('@weex-module/gcanvas')) : {};
-
-let isDebugging = false;
-
-let isComboDisabled = false;
-
-const logCommand = (function () {
- const methodQuery = [];
- Object.keys(GLmethod).forEach(key => {
- methodQuery[GLmethod[key]] = key;
- })
- const queryMethod = (id) => {
- return methodQuery[parseInt(id)] || 'NotFoundMethod';
- }
- const logCommand = (id, cmds) => {
- const mId = cmds.split(',')[0];
- console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`);
- }
- return logCommand;
-})();
-
-function joinArray(arr, sep) {
- let res = '';
- for (let i = 0; i < arr.length; i++) {
- if (i !== 0) {
- res += sep;
- }
- res += arr[i];
- }
- return res;
-}
-
-const commandsCache = {}
-
-const GBridge = {
-
- callEnable: (ref, configArray) => {
-
- commandsCache[ref] = [];
-
- return GCanvasModule.enable({
- componentId: ref,
- config: configArray
- });
- },
-
- callEnableDebug: () => {
- isDebugging = true;
- },
-
- callEnableDisableCombo: () => {
- isComboDisabled = true;
- },
-
- callSetContextType: function (componentId, context_type) {
- GCanvasModule.setContextType(context_type, componentId);
- },
-
- callReset: function(id){
- GCanvasModule.resetComponent && canvasModule.resetComponent(componentId);
- },
-
- render: isWeexIOS ? function (componentId) {
- return GCanvasModule.extendCallNative({
- contextId: componentId,
- type: 0x60000001
- });
- } : function (componentId) {
- return callGCanvasLinkNative(componentId, 0x60000001, 'render');
- },
-
- render2d: isWeexIOS ? function (componentId, commands, callback) {
-
- if (isDebugging) {
- console.log('>>> >>> render2d ===');
- console.log('>>> commands: ' + commands);
- }
-
- GCanvasModule.render([commands, callback?true:false], componentId, callback);
-
- } : function (componentId, commands,callback) {
-
- if (isDebugging) {
- console.log('>>> >>> render2d ===');
- console.log('>>> commands: ' + commands);
- }
-
- callGCanvasLinkNative(componentId, 0x20000001, commands);
- if(callback){
- callback();
- }
- },
-
- callExtendCallNative: isWeexIOS ? function (componentId, cmdArgs) {
-
- throw 'should not be here anymore ' + cmdArgs;
-
- } : function (componentId, cmdArgs) {
-
- throw 'should not be here anymore ' + cmdArgs;
-
- },
-
-
- flushNative: isWeexIOS ? function (componentId) {
-
- const cmdArgs = joinArray(commandsCache[componentId], ';');
- commandsCache[componentId] = [];
-
- if (isDebugging) {
- console.log('>>> >>> flush native ===');
- console.log('>>> commands: ' + cmdArgs);
- }
-
- const result = GCanvasModule.extendCallNative({
- "contextId": componentId,
- "type": 0x60000000,
- "args": cmdArgs
- });
-
- const res = result && result.result;
-
- if (isDebugging) {
- console.log('>>> result: ' + res);
- }
-
- return res;
-
- } : function (componentId) {
-
- const cmdArgs = joinArray(commandsCache[componentId], ';');
- commandsCache[componentId] = [];
-
- if (isDebugging) {
- console.log('>>> >>> flush native ===');
- console.log('>>> commands: ' + cmdArgs);
- }
-
- const result = callGCanvasLinkNative(componentId, 0x60000000, cmdArgs);
-
- if (isDebugging) {
- console.log('>>> result: ' + result);
- }
-
- return result;
- },
-
- callNative: function (componentId, cmdArgs, cache) {
-
- if (isDebugging) {
- logCommand(componentId, cmdArgs);
- }
-
- commandsCache[componentId].push(cmdArgs);
-
- if (!cache || isComboDisabled) {
- return GBridge.flushNative(componentId);
- } else {
- return undefined;
- }
- },
-
- texImage2D(componentId, ...args) {
- if (isWeexIOS) {
- if (args.length === 6) {
- const [target, level, internalformat, format, type, image] = args;
- GBridge.callNative(
- componentId,
- GLmethod.texImage2D + ',' + 6 + ',' + target + ',' + level + ',' + internalformat + ',' + format + ',' + type + ',' + image.src
- )
- } else if (args.length === 9) {
- const [target, level, internalformat, width, height, border, format, type, image] = args;
- GBridge.callNative(
- componentId,
- GLmethod.texImage2D + ',' + 9 + ',' + target + ',' + level + ',' + internalformat + ',' + width + ',' + height + ',' + border + ',' +
- + format + ',' + type + ',' + (image ? image.src : 0)
- )
- }
- } else if (isWeexAndroidLike) {
- if (args.length === 6) {
- const [target, level, internalformat, format, type, image] = args;
- GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src);
- } else if (args.length === 9) {
- const [target, level, internalformat, width, height, border, format, type, image] = args;
- GCanvasModule.texImage2D(componentId, target, level, internalformat, width, height, border, format, type, (image ? image.src : 0));
- }
- }
- },
-
- texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image) {
- if (isWeexIOS) {
- if (arguments.length === 8) {
- GBridge.callNative(
- componentId,
- GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, + ',' + format + ',' + type + ',' + image.src
- )
- }
- } else if (isWeexAndroidLike) {
- GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src);
- }
- },
-
- bindImageTexture(componentId, src, imageId) {
- GCanvasModule.bindImageTexture([src, imageId], componentId);
- },
-
- perloadImage([url, id], callback) {
- console.log('********************asda**********')
- GCanvasModule.preLoadImage([url, id], function (image) {
- console.log('********************asda2**********')
- image.url = url;
- image.id = id;
- callback(image);
- });
- },
-
- measureText(text, fontStyle, componentId) {
- return GCanvasModule.measureText([text, fontStyle], componentId);
- },
-
- getImageData (componentId, x, y, w, h, callback) {
- GCanvasModule.getImageData([x, y,w,h],componentId,callback);
- },
-
- putImageData (componentId, data, x, y, w, h, callback) {
- GCanvasModule.putImageData([x, y,w,h,data],componentId,callback);
- },
-
- toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, fileType, quality, callback){
- GCanvasModule.toTempFilePath([x, y, width,height, destWidth, destHeight, fileType, quality], componentId, callback);
- }
-}
-
-export default GBridge;
+const isWeex = typeof WXEnvironment !== 'undefined';
+const isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform);
+const isWeexAndroid = isWeex && !isWeexIOS;
+
+import GLmethod from '../context-webgl/GLmethod';
+
+const GCanvasModule =
+ (typeof weex !== 'undefined' && weex.requireModule) ? (weex.requireModule('gcanvas')) :
+ (typeof __weex_require__ !== 'undefined') ? (__weex_require__('@weex-module/gcanvas')) : {};
+
+let isDebugging = false;
+
+let isComboDisabled = false;
+
+const logCommand = (function () {
+ const methodQuery = [];
+ Object.keys(GLmethod).forEach(key => {
+ methodQuery[GLmethod[key]] = key;
+ })
+ const queryMethod = (id) => {
+ return methodQuery[parseInt(id)] || 'NotFoundMethod';
+ }
+ const logCommand = (id, cmds) => {
+ const mId = cmds.split(',')[0];
+ const mName = queryMethod(mId);
+ console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`);
+ }
+ return logCommand;
+})();
+
+function joinArray(arr, sep) {
+ let res = '';
+ for (let i = 0; i < arr.length; i++) {
+ if (i !== 0) {
+ res += sep;
+ }
+ res += arr[i];
+ }
+ return res;
+}
+
+const commandsCache = {}
+
+const GBridge = {
+
+ callEnable: (ref, configArray) => {
+
+ commandsCache[ref] = [];
+
+ return GCanvasModule.enable({
+ componentId: ref,
+ config: configArray
+ });
+ },
+
+ callEnableDebug: () => {
+ isDebugging = true;
+ },
+
+ callEnableDisableCombo: () => {
+ isComboDisabled = true;
+ },
+
+ callSetContextType: function (componentId, context_type) {
+ GCanvasModule.setContextType(context_type, componentId);
+ },
+
+ callReset: function(id){
+ GCanvasModule.resetComponent && canvasModule.resetComponent(componentId);
+ },
+
+ render: isWeexIOS ? function (componentId) {
+ return GCanvasModule.extendCallNative({
+ contextId: componentId,
+ type: 0x60000001
+ });
+ } : function (componentId) {
+ return callGCanvasLinkNative(componentId, 0x60000001, 'render');
+ },
+
+ render2d: isWeexIOS ? function (componentId, commands, callback) {
+
+ if (isDebugging) {
+ console.log('>>> >>> render2d ===');
+ console.log('>>> commands: ' + commands);
+ }
+
+ GCanvasModule.render([commands, callback?true:false], componentId, callback);
+
+ } : function (componentId, commands,callback) {
+
+ if (isDebugging) {
+ console.log('>>> >>> render2d ===');
+ console.log('>>> commands: ' + commands);
+ }
+
+ callGCanvasLinkNative(componentId, 0x20000001, commands);
+ if(callback){
+ callback();
+ }
+ },
+
+ callExtendCallNative: isWeexIOS ? function (componentId, cmdArgs) {
+
+ throw 'should not be here anymore ' + cmdArgs;
+
+ } : function (componentId, cmdArgs) {
+
+ throw 'should not be here anymore ' + cmdArgs;
+
+ },
+
+
+ flushNative: isWeexIOS ? function (componentId) {
+
+ const cmdArgs = joinArray(commandsCache[componentId], ';');
+ commandsCache[componentId] = [];
+
+ if (isDebugging) {
+ console.log('>>> >>> flush native ===');
+ console.log('>>> commands: ' + cmdArgs);
+ }
+
+ const result = GCanvasModule.extendCallNative({
+ "contextId": componentId,
+ "type": 0x60000000,
+ "args": cmdArgs
+ });
+
+ const res = result && result.result;
+
+ if (isDebugging) {
+ console.log('>>> result: ' + res);
+ }
+
+ return res;
+
+ } : function (componentId) {
+
+ const cmdArgs = joinArray(commandsCache[componentId], ';');
+ commandsCache[componentId] = [];
+
+ if (isDebugging) {
+ console.log('>>> >>> flush native ===');
+ console.log('>>> commands: ' + cmdArgs);
+ }
+
+ const result = callGCanvasLinkNative(componentId, 0x60000000, cmdArgs);
+
+ if (isDebugging) {
+ console.log('>>> result: ' + result);
+ }
+
+ return result;
+ },
+
+ callNative: function (componentId, cmdArgs, cache) {
+
+ if (isDebugging) {
+ logCommand(componentId, cmdArgs);
+ }
+
+ commandsCache[componentId].push(cmdArgs);
+
+ if (!cache || isComboDisabled) {
+ return GBridge.flushNative(componentId);
+ } else {
+ return undefined;
+ }
+ },
+
+ texImage2D(componentId, ...args) {
+ if (isWeexIOS) {
+ if (args.length === 6) {
+ const [target, level, internalformat, format, type, image] = args;
+ GBridge.callNative(
+ componentId,
+ GLmethod.texImage2D + ',' + 6 + ',' + target + ',' + level + ',' + internalformat + ',' + format + ',' + type + ',' + image.src
+ )
+ } else if (args.length === 9) {
+ const [target, level, internalformat, width, height, border, format, type, image] = args;
+ GBridge.callNative(
+ componentId,
+ GLmethod.texImage2D + ',' + 9 + ',' + target + ',' + level + ',' + internalformat + ',' + width + ',' + height + ',' + border + ',' +
+ + format + ',' + type + ',' + (image ? image.src : 0)
+ )
+ }
+ } else if (isWeexAndroid) {
+ if (args.length === 6) {
+ const [target, level, internalformat, format, type, image] = args;
+ GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src);
+ } else if (args.length === 9) {
+ const [target, level, internalformat, width, height, border, format, type, image] = args;
+ GCanvasModule.texImage2D(componentId, target, level, internalformat, width, height, border, format, type, (image ? image.src : 0));
+ }
+ }
+ },
+
+ texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image) {
+ if (isWeexIOS) {
+ if (arguments.length === 8) {
+ GBridge.callNative(
+ componentId,
+ GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, + ',' + format + ',' + type + ',' + image.src
+ )
+ }
+ } else if (isWeexAndroid) {
+ GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src);
+ }
+ },
+
+ bindImageTexture(componentId, src, imageId) {
+ GCanvasModule.bindImageTexture([src, imageId], componentId);
+ },
+
+ perloadImage([url, id], callback) {
+ GCanvasModule.preLoadImage([url, id], function (image) {
+ image.url = url;
+ image.id = id;
+ callback(image);
+ });
+ },
+
+ measureText(text, fontStyle, componentId) {
+ return GCanvasModule.measureText([text, fontStyle], componentId);
+ },
+
+ getImageData (componentId, x, y, w, h, callback) {
+ GCanvasModule.getImageData([x, y,w,h],componentId,callback);
+ },
+
+ putImageData (componentId, data, x, y, w, h, callback) {
+ GCanvasModule.putImageData([x, y,w,h,data],componentId,callback);
+ },
+
+ toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, fileType, quality, callback){
+ GCanvasModule.toTempFilePath([x, y, width,height, destWidth, destHeight, fileType, quality], componentId, callback);
+ }
+}
+
+export default GBridge;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js
index 3e7f03a..97e9f0f 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js
@@ -1,18 +1,18 @@
-class FillStyleLinearGradient {
-
- constructor(x0, y0, x1, y1) {
- this._start_pos = { _x: x0, _y: y0 };
- this._end_pos = { _x: x1, _y: y1 };
- this._stop_count = 0;
- this._stops = [0, 0, 0, 0, 0];
- }
-
- addColorStop = function (pos, color) {
- if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
- this._stops[this._stop_count] = { _pos: pos, _color: color };
- this._stop_count++;
- }
- }
-}
-
+class FillStyleLinearGradient {
+
+ constructor(x0, y0, x1, y1) {
+ this._start_pos = { _x: x0, _y: y0 };
+ this._end_pos = { _x: x1, _y: y1 };
+ this._stop_count = 0;
+ this._stops = [0, 0, 0, 0, 0];
+ }
+
+ addColorStop = function (pos, color) {
+ if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
+ this._stops[this._stop_count] = { _pos: pos, _color: color };
+ this._stop_count++;
+ }
+ }
+}
+
export default FillStyleLinearGradient;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStylePattern.js b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStylePattern.js
index 6e4f646..6c9c921 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStylePattern.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStylePattern.js
@@ -1,8 +1,8 @@
-class FillStylePattern {
- constructor(img, pattern) {
- this._style = pattern;
- this._img = img;
- }
-}
-
+class FillStylePattern {
+ constructor(img, pattern) {
+ this._style = pattern;
+ this._img = img;
+ }
+}
+
export default FillStylePattern;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js
index 7790596..e6ab4f3 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js
@@ -1,17 +1,17 @@
-class FillStyleRadialGradient {
- constructor(x0, y0, r0, x1, y1, r1) {
- this._start_pos = { _x: x0, _y: y0, _r: r0 };
- this._end_pos = { _x: x1, _y: y1, _r: r1 };
- this._stop_count = 0;
- this._stops = [0, 0, 0, 0, 0];
- }
-
- addColorStop(pos, color) {
- if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
- this._stops[this._stop_count] = { _pos: pos, _color: color };
- this._stop_count++;
- }
- }
-}
-
+class FillStyleRadialGradient {
+ constructor(x0, y0, r0, x1, y1, r1) {
+ this._start_pos = { _x: x0, _y: y0, _r: r0 };
+ this._end_pos = { _x: x1, _y: y1, _r: r1 };
+ this._stop_count = 0;
+ this._stops = [0, 0, 0, 0, 0];
+ }
+
+ addColorStop(pos, color) {
+ if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
+ this._stops[this._stop_count] = { _pos: pos, _color: color };
+ this._stop_count++;
+ }
+ }
+}
+
export default FillStyleRadialGradient;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ActiveInfo.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ActiveInfo.js
index b495129..41738b1 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ActiveInfo.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ActiveInfo.js
@@ -1,11 +1,11 @@
-export default class WebGLActiveInfo {
- className = 'WebGLActiveInfo';
-
- constructor({
- type, name, size
- }) {
- this.type = type;
- this.name = name;
- this.size = size;
- }
+export default class WebGLActiveInfo {
+ className = 'WebGLActiveInfo';
+
+ constructor({
+ type, name, size
+ }) {
+ this.type = type;
+ this.name = name;
+ this.size = size;
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Buffer.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Buffer.js
index 4800f67..a451291 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Buffer.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Buffer.js
@@ -1,21 +1,21 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLBuffer';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLBuffer {
- className = name;
-
- constructor(id) {
- this.id = id;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLBuffer';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLBuffer {
+ className = name;
+
+ constructor(id) {
+ this.id = id;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Framebuffer.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Framebuffer.js
index 28b46d3..e8d806e 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Framebuffer.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Framebuffer.js
@@ -1,21 +1,21 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLFrameBuffer';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLFramebuffer {
- className = name;
-
- constructor(id) {
- this.id = id;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLFrameBuffer';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLFramebuffer {
+ className = name;
+
+ constructor(id) {
+ this.id = id;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLenum.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLenum.js
index ac5544d..5fdc49f 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLenum.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLenum.js
@@ -1,298 +1,298 @@
-export default {
- "DEPTH_BUFFER_BIT": 256,
- "STENCIL_BUFFER_BIT": 1024,
- "COLOR_BUFFER_BIT": 16384,
- "POINTS": 0,
- "LINES": 1,
- "LINE_LOOP": 2,
- "LINE_STRIP": 3,
- "TRIANGLES": 4,
- "TRIANGLE_STRIP": 5,
- "TRIANGLE_FAN": 6,
- "ZERO": 0,
- "ONE": 1,
- "SRC_COLOR": 768,
- "ONE_MINUS_SRC_COLOR": 769,
- "SRC_ALPHA": 770,
- "ONE_MINUS_SRC_ALPHA": 771,
- "DST_ALPHA": 772,
- "ONE_MINUS_DST_ALPHA": 773,
- "DST_COLOR": 774,
- "ONE_MINUS_DST_COLOR": 775,
- "SRC_ALPHA_SATURATE": 776,
- "FUNC_ADD": 32774,
- "BLEND_EQUATION": 32777,
- "BLEND_EQUATION_RGB": 32777,
- "BLEND_EQUATION_ALPHA": 34877,
- "FUNC_SUBTRACT": 32778,
- "FUNC_REVERSE_SUBTRACT": 32779,
- "BLEND_DST_RGB": 32968,
- "BLEND_SRC_RGB": 32969,
- "BLEND_DST_ALPHA": 32970,
- "BLEND_SRC_ALPHA": 32971,
- "CONSTANT_COLOR": 32769,
- "ONE_MINUS_CONSTANT_COLOR": 32770,
- "CONSTANT_ALPHA": 32771,
- "ONE_MINUS_CONSTANT_ALPHA": 32772,
- "BLEND_COLOR": 32773,
- "ARRAY_BUFFER": 34962,
- "ELEMENT_ARRAY_BUFFER": 34963,
- "ARRAY_BUFFER_BINDING": 34964,
- "ELEMENT_ARRAY_BUFFER_BINDING": 34965,
- "STREAM_DRAW": 35040,
- "STATIC_DRAW": 35044,
- "DYNAMIC_DRAW": 35048,
- "BUFFER_SIZE": 34660,
- "BUFFER_USAGE": 34661,
- "CURRENT_VERTEX_ATTRIB": 34342,
- "FRONT": 1028,
- "BACK": 1029,
- "FRONT_AND_BACK": 1032,
- "TEXTURE_2D": 3553,
- "CULL_FACE": 2884,
- "BLEND": 3042,
- "DITHER": 3024,
- "STENCIL_TEST": 2960,
- "DEPTH_TEST": 2929,
- "SCISSOR_TEST": 3089,
- "POLYGON_OFFSET_FILL": 32823,
- "SAMPLE_ALPHA_TO_COVERAGE": 32926,
- "SAMPLE_COVERAGE": 32928,
- "NO_ERROR": 0,
- "INVALID_ENUM": 1280,
- "INVALID_VALUE": 1281,
- "INVALID_OPERATION": 1282,
- "OUT_OF_MEMORY": 1285,
- "CW": 2304,
- "CCW": 2305,
- "LINE_WIDTH": 2849,
- "ALIASED_POINT_SIZE_RANGE": 33901,
- "ALIASED_LINE_WIDTH_RANGE": 33902,
- "CULL_FACE_MODE": 2885,
- "FRONT_FACE": 2886,
- "DEPTH_RANGE": 2928,
- "DEPTH_WRITEMASK": 2930,
- "DEPTH_CLEAR_VALUE": 2931,
- "DEPTH_FUNC": 2932,
- "STENCIL_CLEAR_VALUE": 2961,
- "STENCIL_FUNC": 2962,
- "STENCIL_FAIL": 2964,
- "STENCIL_PASS_DEPTH_FAIL": 2965,
- "STENCIL_PASS_DEPTH_PASS": 2966,
- "STENCIL_REF": 2967,
- "STENCIL_VALUE_MASK": 2963,
- "STENCIL_WRITEMASK": 2968,
- "STENCIL_BACK_FUNC": 34816,
- "STENCIL_BACK_FAIL": 34817,
- "STENCIL_BACK_PASS_DEPTH_FAIL": 34818,
- "STENCIL_BACK_PASS_DEPTH_PASS": 34819,
- "STENCIL_BACK_REF": 36003,
- "STENCIL_BACK_VALUE_MASK": 36004,
- "STENCIL_BACK_WRITEMASK": 36005,
- "VIEWPORT": 2978,
- "SCISSOR_BOX": 3088,
- "COLOR_CLEAR_VALUE": 3106,
- "COLOR_WRITEMASK": 3107,
- "UNPACK_ALIGNMENT": 3317,
- "PACK_ALIGNMENT": 3333,
- "MAX_TEXTURE_SIZE": 3379,
- "MAX_VIEWPORT_DIMS": 3386,
- "SUBPIXEL_BITS": 3408,
- "RED_BITS": 3410,
- "GREEN_BITS": 3411,
- "BLUE_BITS": 3412,
- "ALPHA_BITS": 3413,
- "DEPTH_BITS": 3414,
- "STENCIL_BITS": 3415,
- "POLYGON_OFFSET_UNITS": 10752,
- "POLYGON_OFFSET_FACTOR": 32824,
- "TEXTURE_BINDING_2D": 32873,
- "SAMPLE_BUFFERS": 32936,
- "SAMPLES": 32937,
- "SAMPLE_COVERAGE_VALUE": 32938,
- "SAMPLE_COVERAGE_INVERT": 32939,
- "COMPRESSED_TEXTURE_FORMATS": 34467,
- "DONT_CARE": 4352,
- "FASTEST": 4353,
- "NICEST": 4354,
- "GENERATE_MIPMAP_HINT": 33170,
- "BYTE": 5120,
- "UNSIGNED_BYTE": 5121,
- "SHORT": 5122,
- "UNSIGNED_SHORT": 5123,
- "INT": 5124,
- "UNSIGNED_INT": 5125,
- "FLOAT": 5126,
- "DEPTH_COMPONENT": 6402,
- "ALPHA": 6406,
- "RGB": 6407,
- "RGBA": 6408,
- "LUMINANCE": 6409,
- "LUMINANCE_ALPHA": 6410,
- "UNSIGNED_SHORT_4_4_4_4": 32819,
- "UNSIGNED_SHORT_5_5_5_1": 32820,
- "UNSIGNED_SHORT_5_6_5": 33635,
- "FRAGMENT_SHADER": 35632,
- "VERTEX_SHADER": 35633,
- "MAX_VERTEX_ATTRIBS": 34921,
- "MAX_VERTEX_UNIFORM_VECTORS": 36347,
- "MAX_VARYING_VECTORS": 36348,
- "MAX_COMBINED_TEXTURE_IMAGE_UNITS": 35661,
- "MAX_VERTEX_TEXTURE_IMAGE_UNITS": 35660,
- "MAX_TEXTURE_IMAGE_UNITS": 34930,
- "MAX_FRAGMENT_UNIFORM_VECTORS": 36349,
- "SHADER_TYPE": 35663,
- "DELETE_STATUS": 35712,
- "LINK_STATUS": 35714,
- "VALIDATE_STATUS": 35715,
- "ATTACHED_SHADERS": 35717,
- "ACTIVE_UNIFORMS": 35718,
- "ACTIVE_ATTRIBUTES": 35721,
- "SHADING_LANGUAGE_VERSION": 35724,
- "CURRENT_PROGRAM": 35725,
- "NEVER": 512,
- "LESS": 513,
- "EQUAL": 514,
- "LEQUAL": 515,
- "GREATER": 516,
- "NOTEQUAL": 517,
- "GEQUAL": 518,
- "ALWAYS": 519,
- "KEEP": 7680,
- "REPLACE": 7681,
- "INCR": 7682,
- "DECR": 7683,
- "INVERT": 5386,
- "INCR_WRAP": 34055,
- "DECR_WRAP": 34056,
- "VENDOR": 7936,
- "RENDERER": 7937,
- "VERSION": 7938,
- "NEAREST": 9728,
- "LINEAR": 9729,
- "NEAREST_MIPMAP_NEAREST": 9984,
- "LINEAR_MIPMAP_NEAREST": 9985,
- "NEAREST_MIPMAP_LINEAR": 9986,
- "LINEAR_MIPMAP_LINEAR": 9987,
- "TEXTURE_MAG_FILTER": 10240,
- "TEXTURE_MIN_FILTER": 10241,
- "TEXTURE_WRAP_S": 10242,
- "TEXTURE_WRAP_T": 10243,
- "TEXTURE": 5890,
- "TEXTURE_CUBE_MAP": 34067,
- "TEXTURE_BINDING_CUBE_MAP": 34068,
- "TEXTURE_CUBE_MAP_POSITIVE_X": 34069,
- "TEXTURE_CUBE_MAP_NEGATIVE_X": 34070,
- "TEXTURE_CUBE_MAP_POSITIVE_Y": 34071,
- "TEXTURE_CUBE_MAP_NEGATIVE_Y": 34072,
- "TEXTURE_CUBE_MAP_POSITIVE_Z": 34073,
- "TEXTURE_CUBE_MAP_NEGATIVE_Z": 34074,
- "MAX_CUBE_MAP_TEXTURE_SIZE": 34076,
- "TEXTURE0": 33984,
- "TEXTURE1": 33985,
- "TEXTURE2": 33986,
- "TEXTURE3": 33987,
- "TEXTURE4": 33988,
- "TEXTURE5": 33989,
- "TEXTURE6": 33990,
- "TEXTURE7": 33991,
- "TEXTURE8": 33992,
- "TEXTURE9": 33993,
- "TEXTURE10": 33994,
- "TEXTURE11": 33995,
- "TEXTURE12": 33996,
- "TEXTURE13": 33997,
- "TEXTURE14": 33998,
- "TEXTURE15": 33999,
- "TEXTURE16": 34000,
- "TEXTURE17": 34001,
- "TEXTURE18": 34002,
- "TEXTURE19": 34003,
- "TEXTURE20": 34004,
- "TEXTURE21": 34005,
- "TEXTURE22": 34006,
- "TEXTURE23": 34007,
- "TEXTURE24": 34008,
- "TEXTURE25": 34009,
- "TEXTURE26": 34010,
- "TEXTURE27": 34011,
- "TEXTURE28": 34012,
- "TEXTURE29": 34013,
- "TEXTURE30": 34014,
- "TEXTURE31": 34015,
- "ACTIVE_TEXTURE": 34016,
- "REPEAT": 10497,
- "CLAMP_TO_EDGE": 33071,
- "MIRRORED_REPEAT": 33648,
- "FLOAT_VEC2": 35664,
- "FLOAT_VEC3": 35665,
- "FLOAT_VEC4": 35666,
- "INT_VEC2": 35667,
- "INT_VEC3": 35668,
- "INT_VEC4": 35669,
- "BOOL": 35670,
- "BOOL_VEC2": 35671,
- "BOOL_VEC3": 35672,
- "BOOL_VEC4": 35673,
- "FLOAT_MAT2": 35674,
- "FLOAT_MAT3": 35675,
- "FLOAT_MAT4": 35676,
- "SAMPLER_2D": 35678,
- "SAMPLER_CUBE": 35680,
- "VERTEX_ATTRIB_ARRAY_ENABLED": 34338,
- "VERTEX_ATTRIB_ARRAY_SIZE": 34339,
- "VERTEX_ATTRIB_ARRAY_STRIDE": 34340,
- "VERTEX_ATTRIB_ARRAY_TYPE": 34341,
- "VERTEX_ATTRIB_ARRAY_NORMALIZED": 34922,
- "VERTEX_ATTRIB_ARRAY_POINTER": 34373,
- "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 34975,
- "IMPLEMENTATION_COLOR_READ_TYPE": 35738,
- "IMPLEMENTATION_COLOR_READ_FORMAT": 35739,
- "COMPILE_STATUS": 35713,
- "LOW_FLOAT": 36336,
- "MEDIUM_FLOAT": 36337,
- "HIGH_FLOAT": 36338,
- "LOW_INT": 36339,
- "MEDIUM_INT": 36340,
- "HIGH_INT": 36341,
- "FRAMEBUFFER": 36160,
- "RENDERBUFFER": 36161,
- "RGBA4": 32854,
- "RGB5_A1": 32855,
- "RGB565": 36194,
- "DEPTH_COMPONENT16": 33189,
- "STENCIL_INDEX8": 36168,
- "DEPTH_STENCIL": 34041,
- "RENDERBUFFER_WIDTH": 36162,
- "RENDERBUFFER_HEIGHT": 36163,
- "RENDERBUFFER_INTERNAL_FORMAT": 36164,
- "RENDERBUFFER_RED_SIZE": 36176,
- "RENDERBUFFER_GREEN_SIZE": 36177,
- "RENDERBUFFER_BLUE_SIZE": 36178,
- "RENDERBUFFER_ALPHA_SIZE": 36179,
- "RENDERBUFFER_DEPTH_SIZE": 36180,
- "RENDERBUFFER_STENCIL_SIZE": 36181,
- "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": 36048,
- "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": 36049,
- "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": 36050,
- "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": 36051,
- "COLOR_ATTACHMENT0": 36064,
- "DEPTH_ATTACHMENT": 36096,
- "STENCIL_ATTACHMENT": 36128,
- "DEPTH_STENCIL_ATTACHMENT": 33306,
- "NONE": 0,
- "FRAMEBUFFER_COMPLETE": 36053,
- "FRAMEBUFFER_INCOMPLETE_ATTACHMENT": 36054,
- "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": 36055,
- "FRAMEBUFFER_INCOMPLETE_DIMENSIONS": 36057,
- "FRAMEBUFFER_UNSUPPORTED": 36061,
- "FRAMEBUFFER_BINDING": 36006,
- "RENDERBUFFER_BINDING": 36007,
- "MAX_RENDERBUFFER_SIZE": 34024,
- "INVALID_FRAMEBUFFER_OPERATION": 1286,
- "UNPACK_FLIP_Y_WEBGL": 37440,
- "UNPACK_PREMULTIPLY_ALPHA_WEBGL": 37441,
- "CONTEXT_LOST_WEBGL": 37442,
- "UNPACK_COLORSPACE_CONVERSION_WEBGL": 37443,
- "BROWSER_DEFAULT_WEBGL": 37444
+export default {
+ "DEPTH_BUFFER_BIT": 256,
+ "STENCIL_BUFFER_BIT": 1024,
+ "COLOR_BUFFER_BIT": 16384,
+ "POINTS": 0,
+ "LINES": 1,
+ "LINE_LOOP": 2,
+ "LINE_STRIP": 3,
+ "TRIANGLES": 4,
+ "TRIANGLE_STRIP": 5,
+ "TRIANGLE_FAN": 6,
+ "ZERO": 0,
+ "ONE": 1,
+ "SRC_COLOR": 768,
+ "ONE_MINUS_SRC_COLOR": 769,
+ "SRC_ALPHA": 770,
+ "ONE_MINUS_SRC_ALPHA": 771,
+ "DST_ALPHA": 772,
+ "ONE_MINUS_DST_ALPHA": 773,
+ "DST_COLOR": 774,
+ "ONE_MINUS_DST_COLOR": 775,
+ "SRC_ALPHA_SATURATE": 776,
+ "FUNC_ADD": 32774,
+ "BLEND_EQUATION": 32777,
+ "BLEND_EQUATION_RGB": 32777,
+ "BLEND_EQUATION_ALPHA": 34877,
+ "FUNC_SUBTRACT": 32778,
+ "FUNC_REVERSE_SUBTRACT": 32779,
+ "BLEND_DST_RGB": 32968,
+ "BLEND_SRC_RGB": 32969,
+ "BLEND_DST_ALPHA": 32970,
+ "BLEND_SRC_ALPHA": 32971,
+ "CONSTANT_COLOR": 32769,
+ "ONE_MINUS_CONSTANT_COLOR": 32770,
+ "CONSTANT_ALPHA": 32771,
+ "ONE_MINUS_CONSTANT_ALPHA": 32772,
+ "BLEND_COLOR": 32773,
+ "ARRAY_BUFFER": 34962,
+ "ELEMENT_ARRAY_BUFFER": 34963,
+ "ARRAY_BUFFER_BINDING": 34964,
+ "ELEMENT_ARRAY_BUFFER_BINDING": 34965,
+ "STREAM_DRAW": 35040,
+ "STATIC_DRAW": 35044,
+ "DYNAMIC_DRAW": 35048,
+ "BUFFER_SIZE": 34660,
+ "BUFFER_USAGE": 34661,
+ "CURRENT_VERTEX_ATTRIB": 34342,
+ "FRONT": 1028,
+ "BACK": 1029,
+ "FRONT_AND_BACK": 1032,
+ "TEXTURE_2D": 3553,
+ "CULL_FACE": 2884,
+ "BLEND": 3042,
+ "DITHER": 3024,
+ "STENCIL_TEST": 2960,
+ "DEPTH_TEST": 2929,
+ "SCISSOR_TEST": 3089,
+ "POLYGON_OFFSET_FILL": 32823,
+ "SAMPLE_ALPHA_TO_COVERAGE": 32926,
+ "SAMPLE_COVERAGE": 32928,
+ "NO_ERROR": 0,
+ "INVALID_ENUM": 1280,
+ "INVALID_VALUE": 1281,
+ "INVALID_OPERATION": 1282,
+ "OUT_OF_MEMORY": 1285,
+ "CW": 2304,
+ "CCW": 2305,
+ "LINE_WIDTH": 2849,
+ "ALIASED_POINT_SIZE_RANGE": 33901,
+ "ALIASED_LINE_WIDTH_RANGE": 33902,
+ "CULL_FACE_MODE": 2885,
+ "FRONT_FACE": 2886,
+ "DEPTH_RANGE": 2928,
+ "DEPTH_WRITEMASK": 2930,
+ "DEPTH_CLEAR_VALUE": 2931,
+ "DEPTH_FUNC": 2932,
+ "STENCIL_CLEAR_VALUE": 2961,
+ "STENCIL_FUNC": 2962,
+ "STENCIL_FAIL": 2964,
+ "STENCIL_PASS_DEPTH_FAIL": 2965,
+ "STENCIL_PASS_DEPTH_PASS": 2966,
+ "STENCIL_REF": 2967,
+ "STENCIL_VALUE_MASK": 2963,
+ "STENCIL_WRITEMASK": 2968,
+ "STENCIL_BACK_FUNC": 34816,
+ "STENCIL_BACK_FAIL": 34817,
+ "STENCIL_BACK_PASS_DEPTH_FAIL": 34818,
+ "STENCIL_BACK_PASS_DEPTH_PASS": 34819,
+ "STENCIL_BACK_REF": 36003,
+ "STENCIL_BACK_VALUE_MASK": 36004,
+ "STENCIL_BACK_WRITEMASK": 36005,
+ "VIEWPORT": 2978,
+ "SCISSOR_BOX": 3088,
+ "COLOR_CLEAR_VALUE": 3106,
+ "COLOR_WRITEMASK": 3107,
+ "UNPACK_ALIGNMENT": 3317,
+ "PACK_ALIGNMENT": 3333,
+ "MAX_TEXTURE_SIZE": 3379,
+ "MAX_VIEWPORT_DIMS": 3386,
+ "SUBPIXEL_BITS": 3408,
+ "RED_BITS": 3410,
+ "GREEN_BITS": 3411,
+ "BLUE_BITS": 3412,
+ "ALPHA_BITS": 3413,
+ "DEPTH_BITS": 3414,
+ "STENCIL_BITS": 3415,
+ "POLYGON_OFFSET_UNITS": 10752,
+ "POLYGON_OFFSET_FACTOR": 32824,
+ "TEXTURE_BINDING_2D": 32873,
+ "SAMPLE_BUFFERS": 32936,
+ "SAMPLES": 32937,
+ "SAMPLE_COVERAGE_VALUE": 32938,
+ "SAMPLE_COVERAGE_INVERT": 32939,
+ "COMPRESSED_TEXTURE_FORMATS": 34467,
+ "DONT_CARE": 4352,
+ "FASTEST": 4353,
+ "NICEST": 4354,
+ "GENERATE_MIPMAP_HINT": 33170,
+ "BYTE": 5120,
+ "UNSIGNED_BYTE": 5121,
+ "SHORT": 5122,
+ "UNSIGNED_SHORT": 5123,
+ "INT": 5124,
+ "UNSIGNED_INT": 5125,
+ "FLOAT": 5126,
+ "DEPTH_COMPONENT": 6402,
+ "ALPHA": 6406,
+ "RGB": 6407,
+ "RGBA": 6408,
+ "LUMINANCE": 6409,
+ "LUMINANCE_ALPHA": 6410,
+ "UNSIGNED_SHORT_4_4_4_4": 32819,
+ "UNSIGNED_SHORT_5_5_5_1": 32820,
+ "UNSIGNED_SHORT_5_6_5": 33635,
+ "FRAGMENT_SHADER": 35632,
+ "VERTEX_SHADER": 35633,
+ "MAX_VERTEX_ATTRIBS": 34921,
+ "MAX_VERTEX_UNIFORM_VECTORS": 36347,
+ "MAX_VARYING_VECTORS": 36348,
+ "MAX_COMBINED_TEXTURE_IMAGE_UNITS": 35661,
+ "MAX_VERTEX_TEXTURE_IMAGE_UNITS": 35660,
+ "MAX_TEXTURE_IMAGE_UNITS": 34930,
+ "MAX_FRAGMENT_UNIFORM_VECTORS": 36349,
+ "SHADER_TYPE": 35663,
+ "DELETE_STATUS": 35712,
+ "LINK_STATUS": 35714,
+ "VALIDATE_STATUS": 35715,
+ "ATTACHED_SHADERS": 35717,
+ "ACTIVE_UNIFORMS": 35718,
+ "ACTIVE_ATTRIBUTES": 35721,
+ "SHADING_LANGUAGE_VERSION": 35724,
+ "CURRENT_PROGRAM": 35725,
+ "NEVER": 512,
+ "LESS": 513,
+ "EQUAL": 514,
+ "LEQUAL": 515,
+ "GREATER": 516,
+ "NOTEQUAL": 517,
+ "GEQUAL": 518,
+ "ALWAYS": 519,
+ "KEEP": 7680,
+ "REPLACE": 7681,
+ "INCR": 7682,
+ "DECR": 7683,
+ "INVERT": 5386,
+ "INCR_WRAP": 34055,
+ "DECR_WRAP": 34056,
+ "VENDOR": 7936,
+ "RENDERER": 7937,
+ "VERSION": 7938,
+ "NEAREST": 9728,
+ "LINEAR": 9729,
+ "NEAREST_MIPMAP_NEAREST": 9984,
+ "LINEAR_MIPMAP_NEAREST": 9985,
+ "NEAREST_MIPMAP_LINEAR": 9986,
+ "LINEAR_MIPMAP_LINEAR": 9987,
+ "TEXTURE_MAG_FILTER": 10240,
+ "TEXTURE_MIN_FILTER": 10241,
+ "TEXTURE_WRAP_S": 10242,
+ "TEXTURE_WRAP_T": 10243,
+ "TEXTURE": 5890,
+ "TEXTURE_CUBE_MAP": 34067,
+ "TEXTURE_BINDING_CUBE_MAP": 34068,
+ "TEXTURE_CUBE_MAP_POSITIVE_X": 34069,
+ "TEXTURE_CUBE_MAP_NEGATIVE_X": 34070,
+ "TEXTURE_CUBE_MAP_POSITIVE_Y": 34071,
+ "TEXTURE_CUBE_MAP_NEGATIVE_Y": 34072,
+ "TEXTURE_CUBE_MAP_POSITIVE_Z": 34073,
+ "TEXTURE_CUBE_MAP_NEGATIVE_Z": 34074,
+ "MAX_CUBE_MAP_TEXTURE_SIZE": 34076,
+ "TEXTURE0": 33984,
+ "TEXTURE1": 33985,
+ "TEXTURE2": 33986,
+ "TEXTURE3": 33987,
+ "TEXTURE4": 33988,
+ "TEXTURE5": 33989,
+ "TEXTURE6": 33990,
+ "TEXTURE7": 33991,
+ "TEXTURE8": 33992,
+ "TEXTURE9": 33993,
+ "TEXTURE10": 33994,
+ "TEXTURE11": 33995,
+ "TEXTURE12": 33996,
+ "TEXTURE13": 33997,
+ "TEXTURE14": 33998,
+ "TEXTURE15": 33999,
+ "TEXTURE16": 34000,
+ "TEXTURE17": 34001,
+ "TEXTURE18": 34002,
+ "TEXTURE19": 34003,
+ "TEXTURE20": 34004,
+ "TEXTURE21": 34005,
+ "TEXTURE22": 34006,
+ "TEXTURE23": 34007,
+ "TEXTURE24": 34008,
+ "TEXTURE25": 34009,
+ "TEXTURE26": 34010,
+ "TEXTURE27": 34011,
+ "TEXTURE28": 34012,
+ "TEXTURE29": 34013,
+ "TEXTURE30": 34014,
+ "TEXTURE31": 34015,
+ "ACTIVE_TEXTURE": 34016,
+ "REPEAT": 10497,
+ "CLAMP_TO_EDGE": 33071,
+ "MIRRORED_REPEAT": 33648,
+ "FLOAT_VEC2": 35664,
+ "FLOAT_VEC3": 35665,
+ "FLOAT_VEC4": 35666,
+ "INT_VEC2": 35667,
+ "INT_VEC3": 35668,
+ "INT_VEC4": 35669,
+ "BOOL": 35670,
+ "BOOL_VEC2": 35671,
+ "BOOL_VEC3": 35672,
+ "BOOL_VEC4": 35673,
+ "FLOAT_MAT2": 35674,
+ "FLOAT_MAT3": 35675,
+ "FLOAT_MAT4": 35676,
+ "SAMPLER_2D": 35678,
+ "SAMPLER_CUBE": 35680,
+ "VERTEX_ATTRIB_ARRAY_ENABLED": 34338,
+ "VERTEX_ATTRIB_ARRAY_SIZE": 34339,
+ "VERTEX_ATTRIB_ARRAY_STRIDE": 34340,
+ "VERTEX_ATTRIB_ARRAY_TYPE": 34341,
+ "VERTEX_ATTRIB_ARRAY_NORMALIZED": 34922,
+ "VERTEX_ATTRIB_ARRAY_POINTER": 34373,
+ "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 34975,
+ "IMPLEMENTATION_COLOR_READ_TYPE": 35738,
+ "IMPLEMENTATION_COLOR_READ_FORMAT": 35739,
+ "COMPILE_STATUS": 35713,
+ "LOW_FLOAT": 36336,
+ "MEDIUM_FLOAT": 36337,
+ "HIGH_FLOAT": 36338,
+ "LOW_INT": 36339,
+ "MEDIUM_INT": 36340,
+ "HIGH_INT": 36341,
+ "FRAMEBUFFER": 36160,
+ "RENDERBUFFER": 36161,
+ "RGBA4": 32854,
+ "RGB5_A1": 32855,
+ "RGB565": 36194,
+ "DEPTH_COMPONENT16": 33189,
+ "STENCIL_INDEX8": 36168,
+ "DEPTH_STENCIL": 34041,
+ "RENDERBUFFER_WIDTH": 36162,
+ "RENDERBUFFER_HEIGHT": 36163,
+ "RENDERBUFFER_INTERNAL_FORMAT": 36164,
+ "RENDERBUFFER_RED_SIZE": 36176,
+ "RENDERBUFFER_GREEN_SIZE": 36177,
+ "RENDERBUFFER_BLUE_SIZE": 36178,
+ "RENDERBUFFER_ALPHA_SIZE": 36179,
+ "RENDERBUFFER_DEPTH_SIZE": 36180,
+ "RENDERBUFFER_STENCIL_SIZE": 36181,
+ "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": 36048,
+ "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": 36049,
+ "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": 36050,
+ "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": 36051,
+ "COLOR_ATTACHMENT0": 36064,
+ "DEPTH_ATTACHMENT": 36096,
+ "STENCIL_ATTACHMENT": 36128,
+ "DEPTH_STENCIL_ATTACHMENT": 33306,
+ "NONE": 0,
+ "FRAMEBUFFER_COMPLETE": 36053,
+ "FRAMEBUFFER_INCOMPLETE_ATTACHMENT": 36054,
+ "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": 36055,
+ "FRAMEBUFFER_INCOMPLETE_DIMENSIONS": 36057,
+ "FRAMEBUFFER_UNSUPPORTED": 36061,
+ "FRAMEBUFFER_BINDING": 36006,
+ "RENDERBUFFER_BINDING": 36007,
+ "MAX_RENDERBUFFER_SIZE": 34024,
+ "INVALID_FRAMEBUFFER_OPERATION": 1286,
+ "UNPACK_FLIP_Y_WEBGL": 37440,
+ "UNPACK_PREMULTIPLY_ALPHA_WEBGL": 37441,
+ "CONTEXT_LOST_WEBGL": 37442,
+ "UNPACK_COLORSPACE_CONVERSION_WEBGL": 37443,
+ "BROWSER_DEFAULT_WEBGL": 37444
};
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLmethod.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLmethod.js
index f2659be..8ca2212 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLmethod.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLmethod.js
@@ -1,142 +1,142 @@
-let i = 1;
-
-const GLmethod = {};
-
-GLmethod.activeTexture = i++; //1
-GLmethod.attachShader = i++;
-GLmethod.bindAttribLocation = i++;
-GLmethod.bindBuffer = i++;
-GLmethod.bindFramebuffer = i++;
-GLmethod.bindRenderbuffer = i++;
-GLmethod.bindTexture = i++;
-GLmethod.blendColor = i++;
-GLmethod.blendEquation = i++;
-GLmethod.blendEquationSeparate = i++; //10
-GLmethod.blendFunc = i++;
-GLmethod.blendFuncSeparate = i++;
-GLmethod.bufferData = i++;
-GLmethod.bufferSubData = i++;
-GLmethod.checkFramebufferStatus = i++;
-GLmethod.clear = i++;
-GLmethod.clearColor = i++;
-GLmethod.clearDepth = i++;
-GLmethod.clearStencil = i++;
-GLmethod.colorMask = i++; //20
-GLmethod.compileShader = i++;
-GLmethod.compressedTexImage2D = i++;
-GLmethod.compressedTexSubImage2D = i++;
-GLmethod.copyTexImage2D = i++;
-GLmethod.copyTexSubImage2D = i++;
-GLmethod.createBuffer = i++;
-GLmethod.createFramebuffer = i++;
-GLmethod.createProgram = i++;
-GLmethod.createRenderbuffer = i++;
-GLmethod.createShader = i++; //30
-GLmethod.createTexture = i++;
-GLmethod.cullFace = i++;
-GLmethod.deleteBuffer = i++;
-GLmethod.deleteFramebuffer = i++;
-GLmethod.deleteProgram = i++;
-GLmethod.deleteRenderbuffer = i++;
-GLmethod.deleteShader = i++;
-GLmethod.deleteTexture = i++;
-GLmethod.depthFunc = i++;
-GLmethod.depthMask = i++; //40
-GLmethod.depthRange = i++;
-GLmethod.detachShader = i++;
-GLmethod.disable = i++;
-GLmethod.disableVertexAttribArray = i++;
-GLmethod.drawArrays = i++;
-GLmethod.drawArraysInstancedANGLE = i++;
-GLmethod.drawElements = i++;
-GLmethod.drawElementsInstancedANGLE = i++;
-GLmethod.enable = i++;
-GLmethod.enableVertexAttribArray = i++; //50
-GLmethod.flush = i++;
-GLmethod.framebufferRenderbuffer = i++;
-GLmethod.framebufferTexture2D = i++;
-GLmethod.frontFace = i++;
-GLmethod.generateMipmap = i++;
-GLmethod.getActiveAttrib = i++;
-GLmethod.getActiveUniform = i++;
-GLmethod.getAttachedShaders = i++;
-GLmethod.getAttribLocation = i++;
-GLmethod.getBufferParameter = i++; //60
-GLmethod.getContextAttributes = i++;
-GLmethod.getError = i++;
-GLmethod.getExtension = i++;
-GLmethod.getFramebufferAttachmentParameter = i++;
-GLmethod.getParameter = i++;
-GLmethod.getProgramInfoLog = i++;
-GLmethod.getProgramParameter = i++;
-GLmethod.getRenderbufferParameter = i++;
-GLmethod.getShaderInfoLog = i++;
-GLmethod.getShaderParameter = i++; //70
-GLmethod.getShaderPrecisionFormat = i++;
-GLmethod.getShaderSource = i++;
-GLmethod.getSupportedExtensions = i++;
-GLmethod.getTexParameter = i++;
-GLmethod.getUniform = i++;
-GLmethod.getUniformLocation = i++;
-GLmethod.getVertexAttrib = i++;
-GLmethod.getVertexAttribOffset = i++;
-GLmethod.isBuffer = i++;
-GLmethod.isContextLost = i++; //80
-GLmethod.isEnabled = i++;
-GLmethod.isFramebuffer = i++;
-GLmethod.isProgram = i++;
-GLmethod.isRenderbuffer = i++;
-GLmethod.isShader = i++;
-GLmethod.isTexture = i++;
-GLmethod.lineWidth = i++;
-GLmethod.linkProgram = i++;
-GLmethod.pixelStorei = i++;
-GLmethod.polygonOffset = i++; //90
-GLmethod.readPixels = i++;
-GLmethod.renderbufferStorage = i++;
-GLmethod.sampleCoverage = i++;
-GLmethod.scissor = i++;
-GLmethod.shaderSource = i++;
-GLmethod.stencilFunc = i++;
-GLmethod.stencilFuncSeparate = i++;
-GLmethod.stencilMask = i++;
-GLmethod.stencilMaskSeparate = i++;
-GLmethod.stencilOp = i++; //100
-GLmethod.stencilOpSeparate = i++;
-GLmethod.texImage2D = i++;
-GLmethod.texParameterf = i++;
-GLmethod.texParameteri = i++;
-GLmethod.texSubImage2D = i++;
-GLmethod.uniform1f = i++;
-GLmethod.uniform1fv = i++;
-GLmethod.uniform1i = i++;
-GLmethod.uniform1iv = i++;
-GLmethod.uniform2f = i++; //110
-GLmethod.uniform2fv = i++;
-GLmethod.uniform2i = i++;
-GLmethod.uniform2iv = i++;
-GLmethod.uniform3f = i++;
-GLmethod.uniform3fv = i++;
-GLmethod.uniform3i = i++;
-GLmethod.uniform3iv = i++;
-GLmethod.uniform4f = i++;
-GLmethod.uniform4fv = i++;
-GLmethod.uniform4i = i++; //120
-GLmethod.uniform4iv = i++;
-GLmethod.uniformMatrix2fv = i++;
-GLmethod.uniformMatrix3fv = i++;
-GLmethod.uniformMatrix4fv = i++;
-GLmethod.useProgram = i++;
-GLmethod.validateProgram = i++;
-GLmethod.vertexAttrib1f = i++; //new
-GLmethod.vertexAttrib2f = i++; //new
-GLmethod.vertexAttrib3f = i++; //new
-GLmethod.vertexAttrib4f = i++; //new //130
-GLmethod.vertexAttrib1fv = i++; //new
-GLmethod.vertexAttrib2fv = i++; //new
-GLmethod.vertexAttrib3fv = i++; //new
-GLmethod.vertexAttrib4fv = i++; //new
-GLmethod.vertexAttribPointer = i++;
-GLmethod.viewport = i++;
-
+let i = 1;
+
+const GLmethod = {};
+
+GLmethod.activeTexture = i++; //1
+GLmethod.attachShader = i++;
+GLmethod.bindAttribLocation = i++;
+GLmethod.bindBuffer = i++;
+GLmethod.bindFramebuffer = i++;
+GLmethod.bindRenderbuffer = i++;
+GLmethod.bindTexture = i++;
+GLmethod.blendColor = i++;
+GLmethod.blendEquation = i++;
+GLmethod.blendEquationSeparate = i++; //10
+GLmethod.blendFunc = i++;
+GLmethod.blendFuncSeparate = i++;
+GLmethod.bufferData = i++;
+GLmethod.bufferSubData = i++;
+GLmethod.checkFramebufferStatus = i++;
+GLmethod.clear = i++;
+GLmethod.clearColor = i++;
+GLmethod.clearDepth = i++;
+GLmethod.clearStencil = i++;
+GLmethod.colorMask = i++; //20
+GLmethod.compileShader = i++;
+GLmethod.compressedTexImage2D = i++;
+GLmethod.compressedTexSubImage2D = i++;
+GLmethod.copyTexImage2D = i++;
+GLmethod.copyTexSubImage2D = i++;
+GLmethod.createBuffer = i++;
+GLmethod.createFramebuffer = i++;
+GLmethod.createProgram = i++;
+GLmethod.createRenderbuffer = i++;
+GLmethod.createShader = i++; //30
+GLmethod.createTexture = i++;
+GLmethod.cullFace = i++;
+GLmethod.deleteBuffer = i++;
+GLmethod.deleteFramebuffer = i++;
+GLmethod.deleteProgram = i++;
+GLmethod.deleteRenderbuffer = i++;
+GLmethod.deleteShader = i++;
+GLmethod.deleteTexture = i++;
+GLmethod.depthFunc = i++;
+GLmethod.depthMask = i++; //40
+GLmethod.depthRange = i++;
+GLmethod.detachShader = i++;
+GLmethod.disable = i++;
+GLmethod.disableVertexAttribArray = i++;
+GLmethod.drawArrays = i++;
+GLmethod.drawArraysInstancedANGLE = i++;
+GLmethod.drawElements = i++;
+GLmethod.drawElementsInstancedANGLE = i++;
+GLmethod.enable = i++;
+GLmethod.enableVertexAttribArray = i++; //50
+GLmethod.flush = i++;
+GLmethod.framebufferRenderbuffer = i++;
+GLmethod.framebufferTexture2D = i++;
+GLmethod.frontFace = i++;
+GLmethod.generateMipmap = i++;
+GLmethod.getActiveAttrib = i++;
+GLmethod.getActiveUniform = i++;
+GLmethod.getAttachedShaders = i++;
+GLmethod.getAttribLocation = i++;
+GLmethod.getBufferParameter = i++; //60
+GLmethod.getContextAttributes = i++;
+GLmethod.getError = i++;
+GLmethod.getExtension = i++;
+GLmethod.getFramebufferAttachmentParameter = i++;
+GLmethod.getParameter = i++;
+GLmethod.getProgramInfoLog = i++;
+GLmethod.getProgramParameter = i++;
+GLmethod.getRenderbufferParameter = i++;
+GLmethod.getShaderInfoLog = i++;
+GLmethod.getShaderParameter = i++; //70
+GLmethod.getShaderPrecisionFormat = i++;
+GLmethod.getShaderSource = i++;
+GLmethod.getSupportedExtensions = i++;
+GLmethod.getTexParameter = i++;
+GLmethod.getUniform = i++;
+GLmethod.getUniformLocation = i++;
+GLmethod.getVertexAttrib = i++;
+GLmethod.getVertexAttribOffset = i++;
+GLmethod.isBuffer = i++;
+GLmethod.isContextLost = i++; //80
+GLmethod.isEnabled = i++;
+GLmethod.isFramebuffer = i++;
+GLmethod.isProgram = i++;
+GLmethod.isRenderbuffer = i++;
+GLmethod.isShader = i++;
+GLmethod.isTexture = i++;
+GLmethod.lineWidth = i++;
+GLmethod.linkProgram = i++;
+GLmethod.pixelStorei = i++;
+GLmethod.polygonOffset = i++; //90
+GLmethod.readPixels = i++;
+GLmethod.renderbufferStorage = i++;
+GLmethod.sampleCoverage = i++;
+GLmethod.scissor = i++;
+GLmethod.shaderSource = i++;
+GLmethod.stencilFunc = i++;
+GLmethod.stencilFuncSeparate = i++;
+GLmethod.stencilMask = i++;
+GLmethod.stencilMaskSeparate = i++;
+GLmethod.stencilOp = i++; //100
+GLmethod.stencilOpSeparate = i++;
+GLmethod.texImage2D = i++;
+GLmethod.texParameterf = i++;
+GLmethod.texParameteri = i++;
+GLmethod.texSubImage2D = i++;
+GLmethod.uniform1f = i++;
+GLmethod.uniform1fv = i++;
+GLmethod.uniform1i = i++;
+GLmethod.uniform1iv = i++;
+GLmethod.uniform2f = i++; //110
+GLmethod.uniform2fv = i++;
+GLmethod.uniform2i = i++;
+GLmethod.uniform2iv = i++;
+GLmethod.uniform3f = i++;
+GLmethod.uniform3fv = i++;
+GLmethod.uniform3i = i++;
+GLmethod.uniform3iv = i++;
+GLmethod.uniform4f = i++;
+GLmethod.uniform4fv = i++;
+GLmethod.uniform4i = i++; //120
+GLmethod.uniform4iv = i++;
+GLmethod.uniformMatrix2fv = i++;
+GLmethod.uniformMatrix3fv = i++;
+GLmethod.uniformMatrix4fv = i++;
+GLmethod.useProgram = i++;
+GLmethod.validateProgram = i++;
+GLmethod.vertexAttrib1f = i++; //new
+GLmethod.vertexAttrib2f = i++; //new
+GLmethod.vertexAttrib3f = i++; //new
+GLmethod.vertexAttrib4f = i++; //new //130
+GLmethod.vertexAttrib1fv = i++; //new
+GLmethod.vertexAttrib2fv = i++; //new
+GLmethod.vertexAttrib3fv = i++; //new
+GLmethod.vertexAttrib4fv = i++; //new
+GLmethod.vertexAttribPointer = i++;
+GLmethod.viewport = i++;
+
export default GLmethod;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLtype.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLtype.js
index 695abcb..d7d81bb 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLtype.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/GLtype.js
@@ -1,23 +1,23 @@
-const GLtype = {};
-
-[
- "GLbitfield",
- "GLboolean",
- "GLbyte",
- "GLclampf",
- "GLenum",
- "GLfloat",
- "GLint",
- "GLintptr",
- "GLsizei",
- "GLsizeiptr",
- "GLshort",
- "GLubyte",
- "GLuint",
- "GLushort"
-].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1));
-
-export default GLtype;
-
-
-
+const GLtype = {};
+
+[
+ "GLbitfield",
+ "GLboolean",
+ "GLbyte",
+ "GLclampf",
+ "GLenum",
+ "GLfloat",
+ "GLint",
+ "GLintptr",
+ "GLsizei",
+ "GLsizeiptr",
+ "GLshort",
+ "GLubyte",
+ "GLuint",
+ "GLushort"
+].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1));
+
+export default GLtype;
+
+
+
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Program.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Program.js
index 6f5691c..bd69737 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Program.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Program.js
@@ -1,21 +1,21 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLProgram';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLProgram {
- className = name;
-
- constructor(id) {
- this.id = id;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLProgram';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLProgram {
+ className = name;
+
+ constructor(id) {
+ this.id = id;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Renderbuffer.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Renderbuffer.js
index d3182ae..3f500f0 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Renderbuffer.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Renderbuffer.js
@@ -1,21 +1,21 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLRenderBuffer';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLRenderbuffer {
- className = name;
-
- constructor(id) {
- this.id = id;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLRenderBuffer';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLRenderbuffer {
+ className = name;
+
+ constructor(id) {
+ this.id = id;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/RenderingContext.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/RenderingContext.js
index 5f9608f..c004883 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/RenderingContext.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/RenderingContext.js
@@ -1,1191 +1,1191 @@
-import GLenum from './GLenum';
-import ActiveInfo from './ActiveInfo';
-import Buffer from './Buffer';
-import Framebuffer from './Framebuffer';
-import Renderbuffer from './Renderbuffer';
-import Texture from './Texture';
-import Program from './Program';
-import Shader from './Shader';
-import ShaderPrecisionFormat from './ShaderPrecisionFormat';
-import UniformLocation from './UniformLocation';
-import GLmethod from './GLmethod';
-
-const processArray = (array, checkArrayType = false) => {
-
- function joinArray(arr, sep) {
- let res = '';
- for (let i = 0; i < arr.length; i++) {
- if (i !== 0) {
- res += sep;
- }
- res += arr[i];
- }
- return res;
- }
-
- let type = 'Float32Array';
- if (checkArrayType) {
- if (array instanceof Uint8Array) {
- type = 'Uint8Array'
- } else if (array instanceof Uint16Array) {
- type = 'Uint16Array';
- } else if (array instanceof Uint32Array) {
- type = 'Uint32Array';
- } else if (array instanceof Float32Array) {
- type = 'Float32Array';
- } else {
- throw new Error('Check array type failed. Array type is ' + typeof array);
- }
- }
-
- const ArrayTypes = {
- Uint8Array: 1,
- Uint16Array: 2,
- Uint32Array: 4,
- Float32Array: 14
- };
- return ArrayTypes[type] + ',' + btoa(joinArray(array, ','))
-}
-
-export default class WebGLRenderingContext {
-
- // static GBridge = null;
-
- className = 'WebGLRenderingContext';
-
- constructor(canvas, type, attrs) {
- this._canvas = canvas;
- this._type = type;
- this._version = 'WebGL 1.0';
- this._attrs = attrs;
- this._map = new Map();
-
- Object.keys(GLenum)
- .forEach(name => Object.defineProperty(this, name, {
- value: GLenum[name]
- }));
- }
-
- get canvas() {
- return this._canvas;
- }
-
- activeTexture = function (textureUnit) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.activeTexture + ',' + textureUnit,
- true
- );
- }
-
- attachShader = function (progarm, shader) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.attachShader + ',' + progarm.id + ',' + shader.id,
- true
- );
- }
-
- bindAttribLocation = function (program, index, name) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bindAttribLocation + ',' + program.id + ',' + index + ',' + name,
- true
- )
- }
-
- bindBuffer = function (target, buffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bindBuffer + ',' + target + ',' + (buffer ? buffer.id : 0),
- true
- );
- }
-
- bindFramebuffer = function (target, framebuffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bindFramebuffer + ',' + target + ',' + (framebuffer ? framebuffer.id : 0),
- true
- )
- }
-
- bindRenderbuffer = function (target, renderBuffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bindRenderbuffer + ',' + target + ',' + (renderBuffer ? renderBuffer.id : 0),
- true
- )
- }
-
- bindTexture = function (target, texture) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bindTexture + ',' + target + ',' + (texture ? texture.id : 0),
- true
- )
- }
-
- blendColor = function (r, g, b, a) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.blendColor + ',' + target + ',' + r + ',' + g + ',' + b + ',' + a,
- true
- )
- }
-
- blendEquation = function (mode) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.blendEquation + ',' + mode,
- true
- )
- }
-
- blendEquationSeparate = function (modeRGB, modeAlpha) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.blendEquationSeparate + ',' + modeRGB + ',' + modeAlpha,
- true
- )
- }
-
-
- blendFunc = function (sfactor, dfactor) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.blendFunc + ',' + sfactor + ',' + dfactor,
- true
- );
- }
-
- blendFuncSeparate = function (srcRGB, dstRGB, srcAlpha, dstAlpha) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.blendFuncSeparate + ',' + srcRGB + ',' + dstRGB + ',' + srcAlpha + ',' + dstAlpha,
- true
- );
- }
-
- bufferData = function (target, data, usage) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bufferData + ',' + target + ',' + processArray(data, true) + ',' + usage,
- true
- )
- }
-
- bufferSubData = function (target, offset, data) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.bufferSubData + ',' + target + ',' + offset + ',' + processArray(data, true),
- true
- )
- }
-
- checkFramebufferStatus = function (target) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.checkFramebufferStatus + ',' + target
- );
- return Number(result);
- }
-
- clear = function (mask) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.clear + ',' + mask
- );
- this._canvas._needRender = true;
- }
-
- clearColor = function (r, g, b, a) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.clearColor + ',' + r + ',' + g + ',' + b,
- true
- )
- }
-
- clearDepth = function (depth) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.clearDepth + ',' + depth,
- true
- )
- }
-
- clearStencil = function (s) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.clearStencil + ',' + s
- );
- }
-
- colorMask = function (r, g, b, a) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.colorMask + ',' + r + ',' + g + ',' + b + ',' + a
- )
- }
-
- compileShader = function (shader) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.compileShader + ',' + shader.id,
- true
- )
- }
-
- compressedTexImage2D = function (target, level, internalformat, width, height, border, pixels) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.compressedTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' +
- width + ',' + height + ',' + border + ',' + processArray(pixels),
- true
- )
- }
-
- compressedTexSubImage2D = function (target, level, xoffset, yoffset, width, height, format, pixels) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.compressedTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' +
- width + ',' + height + ',' + format + ',' + processArray(pixels),
- true
- )
- }
-
-
- copyTexImage2D = function (target, level, internalformat, x, y, width, height, border) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.copyTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' + x + ',' + y + ',' +
- width + ',' + height + ',' + border,
- true
- );
- }
-
- copyTexSubImage2D = function (target, level, xoffset, yoffset, x, y, width, height) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.copyTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' + x + ',' + y + ',' +
- width + ',' + height
- );
- }
-
- createBuffer = function () {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createBuffer + ''
- );
- const buffer = new Buffer(result);
- this._map.set(buffer.uuid(), buffer);
- return buffer;
- }
-
- createFramebuffer = function () {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createFramebuffer + ''
- );
- const framebuffer = new Framebuffer(result);
- this._map.set(framebuffer.uuid(), framebuffer);
- return framebuffer;
- }
-
-
- createProgram = function () {
- const id = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createProgram + ''
- );
- const program = new Program(id);
- this._map.set(program.uuid(), program);
- return program;
- }
-
- createRenderbuffer = function () {
- const id = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createRenderbuffer + ''
- )
- const renderBuffer = new Renderbuffer(id);
- this._map.set(renderBuffer.uuid(), renderBuffer);
- return renderBuffer;
- }
-
- createShader = function (type) {
- const id = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createShader + ',' + type
- )
- const shader = new Shader(id, type);
- this._map.set(shader.uuid(), shader);
- return shader;
- }
-
- createTexture = function () {
- const id = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.createTexture + ''
- );
- const texture = new Texture(id);
- this._map.set(texture.uuid(), texture);
- return texture;
- }
-
- cullFace = function (mode) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.cullFace + ',' + mode,
- true
- )
- }
-
-
- deleteBuffer = function (buffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteBuffer + ',' + buffer.id,
- true
- )
- }
-
- deleteFramebuffer = function (framebuffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteFramebuffer + ',' + framebuffer.id,
- true
- )
- }
-
- deleteProgram = function (program) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteProgram + ',' + program.id,
- true
- )
- }
-
- deleteRenderbuffer = function (renderbuffer) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteRenderbuffer + ',' + renderbuffer.id,
- true
- )
- }
-
- deleteShader = function (shader) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteShader + ',' + shader.id,
- true
- )
- }
-
- deleteTexture = function (texture) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.deleteTexture + ',' + texture.id,
- true
- )
- }
-
- depthFunc = function (func) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.depthFunc + ',' + func
- )
- }
-
- depthMask = function (flag) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.depthMask + ',' + Number(flag),
- true
- )
- }
-
- depthRange = function (zNear, zFar) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.depthRange + ',' + zNear + ',' + zFar,
- true
- )
- }
-
- detachShader = function (program, shader) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.detachShader + ',' + program.id + ',' + shader.id,
- true
- )
- }
-
- disable = function (cap) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.disable + ',' + cap,
- true
- )
- }
-
- disableVertexAttribArray = function (index) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.disableVertexAttribArray + ',' + index,
- true
- );
- }
-
- drawArrays = function (mode, first, count) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.drawArrays + ',' + mode + ',' + first + ',' + count
- )
- this._canvas._needRender = true;
- }
-
- drawElements = function (mode, count, type, offset) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.drawElements + ',' + mode + ',' + count + ',' + type + ',' + offset + ';'
- );
- this._canvas._needRender = true;
- }
-
- enable = function (cap) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.enable + ',' + cap,
- true
- );
- }
-
- enableVertexAttribArray = function (index) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.enableVertexAttribArray + ',' + index,
- true
- )
- }
-
-
- flush = function () {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.flush + ''
- )
- }
-
- framebufferRenderbuffer = function (target, attachment, textarget, texture, level) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.framebufferRenderbuffer + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level,
- true
- )
- }
-
- framebufferTexture2D = function (target, attachment, textarget, texture, level) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.framebufferTexture2D + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level,
- true
- )
- }
-
- frontFace = function (mode) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.frontFace + ',' + mode,
- true
- )
- }
-
- generateMipmap = function (target) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.generateMipmap + ',' + target,
- true
- )
- }
-
- getActiveAttrib = function (progarm, index) {
- const resultString = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getActiveAttrib + ',' + progarm.id + ',' + index
- )
- const [type, size, name] = resultString.split(',');
- return new ActiveInfo({
- type: Number(type),
- size: Number(size),
- name
- });
- }
-
- getActiveUniform = function (progarm, index) {
- const resultString = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getActiveUniform + ',' + progarm.id + ',' + index
- );
- const [type, size, name] = resultString.split(',');
- return new ActiveInfo({
- type: Number(type),
- size: Number(size),
- name
- })
- }
-
- getAttachedShaders = function (progarm) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getAttachedShaders + ',' + progarm.id
- );
- const [type, ...ids] = result;
- return ids.map(id => this._map.get(Shader.uuid(id)));
- }
-
- getAttribLocation = function (progarm, name) {
- return WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getAttribLocation + ',' + progarm.id + ',' + name
- )
- }
-
- getBufferParameter = function (target, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getBufferParameter + ',' + target + ',' + pname
- );
- const [type, res] = getBufferParameter;
- return res;
- }
-
- getError = function () {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getError + ''
- )
- return result;
- }
-
- getExtension = function (name) {
- return null;
- }
-
- getFramebufferAttachmentParameter = function (target, attachment, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getFramebufferAttachmentParameter + ',' + target + ',' + attachment + ',' + pname
- )
- switch (pname) {
- case GLenum.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
- return this._map.get(Renderbuffer.uuid(result)) || this._map.get(Texture.uuid(result)) || null;
- default:
- return result;
- }
- }
-
- getParameter = function (pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getParameter + ',' + pname
- )
- switch (pname) {
- case GLenum.VERSION:
- return this._version;
- case GLenum.ARRAY_BUFFER_BINDING: // buffer
- case GLenum.ELEMENT_ARRAY_BUFFER_BINDING: // buffer
- return this._map.get(Buffer.uuid(result)) || null;
- case GLenum.CURRENT_PROGRAM: // program
- return this._map.get(Program.uuid(result)) || null;
- case GLenum.FRAMEBUFFER_BINDING: // framebuffer
- return this._map.get(Framebuffer.uuid(result)) || null;
- case GLenum.RENDERBUFFER_BINDING: // renderbuffer
- return this._map.get(Renderbuffer.uuid(result)) || null;
- case GLenum.TEXTURE_BINDING_2D: // texture
- case GLenum.TEXTURE_BINDING_CUBE_MAP: // texture
- return this._map.get(Texture.uuid(result)) || null;
- case GLenum.ALIASED_LINE_WIDTH_RANGE: // Float32Array
- case GLenum.ALIASED_POINT_SIZE_RANGE: // Float32Array
- case GLenum.BLEND_COLOR: // Float32Array
- case GLenum.COLOR_CLEAR_VALUE: // Float32Array
- case GLenum.DEPTH_RANGE: // Float32Array
- case GLenum.MAX_VIEWPORT_DIMS: // Int32Array
- case GLenum.SCISSOR_BOX: // Int32Array
- case GLenum.VIEWPORT: // Int32Array
- case GLenum.COMPRESSED_TEXTURE_FORMATS: // Uint32Array
- default:
- const [type, ...res] = result.split(',');
- if (res.length === 1) {
- return Number(res[0]);
- } else {
- return res.map(Number);
- }
- }
- }
-
- getProgramInfoLog = function (progarm) {
- return WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getProgramInfoLog + ',' + progarm.id
- )
- }
-
- getProgramParameter = function (program, pname) {
- const res = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getProgramParameter + ',' + program.id + ',' + pname
- );
-
- const [type, result] = res.split(',').map(i => parseInt(i));
-
- if (type === 1) {
- return Boolean(result);
- } else if (type === 2) {
- return result;
- } else {
- throw new Error('Unrecongized program paramater ' + res + ', type: ' + typeof res);
- }
- }
-
-
- getRenderbufferParameter = function (target, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getRenderbufferParameter + ',' + target + ',' + pname
- )
- return result;
- }
-
-
- getShaderInfoLog = function (shader) {
- return WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getShaderInfoLog + ',' + shader.id
- );
- }
-
- getShaderParameter = function (shader, pname) {
- return WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getShaderParameter + ',' + shader.id + ',' + pname
- )
- }
-
- getShaderPrecisionFormat = function (shaderType, precisionType) {
- const [rangeMin, rangeMax, precision] = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getShaderPrecisionFormat + ',' + shaderType + ',' + precisionType
- );
- const shaderPrecisionFormat = new ShaderPrecisionFormat({
- rangeMin: Number(rangeMin),
- rangeMax: Number(rangeMax),
- precision: Number(precision)
- });
- return shaderPrecisionFormat;
- }
-
- getShaderSource = function (shader) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getShaderSource + ',' + shader.id
- );
- return result;
- }
-
- getSupportedExtensions = function () {
- return Object.keys({});
- }
-
- getTexParameter = function (target, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getTexParameter + ',' + target + ',' + pname
- )
- return result;
- }
-
- getUniformLocation = function (program, name) {
- const id = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getUniformLocation + ',' + program.id + ',' + name
- );
- if (id === -1) {
- return null;
- } else {
- return new UniformLocation(Number(id));
- }
- }
-
- getVertexAttrib = function (index, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getVertexAttrib + ',' + index + ',' + pname
- );
- switch (pname) {
- case GLenum.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:
- return this._map.get(Buffer.uuid(result)) || null;
- case GLenum.CURRENT_VERTEX_ATTRIB: // Float32Array
- default:
- return result;
- }
- }
-
- getVertexAttribOffset = function (index, pname) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.getVertexAttribOffset + ',' + index + ',' + pname
- )
- return Number(result);
- }
-
- isBuffer = function (buffer) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isBuffer + ',' + buffer.id
- )
- return Boolean(result);
- }
-
- isContextLost = function () {
- return false;
- }
-
- isEnabled = function (cap) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isEnabled + ',' + cap
- )
- return Boolean(result);
- }
-
- isFramebuffer = function (framebuffer) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isFramebuffer + ',' + framebuffer.id
- )
- return Boolean(result);
- }
-
- isProgram = function (program) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isProgram + ',' + program.id
- )
- return Boolean(result);
- }
-
- isRenderbuffer = function (renderBuffer) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isRenderbuffer + ',' + renderbuffer.id
- )
- return Boolean(result);
- }
-
- isShader = function (shader) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isShader + ',' + shader.id
- )
- return Boolean(result);
- }
-
- isTexture = function (texture) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.isTexture + ',' + texture.id
- );
- return Boolean(result);
- }
-
- lineWidth = function (width) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.lineWidth + ',' + width,
- true
- )
- }
-
- linkProgram = function (program) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.linkProgram + ',' + program.id,
- true
- );
- }
-
-
- pixelStorei = function (pname, param) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.pixelStorei + ',' + pname + ',' + Number(param)
- )
- }
-
- polygonOffset = function (factor, units) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.polygonOffset + ',' + factor + ',' + units
- )
- }
-
- readPixels = function (x, y, width, height, format, type, pixels) {
- const result = WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.readPixels + ',' + x + ',' + y + ',' + width + ',' + height + ',' + format + ',' + type
- )
- return result;
- }
-
- renderbufferStorage = function (target, internalFormat, width, height) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.renderbufferStorage + ',' + target + ',' + internalFormat + ',' + width + ',' + height,
- true
- )
- }
-
- sampleCoverage = function (value, invert) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.sampleCoverage + ',' + value + ',' + Number(invert),
- true
- )
- }
-
- scissor = function (x, y, width, height) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.scissor + ',' + x + ',' + y + ',' + width + ',' + height,
- true
- )
- }
-
- shaderSource = function (shader, source) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.shaderSource + ',' + shader.id + ',' + source
- )
- }
-
- stencilFunc = function (func, ref, mask) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilFunc + ',' + func + ',' + ref + ',' + mask,
- true
- )
- }
-
- stencilFuncSeparate = function (face, func, ref, mask) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilFuncSeparate + ',' + face + ',' + func + ',' + ref + ',' + mask,
- true
- )
- }
-
- stencilMask = function (mask) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilMask + ',' + mask,
- true
- )
- }
-
- stencilMaskSeparate = function (face, mask) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilMaskSeparate + ',' + face + ',' + mask,
- true
- )
- }
-
- stencilOp = function (fail, zfail, zpass) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilOp + ',' + fail + ',' + zfail + ',' + zpass
- )
- }
-
- stencilOpSeparate = function (face, fail, zfail, zpass) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.stencilOp + ',' + face + ',' + fail + ',' + zfail + ',' + zpass,
- true
- )
- }
-
- texImage2D = function (...args) {
- WebGLRenderingContext.GBridge.texImage2D(this._canvas.id, ...args);
- }
-
-
- texParameterf = function (target, pname, param) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.texParameterf + ',' + target + ',' + pname + ',' + param,
- true
- )
- }
-
- texParameteri = function (target, pname, param) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.texParameteri + ',' + target + ',' + pname + ',' + param
- )
- }
-
- texSubImage2D = function (...args) {
- WebGLRenderingContext.GBridge.texSubImage2D(this._canvas.id, ...args);
- }
-
- uniform1f = function (location, v0) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform1f + ',' + location.id + ',' + v0
- )
- }
-
- uniform1fv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform1fv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform1i = function (location, v0) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform1i + ',' + location.id + ',' + v0,
- // true
- )
- }
-
- uniform1iv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform1iv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform2f = function (location, v0, v1) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform2f + ',' + location.id + ',' + v0 + ',' + v1,
- true
- )
- }
-
- uniform2fv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform2fv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform2i = function (location, v0, v1) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform2i + ',' + location.id + ',' + v0 + ',' + v1,
- true
- )
- }
-
- uniform2iv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform2iv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform3f = function (location, v0, v1, v2) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform3f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2,
- true
- )
- }
-
- uniform3fv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform3fv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform3i = function (location, v0, v1, v2) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform3i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2,
- true
- )
- }
-
- uniform3iv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform3iv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform4f = function (location, v0, v1, v2, v3) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform4f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
- true
- )
- }
-
- uniform4fv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform4fv + ',' + location.id + ',' + processArray(value),
- true
- )
- }
-
- uniform4i = function (location, v0, v1, v2, v3) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform4i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
- true
- )
- }
-
- uniform4iv = function (location, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniform4iv + ',' + location.id + ',' + processArray(value, true),
- true
- )
- }
-
- uniformMatrix2fv = function (location, transpose, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniformMatrix2fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
- true
- )
- }
-
- uniformMatrix3fv = function (location, transpose, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniformMatrix3fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
- true
- )
- }
-
- uniformMatrix4fv = function (location, transpose, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.uniformMatrix4fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
- true
- );
- }
-
- useProgram = function (progarm) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.useProgram + ',' + progarm.id + '',
- true
- )
- }
-
-
- validateProgram = function (program) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.validateProgram + ',' + program.id,
- true
- )
- }
-
- vertexAttrib1f = function (index, v0) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib1f + ',' + index + ',' + v0,
- true
- )
- }
-
- vertexAttrib2f = function (index, v0, v1) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib2f + ',' + index + ',' + v0 + ',' + v1,
- true
- )
- }
-
- vertexAttrib3f = function (index, v0, v1, v2) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib3f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2,
- true
- )
- }
-
- vertexAttrib4f = function (index, v0, v1, v2, v3) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib4f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
- true
- )
- }
-
- vertexAttrib1fv = function (index, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib1fv + ',' + index + ',' + processArray(value),
- true
- )
- }
-
- vertexAttrib2fv = function (index, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib2fv + ',' + index + ',' + processArray(value),
- true
- )
- }
-
- vertexAttrib3fv = function (index, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib3fv + ',' + index + ',' + processArray(value),
- true
- )
- }
-
- vertexAttrib4fv = function (index, value) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttrib4fv + ',' + index + ',' + processArray(value),
- true
- )
- }
-
- vertexAttribPointer = function (index, size, type, normalized, stride, offset) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.vertexAttribPointer + ',' + index + ',' + size + ',' + type + ',' + Number(normalized) + ',' + stride + ',' + offset,
- true
- )
- }
-
- viewport = function (x, y, width, height) {
- WebGLRenderingContext.GBridge.callNative(
- this._canvas.id,
- GLmethod.viewport + ',' + x + ',' + y + ',' + width + ',' + height,
- true
- )
- }
+import GLenum from './GLenum';
+import ActiveInfo from './ActiveInfo';
+import Buffer from './Buffer';
+import Framebuffer from './Framebuffer';
+import Renderbuffer from './Renderbuffer';
+import Texture from './Texture';
+import Program from './Program';
+import Shader from './Shader';
+import ShaderPrecisionFormat from './ShaderPrecisionFormat';
+import UniformLocation from './UniformLocation';
+import GLmethod from './GLmethod';
+
+const processArray = (array, checkArrayType = false) => {
+
+ function joinArray(arr, sep) {
+ let res = '';
+ for (let i = 0; i < arr.length; i++) {
+ if (i !== 0) {
+ res += sep;
+ }
+ res += arr[i];
+ }
+ return res;
+ }
+
+ let type = 'Float32Array';
+ if (checkArrayType) {
+ if (array instanceof Uint8Array) {
+ type = 'Uint8Array'
+ } else if (array instanceof Uint16Array) {
+ type = 'Uint16Array';
+ } else if (array instanceof Uint32Array) {
+ type = 'Uint32Array';
+ } else if (array instanceof Float32Array) {
+ type = 'Float32Array';
+ } else {
+ throw new Error('Check array type failed. Array type is ' + typeof array);
+ }
+ }
+
+ const ArrayTypes = {
+ Uint8Array: 1,
+ Uint16Array: 2,
+ Uint32Array: 4,
+ Float32Array: 14
+ };
+ return ArrayTypes[type] + ',' + btoa(joinArray(array, ','))
+}
+
+export default class WebGLRenderingContext {
+
+ // static GBridge = null;
+
+ className = 'WebGLRenderingContext';
+
+ constructor(canvas, type, attrs) {
+ this._canvas = canvas;
+ this._type = type;
+ this._version = 'WebGL 1.0';
+ this._attrs = attrs;
+ this._map = new Map();
+
+ Object.keys(GLenum)
+ .forEach(name => Object.defineProperty(this, name, {
+ value: GLenum[name]
+ }));
+ }
+
+ get canvas() {
+ return this._canvas;
+ }
+
+ activeTexture = function (textureUnit) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.activeTexture + ',' + textureUnit,
+ true
+ );
+ }
+
+ attachShader = function (progarm, shader) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.attachShader + ',' + progarm.id + ',' + shader.id,
+ true
+ );
+ }
+
+ bindAttribLocation = function (program, index, name) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bindAttribLocation + ',' + program.id + ',' + index + ',' + name,
+ true
+ )
+ }
+
+ bindBuffer = function (target, buffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bindBuffer + ',' + target + ',' + (buffer ? buffer.id : 0),
+ true
+ );
+ }
+
+ bindFramebuffer = function (target, framebuffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bindFramebuffer + ',' + target + ',' + (framebuffer ? framebuffer.id : 0),
+ true
+ )
+ }
+
+ bindRenderbuffer = function (target, renderBuffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bindRenderbuffer + ',' + target + ',' + (renderBuffer ? renderBuffer.id : 0),
+ true
+ )
+ }
+
+ bindTexture = function (target, texture) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bindTexture + ',' + target + ',' + (texture ? texture.id : 0),
+ true
+ )
+ }
+
+ blendColor = function (r, g, b, a) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.blendColor + ',' + target + ',' + r + ',' + g + ',' + b + ',' + a,
+ true
+ )
+ }
+
+ blendEquation = function (mode) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.blendEquation + ',' + mode,
+ true
+ )
+ }
+
+ blendEquationSeparate = function (modeRGB, modeAlpha) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.blendEquationSeparate + ',' + modeRGB + ',' + modeAlpha,
+ true
+ )
+ }
+
+
+ blendFunc = function (sfactor, dfactor) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.blendFunc + ',' + sfactor + ',' + dfactor,
+ true
+ );
+ }
+
+ blendFuncSeparate = function (srcRGB, dstRGB, srcAlpha, dstAlpha) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.blendFuncSeparate + ',' + srcRGB + ',' + dstRGB + ',' + srcAlpha + ',' + dstAlpha,
+ true
+ );
+ }
+
+ bufferData = function (target, data, usage) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bufferData + ',' + target + ',' + processArray(data, true) + ',' + usage,
+ true
+ )
+ }
+
+ bufferSubData = function (target, offset, data) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.bufferSubData + ',' + target + ',' + offset + ',' + processArray(data, true),
+ true
+ )
+ }
+
+ checkFramebufferStatus = function (target) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.checkFramebufferStatus + ',' + target
+ );
+ return Number(result);
+ }
+
+ clear = function (mask) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.clear + ',' + mask
+ );
+ this._canvas._needRender = true;
+ }
+
+ clearColor = function (r, g, b, a) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.clearColor + ',' + r + ',' + g + ',' + b,
+ true
+ )
+ }
+
+ clearDepth = function (depth) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.clearDepth + ',' + depth,
+ true
+ )
+ }
+
+ clearStencil = function (s) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.clearStencil + ',' + s
+ );
+ }
+
+ colorMask = function (r, g, b, a) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.colorMask + ',' + r + ',' + g + ',' + b + ',' + a
+ )
+ }
+
+ compileShader = function (shader) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.compileShader + ',' + shader.id,
+ true
+ )
+ }
+
+ compressedTexImage2D = function (target, level, internalformat, width, height, border, pixels) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.compressedTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' +
+ width + ',' + height + ',' + border + ',' + processArray(pixels),
+ true
+ )
+ }
+
+ compressedTexSubImage2D = function (target, level, xoffset, yoffset, width, height, format, pixels) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.compressedTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' +
+ width + ',' + height + ',' + format + ',' + processArray(pixels),
+ true
+ )
+ }
+
+
+ copyTexImage2D = function (target, level, internalformat, x, y, width, height, border) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.copyTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' + x + ',' + y + ',' +
+ width + ',' + height + ',' + border,
+ true
+ );
+ }
+
+ copyTexSubImage2D = function (target, level, xoffset, yoffset, x, y, width, height) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.copyTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' + x + ',' + y + ',' +
+ width + ',' + height
+ );
+ }
+
+ createBuffer = function () {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createBuffer + ''
+ );
+ const buffer = new Buffer(result);
+ this._map.set(buffer.uuid(), buffer);
+ return buffer;
+ }
+
+ createFramebuffer = function () {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createFramebuffer + ''
+ );
+ const framebuffer = new Framebuffer(result);
+ this._map.set(framebuffer.uuid(), framebuffer);
+ return framebuffer;
+ }
+
+
+ createProgram = function () {
+ const id = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createProgram + ''
+ );
+ const program = new Program(id);
+ this._map.set(program.uuid(), program);
+ return program;
+ }
+
+ createRenderbuffer = function () {
+ const id = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createRenderbuffer + ''
+ )
+ const renderBuffer = new Renderbuffer(id);
+ this._map.set(renderBuffer.uuid(), renderBuffer);
+ return renderBuffer;
+ }
+
+ createShader = function (type) {
+ const id = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createShader + ',' + type
+ )
+ const shader = new Shader(id, type);
+ this._map.set(shader.uuid(), shader);
+ return shader;
+ }
+
+ createTexture = function () {
+ const id = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.createTexture + ''
+ );
+ const texture = new Texture(id);
+ this._map.set(texture.uuid(), texture);
+ return texture;
+ }
+
+ cullFace = function (mode) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.cullFace + ',' + mode,
+ true
+ )
+ }
+
+
+ deleteBuffer = function (buffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteBuffer + ',' + buffer.id,
+ true
+ )
+ }
+
+ deleteFramebuffer = function (framebuffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteFramebuffer + ',' + framebuffer.id,
+ true
+ )
+ }
+
+ deleteProgram = function (program) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteProgram + ',' + program.id,
+ true
+ )
+ }
+
+ deleteRenderbuffer = function (renderbuffer) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteRenderbuffer + ',' + renderbuffer.id,
+ true
+ )
+ }
+
+ deleteShader = function (shader) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteShader + ',' + shader.id,
+ true
+ )
+ }
+
+ deleteTexture = function (texture) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.deleteTexture + ',' + texture.id,
+ true
+ )
+ }
+
+ depthFunc = function (func) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.depthFunc + ',' + func
+ )
+ }
+
+ depthMask = function (flag) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.depthMask + ',' + Number(flag),
+ true
+ )
+ }
+
+ depthRange = function (zNear, zFar) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.depthRange + ',' + zNear + ',' + zFar,
+ true
+ )
+ }
+
+ detachShader = function (program, shader) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.detachShader + ',' + program.id + ',' + shader.id,
+ true
+ )
+ }
+
+ disable = function (cap) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.disable + ',' + cap,
+ true
+ )
+ }
+
+ disableVertexAttribArray = function (index) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.disableVertexAttribArray + ',' + index,
+ true
+ );
+ }
+
+ drawArrays = function (mode, first, count) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.drawArrays + ',' + mode + ',' + first + ',' + count
+ )
+ this._canvas._needRender = true;
+ }
+
+ drawElements = function (mode, count, type, offset) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.drawElements + ',' + mode + ',' + count + ',' + type + ',' + offset + ';'
+ );
+ this._canvas._needRender = true;
+ }
+
+ enable = function (cap) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.enable + ',' + cap,
+ true
+ );
+ }
+
+ enableVertexAttribArray = function (index) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.enableVertexAttribArray + ',' + index,
+ true
+ )
+ }
+
+
+ flush = function () {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.flush + ''
+ )
+ }
+
+ framebufferRenderbuffer = function (target, attachment, textarget, texture, level) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.framebufferRenderbuffer + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level,
+ true
+ )
+ }
+
+ framebufferTexture2D = function (target, attachment, textarget, texture, level) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.framebufferTexture2D + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level,
+ true
+ )
+ }
+
+ frontFace = function (mode) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.frontFace + ',' + mode,
+ true
+ )
+ }
+
+ generateMipmap = function (target) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.generateMipmap + ',' + target,
+ true
+ )
+ }
+
+ getActiveAttrib = function (progarm, index) {
+ const resultString = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getActiveAttrib + ',' + progarm.id + ',' + index
+ )
+ const [type, size, name] = resultString.split(',');
+ return new ActiveInfo({
+ type: Number(type),
+ size: Number(size),
+ name
+ });
+ }
+
+ getActiveUniform = function (progarm, index) {
+ const resultString = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getActiveUniform + ',' + progarm.id + ',' + index
+ );
+ const [type, size, name] = resultString.split(',');
+ return new ActiveInfo({
+ type: Number(type),
+ size: Number(size),
+ name
+ })
+ }
+
+ getAttachedShaders = function (progarm) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getAttachedShaders + ',' + progarm.id
+ );
+ const [type, ...ids] = result;
+ return ids.map(id => this._map.get(Shader.uuid(id)));
+ }
+
+ getAttribLocation = function (progarm, name) {
+ return WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getAttribLocation + ',' + progarm.id + ',' + name
+ )
+ }
+
+ getBufferParameter = function (target, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getBufferParameter + ',' + target + ',' + pname
+ );
+ const [type, res] = getBufferParameter;
+ return res;
+ }
+
+ getError = function () {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getError + ''
+ )
+ return result;
+ }
+
+ getExtension = function (name) {
+ return null;
+ }
+
+ getFramebufferAttachmentParameter = function (target, attachment, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getFramebufferAttachmentParameter + ',' + target + ',' + attachment + ',' + pname
+ )
+ switch (pname) {
+ case GLenum.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
+ return this._map.get(Renderbuffer.uuid(result)) || this._map.get(Texture.uuid(result)) || null;
+ default:
+ return result;
+ }
+ }
+
+ getParameter = function (pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getParameter + ',' + pname
+ )
+ switch (pname) {
+ case GLenum.VERSION:
+ return this._version;
+ case GLenum.ARRAY_BUFFER_BINDING: // buffer
+ case GLenum.ELEMENT_ARRAY_BUFFER_BINDING: // buffer
+ return this._map.get(Buffer.uuid(result)) || null;
+ case GLenum.CURRENT_PROGRAM: // program
+ return this._map.get(Program.uuid(result)) || null;
+ case GLenum.FRAMEBUFFER_BINDING: // framebuffer
+ return this._map.get(Framebuffer.uuid(result)) || null;
+ case GLenum.RENDERBUFFER_BINDING: // renderbuffer
+ return this._map.get(Renderbuffer.uuid(result)) || null;
+ case GLenum.TEXTURE_BINDING_2D: // texture
+ case GLenum.TEXTURE_BINDING_CUBE_MAP: // texture
+ return this._map.get(Texture.uuid(result)) || null;
+ case GLenum.ALIASED_LINE_WIDTH_RANGE: // Float32Array
+ case GLenum.ALIASED_POINT_SIZE_RANGE: // Float32Array
+ case GLenum.BLEND_COLOR: // Float32Array
+ case GLenum.COLOR_CLEAR_VALUE: // Float32Array
+ case GLenum.DEPTH_RANGE: // Float32Array
+ case GLenum.MAX_VIEWPORT_DIMS: // Int32Array
+ case GLenum.SCISSOR_BOX: // Int32Array
+ case GLenum.VIEWPORT: // Int32Array
+ case GLenum.COMPRESSED_TEXTURE_FORMATS: // Uint32Array
+ default:
+ const [type, ...res] = result.split(',');
+ if (res.length === 1) {
+ return Number(res[0]);
+ } else {
+ return res.map(Number);
+ }
+ }
+ }
+
+ getProgramInfoLog = function (progarm) {
+ return WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getProgramInfoLog + ',' + progarm.id
+ )
+ }
+
+ getProgramParameter = function (program, pname) {
+ const res = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getProgramParameter + ',' + program.id + ',' + pname
+ );
+
+ const [type, result] = res.split(',').map(i => parseInt(i));
+
+ if (type === 1) {
+ return Boolean(result);
+ } else if (type === 2) {
+ return result;
+ } else {
+ throw new Error('Unrecongized program paramater ' + res + ', type: ' + typeof res);
+ }
+ }
+
+
+ getRenderbufferParameter = function (target, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getRenderbufferParameter + ',' + target + ',' + pname
+ )
+ return result;
+ }
+
+
+ getShaderInfoLog = function (shader) {
+ return WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getShaderInfoLog + ',' + shader.id
+ );
+ }
+
+ getShaderParameter = function (shader, pname) {
+ return WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getShaderParameter + ',' + shader.id + ',' + pname
+ )
+ }
+
+ getShaderPrecisionFormat = function (shaderType, precisionType) {
+ const [rangeMin, rangeMax, precision] = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getShaderPrecisionFormat + ',' + shaderType + ',' + precisionType
+ );
+ const shaderPrecisionFormat = new ShaderPrecisionFormat({
+ rangeMin: Number(rangeMin),
+ rangeMax: Number(rangeMax),
+ precision: Number(precision)
+ });
+ return shaderPrecisionFormat;
+ }
+
+ getShaderSource = function (shader) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getShaderSource + ',' + shader.id
+ );
+ return result;
+ }
+
+ getSupportedExtensions = function () {
+ return Object.keys({});
+ }
+
+ getTexParameter = function (target, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getTexParameter + ',' + target + ',' + pname
+ )
+ return result;
+ }
+
+ getUniformLocation = function (program, name) {
+ const id = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getUniformLocation + ',' + program.id + ',' + name
+ );
+ if (id === -1) {
+ return null;
+ } else {
+ return new UniformLocation(Number(id));
+ }
+ }
+
+ getVertexAttrib = function (index, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getVertexAttrib + ',' + index + ',' + pname
+ );
+ switch (pname) {
+ case GLenum.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:
+ return this._map.get(Buffer.uuid(result)) || null;
+ case GLenum.CURRENT_VERTEX_ATTRIB: // Float32Array
+ default:
+ return result;
+ }
+ }
+
+ getVertexAttribOffset = function (index, pname) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.getVertexAttribOffset + ',' + index + ',' + pname
+ )
+ return Number(result);
+ }
+
+ isBuffer = function (buffer) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isBuffer + ',' + buffer.id
+ )
+ return Boolean(result);
+ }
+
+ isContextLost = function () {
+ return false;
+ }
+
+ isEnabled = function (cap) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isEnabled + ',' + cap
+ )
+ return Boolean(result);
+ }
+
+ isFramebuffer = function (framebuffer) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isFramebuffer + ',' + framebuffer.id
+ )
+ return Boolean(result);
+ }
+
+ isProgram = function (program) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isProgram + ',' + program.id
+ )
+ return Boolean(result);
+ }
+
+ isRenderbuffer = function (renderBuffer) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isRenderbuffer + ',' + renderbuffer.id
+ )
+ return Boolean(result);
+ }
+
+ isShader = function (shader) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isShader + ',' + shader.id
+ )
+ return Boolean(result);
+ }
+
+ isTexture = function (texture) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.isTexture + ',' + texture.id
+ );
+ return Boolean(result);
+ }
+
+ lineWidth = function (width) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.lineWidth + ',' + width,
+ true
+ )
+ }
+
+ linkProgram = function (program) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.linkProgram + ',' + program.id,
+ true
+ );
+ }
+
+
+ pixelStorei = function (pname, param) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.pixelStorei + ',' + pname + ',' + Number(param)
+ )
+ }
+
+ polygonOffset = function (factor, units) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.polygonOffset + ',' + factor + ',' + units
+ )
+ }
+
+ readPixels = function (x, y, width, height, format, type, pixels) {
+ const result = WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.readPixels + ',' + x + ',' + y + ',' + width + ',' + height + ',' + format + ',' + type
+ )
+ return result;
+ }
+
+ renderbufferStorage = function (target, internalFormat, width, height) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.renderbufferStorage + ',' + target + ',' + internalFormat + ',' + width + ',' + height,
+ true
+ )
+ }
+
+ sampleCoverage = function (value, invert) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.sampleCoverage + ',' + value + ',' + Number(invert),
+ true
+ )
+ }
+
+ scissor = function (x, y, width, height) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.scissor + ',' + x + ',' + y + ',' + width + ',' + height,
+ true
+ )
+ }
+
+ shaderSource = function (shader, source) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.shaderSource + ',' + shader.id + ',' + source
+ )
+ }
+
+ stencilFunc = function (func, ref, mask) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilFunc + ',' + func + ',' + ref + ',' + mask,
+ true
+ )
+ }
+
+ stencilFuncSeparate = function (face, func, ref, mask) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilFuncSeparate + ',' + face + ',' + func + ',' + ref + ',' + mask,
+ true
+ )
+ }
+
+ stencilMask = function (mask) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilMask + ',' + mask,
+ true
+ )
+ }
+
+ stencilMaskSeparate = function (face, mask) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilMaskSeparate + ',' + face + ',' + mask,
+ true
+ )
+ }
+
+ stencilOp = function (fail, zfail, zpass) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilOp + ',' + fail + ',' + zfail + ',' + zpass
+ )
+ }
+
+ stencilOpSeparate = function (face, fail, zfail, zpass) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.stencilOp + ',' + face + ',' + fail + ',' + zfail + ',' + zpass,
+ true
+ )
+ }
+
+ texImage2D = function (...args) {
+ WebGLRenderingContext.GBridge.texImage2D(this._canvas.id, ...args);
+ }
+
+
+ texParameterf = function (target, pname, param) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.texParameterf + ',' + target + ',' + pname + ',' + param,
+ true
+ )
+ }
+
+ texParameteri = function (target, pname, param) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.texParameteri + ',' + target + ',' + pname + ',' + param
+ )
+ }
+
+ texSubImage2D = function (...args) {
+ WebGLRenderingContext.GBridge.texSubImage2D(this._canvas.id, ...args);
+ }
+
+ uniform1f = function (location, v0) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform1f + ',' + location.id + ',' + v0
+ )
+ }
+
+ uniform1fv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform1fv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform1i = function (location, v0) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform1i + ',' + location.id + ',' + v0,
+ // true
+ )
+ }
+
+ uniform1iv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform1iv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform2f = function (location, v0, v1) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform2f + ',' + location.id + ',' + v0 + ',' + v1,
+ true
+ )
+ }
+
+ uniform2fv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform2fv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform2i = function (location, v0, v1) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform2i + ',' + location.id + ',' + v0 + ',' + v1,
+ true
+ )
+ }
+
+ uniform2iv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform2iv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform3f = function (location, v0, v1, v2) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform3f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2,
+ true
+ )
+ }
+
+ uniform3fv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform3fv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform3i = function (location, v0, v1, v2) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform3i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2,
+ true
+ )
+ }
+
+ uniform3iv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform3iv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform4f = function (location, v0, v1, v2, v3) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform4f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
+ true
+ )
+ }
+
+ uniform4fv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform4fv + ',' + location.id + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniform4i = function (location, v0, v1, v2, v3) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform4i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
+ true
+ )
+ }
+
+ uniform4iv = function (location, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniform4iv + ',' + location.id + ',' + processArray(value, true),
+ true
+ )
+ }
+
+ uniformMatrix2fv = function (location, transpose, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniformMatrix2fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniformMatrix3fv = function (location, transpose, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniformMatrix3fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
+ true
+ )
+ }
+
+ uniformMatrix4fv = function (location, transpose, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.uniformMatrix4fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value),
+ true
+ );
+ }
+
+ useProgram = function (progarm) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.useProgram + ',' + progarm.id + '',
+ true
+ )
+ }
+
+
+ validateProgram = function (program) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.validateProgram + ',' + program.id,
+ true
+ )
+ }
+
+ vertexAttrib1f = function (index, v0) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib1f + ',' + index + ',' + v0,
+ true
+ )
+ }
+
+ vertexAttrib2f = function (index, v0, v1) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib2f + ',' + index + ',' + v0 + ',' + v1,
+ true
+ )
+ }
+
+ vertexAttrib3f = function (index, v0, v1, v2) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib3f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2,
+ true
+ )
+ }
+
+ vertexAttrib4f = function (index, v0, v1, v2, v3) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib4f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3,
+ true
+ )
+ }
+
+ vertexAttrib1fv = function (index, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib1fv + ',' + index + ',' + processArray(value),
+ true
+ )
+ }
+
+ vertexAttrib2fv = function (index, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib2fv + ',' + index + ',' + processArray(value),
+ true
+ )
+ }
+
+ vertexAttrib3fv = function (index, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib3fv + ',' + index + ',' + processArray(value),
+ true
+ )
+ }
+
+ vertexAttrib4fv = function (index, value) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttrib4fv + ',' + index + ',' + processArray(value),
+ true
+ )
+ }
+
+ vertexAttribPointer = function (index, size, type, normalized, stride, offset) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.vertexAttribPointer + ',' + index + ',' + size + ',' + type + ',' + Number(normalized) + ',' + stride + ',' + offset,
+ true
+ )
+ }
+
+ viewport = function (x, y, width, height) {
+ WebGLRenderingContext.GBridge.callNative(
+ this._canvas.id,
+ GLmethod.viewport + ',' + x + ',' + y + ',' + width + ',' + height,
+ true
+ )
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Shader.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Shader.js
index a763886..2917b59 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Shader.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Shader.js
@@ -1,22 +1,22 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLShader';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLShader {
- className = name;
-
- constructor(id, type) {
- this.id = id;
- this.type = type;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLShader';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLShader {
+ className = name;
+
+ constructor(id, type) {
+ this.id = id;
+ this.type = type;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js
index 208d6c1..8b70e9a 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js
@@ -1,11 +1,11 @@
-export default class WebGLShaderPrecisionFormat {
- className = 'WebGLShaderPrecisionFormat';
-
- constructor({
- rangeMin, rangeMax, precision
- }) {
- this.rangeMin = rangeMin;
- this.rangeMax = rangeMax;
- this.precision = precision;
- }
+export default class WebGLShaderPrecisionFormat {
+ className = 'WebGLShaderPrecisionFormat';
+
+ constructor({
+ rangeMin, rangeMax, precision
+ }) {
+ this.rangeMin = rangeMin;
+ this.rangeMax = rangeMax;
+ this.precision = precision;
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Texture.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Texture.js
index de4d806..089181e 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Texture.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/Texture.js
@@ -1,22 +1,22 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLTexture';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLTexture {
- className = name;
-
- constructor(id, type) {
- this.id = id;
- this.type = type;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLTexture';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLTexture {
+ className = name;
+
+ constructor(id, type) {
+ this.id = id;
+ this.type = type;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/UniformLocation.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/UniformLocation.js
index f5e99dc..f19c94c 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/UniformLocation.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/UniformLocation.js
@@ -1,22 +1,22 @@
-import {getTransferedObjectUUID} from './classUtils';
-
-const name = 'WebGLUniformLocation';
-
-function uuid(id) {
- return getTransferedObjectUUID(name, id);
-}
-
-export default class WebGLUniformLocation {
- className = name;
-
- constructor(id, type) {
- this.id = id;
- this.type = type;
- }
-
- static uuid = uuid;
-
- uuid() {
- return uuid(this.id);
- }
+import {getTransferedObjectUUID} from './classUtils';
+
+const name = 'WebGLUniformLocation';
+
+function uuid(id) {
+ return getTransferedObjectUUID(name, id);
+}
+
+export default class WebGLUniformLocation {
+ className = name;
+
+ constructor(id, type) {
+ this.id = id;
+ this.type = type;
+ }
+
+ static uuid = uuid;
+
+ uuid() {
+ return uuid(this.id);
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/classUtils.js b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/classUtils.js
index 88716be..59f02e1 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/classUtils.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/context-webgl/classUtils.js
@@ -1,3 +1,3 @@
-export function getTransferedObjectUUID(name, id) {
- return `${name.toLowerCase()}-${id}`;
+export function getTransferedObjectUUID(name, id) {
+ return `${name.toLowerCase()}-${id}`;
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/env/canvas.js b/uni_modules/uview-plus/libs/util/gcanvas/env/canvas.js
index a8d9bb9..57df6fe 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/env/canvas.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/env/canvas.js
@@ -1,74 +1,74 @@
-import GContext2D from '../context-2d/RenderingContext';
-import GContextWebGL from '../context-webgl/RenderingContext';
-
-export default class GCanvas {
-
- // static GBridge = null;
-
- id = null;
-
- _needRender = true;
-
- constructor(id, { disableAutoSwap }) {
- this.id = id;
-
- this._disableAutoSwap = disableAutoSwap;
- if (disableAutoSwap) {
- this._swapBuffers = () => {
- GCanvas.GBridge.render(this.id);
- }
- }
- }
-
- getContext(type) {
-
- let context = null;
-
- if (type.match(/webgl/i)) {
- context = new GContextWebGL(this);
-
- context.componentId = this.id;
-
- if (!this._disableAutoSwap) {
- const render = () => {
- if (this._needRender) {
- GCanvas.GBridge.render(this.id);
- this._needRender = false;
- }
- }
- setInterval(render, 16);
- }
-
- GCanvas.GBridge.callSetContextType(this.id, 1); // 0 for 2d; 1 for webgl
- } else if (type.match(/2d/i)) {
- context = new GContext2D(this);
-
- context.componentId = this.id;
-
-// const render = ( callback ) => {
-//
-// const commands = context._drawCommands;
-// context._drawCommands = '';
-//
-// GCanvas.GBridge.render2d(this.id, commands, callback);
-// this._needRender = false;
-// }
-// //draw方法触发
-// context._flush = render;
-// //setInterval(render, 16);
-
- GCanvas.GBridge.callSetContextType(this.id, 0);
- } else {
- throw new Error('not supported context ' + type);
- }
-
- return context;
-
- }
-
- reset() {
- GCanvas.GBridge.callReset(this.id);
- }
-
-
+import GContext2D from '../context-2d/RenderingContext';
+import GContextWebGL from '../context-webgl/RenderingContext';
+
+export default class GCanvas {
+
+ // static GBridge = null;
+
+ id = null;
+
+ _needRender = true;
+
+ constructor(id, { disableAutoSwap }) {
+ this.id = id;
+
+ this._disableAutoSwap = disableAutoSwap;
+ if (disableAutoSwap) {
+ this._swapBuffers = () => {
+ GCanvas.GBridge.render(this.id);
+ }
+ }
+ }
+
+ getContext(type) {
+
+ let context = null;
+
+ if (type.match(/webgl/i)) {
+ context = new GContextWebGL(this);
+
+ context.componentId = this.id;
+
+ if (!this._disableAutoSwap) {
+ const render = () => {
+ if (this._needRender) {
+ GCanvas.GBridge.render(this.id);
+ this._needRender = false;
+ }
+ }
+ setInterval(render, 16);
+ }
+
+ GCanvas.GBridge.callSetContextType(this.id, 1); // 0 for 2d; 1 for webgl
+ } else if (type.match(/2d/i)) {
+ context = new GContext2D(this);
+
+ context.componentId = this.id;
+
+// const render = ( callback ) => {
+//
+// const commands = context._drawCommands;
+// context._drawCommands = '';
+//
+// GCanvas.GBridge.render2d(this.id, commands, callback);
+// this._needRender = false;
+// }
+// //draw方法触发
+// context._flush = render;
+// //setInterval(render, 16);
+
+ GCanvas.GBridge.callSetContextType(this.id, 0);
+ } else {
+ throw new Error('not supported context ' + type);
+ }
+
+ return context;
+
+ }
+
+ reset() {
+ GCanvas.GBridge.callReset(this.id);
+ }
+
+
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/env/image.js b/uni_modules/uview-plus/libs/util/gcanvas/env/image.js
index 810e5e0..458d3cd 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/env/image.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/env/image.js
@@ -1,104 +1,96 @@
-let incId = 1;
-
-import GBridge from '../bridge/bridge-weex.js'
-const noop = function () { };
-
-class GImage {
-
- static GBridge = null;
-
- constructor() {
- this._id = incId++;
- this._width = 0;
- this._height = 0;
- this._src = undefined;
- this._onload = noop;
- this._onerror = noop;
- this.complete = false;
- }
-
- get width() {
- return this._width;
- }
- set width(v) {
- this._width = v;
- }
-
- get height() {
- return this._height;
- }
-
- set height(v) {
- this._height = v;
- }
-
- get src() {
- return this._src;
- }
-
- set src(v) {
-
- if (v.startsWith('//')) {
- v = 'http:' + v;
- }
-
- this._src = v;
- try {
- GBridge.perloadImage([this._src, this._id], (data) => {
- if (process.env.NODE_ENV === 'development') {
- console.log('****GBridge.perloadImage****')
- }
- if (typeof data === 'string') {
- data = JSON.parse(data);
- }
-
- if (data.error) {
- var evt = { type: 'error', target: this };
- this.onerror(evt);
- } else {
- this.complete = true;
- this.width = typeof data.width === 'number' ? data.width : 0;
- this.height = typeof data.height === 'number' ? data.height : 0;
- var evt = { type: 'load', target: this };
- this.onload(evt);
- }
- });
- } catch (error) {
- console.log('perloadImage fail', error)
- }
- }
-
- addEventListener(name, listener) {
- if (name === 'load') {
- this.onload = listener;
- } else if (name === 'error') {
- this.onerror = listener;
- }
- }
-
- removeEventListener(name, listener) {
- if (name === 'load') {
- this.onload = noop;
- } else if (name === 'error') {
- this.onerror = noop;
- }
- }
-
- get onload() {
- return this._onload;
- }
-
- set onload(v) {
- this._onload = v;
- }
-
- get onerror() {
- return this._onerror;
- }
-
- set onerror(v) {
- this._onerror = v;
- }
-}
-
+let incId = 1;
+
+const noop = function () { };
+
+class GImage {
+
+ static GBridge = null;
+
+ constructor() {
+ this._id = incId++;
+ this._width = 0;
+ this._height = 0;
+ this._src = undefined;
+ this._onload = noop;
+ this._onerror = noop;
+ this.complete = false;
+ }
+
+ get width() {
+ return this._width;
+ }
+ set width(v) {
+ this._width = v;
+ }
+
+ get height() {
+ return this._height;
+ }
+
+ set height(v) {
+ this._height = v;
+ }
+
+ get src() {
+ return this._src;
+ }
+
+ set src(v) {
+
+ if (v.startsWith('//')) {
+ v = 'http:' + v;
+ }
+
+ this._src = v;
+
+ GImage.GBridge.perloadImage([this._src, this._id], (data) => {
+ if (typeof data === 'string') {
+ data = JSON.parse(data);
+ }
+ if (data.error) {
+ var evt = { type: 'error', target: this };
+ this.onerror(evt);
+ } else {
+ this.complete = true;
+ this.width = typeof data.width === 'number' ? data.width : 0;
+ this.height = typeof data.height === 'number' ? data.height : 0;
+ var evt = { type: 'load', target: this };
+ this.onload(evt);
+ }
+ });
+ }
+
+ addEventListener(name, listener) {
+ if (name === 'load') {
+ this.onload = listener;
+ } else if (name === 'error') {
+ this.onerror = listener;
+ }
+ }
+
+ removeEventListener(name, listener) {
+ if (name === 'load') {
+ this.onload = noop;
+ } else if (name === 'error') {
+ this.onerror = noop;
+ }
+ }
+
+ get onload() {
+ return this._onload;
+ }
+
+ set onload(v) {
+ this._onload = v;
+ }
+
+ get onerror() {
+ return this._onerror;
+ }
+
+ set onerror(v) {
+ this._onerror = v;
+ }
+}
+
export default GImage;
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/env/tool.js b/uni_modules/uview-plus/libs/util/gcanvas/env/tool.js
index d3fb398..1174c7f 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/env/tool.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/env/tool.js
@@ -1,24 +1,24 @@
-
-export function ArrayBufferToBase64 (buffer) {
- var binary = '';
- var bytes = new Uint8ClampedArray(buffer);
- for (var len = bytes.byteLength, i = 0; i < len; i++) {
- binary += String.fromCharCode(bytes[i]);
- }
- return btoa(binary);
-}
-
-export function Base64ToUint8ClampedArray(base64String) {
- const padding = '='.repeat((4 - base64String.length % 4) % 4);
- const base64 = (base64String + padding)
- .replace(/\-/g, '+')
- .replace(/_/g, '/');
-
- const rawData = atob(base64);
- const outputArray = new Uint8ClampedArray(rawData.length);
-
- for (let i = 0; i < rawData.length; ++i) {
- outputArray[i] = rawData.charCodeAt(i);
- }
- return outputArray;
+
+export function ArrayBufferToBase64 (buffer) {
+ var binary = '';
+ var bytes = new Uint8ClampedArray(buffer);
+ for (var len = bytes.byteLength, i = 0; i < len; i++) {
+ binary += String.fromCharCode(bytes[i]);
+ }
+ return btoa(binary);
+}
+
+export function Base64ToUint8ClampedArray(base64String) {
+ const padding = '='.repeat((4 - base64String.length % 4) % 4);
+ const base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+
+ const rawData = atob(base64);
+ const outputArray = new Uint8ClampedArray(rawData.length);
+
+ for (let i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
}
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/gcanvas/index.js b/uni_modules/uview-plus/libs/util/gcanvas/index.js
index a34ad58..3dcc62a 100644
--- a/uni_modules/uview-plus/libs/util/gcanvas/index.js
+++ b/uni_modules/uview-plus/libs/util/gcanvas/index.js
@@ -1,39 +1,39 @@
-import GCanvas from './env/canvas';
-import GImage from './env/image';
-
-import GWebGLRenderingContext from './context-webgl/RenderingContext';
-import GContext2D from './context-2d/RenderingContext';
-
-import GBridgeWeex from './bridge/bridge-weex';
-
-export let Image = GImage;
-
-export let WeexBridge = GBridgeWeex;
-
-export function enable(el, { bridge, debug, disableAutoSwap, disableComboCommands } = {}) {
-
- const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge;
-
- GBridge.callEnable(el.ref, [
- 0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY
- -1, // hybridLayerType: 0--LAYER_TYPE_NONE 1--LAYER_TYPE_SOFTWARE 2--LAYER_TYPE_HARDWARE
- false, // supportScroll
- false, // newCanvasMode
- 1, // compatible
- 'white',// clearColor
- false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level
- ]);
-
- if (debug === true) {
- GBridge.callEnableDebug();
- }
- if (disableComboCommands) {
- GBridge.callEnableDisableCombo();
- }
-
- var canvas = new GCanvas(el.ref, { disableAutoSwap });
- canvas.width = el.style.width;
- canvas.height = el.style.height;
-
- return canvas;
+import GCanvas from './env/canvas';
+import GImage from './env/image';
+
+import GWebGLRenderingContext from './context-webgl/RenderingContext';
+import GContext2D from './context-2d/RenderingContext';
+
+import GBridgeWeex from './bridge/bridge-weex';
+
+export let Image = GImage;
+
+export let WeexBridge = GBridgeWeex;
+
+export function enable(el, { bridge, debug, disableAutoSwap, disableComboCommands } = {}) {
+
+ const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge;
+
+ GBridge.callEnable(el.ref, [
+ 0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY
+ -1, // hybridLayerType: 0--LAYER_TYPE_NONE 1--LAYER_TYPE_SOFTWARE 2--LAYER_TYPE_HARDWARE
+ false, // supportScroll
+ false, // newCanvasMode
+ 1, // compatible
+ 'white',// clearColor
+ false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level
+ ]);
+
+ if (debug === true) {
+ GBridge.callEnableDebug();
+ }
+ if (disableComboCommands) {
+ GBridge.callEnableDisableCombo();
+ }
+
+ var canvas = new GCanvas(el.ref, { disableAutoSwap });
+ canvas.width = el.style.width;
+ canvas.height = el.style.height;
+
+ return canvas;
};
\ No newline at end of file
diff --git a/uni_modules/uview-plus/libs/util/route.js b/uni_modules/uview-plus/libs/util/route.js
index 4e474f5..600b3f1 100644
--- a/uni_modules/uview-plus/libs/util/route.js
+++ b/uni_modules/uview-plus/libs/util/route.js
@@ -1,124 +1,124 @@
-/**
- * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
- * 并且带有路由拦截功能
- */
-import { queryParams, deepMerge, page } from '../function/index';
-class Router {
- constructor() {
- // 原始属性定义
- this.config = {
- type: 'navigateTo',
- url: '',
- delta: 1, // navigateBack页面后退时,回退的层数
- params: {}, // 传递的参数
- animationType: 'pop-in', // 窗口动画,只在APP有效
- animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
- intercept: false // 是否需要拦截
- }
- // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
- // 这里在构造函数中进行this绑定
- this.route = this.route.bind(this)
- }
-
- // 判断url前面是否有"/",如果没有则加上,否则无法跳转
- addRootPath(url) {
- return url[0] === '/' ? url : `/${url}`
- }
-
- // 整合路由参数
- mixinParam(url, params) {
- url = url && this.addRootPath(url)
-
- // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
- // 如果有url中有get参数,转换后无需带上"?"
- let query = ''
- if (/.*\/.*\?.*=.*/.test(url)) {
- // object对象转为get类型的参数
- query = queryParams(params, false)
- // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
- return url += `&${query}`
- }
- // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
- query = queryParams(params)
- return url += query
- }
-
- // 对外的方法名称
- async route(options = {}, params = {}) {
- // 合并用户的配置和内部的默认配置
- let mergeConfig = {}
-
- if (typeof options === 'string') {
- // 如果options为字符串,则为route(url, params)的形式
- mergeConfig.url = this.mixinParam(options, params)
- mergeConfig.type = 'navigateTo'
- } else {
- mergeConfig = deepMerge(this.config, options)
- // 否则正常使用mergeConfig中的url和params进行拼接
- mergeConfig.url = this.mixinParam(options.url, options.params)
- }
-
- // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
- if (mergeConfig.url === page()) return
-
- if (params.intercept) {
- this.config.intercept = params.intercept
- }
- // params参数也带给拦截器
- mergeConfig.params = params
- // 合并内外部参数
- mergeConfig = deepMerge(this.config, mergeConfig)
- // 判断用户是否定义了拦截器
- if (typeof uni.$u.routeIntercept === 'function') {
- // 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转
- const isNext = await new Promise((resolve, reject) => {
- uni.$u.routeIntercept(mergeConfig, resolve)
- })
- // 如果isNext为true,则执行路由跳转
- isNext && this.openPage(mergeConfig)
- } else {
- this.openPage(mergeConfig)
- }
- }
-
- // 执行路由跳转
- openPage(config) {
- // 解构参数
- const {
- url,
- type,
- delta,
- animationType,
- animationDuration
- } = config
- if (config.type == 'navigateTo' || config.type == 'to') {
- uni.navigateTo({
- url,
- animationType,
- animationDuration
- })
- }
- if (config.type == 'redirectTo' || config.type == 'redirect') {
- uni.redirectTo({
- url
- })
- }
- if (config.type == 'switchTab' || config.type == 'tab') {
- uni.switchTab({
- url
- })
- }
- if (config.type == 'reLaunch' || config.type == 'launch') {
- uni.reLaunch({
- url
- })
- }
- if (config.type == 'navigateBack' || config.type == 'back') {
- uni.navigateBack({
- delta
- })
- }
- }
-}
-
-export default (new Router()).route
+/**
+ * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
+ * 并且带有路由拦截功能
+ */
+import { queryParams, deepMerge, page } from '../function/index';
+class Router {
+ constructor() {
+ // 原始属性定义
+ this.config = {
+ type: 'navigateTo',
+ url: '',
+ delta: 1, // navigateBack页面后退时,回退的层数
+ params: {}, // 传递的参数
+ animationType: 'pop-in', // 窗口动画,只在APP有效
+ animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
+ intercept: false // 是否需要拦截
+ }
+ // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
+ // 这里在构造函数中进行this绑定
+ this.route = this.route.bind(this)
+ }
+
+ // 判断url前面是否有"/",如果没有则加上,否则无法跳转
+ addRootPath(url) {
+ return url[0] === '/' ? url : `/${url}`
+ }
+
+ // 整合路由参数
+ mixinParam(url, params) {
+ url = url && this.addRootPath(url)
+
+ // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
+ // 如果有url中有get参数,转换后无需带上"?"
+ let query = ''
+ if (/.*\/.*\?.*=.*/.test(url)) {
+ // object对象转为get类型的参数
+ query = queryParams(params, false)
+ // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
+ return url += `&${query}`
+ }
+ // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
+ query = queryParams(params)
+ return url += query
+ }
+
+ // 对外的方法名称
+ async route(options = {}, params = {}) {
+ // 合并用户的配置和内部的默认配置
+ let mergeConfig = {}
+
+ if (typeof options === 'string') {
+ // 如果options为字符串,则为route(url, params)的形式
+ mergeConfig.url = this.mixinParam(options, params)
+ mergeConfig.type = 'navigateTo'
+ } else {
+ mergeConfig = deepMerge(this.config, options)
+ // 否则正常使用mergeConfig中的url和params进行拼接
+ mergeConfig.url = this.mixinParam(options.url, options.params)
+ }
+
+ // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
+ if (mergeConfig.url === page()) return
+
+ if (params.intercept) {
+ this.config.intercept = params.intercept
+ }
+ // params参数也带给拦截器
+ mergeConfig.params = params
+ // 合并内外部参数
+ mergeConfig = deepMerge(this.config, mergeConfig)
+ // 判断用户是否定义了拦截器
+ if (typeof uni.$u.routeIntercept === 'function') {
+ // 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转
+ const isNext = await new Promise((resolve, reject) => {
+ uni.$u.routeIntercept(mergeConfig, resolve)
+ })
+ // 如果isNext为true,则执行路由跳转
+ isNext && this.openPage(mergeConfig)
+ } else {
+ this.openPage(mergeConfig)
+ }
+ }
+
+ // 执行路由跳转
+ openPage(config) {
+ // 解构参数
+ const {
+ url,
+ type,
+ delta,
+ animationType,
+ animationDuration
+ } = config
+ if (config.type == 'navigateTo' || config.type == 'to') {
+ uni.navigateTo({
+ url,
+ animationType,
+ animationDuration
+ })
+ }
+ if (config.type == 'redirectTo' || config.type == 'redirect') {
+ uni.redirectTo({
+ url
+ })
+ }
+ if (config.type == 'switchTab' || config.type == 'tab') {
+ uni.switchTab({
+ url
+ })
+ }
+ if (config.type == 'reLaunch' || config.type == 'launch') {
+ uni.reLaunch({
+ url
+ })
+ }
+ if (config.type == 'navigateBack' || config.type == 'back') {
+ uni.navigateBack({
+ delta
+ })
+ }
+ }
+}
+
+export default (new Router()).route
diff --git a/uni_modules/uview-plus/libs/vue.js b/uni_modules/uview-plus/libs/vue.js
index 0a34916..5bd1bd8 100644
--- a/uni_modules/uview-plus/libs/vue.js
+++ b/uni_modules/uview-plus/libs/vue.js
@@ -1,3 +1,3 @@
-export const defineMixin = (options) => {
- return options
-}
+export const defineMixin = (options) => {
+ return options
+}
diff --git a/uni_modules/uview-plus/package.json b/uni_modules/uview-plus/package.json
index b9a17d4..defcace 100644
--- a/uni_modules/uview-plus/package.json
+++ b/uni_modules/uview-plus/package.json
@@ -1,109 +1,96 @@
-{
- "id": "uview-plus",
- "name": "uview-plus",
- "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
- "version": "3.8.82",
- "description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
- "keywords": [
- "uview",
- "uview-plus",
- "ui",
- "echarts",
- "ui",
- "可视化"
- ],
- "main": "index.js",
- "repository": "https://github.com/ijry/uview-plus",
- "engines": {
- "HBuilderX": "^3.1.0",
- "uni-app": "^4.66",
- "uni-app-x": ""
- },
- "dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": "598821125"
- },
- "declaration": {
- "ads": "请注意本插件开发文档包含弹窗广告每日展示一次,源码纯净无广告。",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/uview-plus",
- "type": "component-vue",
- "darkmode": "x",
- "i18n": "√",
- "widescreen": "x"
- },
- "uni_modules": {
- "dependencies": [],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "√",
- "aliyun": "√",
- "alipay": "√"
- },
- "client": {
- "uni-app": {
- "vue": {
- "vue2": "-",
- "vue3": "√"
- },
- "web": {
- "safari": "√",
- "chrome": "√"
- },
- "app": {
- "vue": "√",
- "nvue": "√",
- "android": "√",
- "ios": "√",
- "harmony": "√"
- },
- "mp": {
- "weixin": "√",
- "alipay": "√",
- "toutiao": "√",
- "baidu": "-",
- "kuaishou": "-",
- "jd": "-",
- "harmony": "√",
- "qq": "√",
- "lark": "-",
- "xhs": "-"
- },
- "quickapp": {
- "huawei": "-",
- "union": "-"
- }
- },
- "uni-app-x": {
- "web": {
- "safari": "-",
- "chrome": "-"
- },
- "app": {
- "android": "-",
- "ios": "-",
- "harmony": "-"
- },
- "mp": {
- "weixin": "-"
- }
- }
- }
- }
- },
- "dependencies": {},
- "publishConfig": {
- "registry": "https://registry.npmjs.org/"
- }
-}
+{
+ "id": "uview-plus",
+ "name": "uview-plus",
+ "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
+ "version": "3.3.72",
+ "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
+ "keywords": [
+ "uview",
+ "uview-plus",
+ "ui",
+ "ui",
+ "uni-app",
+ "uni-app",
+ "ui",
+ "可视化设计"
+ ],
+ "main": "index.js",
+ "repository": "https://github.com/ijry/uview-plus",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": "598821125"
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/uview-plus",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "n",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y",
+ "app-harmony": "u",
+ "app-uvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ }
+ }
+ }
+ },
+ "dependencies": {
+ "clipboard": "^2.0.11",
+ "dayjs": "^1.11.3"
+ },
+ "publishConfig": {
+ "registry": "https://registry.npmjs.org/"
+ }
+}
diff --git a/uni_modules/uview-plus/pnpm-lock.yaml b/uni_modules/uview-plus/pnpm-lock.yaml
deleted file mode 100644
index be95baf..0000000
--- a/uni_modules/uview-plus/pnpm-lock.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-lockfileVersion: '6.0'
-
-settings:
- autoInstallPeers: true
- excludeLinksFromLockfile: false
-
-dependencies:
- clipboard:
- specifier: ^2.0.11
- version: 2.0.11
- dayjs:
- specifier: ^1.11.3
- version: 1.11.3
-
-packages:
-
- /clipboard@2.0.11:
- resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==}
- dependencies:
- good-listener: r2.cnpmjs.org/good-listener@1.2.2
- select: r2.cnpmjs.org/select@1.1.2
- tiny-emitter: r2.cnpmjs.org/tiny-emitter@2.1.0
- dev: false
-
- /dayjs@1.11.3:
- resolution: {integrity: sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==}
- dev: false
-
- r2.cnpmjs.org/delegate@3.2.0:
- resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==, registry: https://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/delegate/-/delegate-3.2.0.tgz}
- name: delegate
- version: 3.2.0
- dev: false
-
- r2.cnpmjs.org/good-listener@1.2.2:
- resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==, registry: https://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/good-listener/-/good-listener-1.2.2.tgz}
- name: good-listener
- version: 1.2.2
- dependencies:
- delegate: r2.cnpmjs.org/delegate@3.2.0
- dev: false
-
- r2.cnpmjs.org/select@1.1.2:
- resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==, registry: https://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/select/-/select-1.1.2.tgz}
- name: select
- version: 1.1.2
- dev: false
-
- r2.cnpmjs.org/tiny-emitter@2.1.0:
- resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==, registry: https://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz}
- name: tiny-emitter
- version: 2.1.0
- dev: false
diff --git a/uni_modules/uview-plus/theme.scss b/uni_modules/uview-plus/theme.scss
index be47c69..3587ef0 100644
--- a/uni_modules/uview-plus/theme.scss
+++ b/uni_modules/uview-plus/theme.scss
@@ -1,120 +1,44 @@
-// 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于
-// uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大,
-// 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入
-
-/* #ifdef APP-NVUE */
-$u-main-color: var(--up-main-color, var(--u-main-color, #303133)) !default;
-$u-content-color: var(--up-content-color, var(--u-content-color, #606266)) !default;
-$u-tips-color: var(--up-tips-color, var(--u-tips-color, #909193)) !default;
-$u-light-color: var(--up-light-color, var(--u-light-color, #c0c4cc)) !default;
-$u-border-color: var(--up-border-color, var(--u-border-color, #dadbde)) !default;
-$u-bg-color: var(--up-bg-color, var(--u-bg-color, #f3f4f6)) !default;
-$u-disabled-color: var(--up-disabled-color, var(--u-disabled-color, #c8c9cc)) !default;
-
-$u-primary: var(--up-primary, var(--u-primary, #3c9cff)) !default;
-$u-primary-dark: var(--up-primary-dark, var(--u-primary-dark, #398ade)) !default;
-$u-primary-disabled: var(--up-primary-disabled, var(--u-primary-disabled, #9acafc)) !default;
-$u-primary-light: var(--up-primary-light, var(--u-primary-light, #ecf5ff)) !default;
-
-$u-warning: var(--up-warning, var(--u-warning, #f9ae3d)) !default;
-$u-warning-dark: var(--up-warning-dark, var(--u-warning-dark, #f1a532)) !default;
-$u-warning-disabled: var(--up-warning-disabled, var(--u-warning-disabled, #f9d39b)) !default;
-$u-warning-light: var(--up-warning-light, var(--u-warning-light, #fdf6ec)) !default;
-
-$u-success: var(--up-success, var(--u-success, #5ac725)) !default;
-$u-success-dark: var(--up-success-dark, var(--u-success-dark, #53c21d)) !default;
-$u-success-disabled: var(--up-success-disabled, var(--u-success-disabled, #a9e08f)) !default;
-$u-success-light: var(--up-success-light, var(--u-success-light, #f5fff0)) !default;
-
-$u-error: var(--up-error, var(--u-error, #f56c6c)) !default;
-$u-error-dark: var(--up-error-dark, var(--u-error-dark, #e45656)) !default;
-$u-error-disabled: var(--up-error-disabled, var(--u-error-disabled, #f7b2b2)) !default;
-$u-error-light: var(--up-error-light, var(--u-error-light, #fef0f0)) !default;
-
-$u-info: var(--up-info, var(--u-info, #909399)) !default;
-$u-info-dark: var(--up-info-dark, var(--u-info-dark, #767a82)) !default;
-$u-info-disabled: var(--up-info-disabled, var(--u-info-disabled, #c4c6c9)) !default;
-$u-info-light: var(--up-info-light, var(--u-info-light, #f4f4f5)) !default;
-/* #endif */
-
-/* #ifndef APP-NVUE */
-$u-main-color: var(--up-main-color, var(--u-main-color, #303133)) !default;
-$u-content-color: var(--up-content-color, var(--u-content-color, #606266)) !default;
-$u-tips-color: var(--up-tips-color, var(--u-tips-color, #909193)) !default;
-$u-light-color: var(--up-light-color, var(--u-light-color, #c0c4cc)) !default;
-$u-border-color: var(--up-border-color, var(--u-border-color, #dadbde)) !default;
-$u-bg-color: var(--up-bg-color, var(--u-bg-color, #f3f4f6)) !default;
-$u-disabled-color: var(--up-disabled-color, var(--u-disabled-color, #c8c9cc)) !default;
-
-$u-primary: var(--up-primary, var(--u-primary, #3c9cff)) !default;
-$u-primary-dark: var(--up-primary-dark, var(--u-primary-dark, #398ade)) !default;
-$u-primary-disabled: var(--up-primary-disabled, var(--u-primary-disabled, #9acafc)) !default;
-$u-primary-light: var(--up-primary-light, var(--u-primary-light, #ecf5ff)) !default;
-
-$u-warning: var(--up-warning, var(--u-warning, #f9ae3d)) !default;
-$u-warning-dark: var(--up-warning-dark, var(--u-warning-dark, #f1a532)) !default;
-$u-warning-disabled: var(--up-warning-disabled, var(--u-warning-disabled, #f9d39b)) !default;
-$u-warning-light: var(--up-warning-light, var(--u-warning-light, #fdf6ec)) !default;
-
-$u-success: var(--up-success, var(--u-success, #5ac725)) !default;
-$u-success-dark: var(--up-success-dark, var(--u-success-dark, #53c21d)) !default;
-$u-success-disabled: var(--up-success-disabled, var(--u-success-disabled, #a9e08f)) !default;
-$u-success-light: var(--up-success-light, var(--u-success-light, #f5fff0)) !default;
-
-$u-error: var(--up-error, var(--u-error, #f56c6c)) !default;
-$u-error-dark: var(--up-error-dark, var(--u-error-dark, #e45656)) !default;
-$u-error-disabled: var(--up-error-disabled, var(--u-error-disabled, #f7b2b2)) !default;
-$u-error-light: var(--up-error-light, var(--u-error-light, #fef0f0)) !default;
-
-$u-info: var(--up-info, var(--u-info, #909399)) !default;
-$u-info-dark: var(--up-info-dark, var(--u-info-dark, #767a82)) !default;
-$u-info-disabled: var(--up-info-disabled, var(--u-info-disabled, #c4c6c9)) !default;
-$u-info-light: var(--up-info-light, var(--u-info-light, #f4f4f5)) !default;
-/* #endif */
-
-$up-legacy-light-theme-map: (
- 'main-color': $u-main-color,
- 'content-color': $u-content-color,
- 'tips-color': $u-tips-color,
- 'light-color': $u-light-color,
- 'border-color': $u-border-color,
- 'bg-color': $u-bg-color,
- 'disabled-color': $u-disabled-color,
- 'primary': $u-primary,
- 'primary-dark': $u-primary-dark,
- 'primary-disabled': $u-primary-disabled,
- 'primary-light': $u-primary-light,
- 'warning': $u-warning,
- 'warning-dark': $u-warning-dark,
- 'warning-disabled': $u-warning-disabled,
- 'warning-light': $u-warning-light,
- 'success': $u-success,
- 'success-dark': $u-success-dark,
- 'success-disabled': $u-success-disabled,
- 'success-light': $u-success-light,
- 'error': $u-error,
- 'error-dark': $u-error-dark,
- 'error-disabled': $u-error-disabled,
- 'error-light': $u-error-light,
- 'info': $u-info,
- 'info-dark': $u-info-dark,
- 'info-disabled': $u-info-disabled,
- 'info-light': $u-info-light
-);
-
-@mixin up-export-legacy-light-vars($selector) {
- #{$selector} {
- @each $name, $value in $up-legacy-light-theme-map {
- --up-light-#{$name}: #{$value};
- --u-light-#{$name}: #{$value};
- }
- }
-}
-
-// scss混入,为了少写几行#ifndef
-@mixin flex($direction: row) {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: $direction;
-}
+// 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于
+// uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大,
+// 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入
+
+$u-main-color: #303133;
+$u-content-color: #606266;
+$u-tips-color: #909193;
+$u-light-color: #c0c4cc;
+$u-border-color: #dadbde;
+$u-bg-color: #f3f4f6;
+$u-disabled-color: #c8c9cc;
+
+$u-primary: #3c9cff;
+$u-primary-dark: #398ade;
+$u-primary-disabled: #9acafc;
+$u-primary-light: #ecf5ff;
+
+$u-warning: #f9ae3d;
+$u-warning-dark: #f1a532;
+$u-warning-disabled: #f9d39b;
+$u-warning-light: #fdf6ec;
+
+$u-success: #5ac725;
+$u-success-dark: #53c21d;
+$u-success-disabled: #a9e08f;
+$u-success-light: #f5fff0;
+
+$u-error: #f56c6c;
+$u-error-dark: #e45656;
+$u-error-disabled: #f7b2b2;
+$u-error-light: #fef0f0;
+
+$u-info: #909399;
+$u-info-dark: #767a82;
+$u-info-disabled: #c4c6c9;
+$u-info-light: #f4f4f5;
+
+// scss混入,为了少写几行#ifndef
+@mixin flex($direction: row) {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: $direction;
+}
diff --git a/uni_modules/uview-plus/types/comps.d.ts b/uni_modules/uview-plus/types/comps.d.ts
index cf12458..92bc412 100644
--- a/uni_modules/uview-plus/types/comps.d.ts
+++ b/uni_modules/uview-plus/types/comps.d.ts
@@ -1,104 +1,101 @@
-declare module 'vue' {
- export interface GlobalComponents {
- // 基础组件
- ['up-icon']: typeof import('./comps/icon')['Icon']
- ['up-image']: typeof import('./comps/image')['Image']
- ['up-button']: typeof import('./comps/button')['Button']
- ['up-text']: typeof import('./comps/text')['Text']
- ['up-row']: typeof import('./comps/row')['Row']
- ['up-col']: typeof import('./comps/col')['Col']
- ['up-cell']: typeof import('./comps/cell')['Cell']
- ['up-cell-group']: typeof import('./comps/cellGroup')['CellGroup']
- ['up-badge']: typeof import('./comps/badge')['Badge']
- ['up-tag']: typeof import('./comps/tag')['Tag']
- ['up-loading-icon']: typeof import('./comps/loadingIcon')['LoadingIcon']
- ['up-loading-page']: typeof import('./comps/loadingPage')['LoadingPage']
-
- // 表单组件
- ['up-form']: typeof import('./comps/form')['Form']
- ['up-form-item']: typeof import('./comps/formItem')['FormItem']
- ['up-calendar']: typeof import('./comps/calendar')['Calendar']
- ['up-calendar-strip']: typeof import('./comps/calendarStrip')['CalendarStrip']
- ['up-keyboard']: typeof import('./comps/keyboard')['Keyboard']
- ['up-picker']: typeof import('./comps/picker')['Picker']
- ['up-datetime-picker']: typeof import('./comps/datetimePicker')['DatetimePicker']
- ['up-rate']: typeof import('./comps/rate')['Rate']
- ['up-search']: typeof import('./comps/search')['Search']
- ['up-number-box']: typeof import('./comps/numberBox')['NumberBox']
- ['up-upload']: typeof import('./comps/upload')['Upload']
- ['up-code']: typeof import('./comps/code')['Code']
- ['up-input']: typeof import('./comps/input')['Input']
- ['up-textarea']: typeof import('./comps/textarea')['Textarea']
- ['up-checkbox']: typeof import('./comps/checkbox')['Checkbox']
- ['up-checkbox-group']: typeof import('./comps/checkboxGroup')['CheckboxGroup']
- ['up-radio']: typeof import('./comps/radio')['Radio']
- ['up-radio-group']: typeof import('./comps/radioGroup')['RadioGroup']
- ['up-switch']: typeof import('./comps/switch')['Switch']
- ['up-slider']: typeof import('./comps/slider')['Slider']
- ['up-album']: typeof import('./comps/album')['Album']
-
- // 数据组件
- ['up-list']: typeof import('./comps/list')['List']
- ['up-list-item']: typeof import('./comps/listItem')['ListItem']
- ['up-line-progress']: typeof import('./comps/lineProgress')['LineProgress']
- ['up-count-down']: typeof import('./comps/countDown')['CountDown']
- ['up-count-to']: typeof import('./comps/countTo')['CountTo']
-
- // 反馈组件
- ['up-tooltip']: typeof import('./comps/tooltip')['Tooltip']
- ['up-guide']: typeof import('./comps/guide')['Guide']
- ['up-action-sheet']: typeof import('./comps/actionSheet')['ActionSheet']
- ['up-alert']: typeof import('./comps/alert')['Alert']
- ['up-toast']: typeof import('./comps/toast')['Toast']
- ['up-notice-bar']: typeof import('./comps/noticeBar')['NoticeBar']
- ['up-notify']: typeof import('./comps/notify')['Notify']
- ['up-swipe-action']: typeof import('./comps/swipeAction')['SwipeAction']
- ['up-swipe-action-item']: typeof import('./comps/swipeActionItem')['SwipeActionItem']
- ['up-collapse']: typeof import('./comps/collapse')['Collapse']
- ['up-collapse-item']: typeof import('./comps/collapseItem')['CollapseItem']
- ['up-popup']: typeof import('./comps/popup')['Popup']
- ['up-modal']: typeof import('./comps/modal')['Modal']
-
- // 布局组件
- ['up-scroll-list']: typeof import('./comps/scrollList')['ScrollList']
- ['up-line']: typeof import('./comps/line')['Line']
- ['up-overlay']: typeof import('./comps/overlay')['Overlay']
- ['up-no-network']: typeof import('./comps/noNetwork')['NoNetwork']
- ['up-grid']: typeof import('./comps/grid')['Grid']
- ['up-grid-item']: typeof import('./comps/gridItem')['GridItem']
- ['up-swiper']: typeof import('./comps/swiper')['Swiper']
- ['up-skeleton']: typeof import('./comps/skeleton')['Skeleton']
- ['up-sticky']: typeof import('./comps/sticky')['Sticky']
- ['up-divider']: typeof import('./comps/divider')['Divider']
-
- // 导航组件
- ['up-tabbar']: typeof import('./comps/tabbar')['Tabbar']
- ['up-tabbar-item']: typeof import('./comps/tabbarItem')['TabbarItem']
- ['up-back-top']: typeof import('./comps/backTop')['BackTop']
- ['up-navbar']: typeof import('./comps/navbar')['Navbar']
- ['up-tabs']: typeof import('./comps/tabs')['Tabs']
- ['up-subsection']: typeof import('./comps/subsection')['Subsection']
- ['up-index-list']: typeof import('./comps/indexList')['IndexList']
- ['up-index-item']: typeof import('./comps/indexItem')['IndexItem']
- ['up-index-anchor']: typeof import('./comps/indexAnchor')['IndexAnchor']
- ['up-steps']: typeof import('./comps/steps')['Steps']
- ['up-steps-item']: typeof import('./comps/stepsItem')['StepsItem']
- ['up-empty']: typeof import('./comps/empty')['Empty']
-
- // 其他组件
- ['up-parse']: typeof import('./comps/parse')['Parse']
- ['up-code-input']: typeof import('./comps/codeInput')['CodeInput']
- ['up-loadmore']: typeof import('./comps/loadMore')['LoadMore']
- ['up-read-more']: typeof import('./comps/readMore')['ReadMore']
- ['up-gap']: typeof import('./comps/gap')['Gap']
- ['up-avatar']: typeof import('./comps/avatar')['Avatar']
- ['up-avatar-group']: typeof import('./comps/avatarGroup')['AvatarGroup']
- ['up-link']: typeof import('./comps/link')['Link']
- ['up-transition']: typeof import('./comps/transition')['Transition']
- ['up-status-bar']: typeof import('./comps/statusBar')['StatusBar']
- ['up-safe-bottom']: typeof import('./comps/safeBottom')['SafeBottom']
- ['up-qrcode']: typeof import('./comps/qrcode')['Qrcode']
- }
-}
-
-export {}
+declare module 'vue' {
+ export interface GlobalComponents {
+ // 基础组件
+ ['up-icon']: typeof import('./comps/icon')['Icon']
+ ['up-image']: typeof import('./comps/image')['Image']
+ ['up-button']: typeof import('./comps/button')['Button']
+ ['up-text']: typeof import('./comps/text')['Text']
+ ['up-row']: typeof import('./comps/row')['Row']
+ ['up-col']: typeof import('./comps/col')['Col']
+ ['up-cell']: typeof import('./comps/cell')['Cell']
+ ['up-cell-group']: typeof import('./comps/cellGroup')['CellGroup']
+ ['up-badge']: typeof import('./comps/badge')['Badge']
+ ['up-tag']: typeof import('./comps/tag')['Tag']
+ ['up-loading-icon']: typeof import('./comps/loadingIcon')['LoadingIcon']
+ ['up-loading-page']: typeof import('./comps/loadingPage')['LoadingPage']
+
+ // 表单组件
+ ['up-form']: typeof import('./comps/form')['Form']
+ ['up-form-item']: typeof import('./comps/formItem')['FormItem']
+ ['up-calendar']: typeof import('./comps/calendar')['Calendar']
+ ['up-keyboard']: typeof import('./comps/keyboard')['Keyboard']
+ ['up-picker']: typeof import('./comps/picker')['Picker']
+ ['up-datetime-picker']: typeof import('./comps/datetimePicker')['DatetimePicker']
+ ['up-rate']: typeof import('./comps/rate')['Rate']
+ ['up-search']: typeof import('./comps/search')['Search']
+ ['up-number-box']: typeof import('./comps/numberBox')['NumberBox']
+ ['up-upload']: typeof import('./comps/upload')['Upload']
+ ['up-code']: typeof import('./comps/code')['Code']
+ ['up-input']: typeof import('./comps/input')['Input']
+ ['up-textarea']: typeof import('./comps/textarea')['Textarea']
+ ['up-checkbox']: typeof import('./comps/checkbox')['Checkbox']
+ ['up-checkbox-group']: typeof import('./comps/checkboxGroup')['CheckboxGroup']
+ ['up-radio']: typeof import('./comps/radio')['Radio']
+ ['up-radio-group']: typeof import('./comps/radioGroup')['RadioGroup']
+ ['up-switch']: typeof import('./comps/switch')['Switch']
+ ['up-slider']: typeof import('./comps/slider')['Slider']
+ ['up-album']: typeof import('./comps/album')['Album']
+
+ // 数据组件
+ ['up-list']: typeof import('./comps/list')['List']
+ ['up-list-item']: typeof import('./comps/listItem')['ListItem']
+ ['up-line-progress']: typeof import('./comps/lineProgress')['LineProgress']
+ ['up-count-down']: typeof import('./comps/countDown')['CountDown']
+ ['up-count-to']: typeof import('./comps/countTo')['CountTo']
+
+ // 反馈组件
+ ['up-tooltip']: typeof import('./comps/tooltip')['Tooltip']
+ ['up-action-sheet']: typeof import('./comps/actionSheet')['ActionSheet']
+ ['up-alert']: typeof import('./comps/alert')['Alert']
+ ['up-toast']: typeof import('./comps/toast')['Toast']
+ ['up-notice-bar']: typeof import('./comps/noticeBar')['NoticeBar']
+ ['up-notify']: typeof import('./comps/notify')['Notify']
+ ['up-swipe-action']: typeof import('./comps/swipeAction')['SwipeAction']
+ ['up-swipe-action-item']: typeof import('./comps/swipeActionItem')['SwipeActionItem']
+ ['up-collapse']: typeof import('./comps/collapse')['Collapse']
+ ['up-collapse-item']: typeof import('./comps/collapseItem')['CollapseItem']
+ ['up-popup']: typeof import('./comps/popup')['Popup']
+ ['up-modal']: typeof import('./comps/modal')['Modal']
+
+ // 布局组件
+ ['up-scroll-list']: typeof import('./comps/scrollList')['ScrollList']
+ ['up-line']: typeof import('./comps/line')['Line']
+ ['up-overlay']: typeof import('./comps/overlay')['Overlay']
+ ['up-no-network']: typeof import('./comps/noNetwork')['NoNetwork']
+ ['up-grid']: typeof import('./comps/grid')['Grid']
+ ['up-grid-item']: typeof import('./comps/gridItem')['GridItem']
+ ['up-swiper']: typeof import('./comps/swiper')['Swiper']
+ ['up-skeleton']: typeof import('./comps/skeleton')['Skeleton']
+ ['up-sticky']: typeof import('./comps/sticky')['Sticky']
+ ['up-divider']: typeof import('./comps/divider')['Divider']
+
+ // 导航组件
+ ['up-tabbar']: typeof import('./comps/tabbar')['Tabbar']
+ ['up-tabbar-item']: typeof import('./comps/tabbarItem')['TabbarItem']
+ ['up-back-top']: typeof import('./comps/backTop')['BackTop']
+ ['up-navbar']: typeof import('./comps/navbar')['Navbar']
+ ['up-tabs']: typeof import('./comps/tabs')['Tabs']
+ ['up-subsection']: typeof import('./comps/subsection')['Subsection']
+ ['up-index-list']: typeof import('./comps/indexList')['IndexList']
+ ['up-index-item']: typeof import('./comps/indexItem')['IndexItem']
+ ['up-index-anchor']: typeof import('./comps/indexAnchor')['IndexAnchor']
+ ['up-steps']: typeof import('./comps/steps')['Steps']
+ ['up-steps-item']: typeof import('./comps/stepsItem')['StepsItem']
+ ['up-empty']: typeof import('./comps/empty')['Empty']
+
+ // 其他组件
+ ['up-parse']: typeof import('./comps/parse')['Parse']
+ ['up-code-input']: typeof import('./comps/codeInput')['CodeInput']
+ ['up-loadmore']: typeof import('./comps/loadMore')['LoadMore']
+ ['up-read-more']: typeof import('./comps/readMore')['ReadMore']
+ ['up-gap']: typeof import('./comps/gap')['Gap']
+ ['up-avatar']: typeof import('./comps/avatar')['Avatar']
+ ['up-avatar-group']: typeof import('./comps/avatarGroup')['AvatarGroup']
+ ['up-link']: typeof import('./comps/link')['Link']
+ ['up-transition']: typeof import('./comps/transition')['Transition']
+ ['up-status-bar']: typeof import('./comps/statusBar')['StatusBar']
+ ['up-safe-bottom']: typeof import('./comps/safeBottom')['SafeBottom']
+ }
+}
+
+export {}
diff --git a/uni_modules/uview-plus/types/comps/_common.d.ts b/uni_modules/uview-plus/types/comps/_common.d.ts
index 03cb105..ec3b8e7 100644
--- a/uni_modules/uview-plus/types/comps/_common.d.ts
+++ b/uni_modules/uview-plus/types/comps/_common.d.ts
@@ -1,9 +1,9 @@
-export interface AllowedComponentProps {
- class?: unknown;
- style?: unknown;
-}
-
-export interface VNodeProps {
- key?: string | number | symbol;
- ref?: unknown;
-}
+export interface AllowedComponentProps {
+ class?: unknown;
+ style?: unknown;
+}
+
+export interface VNodeProps {
+ key?: string | number | symbol;
+ ref?: unknown;
+}
diff --git a/uni_modules/uview-plus/types/comps/actionSheet.d.ts b/uni_modules/uview-plus/types/comps/actionSheet.d.ts
index 81b3527..8313a94 100644
--- a/uni_modules/uview-plus/types/comps/actionSheet.d.ts
+++ b/uni_modules/uview-plus/types/comps/actionSheet.d.ts
@@ -1,121 +1,121 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface ActionSheetProps {
- /**
- * 是否展示
- * @default false
- */
- show?: boolean
- /**
- * 设置标题
- */
- title?: string
- /**
- * 选项上方的描述信息
- */
- description?: string
- /**
- * 按钮的文字数组
- * @default []
- */
- actions?: any[]
- /**
- * 取消按钮的文字,不为空时显示按钮
- */
- cancelText?: string
- /**
- * 点击某个菜单项时是否关闭弹窗
- */
- closeOnClickAction?: boolean
- /**
- * 是否开启底部安全区适配
- * @default false
- */
- safeAreaInsetBottom?: boolean
- /**
- * 小程序的打开方式
- */
- openType?: string
- /**
- * 点击遮罩是否允许关闭
- */
- closeOnClickOverlay?: boolean
- /**
- * 圆角值,默认无圆角
- * @default 0
- */
- round?: string | number
- /**
- * 指定返回用户信息的语言
- * @default "en"
- */
- lang?: 'zh_CN' | 'zh_TW' | 'en'
- /**
- * 会话来源,open-type="contact"时有效。只微信小程序有效
- */
- sessionFrom?: string
- /**
- * 会话内消息卡片标题,openType="contact"时有效
- */
- sendMessageTitle?: string
- /**
- * 会话内消息卡片点击跳转小程序路径,openType="contact"时有效
- */
- sendMessagePath?: string
- /**
- * 会话内消息卡片图片,openType="contact"时有效
- */
- sendMessageImg?: string
- /**
- * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效
- * @default false
- */
- showMessageCard?: boolean
- /**
- * 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效
- */
- appParameter?: string
- /**
- * 点击ActionSheet列表项时触发
- */
- onSelect?: (e: any) => any
- /**
- * 点击取消按钮时触发
- */
- onClose?: () => any
- /**
- * 获取用户信息回调,openType="getUserInfo"时有效
- * @param detail 用户信息
- */
- onGetuserinfo?: (detail: any) => any
- /**
- * 客服消息回调,openType="contact"时有效
- */
- onContact?: () => any
- /**
- * 获取用户手机号回调,openType="getPhoneNumber"时有效
- */
- onGetphonenumber?: () => any
- /**
- * 当使用开放能力时,发生错误的回调
- */
- onError?: (...args: any) => any
- /**
- * 在打开授权设置页并关闭后回调
- */
- onOpensetting?: (...args: any) => any
- /**
- * 打开 APP 成功的回调
- */
- onLaunchapp?: (...args: any) => any
-}
-
-declare interface _ActionSheet {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- ActionSheetProps
- }
-}
-
-export declare const ActionSheet: _ActionSheet
+import { AllowedComponentProps, VNodeProps } from './_common'
+
+declare interface ActionSheetProps {
+ /**
+ * 是否展示
+ * @default false
+ */
+ show?: boolean
+ /**
+ * 设置标题
+ */
+ title?: string
+ /**
+ * 选项上方的描述信息
+ */
+ description?: string
+ /**
+ * 按钮的文字数组
+ * @default []
+ */
+ actions?: any[]
+ /**
+ * 取消按钮的文字,不为空时显示按钮
+ */
+ cancelText?: string
+ /**
+ * 点击某个菜单项时是否关闭弹窗
+ */
+ closeOnClickAction?: boolean
+ /**
+ * 是否开启底部安全区适配
+ * @default false
+ */
+ safeAreaInsetBottom?: boolean
+ /**
+ * 小程序的打开方式
+ */
+ openType?: string
+ /**
+ * 点击遮罩是否允许关闭
+ */
+ closeOnClickOverlay?: boolean
+ /**
+ * 圆角值,默认无圆角
+ * @default 0
+ */
+ round?: string | number
+ /**
+ * 指定返回用户信息的语言
+ * @default "en"
+ */
+ lang?: 'zh_CN' | 'zh_TW' | 'en'
+ /**
+ * 会话来源,open-type="contact"时有效。只微信小程序有效
+ */
+ sessionFrom?: string
+ /**
+ * 会话内消息卡片标题,openType="contact"时有效
+ */
+ sendMessageTitle?: string
+ /**
+ * 会话内消息卡片点击跳转小程序路径,openType="contact"时有效
+ */
+ sendMessagePath?: string
+ /**
+ * 会话内消息卡片图片,openType="contact"时有效
+ */
+ sendMessageImg?: string
+ /**
+ * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效
+ * @default false
+ */
+ showMessageCard?: boolean
+ /**
+ * 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效
+ */
+ appParameter?: string
+ /**
+ * 点击ActionSheet列表项时触发
+ */
+ onSelect?: (e: any) => any
+ /**
+ * 点击取消按钮时触发
+ */
+ onClose?: () => any
+ /**
+ * 获取用户信息回调,openType="getUserInfo"时有效
+ * @param detail 用户信息
+ */
+ onGetuserinfo?: (detail: any) => any
+ /**
+ * 客服消息回调,openType="contact"时有效
+ */
+ onContact?: () => any
+ /**
+ * 获取用户手机号回调,openType="getPhoneNumber"时有效
+ */
+ onGetphonenumber?: () => any
+ /**
+ * 当使用开放能力时,发生错误的回调
+ */
+ onError?: (...args: any) => any
+ /**
+ * 在打开授权设置页并关闭后回调
+ */
+ onOpensetting?: (...args: any) => any
+ /**
+ * 打开 APP 成功的回调
+ */
+ onLaunchapp?: (...args: any) => any
+}
+
+declare interface _ActionSheet {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ ActionSheetProps
+ }
+}
+
+export declare const ActionSheet: _ActionSheet
diff --git a/uni_modules/uview-plus/types/comps/album.d.ts b/uni_modules/uview-plus/types/comps/album.d.ts
index 886d530..4049132 100644
--- a/uni_modules/uview-plus/types/comps/album.d.ts
+++ b/uni_modules/uview-plus/types/comps/album.d.ts
@@ -1,82 +1,82 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface AlbumProps {
- /**
- * 图片地址列表
- */
- urls?: string[] | Record[]
- /**
- * 指定从数组的对象元素中读取哪个属性作为图片地址
- */
- keyName?: string
- /**
- * 单图时,图片长边的长度
- * @default 180
- */
- singleSize?: string | number
- /**
- * 多图时,图片边长
- * @default 70
- */
- multipleSize?: string | number
- /**
- * 多图时,图片水平和垂直之间的间隔
- * @default 6
- */
- space?: string | number
- /**
- * 单图时,图片缩放裁剪的模式
- * @default "scaleToFill"
- */
- singleMode?: ImageMode
- /**
- * 多图时,图片缩放裁剪的模式
- * @default "aspectFill"
- */
- multipleMode?: ImageMode
- /**
- * 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
- * @default 9
- */
- maxCount?: string | number
- /**
- * 是否可以预览图片
- * @default true
- */
- previewFullImage?: boolean
- /**
- * 每行展示图片数量,如设置,singleSize和multipleSize将会无效
- * @default 3
- */
- rowCount?: string | number
- /**
- * 超出maxCount时是否显示查看更多的提示
- * @default true
- */
- showMore?: boolean
- /**
- * 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送
- * @param width 宽度
- */
- onAlbumWidth?: (width: any) => any
- /**
- * 图片形状
- * @default "square"
- */
- shape?: 'circle' | 'square'
- /**
- * 圆角,默认单位px
- * @default 0
- */
- radius?: string | number
-}
-
-declare interface _Album {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- AlbumProps
- }
-}
-
-export declare const Album: _Album
+import { AllowedComponentProps, VNodeProps } from './_common'
+
+declare interface AlbumProps {
+ /**
+ * 图片地址列表
+ */
+ urls?: string[] | Record[]
+ /**
+ * 指定从数组的对象元素中读取哪个属性作为图片地址
+ */
+ keyName?: string
+ /**
+ * 单图时,图片长边的长度
+ * @default 180
+ */
+ singleSize?: string | number
+ /**
+ * 多图时,图片边长
+ * @default 70
+ */
+ multipleSize?: string | number
+ /**
+ * 多图时,图片水平和垂直之间的间隔
+ * @default 6
+ */
+ space?: string | number
+ /**
+ * 单图时,图片缩放裁剪的模式
+ * @default "scaleToFill"
+ */
+ singleMode?: ImageMode
+ /**
+ * 多图时,图片缩放裁剪的模式
+ * @default "aspectFill"
+ */
+ multipleMode?: ImageMode
+ /**
+ * 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
+ * @default 9
+ */
+ maxCount?: string | number
+ /**
+ * 是否可以预览图片
+ * @default true
+ */
+ previewFullImage?: boolean
+ /**
+ * 每行展示图片数量,如设置,singleSize和multipleSize将会无效
+ * @default 3
+ */
+ rowCount?: string | number
+ /**
+ * 超出maxCount时是否显示查看更多的提示
+ * @default true
+ */
+ showMore?: boolean
+ /**
+ * 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送
+ * @param width 宽度
+ */
+ onAlbumWidth?: (width: any) => any
+ /**
+ * 图片形状
+ * @default "square"
+ */
+ shape?: 'circle' | 'square'
+ /**
+ * 圆角,默认单位px
+ * @default 0
+ */
+ radius?: string | number
+}
+
+declare interface _Album {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ AlbumProps
+ }
+}
+
+export declare const Album: _Album
diff --git a/uni_modules/uview-plus/types/comps/alert.d.ts b/uni_modules/uview-plus/types/comps/alert.d.ts
index b8b5541..142fb8d 100644
--- a/uni_modules/uview-plus/types/comps/alert.d.ts
+++ b/uni_modules/uview-plus/types/comps/alert.d.ts
@@ -1,55 +1,55 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface AlertProps {
- /**
- * 显示的文字
- */
- title?: string
- /**
- * 使用预设的颜色
- * @default "warning"
- */
- type?: 'warning' | 'success' | 'primary' | 'error' | 'info'
- /**
- * 辅助性文字,颜色比`title`浅一点,字号也小一点,可选
- */
- description?: string
- /**
- * 关闭按钮(默认为叉号icon图标)
- * @default false
- */
- closable?: boolean
- /**
- * 是否显示左边的辅助图标
- * @default false
- */
- showIcon?: boolean
- /**
- * 多图时,图片缩放裁剪的模式
- */
- effect?: 'light' | 'dark'
- /**
- * 文字是否居中
- * @default false
- */
- center?: boolean
- /**
- * 字体大小
- * @default 14
- */
- fontSize?: string | number
- /**
- * 点击组件时触发
- */
- onClick?: () => any
-}
-
-declare interface _Alert {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- AlertProps
- }
-}
-
-export declare const Alert: _Alert
+import { AllowedComponentProps, VNodeProps } from './_common'
+
+declare interface AlertProps {
+ /**
+ * 显示的文字
+ */
+ title?: string
+ /**
+ * 使用预设的颜色
+ * @default "warning"
+ */
+ type?: 'warning' | 'success' | 'primary' | 'error' | 'info'
+ /**
+ * 辅助性文字,颜色比`title`浅一点,字号也小一点,可选
+ */
+ description?: string
+ /**
+ * 关闭按钮(默认为叉号icon图标)
+ * @default false
+ */
+ closable?: boolean
+ /**
+ * 是否显示左边的辅助图标
+ * @default false
+ */
+ showIcon?: boolean
+ /**
+ * 多图时,图片缩放裁剪的模式
+ */
+ effect?: 'light' | 'dark'
+ /**
+ * 文字是否居中
+ * @default false
+ */
+ center?: boolean
+ /**
+ * 字体大小
+ * @default 14
+ */
+ fontSize?: string | number
+ /**
+ * 点击组件时触发
+ */
+ onClick?: () => any
+}
+
+declare interface _Alert {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ AlertProps
+ }
+}
+
+export declare const Alert: _Alert
diff --git a/uni_modules/uview-plus/types/comps/avatar.d.ts b/uni_modules/uview-plus/types/comps/avatar.d.ts
index bc3ff36..c349325 100644
--- a/uni_modules/uview-plus/types/comps/avatar.d.ts
+++ b/uni_modules/uview-plus/types/comps/avatar.d.ts
@@ -1,85 +1,85 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-import { ImageMode } from './image'
-
-declare interface AvatarProps {
- /**
- * 头像路径,如加载失败,将会显示默认头像(不能为相对路径)
- */
- src?: string
- /**
- * 头像形状
- * @default "circle"
- */
- shape?: 'circle' | 'square'
- /**
- * 头像尺寸
- * @default 40
- */
- size?: 'large' | 'default' | 'mini' | number
- /**
- * 裁剪类型
- * @default "scaleToFill"
- */
- mode?: ImageMode
- /**
- * 用文字替代图片,级别优先于`src`
- */
- text?: string
- /**
- * 背景颜色
- * @default "#c0c4cc"
- */
- bgColor?: string
- /**
- * 文字颜色
- * @default "#fff"
- */
- color?: string
- /**
- * 文字大小
- * @default 18
- */
- fontSize?: string | number
- /**
- * 显示的图标
- */
- icon?: string
- /**
- * 显示小程序头像,只对百度,微信,QQ小程序有效
- * @default false
- */
- mpAvatar?: boolean
- /**
- * 是否使用随机背景色
- * @default false
- */
- randomBgColor?: boolean
- /**
- * 加载失败的默认头像(组件有内置默认图片)
- */
- defaultUrl?: string
- /**
- * 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
- */
- colorIndex?: string | number
- /**
- * 组件标识符
- * @default "level"
- */
- name?: string
- /**
- * 头像被点击
- * @param index 用户传递的标识符
- */
- onClick?: (index: any) => any
-}
-
-declare interface _Avatar {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- AvatarProps
- }
-}
-
-export declare const Avatar: _Avatar
+import { AllowedComponentProps, VNodeProps } from './_common'
+import { ImageMode } from './image'
+
+declare interface AvatarProps {
+ /**
+ * 头像路径,如加载失败,将会显示默认头像(不能为相对路径)
+ */
+ src?: string
+ /**
+ * 头像形状
+ * @default "circle"
+ */
+ shape?: 'circle' | 'square'
+ /**
+ * 头像尺寸
+ * @default 40
+ */
+ size?: 'large' | 'default' | 'mini' | number
+ /**
+ * 裁剪类型
+ * @default "scaleToFill"
+ */
+ mode?: ImageMode
+ /**
+ * 用文字替代图片,级别优先于`src`
+ */
+ text?: string
+ /**
+ * 背景颜色
+ * @default "#c0c4cc"
+ */
+ bgColor?: string
+ /**
+ * 文字颜色
+ * @default "#fff"
+ */
+ color?: string
+ /**
+ * 文字大小
+ * @default 18
+ */
+ fontSize?: string | number
+ /**
+ * 显示的图标
+ */
+ icon?: string
+ /**
+ * 显示小程序头像,只对百度,微信,QQ小程序有效
+ * @default false
+ */
+ mpAvatar?: boolean
+ /**
+ * 是否使用随机背景色
+ * @default false
+ */
+ randomBgColor?: boolean
+ /**
+ * 加载失败的默认头像(组件有内置默认图片)
+ */
+ defaultUrl?: string
+ /**
+ * 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
+ */
+ colorIndex?: string | number
+ /**
+ * 组件标识符
+ * @default "level"
+ */
+ name?: string
+ /**
+ * 头像被点击
+ * @param index 用户传递的标识符
+ */
+ onClick?: (index: any) => any
+}
+
+declare interface _Avatar {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ AvatarProps
+ }
+}
+
+export declare const Avatar: _Avatar
diff --git a/uni_modules/uview-plus/types/comps/avatarGroup.d.ts b/uni_modules/uview-plus/types/comps/avatarGroup.d.ts
index e9ff4c4..5ceca7d 100644
--- a/uni_modules/uview-plus/types/comps/avatarGroup.d.ts
+++ b/uni_modules/uview-plus/types/comps/avatarGroup.d.ts
@@ -1,62 +1,62 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-import { ImageMode } from './image'
-
-declare interface AvatarGroupProps {
- /**
- * 头像图片组
- * @default []
- */
- urls?: string[]
- /**
- * 最多展示的头像数量
- * @default 5
- */
- maxCount?: string | number
- /**
- * 头像形状
- * @default "circle"
- */
- shape?: 'circle' | 'square'
- /**
- * 裁剪模式
- * @default "aspectFill"
- */
- mode?: ImageMode
- /**
- * 超出maxCount时是否显示查看更多的提示
- * @default true
- */
- showMore?: boolean
- /**
- * 头像大小
- * @default 40
- */
- size?: string | number
- /**
- * 指定从数组的对象元素中读取哪个属性作为图片地址
- */
- keyName?: string
- /**
- * 头像之间的遮挡比例(0.4代表遮挡40%)
- * @default 0.5
- */
- gap?: string | number
- /**
- * 需额外显示的值,如设置则优先于内部的`urls.length - maxCount`值
- */
- extraValue?: string | number
- /**
- * 头像组更多点击
- */
- onShowMore?: () => any
-}
-
-declare interface _AvatarGroup {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- AvatarGroupProps
- }
-}
-
-export declare const AvatarGroup: _AvatarGroup
+import { AllowedComponentProps, VNodeProps } from './_common'
+import { ImageMode } from './image'
+
+declare interface AvatarGroupProps {
+ /**
+ * 头像图片组
+ * @default []
+ */
+ urls?: string[]
+ /**
+ * 最多展示的头像数量
+ * @default 5
+ */
+ maxCount?: string | number
+ /**
+ * 头像形状
+ * @default "circle"
+ */
+ shape?: 'circle' | 'square'
+ /**
+ * 裁剪模式
+ * @default "aspectFill"
+ */
+ mode?: ImageMode
+ /**
+ * 超出maxCount时是否显示查看更多的提示
+ * @default true
+ */
+ showMore?: boolean
+ /**
+ * 头像大小
+ * @default 40
+ */
+ size?: string | number
+ /**
+ * 指定从数组的对象元素中读取哪个属性作为图片地址
+ */
+ keyName?: string
+ /**
+ * 头像之间的遮挡比例(0.4代表遮挡40%)
+ * @default 0.5
+ */
+ gap?: string | number
+ /**
+ * 需额外显示的值,如设置则优先于内部的`urls.length - maxCount`值
+ */
+ extraValue?: string | number
+ /**
+ * 头像组更多点击
+ */
+ onShowMore?: () => any
+}
+
+declare interface _AvatarGroup {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ AvatarGroupProps
+ }
+}
+
+export declare const AvatarGroup: _AvatarGroup
diff --git a/uni_modules/uview-plus/types/comps/backTop.d.ts b/uni_modules/uview-plus/types/comps/backTop.d.ts
index d41cbe6..2ec6aa1 100644
--- a/uni_modules/uview-plus/types/comps/backTop.d.ts
+++ b/uni_modules/uview-plus/types/comps/backTop.d.ts
@@ -1,74 +1,74 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface BackTopProps {
- /**
- * 按钮形状
- * @default "circle"
- */
- mode?: 'circle' | 'square'
- /**
- * uView内置图标名称,或图片路径
- * @default "arrow-upward"
- */
- icon?: string
- /**
- * 返回顶部按钮的提示文字
- */
- text?: string
- /**
- * 返回顶部过程中的过渡时间,单位ms
- * @default 100
- */
- duration?: string | number
- /**
- * 页面的滚动距离,通过`onPageScroll`生命周期获取
- * @default 0
- */
- scrollTop?: string | number
- /**
- * 滚动条滑动多少距离时显示,单位rpx
- * @default 400
- */
- top?: string | number
- /**
- * 返回按钮位置到屏幕底部的距离,单位rpx
- * @default 100
- */
- bottom?: string | number
- /**
- * 返回按钮位置到屏幕右边的距离,单位rpx
- * @default 20
- */
- right?: string | number
- /**
- * 返回顶部按钮的层级
- * @default 9
- */
- zIndex?: string | number
- /**
- * 图标的样式
- */
- iconStyle?: unknown
- /**
- * 按钮外层的自定义样式
- */
- customStyle?: unknown
-}
-
-declare interface BackTopSlots {
- /**
- * 自定义返回按钮的所有内容
- */
- ['default']?: () => any
-}
-
-declare interface _BackTop {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- BackTopProps
- $slots: BackTopSlots
- }
-}
-
-export declare const BackTop: _BackTop
+import { AllowedComponentProps, VNodeProps } from './_common'
+
+declare interface BackTopProps {
+ /**
+ * 按钮形状
+ * @default "circle"
+ */
+ mode?: 'circle' | 'square'
+ /**
+ * uView内置图标名称,或图片路径
+ * @default "arrow-upward"
+ */
+ icon?: string
+ /**
+ * 返回顶部按钮的提示文字
+ */
+ text?: string
+ /**
+ * 返回顶部过程中的过渡时间,单位ms
+ * @default 100
+ */
+ duration?: string | number
+ /**
+ * 页面的滚动距离,通过`onPageScroll`生命周期获取
+ * @default 0
+ */
+ scrollTop?: string | number
+ /**
+ * 滚动条滑动多少距离时显示,单位rpx
+ * @default 400
+ */
+ top?: string | number
+ /**
+ * 返回按钮位置到屏幕底部的距离,单位rpx
+ * @default 100
+ */
+ bottom?: string | number
+ /**
+ * 返回按钮位置到屏幕右边的距离,单位rpx
+ * @default 20
+ */
+ right?: string | number
+ /**
+ * 返回顶部按钮的层级
+ * @default 9
+ */
+ zIndex?: string | number
+ /**
+ * 图标的样式
+ */
+ iconStyle?: unknown
+ /**
+ * 按钮外层的自定义样式
+ */
+ customStyle?: unknown
+}
+
+declare interface BackTopSlots {
+ /**
+ * 自定义返回按钮的所有内容
+ */
+ ['default']?: () => any
+}
+
+declare interface _BackTop {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ BackTopProps
+ $slots: BackTopSlots
+ }
+}
+
+export declare const BackTop: _BackTop
diff --git a/uni_modules/uview-plus/types/comps/badge.d.ts b/uni_modules/uview-plus/types/comps/badge.d.ts
index 35e434f..f03b21d 100644
--- a/uni_modules/uview-plus/types/comps/badge.d.ts
+++ b/uni_modules/uview-plus/types/comps/badge.d.ts
@@ -1,76 +1,76 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface BadgeProps {
- /**
- * 不展示数字,只有一个小点
- * @default false
- */
- isDot?: boolean
- /**
- * 展示的数字,大于`overflowCount`时显示为`${overflowCount}+`,为`0`且`show-zero`为`false`时隐藏
- */
- value?: string | number
- /**
- * 组件是否显示
- * @default true
- */
- show?: boolean
- /**
- * 最大值,超过最大值会显示 '{max}+'
- * @default 99
- */
- max?: string | number
- /**
- * 主题类型
- * @default "error"
- */
- type?: 'error' | 'warning' | 'success' | 'primary' | 'info'
- /**
- * 当数值为 0 时,是否展示 Badge
- * @default false
- */
- showZero?: boolean
- /**
- * 背景颜色,优先级比`type`高,如设置,`type`参数会失效
- */
- bgColor?: string
- /**
- * 字体颜色
- * @default "#fff"
- */
- color?: string
- /**
- * 徽标形状,circle-四角均为圆角,horn-左下角为直角
- * @default "circle"
- */
- shape?: 'circle' | 'horn'
- /**
- * 置数字的显示方式,详细见[文档](https://www.uviewui.com/components/badge.html#%E8%AE%BE%E7%BD%AE%E6%95%B0%E5%AD%97%E7%9A%84%E6%98%BE%E7%A4%BA%E6%96%B9%E5%BC%8F-overflow-ellipsis-limit)
- * @default "overflow"
- */
- numberType?: 'overflow' | 'ellipsis' | 'limit'
- /**
- * 设置badge的位置偏移,格式为 [x, y],也即设置的为`top`和`right`的值,`absolute`为`true`时有效
- */
- offset?: string[]
- /**
- * 是否反转背景和字体颜色
- * @default false
- */
- inverted?: boolean
- /**
- * 组件是否绝对定位,为`true`时,`offset`参数才有效
- * @default false
- */
- absolute?: boolean
-}
-
-declare interface _Badge {
- new (): {
- $props: AllowedComponentProps &
- VNodeProps &
- BadgeProps
- }
-}
-
-export declare const Badge: _Badge
+import { AllowedComponentProps, VNodeProps } from './_common'
+
+declare interface BadgeProps {
+ /**
+ * 不展示数字,只有一个小点
+ * @default false
+ */
+ isDot?: boolean
+ /**
+ * 展示的数字,大于`overflowCount`时显示为`${overflowCount}+`,为`0`且`show-zero`为`false`时隐藏
+ */
+ value?: string | number
+ /**
+ * 组件是否显示
+ * @default true
+ */
+ show?: boolean
+ /**
+ * 最大值,超过最大值会显示 '{max}+'
+ * @default 99
+ */
+ max?: string | number
+ /**
+ * 主题类型
+ * @default "error"
+ */
+ type?: 'error' | 'warning' | 'success' | 'primary' | 'info'
+ /**
+ * 当数值为 0 时,是否展示 Badge
+ * @default false
+ */
+ showZero?: boolean
+ /**
+ * 背景颜色,优先级比`type`高,如设置,`type`参数会失效
+ */
+ bgColor?: string
+ /**
+ * 字体颜色
+ * @default "#fff"
+ */
+ color?: string
+ /**
+ * 徽标形状,circle-四角均为圆角,horn-左下角为直角
+ * @default "circle"
+ */
+ shape?: 'circle' | 'horn'
+ /**
+ * 置数字的显示方式,详细见[文档](https://www.uviewui.com/components/badge.html#%E8%AE%BE%E7%BD%AE%E6%95%B0%E5%AD%97%E7%9A%84%E6%98%BE%E7%A4%BA%E6%96%B9%E5%BC%8F-overflow-ellipsis-limit)
+ * @default "overflow"
+ */
+ numberType?: 'overflow' | 'ellipsis' | 'limit'
+ /**
+ * 设置badge的位置偏移,格式为 [x, y],也即设置的为`top`和`right`的值,`absolute`为`true`时有效
+ */
+ offset?: string[]
+ /**
+ * 是否反转背景和字体颜色
+ * @default false
+ */
+ inverted?: boolean
+ /**
+ * 组件是否绝对定位,为`true`时,`offset`参数才有效
+ * @default false
+ */
+ absolute?: boolean
+}
+
+declare interface _Badge {
+ new (): {
+ $props: AllowedComponentProps &
+ VNodeProps &
+ BadgeProps
+ }
+}
+
+export declare const Badge: _Badge
diff --git a/uni_modules/uview-plus/types/comps/button.d.ts b/uni_modules/uview-plus/types/comps/button.d.ts
index 9868916..04b11d2 100644
--- a/uni_modules/uview-plus/types/comps/button.d.ts
+++ b/uni_modules/uview-plus/types/comps/button.d.ts
@@ -1,169 +1,169 @@
-import { AllowedComponentProps, VNodeProps } from './_common'
-
-declare interface ButtonProps {
- /**
- * 是否显示按钮的细边框
- * @default true
- */
- hairline?: boolean
- /**
- * 按钮的样式类型
- * @default "info"
- */
- type?: 'info' | 'primary' | 'error' | 'warning' | 'success' | 'text'
- /**
- * 按钮的大小
- * @default "normal"
- */
- size?: 'normal' | 'large' | 'small' | 'mini'
- /**
- * 按钮外观形状
- * @default "square"
- */
- shape?: 'square' | 'circle'
- /**
- * 按钮是否镂空
- * @default false
- */
- plain?: boolean
- /**
- * 是否禁用
- * @default false
- */
- disabled?: boolean
- /**
- * 按钮名称前是否带 loading 图标
- * @default false
- */
- loading?: boolean
- /**
- * 加载中提示文字
- */
- loadingText?: string
- /**
- * 加载状态图标类型
- * @default "spinner"
- */
- loadingMode?: string
- /**
- * 加载图标大小
- * @default 15
- */
- loadingSize?: string | number
- /**
- * 开放能力,具体请看 [button](https://uniapp.dcloud.net.cn/component/button.html#open-type-%E6%9C%89%E6%95%88%E5%80%BC)
- */
- openType?: string
- /**
- * 用于