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 @@