From 593b8e820d33285a17ff521aba93ada6e957098b Mon Sep 17 00:00:00 2001
From: xiangheng <11675084@qq.com>
Date: Wed, 5 Jun 2024 17:53:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../uv-datetime-picker/changelog.md | 2 +
.../uv-datetime-picker/uv-datetime-picker.vue | 4 +-
.../uv-datetime-picker/package.json | 5 +-
.../uni_modules/wot-design-uni/changelog.md | 108 ++++++++++--
.../components/common/abstracts/_mixin.scss | 8 +
.../components/common/abstracts/variable.scss | 6 +
.../components/common/canvasHelper.ts | 49 ++++++
.../components/wd-backtop/index.scss | 21 +++
.../components/wd-backtop/types.ts | 37 ++++
.../components/wd-backtop/wd-backtop.vue | 43 +++++
.../components/wd-button/index.scss | 11 +-
.../components/wd-calendar/types.ts | 7 +
.../components/wd-calendar/wd-calendar.vue | 7 +-
.../components/wd-cell/types.ts | 4 +-
.../components/wd-cell/wd-cell.vue | 6 +-
.../components/wd-circle/wd-circle.vue | 131 +++++++-------
.../components/wd-form/wd-form.vue | 4 +-
.../components/wd-img/wd-img.vue | 18 +-
.../components/wd-index-anchor/index.scss | 35 ++++
.../components/wd-index-anchor/type.ts | 9 +
.../wd-index-anchor/wd-index-anchor.vue | 53 ++++++
.../components/wd-index-bar/index.scss | 39 +++++
.../components/wd-index-bar/type.ts | 30 ++++
.../components/wd-index-bar/wd-index-bar.vue | 118 +++++++++++++
.../components/wd-input/types.ts | 7 +-
.../components/wd-input/wd-input.vue | 2 +-
.../components/wd-loading/types.ts | 7 +-
.../components/wd-loading/wd-loading.vue | 21 +--
.../components/wd-message-box/index.scss | 1 -
.../wd-message-box/wd-message-box.vue | 23 ++-
.../components/wd-navbar/wd-navbar.vue | 17 +-
.../components/wd-number-keyboard/index.scss | 1 +
.../wd-picker-view/wd-picker-view.vue | 9 +-
.../components/wd-picker/wd-picker.vue | 61 +++----
.../components/wd-popover/wd-popover.vue | 7 +
.../components/wd-segmented/wd-segmented.vue | 3 +-
.../components/wd-skeleton/types.ts | 4 +-
.../components/wd-skeleton/wd-skeleton.vue | 9 +-
.../wd-sort-button/wd-sort-button.vue | 2 +-
.../components/wd-sticky-box/types.ts | 20 +++
.../wd-sticky-box/wd-sticky-box.vue | 106 +++++++-----
.../components/wd-sticky/wd-sticky.vue | 160 +++++++++---------
.../components/wd-tag/index.scss | 1 +
.../uni_modules/wot-design-uni/global.d.ts | 4 +
.../uni_modules/wot-design-uni/package.json | 7 +-
.../uni_modules/wot-design-uni/readme.md | 27 +--
x_admin_app/utils/env.js | 4 +-
47 files changed, 923 insertions(+), 335 deletions(-)
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/common/canvasHelper.ts
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/index.scss
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/types.ts
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-anchor/index.scss
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-anchor/type.ts
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-anchor/wd-index-anchor.vue
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/index.scss
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/type.ts
create mode 100644 x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue
diff --git a/x_admin_app/uni_modules/uv-datetime-picker/changelog.md b/x_admin_app/uni_modules/uv-datetime-picker/changelog.md
index f869449..5c933d2 100644
--- a/x_admin_app/uni_modules/uv-datetime-picker/changelog.md
+++ b/x_admin_app/uni_modules/uv-datetime-picker/changelog.md
@@ -1,3 +1,5 @@
+## 1.0.14(2024-05-31)
+1. 修复设置maxDate后存在选择不准确的BUG
## 1.0.13(2024-03-22)
1. 修复VUE3中出现的BUG
## 1.0.12(2023-11-27)
diff --git a/x_admin_app/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue b/x_admin_app/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue
index 61b4381..2e7af92 100644
--- a/x_admin_app/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue
+++ b/x_admin_app/uni_modules/uv-datetime-picker/components/uv-datetime-picker/uv-datetime-picker.vue
@@ -78,7 +78,9 @@
},
watch: {
propsChange() {
- this.init()
+ uni.$uv.sleep(100).then(res=>{
+ this.init()
+ })
}
},
computed: {
diff --git a/x_admin_app/uni_modules/uv-datetime-picker/package.json b/x_admin_app/uni_modules/uv-datetime-picker/package.json
index 6ed40bd..be6a549 100644
--- a/x_admin_app/uni_modules/uv-datetime-picker/package.json
+++ b/x_admin_app/uni_modules/uv-datetime-picker/package.json
@@ -1,7 +1,7 @@
{
"id": "uv-datetime-picker",
"displayName": "uv-datetime-picker 时间选择器 全面兼容vue3+2、app、h5、小程序等多端",
- "version": "1.0.13",
+ "version": "1.0.14",
"description": "时间选择器组件用于时间日期,主要用于年月日时分的选择,具体选择的精确度由参数控制。",
"keywords": [
"datetime-picker",
@@ -43,7 +43,8 @@
"platforms": {
"cloud": {
"tcb": "y",
- "aliyun": "y"
+ "aliyun": "y",
+ "alipay": "n"
},
"client": {
"Vue": {
diff --git a/x_admin_app/uni_modules/wot-design-uni/changelog.md b/x_admin_app/uni_modules/wot-design-uni/changelog.md
index 04bd0b6..aaaca30 100644
--- a/x_admin_app/uni_modules/wot-design-uni/changelog.md
+++ b/x_admin_app/uni_modules/wot-design-uni/changelog.md
@@ -1,29 +1,101 @@
-## 1.2.19(2024-05-01)
-### [1.2.19](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.18...v1.2.19) (2024-05-01)
-
-
-### ✨ Features | 新功能
-
-* ✨ `Slider`组件`min`值允许负数 ([9e7c8d3](https://github.com/Moonofweisheng/wot-design-uni/commit/9e7c8d33eb2c0fccc44f465ed3b28d2cd81efa2d)), closes [#266](https://github.com/Moonofweisheng/wot-design-uni/issues/266)
-* ✨ fab添加draggable属性 ([#259](https://github.com/Moonofweisheng/wot-design-uni/issues/259)) ([5e0cd6c](https://github.com/Moonofweisheng/wot-design-uni/commit/5e0cd6caa2296a44a3dc1b3d33033d4cc91d01b9))
-* ✨ table组件添加index参数 ([2161705](https://github.com/Moonofweisheng/wot-design-uni/commit/2161705a2f868f874b89ee28b6029677854a7741))
+## 1.2.24(2024-06-04)
+### [1.2.24](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.23...v1.2.24) (2024-06-03)
### Bug Fixes | Bug 修复
-* 修复`slider`组件`step`属性无效问题 ([50133b9](https://github.com/Moonofweisheng/wot-design-uni/commit/50133b9e5e2a18aace8cbf9eb7570579cc563f1d)), closes [#269](https://github.com/Moonofweisheng/wot-design-uni/issues/269)
-* 修复Cell组件title文字对齐方式受外部影响的问题 ([caf66b6](https://github.com/Moonofweisheng/wot-design-uni/commit/caf66b6beeb236a9295cf0d8ec250557dc19e54e)), closes [#282](https://github.com/Moonofweisheng/wot-design-uni/issues/282)
-* 修复SelectPicker无默认值时仍会查找选择项节点的问题 ([130c438](https://github.com/Moonofweisheng/wot-design-uni/commit/130c4383dc862e190b96bc3670a852a4cce3e629)), closes [#281](https://github.com/Moonofweisheng/wot-design-uni/issues/281)
-* 修复Slider组件max和min变化时滑块和进度条未更新的问题 ([#276](https://github.com/Moonofweisheng/wot-design-uni/issues/276)) ([69303b5](https://github.com/Moonofweisheng/wot-design-uni/commit/69303b52077bd268e3563fa9096e91530bb978c5))
-
-
-### Documentation | 文档
-
-* 补充Table组件关于Events的介绍 ([6760317](https://github.com/Moonofweisheng/wot-design-uni/commit/676031781b189a3a89dba9e57cb989c06999091a)), closes [#260](https://github.com/Moonofweisheng/wot-design-uni/issues/260)
+* 修复Input支付宝小程序number/digit类型使用maxlength=-1时v-model失效的问题 ([7aa21b0](https://github.com/Moonofweisheng/wot-design-uni/commit/7aa21b0baadeccf4f0eb179f74332013acec6a10))
# 更新日志
+### [1.2.24](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.23...v1.2.24) (2024-06-03)
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复Input支付宝小程序number/digit类型使用maxlength=-1时v-model失效的问题 ([7aa21b0](https://github.com/Moonofweisheng/wot-design-uni/commit/7aa21b0baadeccf4f0eb179f74332013acec6a10))
+
+### [1.2.23](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.22...v1.2.23) (2024-06-02)
+
+
+### ✏️ Documentation | 文档
+
+* ✏️ 更新LICENSE文件地址 ([dae3ffc](https://github.com/Moonofweisheng/wot-design-uni/commit/dae3ffcc7b488dd6d87bc1c5e8ae16a78b794f85))
+* ✏️ 修复loading组件示例代码中文标点符号、img-cropper组件示例代码标签缺失的问题 ([#347](https://github.com/Moonofweisheng/wot-design-uni/issues/347)) ([d171255](https://github.com/Moonofweisheng/wot-design-uni/commit/d171255899d232f141c84aa1251c03cc1d0a0b75))
+* update select-picker doc ([#346](https://github.com/Moonofweisheng/wot-design-uni/issues/346)) ([7454452](https://github.com/Moonofweisheng/wot-design-uni/commit/7454452ad44331f329408cead9b483cf774cce5f))
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复Cell的value为0时无法渲染的问题 ([dc64c09](https://github.com/Moonofweisheng/wot-design-uni/commit/dc64c09e6c6f991fe6f8f9fcfa309392e233ce21))
+* 🐛 修复Sticky在h5和App端缓慢拖动时存在几率始终固定在顶部的问题 ([#350](https://github.com/Moonofweisheng/wot-design-uni/issues/350)) ([c5b3c5f](https://github.com/Moonofweisheng/wot-design-uni/commit/c5b3c5f68e1bb376249ed5f2c30b1898cc375abe))
+
+
+### ✨ Features | 新功能
+
+* ✨ 调整Circle环形进度条在微信小程序端使用canvas2d支持同层渲染 ([#351](https://github.com/Moonofweisheng/wot-design-uni/issues/351)) ([4489517](https://github.com/Moonofweisheng/wot-design-uni/commit/44895179e4688ceb995ea1968d23df4f0bf9cdc2))
+
+### [1.2.22](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.21...v1.2.22) (2024-05-23)
+
+
+### ✏️ Documentation | 文档
+
+* ✏️ 组件库介绍组件数量调整至70+ ([efd55ca](https://github.com/Moonofweisheng/wot-design-uni/commit/efd55ca8afc07368b8d9f348d73c9a25cf186c47))
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复Form指定prop为`a.b`时校验失败的问题 ([#329](https://github.com/Moonofweisheng/wot-design-uni/issues/329)) ([ab600b9](https://github.com/Moonofweisheng/wot-design-uni/commit/ab600b915a647ff089d5cfbb0ac955e3baa581c3))
+
+### [1.2.21](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.20...v1.2.21) (2024-05-20)
+
+
+### ✨ Features | 新功能
+
+* ✨ 添加索引栏组件 ([#321](https://github.com/Moonofweisheng/wot-design-uni/issues/321)) ([f84e9af](https://github.com/Moonofweisheng/wot-design-uni/commit/f84e9affb1a044a37661c5d1dc118d834b49239c))
+* ✨ img组件添加loading、error插槽 ([#323](https://github.com/Moonofweisheng/wot-design-uni/issues/323)) ([00ffa9f](https://github.com/Moonofweisheng/wot-design-uni/commit/00ffa9f3e54f3ba9eec967887e195c0266ef0a41))
+* ✨ skeleton添加默认内容插槽 ([#322](https://github.com/Moonofweisheng/wot-design-uni/issues/322)) ([9a68c47](https://github.com/Moonofweisheng/wot-design-uni/commit/9a68c477dbf5e0f30f74882df92251eac707fdde))
+* add backtop ([#314](https://github.com/Moonofweisheng/wot-design-uni/issues/314)) ([bf9e55a](https://github.com/Moonofweisheng/wot-design-uni/commit/bf9e55a24e676a764b1e035ca86bd6fe26b87420))
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复Cell组件单独使用时设置border无效的问题 ([19b9f19](https://github.com/Moonofweisheng/wot-design-uni/commit/19b9f196466b88456e8b3e7221afd710da3df99b))
+* 🐛 修复Picker选择器多列选择模式绑定值为空数组时将列第一项作为显示值的问题 ([c3b96ce](https://github.com/Moonofweisheng/wot-design-uni/commit/c3b96ce912bfc13d30c09393dd57cbcbf2d0b80a))
+* 🐛 修复Sticky吸顶组件在微信小程序中放置在页面顶部时吸顶失效的问题 ([4ca3ebe](https://github.com/Moonofweisheng/wot-design-uni/commit/4ca3ebe7202f118a1bf6a462b27dc76ab6c720f9)), closes [#325](https://github.com/Moonofweisheng/wot-design-uni/issues/325)
+* 修复wd-button在自定义样式时激活态样式问题 ([#312](https://github.com/Moonofweisheng/wot-design-uni/issues/312)) ([7544d69](https://github.com/Moonofweisheng/wot-design-uni/commit/7544d690f176b44a8e016688723af70d2a77388a))
+
+
+### ✏️ Documentation | 文档
+
+* ✏️ 常见问题增加关于useToast等hooks的答疑以及自定义编译平台的内容 ([65597c7](https://github.com/Moonofweisheng/wot-design-uni/commit/65597c76b812e5e61be17879de320989d0873df4))
+* ✏️ 文档中增加解释导入方式的faq ([83fa0b0](https://github.com/Moonofweisheng/wot-design-uni/commit/83fa0b06927fddabd1021ee02c3c7f8377704786))
+
+### [1.2.20](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.19...v1.2.20) (2024-05-12)
+
+
+### ✏️ Documentation | 文档
+
+* ✏️ 调整捐赠榜单和友情链接的数据到cloudflare上 ([1314373](https://github.com/Moonofweisheng/wot-design-uni/commit/1314373af1dff95aee4cd3cddefebcb3a6a5c5d2))
+* ✏️ 推荐文档地址调整至cloudflare ([9119f30](https://github.com/Moonofweisheng/wot-design-uni/commit/9119f30b23676ad1b9a3869e362a3840ba288dc3))
+* ✏️ Curtain组件width属性标记为number类型 ([d172ce7](https://github.com/Moonofweisheng/wot-design-uni/commit/d172ce7ffcfebf29b184b57a7f74a25acad1f967)), closes [#303](https://github.com/Moonofweisheng/wot-design-uni/issues/303)
+
+
+### ✨ Features | 新功能
+
+* Segmented组件添加click事件 ([#301](https://github.com/Moonofweisheng/wot-design-uni/issues/301)) ([225ce22](https://github.com/Moonofweisheng/wot-design-uni/commit/225ce225ac7faedffd4686b908076c47ba111695))
+
+
+### 🐛 Bug Fixes | Bug 修复
+
+* 🐛 修复MessageBox中使用TextArea字数统计样式错误的问题 ([b186ac0](https://github.com/Moonofweisheng/wot-design-uni/commit/b186ac09294a4fede16c514cd96ff94f661fcbc9)), closes [#290](https://github.com/Moonofweisheng/wot-design-uni/issues/290)
+* 🐛 修复PickerView可以滚动到禁用选项的问题 ([edd44ed](https://github.com/Moonofweisheng/wot-design-uni/commit/edd44eda3fc9879dc980b02d1885d77530a3d2e8)), closes [#302](https://github.com/Moonofweisheng/wot-design-uni/issues/302)
+* 🐛 修复Popover指定placement后箭头显示异常的问题([#306](https://github.com/Moonofweisheng/wot-design-uni/issues/306)) ([a9b108d](https://github.com/Moonofweisheng/wot-design-uni/commit/a9b108d231a8e537aab4ba49781590bcafb9354d))
+* 🐛 修复release脚本处理最低版本号问题 ([c8077c9](https://github.com/Moonofweisheng/wot-design-uni/commit/c8077c9f3790e7844c902528d43596c4bc4025af))
+* 🐛 修复Sticky组件获取节点错误的问题 ([5483ea6](https://github.com/Moonofweisheng/wot-design-uni/commit/5483ea6c447f85229af66b950e34c1dc690fadb1))
+* 修复wd-calendar未抛出事件 ([c1203c9](https://github.com/Moonofweisheng/wot-design-uni/commit/c1203c91841c3d5bcd407923a577711e462207a3))
+
### [1.2.19](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.18...v1.2.19) (2024-05-01)
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss b/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss
index 9a84e7d..9ce3ad0 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss
+++ b/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss
@@ -286,6 +286,7 @@
height: $size;
background-color: $bg;
position: absolute;
+ left: 0;
bottom: calc(-1 * $size / 2);
transform: rotateZ(45deg);
box-shadow: $box-shadow;
@@ -293,12 +294,14 @@
}
@include e(arrow-up) {
transform: translateX(-50%);
+ top: 0;
&:after {
content: "";
width: $size;
height: $size;
background-color: $bg;
position: absolute;
+ left: 0;
top: calc(-1 * $size / 2);
transform: rotateZ(45deg);
box-shadow: $box-shadow;
@@ -306,6 +309,7 @@
}
@include e(arrow-left) {
transform: translateY(-50%);
+ left: 0;
&:after {
content: "";
width: $size;
@@ -313,12 +317,15 @@
background-color: $bg;
position: absolute;
left: calc(-1 * $size / 2);
+ top: 0;
transform: rotateZ(45deg);
box-shadow: $box-shadow;
}
}
@include e(arrow-right) {
transform: translateY(-50%);
+ right: 0;
+
&:after {
content: "";
width: $size;
@@ -326,6 +333,7 @@
background-color: $bg;
position: absolute;
right: calc(-1 * $size / 2);
+ top: 0;
transform: rotateZ(45deg);
box-shadow: $box-shadow;
}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/variable.scss b/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/variable.scss
index 1b01b4c..71d2e77 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/variable.scss
+++ b/x_admin_app/uni_modules/wot-design-uni/components/common/abstracts/variable.scss
@@ -869,3 +869,9 @@ $-password-input-cursor-duration: var(--wd-password-input-cursor-duration, 1s);
$-form-item-error-message-color: var(--wot-form-item-error-message-color, $-color-danger) !default;
$-form-item-error-message-font-size: var(--wot-form-item-error-message-font-size, $-fs-secondary) !default;
$-form-item-error-message-line-height: var(--wot-form-item-error-message-line-height, 24px) !default;
+
+/* backtop */
+$-backtop-bg: var(--wot-backtop-bg, #e1e1e1) !default;
+
+/* index-bar */
+$-index-bar-index-font-size: var(--wot-index-bar-index-font-size, $-fs-aid) !default;
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/common/canvasHelper.ts b/x_admin_app/uni_modules/wot-design-uni/components/common/canvasHelper.ts
new file mode 100644
index 0000000..ee17e14
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/common/canvasHelper.ts
@@ -0,0 +1,49 @@
+/**
+ * 适配 canvas 2d 上下文
+ * @param ctx canvas 2d 上下文
+ * @returns
+ */
+export function canvas2dAdapter(ctx: CanvasRenderingContext2D): UniApp.CanvasContext {
+ return Object.assign(ctx, {
+ setFillStyle(color: string | CanvasGradient) {
+ ctx.fillStyle = color
+ },
+ setStrokeStyle(color: string | CanvasGradient | CanvasPattern) {
+ ctx.strokeStyle = color
+ },
+ setLineWidth(lineWidth: number) {
+ ctx.lineWidth = lineWidth
+ },
+ setLineCap(lineCap: 'butt' | 'round' | 'square') {
+ ctx.lineCap = lineCap
+ },
+
+ setFontSize(font: string) {
+ ctx.font = font
+ },
+ setGlobalAlpha(alpha: number) {
+ ctx.globalAlpha = alpha
+ },
+ setLineJoin(lineJoin: 'bevel' | 'round' | 'miter') {
+ ctx.lineJoin = lineJoin
+ },
+ setTextAlign(align: 'left' | 'center' | 'right') {
+ ctx.textAlign = align
+ },
+ setMiterLimit(miterLimit: number) {
+ ctx.miterLimit = miterLimit
+ },
+ setShadow(offsetX: number, offsetY: number, blur: number, color: string) {
+ ctx.shadowOffsetX = offsetX
+ ctx.shadowOffsetY = offsetY
+ ctx.shadowBlur = blur
+ ctx.shadowColor = color
+ },
+ setTextBaseline(textBaseline: 'top' | 'bottom' | 'middle') {
+ ctx.textBaseline = textBaseline
+ },
+ createCircularGradient() {},
+ draw() {},
+ addColorStop() {}
+ }) as unknown as UniApp.CanvasContext
+}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/index.scss b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/index.scss
new file mode 100644
index 0000000..774cc75
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/index.scss
@@ -0,0 +1,21 @@
+@import '../common/abstracts/variable';
+@import '../common/abstracts/mixin';
+
+@include b(backtop) {
+ position: fixed;
+ background-color: $-backtop-bg;
+ width: 40px;
+ height: 40px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: $-color-gray-8;
+
+ @include when(circle) {
+ border-radius: 50%;
+ }
+
+ @include when(square) {
+ border-radius: 4px;
+ }
+}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/types.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/types.ts
new file mode 100644
index 0000000..209c67a
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/types.ts
@@ -0,0 +1,37 @@
+import { baseProps, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props'
+
+export const backtopProps = {
+ ...baseProps,
+ /**
+ * 页面滚动距离
+ */
+ scrollTop: makeRequiredProp(Number),
+ /**
+ * 距离顶部多少距离时显示
+ */
+ top: makeNumberProp(300),
+ /**
+ * 返回顶部滚动时间
+ */
+ duration: makeNumberProp(100),
+ /**
+ * 层级
+ */
+ zIndex: makeNumberProp(10),
+ /**
+ * icon样式
+ */
+ iconStyle: makeStringProp(''),
+ /**
+ * 形状
+ */
+ shape: makeStringProp('circle'),
+ /**
+ * 距离屏幕底部距离
+ */
+ bottom: makeNumberProp(100),
+ /**
+ * 距离屏幕右边距离
+ */
+ right: makeNumberProp(20)
+}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue
new file mode 100644
index 0000000..4378abd
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-button/index.scss b/x_admin_app/uni_modules/wot-design-uni/components/wd-button/index.scss
index 017d164..02e4d58 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-button/index.scss
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-button/index.scss
@@ -52,7 +52,7 @@
box-sizing: border-box;
border: none;
color: $-button-normal-color;
- transition: all 0.2s;
+ transition: opacity 0.2s;
user-select: none;
font-weight: normal;
@@ -224,14 +224,7 @@
@include when(round) {
border-radius: 999px;
-
- &::after {
- border-radius: 999px;
- }
-
- &::before {
- border-radius: 999px;
- }
+ overflow: hidden;
}
@include when(text) {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/types.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/types.ts
index 9ffd1d7..bf09b10 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/types.ts
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/types.ts
@@ -200,3 +200,10 @@ export type CalendarOnShortcutsClickOption = {
}
export type CalendarOnShortcutsClick = (option: CalendarOnShortcutsClickOption) => number | number[]
+
+export type CalendarExpose = {
+ /** 关闭时间选择器弹窗 */
+ close: () => void
+ /** 打开时间选择器弹窗 */
+ open: () => void
+}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue
index fbfa3e0..9b3bf37 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue
@@ -123,7 +123,7 @@ import { useCell } from '../composables/useCell'
import { FORM_KEY, type FormItemRule } from '../wd-form/types'
import { useParent } from '../composables/useParent'
import { useTranslate } from '../composables/useTranslate'
-import { calendarProps } from './types'
+import { calendarProps, type CalendarExpose } from './types'
import type { CalendarType } from '../wd-calendar-view/types'
const { translate } = useTranslate('calendar')
@@ -409,6 +409,11 @@ function handleShortcutClick(index: number) {
handleConfirm()
}
}
+
+defineExpose({
+ close,
+ open
+})
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/index.scss b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/index.scss
new file mode 100644
index 0000000..a0cf250
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/index.scss
@@ -0,0 +1,39 @@
+@import "./../common/abstracts/_mixin.scss";
+@import "./../common/abstracts/variable.scss";
+
+.wot-theme-dark {
+ @include b(index-bar) {
+ @include e(index) {
+ color: $-color-white;
+ }
+ }
+}
+
+@include b(index-bar) {
+ position: relative;
+ width: 100%;
+ height: 100%;
+
+ @include e(content) {
+ width: 100%;
+ height: 100%;
+ }
+
+ @include e(sidebar) {
+ position: absolute;
+ top: 50%;
+ right: 4px;
+ transform: translateY(-50%);
+ }
+
+ @include e(index) {
+ font-size: 12px;
+ font-weight: $-fw-medium;
+ color: $-color-title;
+ padding: 4px 6px;
+
+ @include when(active) {
+ color: $-color-theme;
+ }
+ }
+}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/type.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/type.ts
new file mode 100644
index 0000000..c75f2f1
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/type.ts
@@ -0,0 +1,30 @@
+import type { Ref } from 'vue'
+import type { InjectionKey } from 'vue'
+import type { ExtractPropTypes } from 'vue'
+import { makeBooleanProp } from '../common/props'
+
+export type AnchorIndex = number | string
+
+export interface AnchorItem {
+ top: number
+ index: AnchorIndex
+}
+
+export const indexBarProps = {
+ /**
+ * @description 索引是否吸顶
+ */
+ sticky: makeBooleanProp(false)
+}
+
+export type IndexBarProps = ExtractPropTypes
+
+export type InderBarProvide = {
+ props: { sticky?: boolean }
+ anchorState: {
+ anchorList: AnchorItem[] // 锚点列表
+ activeIndex: AnchorIndex | null // 当前激活的索引
+ }
+}
+
+export const indexBarInjectionKey: InjectionKey = Symbol('wd-index-bar')
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue
new file mode 100644
index 0000000..75de549
--- /dev/null
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-input/types.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-input/types.ts
index 122acb1..e7b19ca 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-input/types.ts
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-input/types.ts
@@ -61,7 +61,12 @@ export const inputProps = {
/**
* 原生属性,最大长度
*/
- maxlength: makeNumberProp(-1),
+ maxlength: {
+ type: Number,
+ // #ifndef MP-ALIPAY
+ default: -1
+ // #endif
+ },
/**
* 原生属性,禁用
*/
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-input/wd-input.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
index 8618157..98d111d 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
@@ -57,7 +57,7 @@
{{ String(inputValue).length }}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/types.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/types.ts
index bb7986b..f4c2b83 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/types.ts
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/types.ts
@@ -1,7 +1,7 @@
/*
* @Author: weisheng
* @Date: 2024-03-15 20:40:34
- * @LastEditTime: 2024-03-18 14:59:32
+ * @LastEditTime: 2024-05-27 18:49:28
* @LastEditors: weisheng
* @Description:
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-loading\types.ts
@@ -10,13 +10,12 @@
import type { ExtractPropTypes } from 'vue'
import { baseProps, makeNumericProp, makeStringProp } from '../common/props'
-// 'circle-outline' | 'circle-ring' 废弃
-export type LoadingType = 'outline' | 'ring' | 'circle-outline' | 'circle-ring' // 提示信息加载状态类型
+export type LoadingType = 'outline' | 'ring' // 提示信息加载状态类型
export const loadingProps = {
...baseProps,
/**
- * 加载指示器类型,可选值:'outline' | 'ring' | 'circle-outline' | 'circle-ring'
+ * 加载指示器类型,可选值:'outline' | 'ring'
*/
type: makeStringProp('ring'),
/**
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
index f8b01c3..14430b1 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
@@ -1,10 +1,10 @@
-
+
-
+
@@ -23,7 +23,7 @@ export default {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/index.scss b/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/index.scss
index 46ba651..5a188c9 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/index.scss
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/index.scss
@@ -60,7 +60,6 @@
font-size: $-message-box-content-fs;
text-align: center;
overflow: auto;
- word-break: break-all;
line-height: 20px;
&::-webkit-scrollbar {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue
index c3147da..ff00549 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue
@@ -11,29 +11,20 @@
:duration="200"
>
-
-
{{ title }}
-
-
-
-
{{ inputError || translate('inputNoValidate') }}
-
{{ msg }}
-
-
{{ cancelButtonText || translate('cancel') }}
@@ -183,15 +174,13 @@ watch(
)
/**
- * @description 关闭消息框的统一主调 handle
- * @param {'cancel' | 'confirm'} action
+ * 点击操作
+ * @param action
*/
function toggleModal(action: 'confirm' | 'cancel' | 'modal') {
- // closeOnClickModal为false,此时点击蒙层没任何效果
if (action === 'modal' && !closeOnClickModal.value) {
return
}
- // prompt类型的弹窗 文案没有通过校验,点击了确定按钮没有任何效果
if (type.value === 'prompt' && action === 'confirm' && !validate()) {
return
}
@@ -228,6 +217,10 @@ function toggleModal(action: 'confirm' | 'cancel' | 'modal') {
}
}
+/**
+ * 确认回调
+ * @param result
+ */
function handleConfirm(result: MessageResult) {
show.value = false
if (isFunction(onConfirm)) {
@@ -235,6 +228,10 @@ function handleConfirm(result: MessageResult) {
}
}
+/**
+ * 取消回调
+ * @param result
+ */
function handleCancel(result: MessageResult) {
show.value = false
if (isFunction(onCancel)) {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue
index 4577b29..7e0b645 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue
@@ -5,19 +5,22 @@
+
-
-
-
- {{ leftText }}
-
+
+ {{ leftText }}
+
+
+
+
+
{{ title }}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss b/x_admin_app/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss
index a50ce42..09a903a 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss
@@ -14,6 +14,7 @@
@include b(number-keyboard) {
width: 100%;
background: $-number-keyboard-background;
+ color: $-color-black;
user-select: none;
@include m(with-title) {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue
index 68e662d..20ad757 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue
@@ -174,6 +174,9 @@ function selectWithIndex(columnIndex: number, rowIndex: number) {
throw Error(`The value to select with Col:${columnIndex} Row:${rowIndex} is correct`)
}
const select: number[] = deepClone(selectedIndex.value)
+ select[columnIndex] = rowIndex
+ selectedIndex.value = deepClone(select)
+
// 被禁用的无法选中,选中距离它最近的未被禁用的
if (col[rowIndex].disabled) {
// 寻找值为0或最最近的未被禁用的节点的索引
@@ -189,10 +192,10 @@ function selectWithIndex(columnIndex: number, rowIndex: number) {
} else if (select[columnIndex] === undefined) {
select[columnIndex] = 0
}
- } else {
- select[columnIndex] = rowIndex
+ nextTick(() => {
+ selectedIndex.value = deepClone(select)
+ })
}
- selectedIndex.value = deepClone(select)
return selectedIndex.value
}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue
index ff14fa6..3003efd 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue
@@ -89,7 +89,7 @@ export default {
import { getCurrentInstance, onBeforeMount, ref, watch, computed, onMounted, nextTick } from 'vue'
import { deepClone, defaultDisplayFormat, getType, isArray, isDef, isFunction } from '../common/util'
import { useCell } from '../composables/useCell'
-import { type ColumnItem, formatArray } from '../wd-picker-view/types'
+import { type ColumnItem, formatArray, type PickerViewInstance } from '../wd-picker-view/types'
import { FORM_KEY, type FormItemRule } from '../wd-form/types'
import { useParent } from '../composables/useParent'
import { useTranslate } from '../composables/useTranslate'
@@ -99,7 +99,7 @@ const { translate } = useTranslate('picker')
const props = defineProps(pickerProps)
const emit = defineEmits(['confirm', 'open', 'cancel', 'update:modelValue'])
-const pickerViewWd = ref(null)
+const pickerViewWd = ref(null)
const cell = useCell()
const innerLoading = ref(false) // 内部控制是否loading
@@ -124,12 +124,8 @@ watch(
if (fn && !isFunction(fn)) {
console.error('The type of displayFormat must be Function')
}
- if (pickerViewWd.value && pickerViewWd.value.selectedIndex && pickerViewWd.value.selectedIndex.length !== 0) {
- if (isDef(props.modelValue) && props.modelValue !== '') {
- setShowValue(pickerViewWd.value.getSelects())
- } else {
- showValue.value = ''
- }
+ if (pickerViewWd.value && pickerViewWd.value.getSelectedIndex().length !== 0) {
+ handleShowValueUpdate(props.modelValue)
}
},
{
@@ -143,17 +139,7 @@ watch(
(newValue) => {
pickerValue.value = newValue
// 获取初始选中项,并展示初始选中文案
- if (isDef(newValue) && newValue !== '') {
- if (pickerViewWd.value && pickerViewWd.value.getSelects) {
- nextTick(() => {
- setShowValue(pickerViewWd.value!.getSelects())
- })
- } else {
- setShowValue(getSelects(newValue)!)
- }
- } else {
- showValue.value = ''
- }
+ handleShowValueUpdate(newValue)
},
{
deep: true,
@@ -167,17 +153,7 @@ watch(
displayColumns.value = newValue
resetColumns.value = newValue
// 获取初始选中项,并展示初始选中文案
- if (isDef(props.modelValue) && props.modelValue !== '') {
- if (pickerViewWd.value && pickerViewWd.value.getSelects) {
- nextTick(() => {
- setShowValue(pickerViewWd.value!.getSelects())
- })
- } else {
- setShowValue(getSelects(props.modelValue)!)
- }
- } else {
- showValue.value = ''
- }
+ handleShowValueUpdate(props.modelValue)
},
{
deep: true,
@@ -226,10 +202,7 @@ const isRequired = computed(() => {
const { proxy } = getCurrentInstance() as any
onMounted(() => {
- isDef(props.modelValue) && props.modelValue !== '' && setShowValue(getSelects(props.modelValue)!)
- if (isDef(props.modelValue) && props.modelValue !== '' && pickerViewWd.value && pickerViewWd.value.getSelects) {
- setShowValue(pickerViewWd.value!.getSelects())
- }
+ handleShowValueUpdate(props.modelValue)
})
onBeforeMount(() => {
@@ -237,6 +210,25 @@ onBeforeMount(() => {
resetColumns.value = deepClone(props.columns)
})
+/**
+ * 值变更时更新显示内容
+ * @param value
+ */
+function handleShowValueUpdate(value: string | number | Array) {
+ // 获取初始选中项,并展示初始选中文案
+ if ((isArray(value) && value.length > 0) || (isDef(value) && !isArray(value) && value !== '')) {
+ if (pickerViewWd.value) {
+ nextTick(() => {
+ setShowValue(pickerViewWd.value!.getSelects())
+ })
+ } else {
+ setShowValue(getSelects(value)!)
+ }
+ } else {
+ showValue.value = ''
+ }
+}
+
/**
* @description 根据传入的value,picker组件获取当前cell展示值。
* @param {String|Number|Array>}value
@@ -344,6 +336,7 @@ function handleConfirm() {
popupShow.value = false
resetColumns.value = deepClone(columns)
emit('update:modelValue', values)
+
setShowValue(selects)
emit('confirm', {
value: values,
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue
index 9b94b0a..332699b 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue
@@ -88,6 +88,13 @@ watch(
}
)
+watch(
+ () => props.placement,
+ () => {
+ popover.init(props.placement, props.visibleArrow, selector)
+ }
+)
+
watch(
() => props.modelValue,
(newValue) => {
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue
index 4a6a1d5..8a3ad9d 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue
@@ -38,7 +38,7 @@ import { segmentedProps, type SegmentedInfo, type SegmentedOption } from './type
const $item = '.wd-segmented__item'
const props = defineProps(segmentedProps)
-const emit = defineEmits(['update:value', 'change'])
+const emit = defineEmits(['update:value', 'change', 'click'])
const sectionItemInfo = reactive({
width: 0,
@@ -130,6 +130,7 @@ function handleClick(option: string | number | SegmentedOption, index: number) {
updateActiveStyle()
emit('update:value', value)
emit('change', isObj(option) ? option : { value })
+ emit('click', isObj(option) ? option : { value })
}
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/types.ts b/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/types.ts
index 5bc5c1f..d9d6f0b 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/types.ts
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/types.ts
@@ -1,4 +1,4 @@
-import type { PropType, CSSProperties, ExtractPropTypes } from 'vue'
+import type { PropType, ExtractPropTypes, CSSProperties } from 'vue'
import { makeArrayProp, makeBooleanProp, makeStringProp } from '../common/props'
type SkeletonTheme = 'text' | 'avatar' | 'paragraph' | 'image'
@@ -16,7 +16,7 @@ export type SkeletonRowColObj = {
borderRadius?: string | number
backgroundColor?: string
}
-export type SkeletonRowCol = Array>
+export type SkeletonRowCol = number | SkeletonRowColObj | Array
export type SkeletonThemeVars = {
notifyPadding?: string
notifyFontSize?: string
diff --git a/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue b/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue
index 168d5ca..68ec6cc 100644
--- a/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue
+++ b/x_admin_app/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue
@@ -9,11 +9,14 @@
-->
-
+
+
+
+