diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0edd6560..a4726ae8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -658,7 +658,7 @@
### ✨ Features | 新功能
* ✨ 新增 Table 表格组件 ([#98](https://github.com/Moonofweisheng/wot-design-uni/issues/98)) ([c8395f8](https://github.com/Moonofweisheng/wot-design-uni/commit/c8395f8a7e1ad041b003672081b715a7c755adc1))
-* ✨ Collpase 折叠面板组件增加分割线 ([adc6633](https://github.com/Moonofweisheng/wot-design-uni/commit/adc6633ad80b74e801a48a50917c9a2d378de9e0)), closes [#97](https://github.com/Moonofweisheng/wot-design-uni/issues/97)
+* ✨ Collapse 折叠面板组件增加分割线 ([adc6633](https://github.com/Moonofweisheng/wot-design-uni/commit/adc6633ad80b74e801a48a50917c9a2d378de9e0)), closes [#97](https://github.com/Moonofweisheng/wot-design-uni/issues/97)
### [0.1.38](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.37...v0.1.38) (2023-10-25)
diff --git a/build/buildThemeVars.js b/build/buildThemeVars.js
index 7f45f23e..ea2f6603 100644
--- a/build/buildThemeVars.js
+++ b/build/buildThemeVars.js
@@ -69,7 +69,7 @@ const generateTSFileContent = (variables) => {
return tsContent
}
-const tsFilePath = path.resolve(__dirname, '../src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts')
+const tsFilePath = path.resolve(__dirname, '../src/uni_modules/wot-design-uni/components/wd-config-provider/type.ts')
const scssFilePath = path.resolve(__dirname, '../src/uni_modules/wot-design-uni/components/common/abstracts/test.scss')
const variables = extractSCSSVariables(scssFilePath)
diff --git a/docs/component/calendar.md b/docs/component/calendar.md
index 80c127b7..29dde050 100644
--- a/docs/component/calendar.md
+++ b/docs/component/calendar.md
@@ -393,7 +393,6 @@ function handleConfirm4({ value }) {
| before-confirm | 确定前校验函数,接收 { value, resolve } 参数,通过 resolve 继续执行,resolve 接收 1 个 boolean 参数 | function | - | - | - |
| use-default-slot | 使用默认插槽时设置该选项 | boolean | - | false | - |
| use-label-slot | 使用 label 插槽时设置该选项 | boolean | - | false | - |
-| name | form 表单中的字段名 | string | - | - | - |
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - |
| z-index | 弹窗层级 | number | - | 15 | - |
| safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - |
diff --git a/docs/component/checkbox.md b/docs/component/checkbox.md
index 71040bbd..bb26d0a9 100644
--- a/docs/component/checkbox.md
+++ b/docs/component/checkbox.md
@@ -171,7 +171,6 @@ const value = ref(['jd'])
| true-value | 选中值,在 checkbox-group 中使用无效,需同 false-value 一块使用 | string / number | - | true | - |
| false-value | 非选中时的值,在 checkbox-group 中使用无效,需同 true-value 一块使用 | string /number | - | false | - |
| size | 设置大小 | string | large | - | - |
-| name | form 表单中的字段名 | string | - | - | - |
## CheckboxGroup Attributes
@@ -186,7 +185,6 @@ const value = ref(['jd'])
| max | 最大选中的数量,0 为无限数量,默认为 0 | number | - | 0 | - |
| inline | 同行展示 | boolean | - | false | - |
| size | 设置大小 | string | large | - | - |
-| name | form 表单中的字段名 | string | - | - | - |
## Checkbox Methods
diff --git a/docs/component/col-picker.md b/docs/component/col-picker.md
index 7814f5eb..1509c00f 100644
--- a/docs/component/col-picker.md
+++ b/docs/component/col-picker.md
@@ -519,7 +519,6 @@ const columnChange = ({ selectedItem, resolve, finish }) => {
| loading-color | loading 图标的颜色 | string | - | #4D80F0 | - |
| use-default-slot | 使用默认插槽时设置该选项 | boolean | - | false | - |
| use-label-slot | 使用 label 插槽时设置该选项 | boolean | - | false | - |
-| name | form 表单中的字段名 | string | - | - | - |
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - |
| auto-complete | 自动触发 column-change 事件来补全数据,当 columns 为空数组或者 columns 数组长度小于 value 数组长度时,会自动触发 column-change | - | false | - |
| z-index | 弹窗层级 | number | - | 15 | - |
diff --git a/docs/component/config-provider.md b/docs/component/config-provider.md
index 9ab1c4da..f170fbab 100644
--- a/docs/component/config-provider.md
+++ b/docs/component/config-provider.md
@@ -127,5 +127,5 @@ const themeVars: ConfigProviderThemeVars = {
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 |
| ---------- | ------------------------------------------------ | ------ | -------------- | ------ | -------- |
| theme | 主题风格,设置为 `dark` 来开启深色模式,全局生效 | string | `dark`/`light` | - | - |
-| theme-vars | 自定义主题变量 | object | - | - | - |
+| theme-vars | 自定义主题变量 | `ConfigProviderThemeVars` | - | - | - |
diff --git a/docs/component/count-down.md b/docs/component/count-down.md
index 9852a441..f6ef075c 100644
--- a/docs/component/count-down.md
+++ b/docs/component/count-down.md
@@ -125,6 +125,15 @@ const onFinish = () => showToast('倒计时结束')
| finish | 倒计时结束时触发 | — | 0.1.58 |
| change | 倒计时变化时触发 | current: TimeData | 0.1.58 |
+
+
+## Methods
+| 方法名 | 说明 | 参数 | 最低版本 |
+| -------- | ---------------- | --------------------- | -------- |
+| start | 开始倒计时 | — | 0.1.58 |
+| pause | 暂停倒计时 | — | 0.1.58 |
+| reset | 重置倒计时,若 `auto-start` 为 `true`,重设后会自动开始倒计时 | — | 0.1.58 |
+
## Slots
| 名称 | 说明 | 最低版本 |
diff --git a/docs/component/datetime-picker.md b/docs/component/datetime-picker.md
index 8e2b9b76..d720e0d0 100644
--- a/docs/component/datetime-picker.md
+++ b/docs/component/datetime-picker.md
@@ -279,7 +279,6 @@ const displayFormatTabLabel = (items) => {
| use-label-slot | label 使用插槽 | boolean | - | false | - |
| use-default-slot | 使用默认插槽 | boolean | - | false | - |
| before-confirm | 确定前校验函数,接收 (value, resolve, picker) 参数,通过 resolve 继续执行 picker,resolve 接收1个boolean参数 | function | - | - | - |
-| name | form 表单中的字段名 | string | - | - | - |
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - |
| z-index | 弹窗层级 | number | - | 15 | - |
| safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - |
diff --git a/docs/component/gap.md b/docs/component/gap.md
index 7312d461..6a3211f2 100644
--- a/docs/component/gap.md
+++ b/docs/component/gap.md
@@ -40,7 +40,7 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 |
|-----------------|---------|---------|------------|-------------| -------- |
| height | 高度 | `string`/`number` | - | 15 | - |
-| background | 背景颜色 | string | | transparent | - |
+| bgColor | 背景颜色 | string | | transparent | - |
| safeAreaBbottom | 底部安全区 | boolean | true/false | false | - |
## 外部样式类
diff --git a/docs/component/img-cropper.md b/docs/component/img-cropper.md
index 4a58a51d..661c32d5 100644
--- a/docs/component/img-cropper.md
+++ b/docs/component/img-cropper.md
@@ -65,7 +65,7 @@ function handleCancel(event) {
| 参数 | 说明 | 类型 | 可选值 | 默认值| 最低版本 |
|-----|------|-----|-------|-------|--------|
-| show | 打开图片裁剪组件 | boolean | - | false | - |
+| v-model | 打开图片裁剪组件 | boolean | - | false | - |
| img-src | 图片资源链接 | string | - | - | - |
| img-width | 截屏预览图片的初始宽度; `1、设置宽度不设置高度,按照宽度等比缩放;2、如果都不设置,预览时图片大小会根据裁剪框大小进行等比缩放,进行锁边处理;`; string 类型只支持 % 单位,number 类型时单位为 px | number / string | - | - | - |
| img-height | 截屏预览图片的初始高度; `1、设置高度不设置宽度,按照高度等比缩放;2、如果都不设置,预览时图片大小会根据裁剪框大小进行等比缩放,进行锁边处理;`; string 类型只支持 % 单位,number 类型时单位为 px | number / string | - | - | - |
diff --git a/docs/component/input-number.md b/docs/component/input-number.md
index 5b0cfdd9..b33d015e 100644
--- a/docs/component/input-number.md
+++ b/docs/component/input-number.md
@@ -111,7 +111,6 @@ function handleChange1({ value }) {
| disabled | 禁用 | boolean | - | false | - |
| without-input | 不显示输入框 | boolean | - | false | - |
| input-width | 输入框宽度 | string | - | 36px | - |
-| name | form 表单中的字段名 | string | - | - | - |
| allow-null | 允许空值 | boolean | - | false | - |
| placeholder | 占位文本 | string | - | - | - |
| disable-input | 禁用输入框 | boolean | - | false | 0.2.14 |
diff --git a/docs/component/picker-view.md b/docs/component/picker-view.md
index ebd39f21..2e14c4a4 100644
--- a/docs/component/picker-view.md
+++ b/docs/component/picker-view.md
@@ -114,7 +114,6 @@ const onChangeDistrict = (pickerView, value, columnIndex, resolve) => {
| value-key | 选项对象中,value对应的 key | string | - | value | - |
| label-key | 选项对象中,展示的文本对应的 key | string | - | label | - |
| column-change | 接收 pickerView 实例、选中项、当前修改列的下标、resolve 作为入参,根据选中项和列下标进行判断,通过 pickerView 实例暴露出来的 `setColumnData` 方法修改其他列的数据源。 | function | - | - | - |
-| name | form 表单中的字段名 | string | - | - | - |
## Methods
diff --git a/docs/component/picker.md b/docs/component/picker.md
index 2a57bce9..da727d61 100644
--- a/docs/component/picker.md
+++ b/docs/component/picker.md
@@ -256,7 +256,6 @@ function handleConfirm({ value }) {
| use-label-slot | label 使用插槽 | boolean | - | false | - |
| use-default-slot | 使用默认插槽 | boolean | - | false | - |
| before-confirm | 确定前校验函数,接收 (value, resolve, picker) 参数,通过 resolve 继续执行 picker,resolve 接收1个boolean参数 | function | - | - | - |
-| name | form 表单中的字段名 | string | - | - | - |
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - |
| z-index | 弹窗层级 | number | - | 15 | - |
| safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - |
diff --git a/docs/component/radio.md b/docs/component/radio.md
index 2cbbc6aa..76fe08b0 100644
--- a/docs/component/radio.md
+++ b/docs/component/radio.md
@@ -146,7 +146,6 @@ radio设置的props优先级比radioGroup上设置的props优先级更高
| max-width | 文字位置最大宽度 | string | - | - | - |
| inline | 同行展示 | boolean | - | false | - |
| cell | 表单模式 | boolean | - | false | - |
-| name | form 表单中的字段名 | string | - | - | - |
## RadioGroup Events
diff --git a/docs/component/rate.md b/docs/component/rate.md
index 72db740d..6c6ba460 100644
--- a/docs/component/rate.md
+++ b/docs/component/rate.md
@@ -1,12 +1,3 @@
-
# Rate 评分
@@ -85,7 +76,6 @@ function changeValue({ value }) {
| active-icon | 选中的图标类名 | string | - | wd-icon-star-on | - |
| disabled | 是否禁用 | boolean | - | false | - |
| disabled-color | 禁用的图标颜色 | string | - | linear-gradient(315deg, rgba(177,177,177,1) 0%,rgba(199,199,199,1) 100%) | - |
-| name | form 表单中的字段名 | string | - | - | - |
## Events
diff --git a/docs/component/search.md b/docs/component/search.md
index ea53b3b8..fca33127 100644
--- a/docs/component/search.md
+++ b/docs/component/search.md
@@ -169,7 +169,6 @@ function changeSearchType({ item, index }) {
| use-suffix-slot | 是否使用输入框右侧插槽 | boolean | - | false | - |
| focus | 是否自动聚焦 | boolean | - | false | 0.1.63 |
| focusWhenClear | 是否在点击清除按钮时聚焦输入框 | boolean | - | false | 0.1.63 |
-| name | form 表单中的字段名 | string | - | - | - |
## Events
diff --git a/docs/component/select-picker.md b/docs/component/select-picker.md
index d3db6078..6376b32c 100644
--- a/docs/component/select-picker.md
+++ b/docs/component/select-picker.md
@@ -334,7 +334,6 @@ function handleConfirm({ value, selectedItems }) {
| checked-color | 选中的颜色(单/复选框) | string | - | #4D80F0 | - |
| use-default-slot | 使用默认插槽时设置该选项 | boolean | - | false | - |
| use-label-slot | 使用 label 插槽时设置该选项 | boolean | - | false | - |
-| name | form 表单中的字段名 | string | - | - | - |
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - |
| z-index | 弹窗层级 | number | - | 15 | - |
| safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - |
diff --git a/docs/component/switch.md b/docs/component/switch.md
index c3290dc9..7a7b0a74 100644
--- a/docs/component/switch.md
+++ b/docs/component/switch.md
@@ -79,7 +79,6 @@ const beforeChange = ({ value, resolve }) => {
| active-color | 打开时的背景色 | string | - | #4D80F0 | - |
| inactive-color | 关闭时的背景色,默认为白色,所以有灰色边框,如果设置了该值,则会自动去除灰色边框 | string | - | #fff | - |
| size | 开关大小,可以为任何单位的字符串尺寸 | string/number | - | 28px | - |
-| name | form 表单中的字段名 | string | - | - | - |
| before-change | 修改前钩子 | function | - | - | - |
## Events
diff --git a/docs/guide/changelog.md b/docs/guide/changelog.md
index 0edd6560..a4726ae8 100644
--- a/docs/guide/changelog.md
+++ b/docs/guide/changelog.md
@@ -658,7 +658,7 @@
### ✨ Features | 新功能
* ✨ 新增 Table 表格组件 ([#98](https://github.com/Moonofweisheng/wot-design-uni/issues/98)) ([c8395f8](https://github.com/Moonofweisheng/wot-design-uni/commit/c8395f8a7e1ad041b003672081b715a7c755adc1))
-* ✨ Collpase 折叠面板组件增加分割线 ([adc6633](https://github.com/Moonofweisheng/wot-design-uni/commit/adc6633ad80b74e801a48a50917c9a2d378de9e0)), closes [#97](https://github.com/Moonofweisheng/wot-design-uni/issues/97)
+* ✨ Collapse 折叠面板组件增加分割线 ([adc6633](https://github.com/Moonofweisheng/wot-design-uni/commit/adc6633ad80b74e801a48a50917c9a2d378de9e0)), closes [#97](https://github.com/Moonofweisheng/wot-design-uni/issues/97)
### [0.1.38](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.37...v0.1.38) (2023-10-25)
diff --git a/package.json b/package.json
index 6ce0de89..20b14c40 100644
--- a/package.json
+++ b/package.json
@@ -113,7 +113,7 @@
"vite": "4.0.3",
"vitest": "^0.30.1",
"vue-eslint-parser": "^9.1.0",
- "vue-tsc": "^1.0.24"
+ "vue-tsc": "^2.0.6"
},
"config": {
"commitizen": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c44c5566..19deb5aa 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -170,8 +170,8 @@ devDependencies:
specifier: ^9.1.0
version: 9.1.0(eslint@8.36.0)
vue-tsc:
- specifier: ^1.0.24
- version: 1.2.0(typescript@5.3.3)
+ specifier: ^2.0.6
+ version: 2.0.6(typescript@5.3.3)
packages:
@@ -574,6 +574,14 @@ packages:
dependencies:
'@babel/types': 7.22.10
+ /@babel/parser@7.24.0:
+ resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+ dependencies:
+ '@babel/types': 7.22.10
+ dev: true
+
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.10):
resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==}
engines: {node: '>=6.9.0'}
@@ -4071,44 +4079,23 @@ packages:
pretty-format: 27.5.1
dev: true
- /@volar/language-core@1.3.0-alpha.0:
- resolution: {integrity: sha512-W3uMzecHPcbwddPu4SJpUcPakRBK/y/BP+U0U6NiPpUX1tONLC4yCawt+QBJqtgJ+sfD6ztf5PyvPL3hQRqfOA==}
+ /@volar/language-core@2.1.2:
+ resolution: {integrity: sha512-5qsDp0Gf6fE09UWCeK7bkVn6NxMwC9OqFWQkMMkeej8h8XjyABPdRygC2RCrqDrfVdGijqlMQeXs6yRS+vfZYA==}
dependencies:
- '@volar/source-map': 1.3.0-alpha.0
+ '@volar/source-map': 2.1.2
dev: true
- /@volar/source-map@1.3.0-alpha.0:
- resolution: {integrity: sha512-jSdizxWFvDTvkPYZnO6ew3sBZUnS0abKCbuopkc0JrIlFbznWC/fPH3iPFIMS8/IIkRxq1Jh9VVG60SmtsdaMQ==}
+ /@volar/source-map@2.1.2:
+ resolution: {integrity: sha512-yFJqsuLm1OaWrsz9E3yd3bJcYIlHqdZ8MbmIoZLrAzMYQDcoF26/INIhgziEXSdyHc8xd7rd/tJdSnUyh0gH4Q==}
dependencies:
- muggle-string: 0.2.2
+ muggle-string: 0.4.1
dev: true
- /@volar/typescript@1.3.0-alpha.0:
- resolution: {integrity: sha512-5UItyW2cdH2mBLu4RrECRNJRgtvvzKrSCn2y3v/D61QwIDkGx4aeil6x8RFuUL5TFtV6QvVHXnsOHxNgd+sCow==}
+ /@volar/typescript@2.1.2:
+ resolution: {integrity: sha512-lhTancZqamvaLvoz0u/uth8dpudENNt2LFZOWCw9JZiX14xRFhdhfzmphiCRb7am9E6qAJSbdS/gMt1utXAoHQ==}
dependencies:
- '@volar/language-core': 1.3.0-alpha.0
- dev: true
-
- /@volar/vue-language-core@1.2.0:
- resolution: {integrity: sha512-w7yEiaITh2WzKe6u8ZdeLKCUz43wdmY/OqAmsB/PGDvvhTcVhCJ6f0W/RprZL1IhqH8wALoWiwEh/Wer7ZviMQ==}
- dependencies:
- '@volar/language-core': 1.3.0-alpha.0
- '@volar/source-map': 1.3.0-alpha.0
- '@vue/compiler-dom': 3.3.4
- '@vue/compiler-sfc': 3.3.4
- '@vue/reactivity': 3.3.4
- '@vue/shared': 3.3.4
- minimatch: 6.2.0
- muggle-string: 0.2.2
- vue-template-compiler: 2.7.14
- dev: true
-
- /@volar/vue-typescript@1.2.0:
- resolution: {integrity: sha512-zjmRi9y3J1EkG+pfuHp8IbHmibihrKK485cfzsHjiuvJMGrpkWvlO5WVEk8oslMxxeGC5XwBFE9AOlvh378EPA==}
- deprecated: 'WARNING: This project has been renamed to @vue/typescript. Install using @vue/typescript instead.'
- dependencies:
- '@volar/typescript': 1.3.0-alpha.0
- '@volar/vue-language-core': 1.2.0
+ '@volar/language-core': 2.1.2
+ path-browserify: 1.0.1
dev: true
/@vue/babel-helper-vue-transform-on@1.0.2:
@@ -4148,6 +4135,16 @@ packages:
estree-walker: 2.0.2
source-map-js: 1.0.2
+ /@vue/compiler-core@3.4.21:
+ resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==}
+ dependencies:
+ '@babel/parser': 7.24.0
+ '@vue/shared': 3.4.21
+ entities: 4.5.0
+ estree-walker: 2.0.2
+ source-map-js: 1.0.2
+ dev: true
+
/@vue/compiler-dom@3.2.47:
resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==}
dependencies:
@@ -4160,6 +4157,13 @@ packages:
'@vue/compiler-core': 3.3.4
'@vue/shared': 3.3.4
+ /@vue/compiler-dom@3.4.21:
+ resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==}
+ dependencies:
+ '@vue/compiler-core': 3.4.21
+ '@vue/shared': 3.4.21
+ dev: true
+
/@vue/compiler-sfc@3.2.47:
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
dependencies:
@@ -4204,6 +4208,24 @@ packages:
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
dev: false
+ /@vue/language-core@2.0.6(typescript@5.3.3):
+ resolution: {integrity: sha512-UzqU12tzf9XLqRO3TiWPwRNpP4fyUzE6MAfOQWQNZ4jy6a30ARRUpmODDKq6O8C4goMc2AlPqTmjOHPjHkilSg==}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@volar/language-core': 2.1.2
+ '@vue/compiler-dom': 3.4.21
+ '@vue/shared': 3.4.21
+ computeds: 0.0.1
+ minimatch: 9.0.3
+ path-browserify: 1.0.1
+ typescript: 5.3.3
+ vue-template-compiler: 2.7.16
+ dev: true
+
/@vue/reactivity-transform@3.2.47:
resolution: {integrity: sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==}
dependencies:
@@ -4264,6 +4286,10 @@ packages:
/@vue/shared@3.3.4:
resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==}
+ /@vue/shared@3.4.21:
+ resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==}
+ dev: true
+
/@vue/tsconfig@0.1.3(@types/node@18.15.3):
resolution: {integrity: sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==}
peerDependencies:
@@ -5068,6 +5094,10 @@ packages:
/compare-versions@3.6.0:
resolution: {integrity: sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==}
+ /computeds@0.0.1:
+ resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==}
+ dev: true
+
/concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true
@@ -5657,6 +5687,11 @@ packages:
engines: {node: '>= 0.8'}
dev: true
+ /entities@4.5.0:
+ resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
+ engines: {node: '>=0.12'}
+ dev: true
+
/error-ex@1.3.2:
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
dependencies:
@@ -8054,13 +8089,6 @@ packages:
brace-expansion: 1.1.11
dev: true
- /minimatch@6.2.0:
- resolution: {integrity: sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==}
- engines: {node: '>=10'}
- dependencies:
- brace-expansion: 2.0.1
- dev: true
-
/minimatch@7.4.2:
resolution: {integrity: sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==}
engines: {node: '>=10'}
@@ -8142,8 +8170,8 @@ packages:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
dev: true
- /muggle-string@0.2.2:
- resolution: {integrity: sha512-YVE1mIJ4VpUMqZObFndk9CJu6DBJR/GB13p3tXuNbwD4XExaI5EOuRl6BHeIDxIqXZVxSfAC+y6U1Z/IxCfKUg==}
+ /muggle-string@0.4.1:
+ resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==}
dev: true
/mute-stream@0.0.8:
@@ -8198,7 +8226,7 @@ packages:
dependencies:
hosted-git-info: 4.1.0
is-core-module: 2.11.0
- semver: 7.4.0
+ semver: 7.5.4
validate-npm-package-license: 3.0.4
dev: true
@@ -8478,6 +8506,10 @@ packages:
engines: {node: '>= 0.8'}
dev: true
+ /path-browserify@1.0.1:
+ resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
+ dev: true
+
/path-exists@3.0.0:
resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==}
engines: {node: '>=4'}
@@ -10303,21 +10335,22 @@ packages:
vue: 3.3.4
dev: false
- /vue-template-compiler@2.7.14:
- resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==}
+ /vue-template-compiler@2.7.16:
+ resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==}
dependencies:
de-indent: 1.0.2
he: 1.2.0
dev: true
- /vue-tsc@1.2.0(typescript@5.3.3):
- resolution: {integrity: sha512-rIlzqdrhyPYyLG9zxsVRa+JEseeS9s8F2BbVVVWRRsTZvJO2BbhLEb2HW3MY+DFma0378tnIqs+vfTzbcQtRFw==}
+ /vue-tsc@2.0.6(typescript@5.3.3):
+ resolution: {integrity: sha512-kK50W4XqQL34vHRkxlRWLicrT6+F9xfgCgJ4KSmCHcytKzc1u3c94XXgI+CjmhOSxyw0krpExF7Obo7y4+0dVQ==}
hasBin: true
peerDependencies:
typescript: '*'
dependencies:
- '@volar/vue-language-core': 1.2.0
- '@volar/vue-typescript': 1.2.0
+ '@volar/typescript': 2.1.2
+ '@vue/language-core': 2.0.6(typescript@5.3.3)
+ semver: 7.5.4
typescript: 5.3.3
dev: true
diff --git a/src/components/wd-privacy-popup/wd-privacy-popup.vue b/src/components/wd-privacy-popup/wd-privacy-popup.vue
index 19845408..1f44fc8f 100644
--- a/src/components/wd-privacy-popup/wd-privacy-popup.vue
+++ b/src/components/wd-privacy-popup/wd-privacy-popup.vue
@@ -110,10 +110,10 @@ function handleDisagree() {
*/
function openPrivacyContract() {
;(wx as any).openPrivacyContract({
- success: (res) => {
+ success: (res: any) => {
console.log('openPrivacyContract success')
},
- fail: (res) => {
+ fail: (res: any) => {
console.error('openPrivacyContract fail', res)
}
})
diff --git a/src/pages/actionSheet/Index.vue b/src/pages/actionSheet/Index.vue
index f47b37a4..01fec236 100644
--- a/src/pages/actionSheet/Index.vue
+++ b/src/pages/actionSheet/Index.vue
@@ -191,10 +191,10 @@ function close4() {
}
const toast = useToast()
-function select({ item, index }) {
+function select({ item, index }: { item: any; index: number }) {
toast.show(`当前选中项: ${item.title}, 下标: ${index}`)
}
-function select1({ item, rowIndex, colIndex }) {
+function select1({ item, rowIndex, colIndex }: { item: any; rowIndex: number; colIndex: number }) {
toast.show(`当前选中项: ${item.title}, 行下标: ${rowIndex}, 列下标: ${colIndex}`)
}
diff --git a/src/pages/button/Index.vue b/src/pages/button/Index.vue
index 664ac84b..e19f30e1 100644
--- a/src/pages/button/Index.vue
+++ b/src/pages/button/Index.vue
@@ -113,7 +113,7 @@
diff --git a/src/pages/calendarView/Index.vue b/src/pages/calendarView/Index.vue
index 2715c436..87d9f901 100644
--- a/src/pages/calendarView/Index.vue
+++ b/src/pages/calendarView/Index.vue
@@ -26,7 +26,7 @@
-
+
@@ -57,7 +57,18 @@ const value6 = ref([Date.now() - 24 * 60 * 60 * 1000 * 3, Date.now() - 24 * 60 *
const value7 = ref([Date.now() - 24 * 60 * 60 * 1000 * 3, Date.now() - 24 * 60 * 60 * 1000])
const value8 = ref([Date.now() - 24 * 60 * 60 * 1000 * 3, Date.now() - 24 * 60 * 60 * 1000])
-const formatter = (day) => {
+const timeFilter = ({ type, values }: any) => {
+ if (type === 'minute') {
+ // 只展示 0,10,20,30,40,50 分钟选项
+ return values.filter((item: any) => {
+ return item.value % 10 === 0
+ })
+ }
+
+ return values
+}
+
+const formatter = (day: any) => {
const date = new Date(day.date)
const now = new Date()
@@ -95,16 +106,17 @@ const formatter = (day) => {
return day
}
-function handleTypeChange2({ value }) {
+function handleTypeChange2({ value }: any) {
type2.value = value
}
-function handleChange1({ value }) {
+function handleChange1({ value }: any) {
+ console.log(value)
// value1.value = value
}
-function handleChange2({ value }) {
+function handleChange2({ value }: any) {
value2.value = value
}
-function handleChange3({ value }) {
+function handleChange3({ value }: any) {
value3.value = value
}
diff --git a/src/pages/cell/Index.vue b/src/pages/cell/Index.vue
index f2c2ea7d..42b50eaf 100644
--- a/src/pages/cell/Index.vue
+++ b/src/pages/cell/Index.vue
@@ -110,13 +110,13 @@ const rate = ref(0)
const slider = ref(0)
const switchValue = ref('')
-function handleRateChange({ value }) {
+function handleRateChange({ value }: any) {
console.log(value)
}
-function handleSliderChange({ value }) {
+function handleSliderChange({ value }: any) {
console.log(value)
}
-function handleSwitchChange({ value }) {
+function handleSwitchChange({ value }: any) {
console.log(value)
}
const toast = useToast()
diff --git a/src/pages/checkbox/Index.vue b/src/pages/checkbox/Index.vue
index 2a8bfbb8..015d7311 100644
--- a/src/pages/checkbox/Index.vue
+++ b/src/pages/checkbox/Index.vue
@@ -112,7 +112,7 @@ const value8 = ref([1])
const value9 = ref([])
const value10 = ref([])
-function handleChange1(e) {
+function handleChange1(e: any) {
console.log(e)
}
diff --git a/src/pages/colPicker/Index.vue b/src/pages/colPicker/Index.vue
index 85b8f4f8..2caa79df 100644
--- a/src/pages/colPicker/Index.vue
+++ b/src/pages/colPicker/Index.vue
@@ -49,6 +49,7 @@
import { ref } from 'vue'
import { areaData } from '../../utils/area'
import { useToast } from '@/uni_modules/wot-design-uni'
+import type { ColPickerColumnChangeOption } from '@/uni_modules/wot-design-uni/components/wd-col-picker/types'
const value1 = ref([])
const value2 = ref(['150000', '150100', '150121'])
@@ -67,7 +68,7 @@ const value14 = ref([])
const value15 = ref([])
const displayValue = ref('')
const areaData1 = ref([
- Object.keys(areaData[86]).map((key) => {
+ Object.keys(areaData[86]).map((key: string) => {
return {
value: key,
label: areaData[86][key]
@@ -117,7 +118,7 @@ const areaData5 = ref([
const toast = useToast()
-const columnChange1 = ({ selectedItem, resolve, finish, index, rowIndex }) => {
+const columnChange1 = ({ selectedItem, resolve, finish, index }: ColPickerColumnChangeOption) => {
const value = index === -1 ? 86 : selectedItem.value
if (areaData[value]) {
resolve(
@@ -132,7 +133,7 @@ const columnChange1 = ({ selectedItem, resolve, finish, index, rowIndex }) => {
finish()
}
}
-const columnChange2 = ({ selectedItem, resolve, finish }) => {
+const columnChange2 = ({ selectedItem, resolve, finish }: ColPickerColumnChangeOption) => {
setTimeout(() => {
if (Math.random() > 0.7) {
finish(false)
@@ -153,11 +154,11 @@ const columnChange2 = ({ selectedItem, resolve, finish }) => {
}
}, 300)
}
-const displayFormat = (selectedItems) => {
+const displayFormat = (selectedItems: Record[]) => {
return selectedItems[selectedItems.length - 2].label + '-' + selectedItems[selectedItems.length - 1].label
}
-const beforeConfirm = (value, selectedItems, resolve) => {
- if (parseInt(value[2]) > 120000) {
+const beforeConfirm = (value: (string | number)[], selectedItems: Record[], resolve: (isPass: boolean) => void) => {
+ if (parseInt(String(value[2])) > 120000) {
toast.error('该地区库存不足')
resolve(false)
} else {
@@ -165,14 +166,14 @@ const beforeConfirm = (value, selectedItems, resolve) => {
}
}
-function handleConfirm({ selectedItems }) {
+function handleConfirm({ selectedItems }: any) {
displayValue.value = selectedItems
- .map((item) => {
+ .map((item: any) => {
return item.label
})
.join('')
}
-function handleValue({ value }) {
+function handleValue({ value }: any) {
console.log(value)
}
diff --git a/src/pages/collapse/Index.vue b/src/pages/collapse/Index.vue
index ce603513..c75c16a9 100644
--- a/src/pages/collapse/Index.vue
+++ b/src/pages/collapse/Index.vue
@@ -2,7 +2,9 @@
-
+ toggleAll
+
+
diff --git a/src/pages/datetimePicker/Index.vue b/src/pages/datetimePicker/Index.vue
index 9d9b6bd2..2b75827e 100644
--- a/src/pages/datetimePicker/Index.vue
+++ b/src/pages/datetimePicker/Index.vue
@@ -35,6 +35,16 @@
diff --git a/src/pages/dropMenu/Index.vue b/src/pages/dropMenu/Index.vue
index 4447497c..3244462b 100644
--- a/src/pages/dropMenu/Index.vue
+++ b/src/pages/dropMenu/Index.vue
@@ -76,31 +76,31 @@ const option2 = ref[]>([
{ label: '上架时间', value: 2 }
])
-function handleChange1({ value }) {
+function handleChange1({ value }: any) {
console.log(value)
}
-function handleChange2({ value }) {
+function handleChange2({ value }: any) {
console.log(value)
}
-function handleChange3({ value }) {
+function handleChange3({ value }: any) {
console.log(value)
}
-function handleChange4({ value }) {
+function handleChange4({ value }: any) {
console.log(value)
}
-function handleChange5({ value }) {
+function handleChange5({ value }: any) {
console.log(value)
}
-function handleChange6({ value }) {
+function handleChange6({ value }: any) {
console.log(value)
}
-function handleChange7({ value }) {
+function handleChange7({ value }: any) {
console.log(value)
}
-function handleChange8({ value }) {
+function handleChange8({ value }: any) {
console.log(value)
}
-function handleChange9({ value }) {
+function handleChange9({ value }: any) {
console.log(value)
}
diff --git a/src/pages/form/Index.vue b/src/pages/form/Index.vue
index ccc3b433..a28dd8dd 100644
--- a/src/pages/form/Index.vue
+++ b/src/pages/form/Index.vue
@@ -108,6 +108,7 @@
diff --git a/src/pages/input/Index.vue b/src/pages/input/Index.vue
index 1cb07714..1622de13 100644
--- a/src/pages/input/Index.vue
+++ b/src/pages/input/Index.vue
@@ -70,19 +70,19 @@ const value17 = ref('')
const value18 = ref('')
const value19 = ref('')
-function handleChange(event) {
+function handleChange(event: any) {
console.log(event)
}
-function handleChange1(event) {
+function handleChange1(event: any) {
console.log(event)
}
-function handleChange2(event) {
+function handleChange2(event: any) {
console.log(event)
}
-function handleChange3(event) {
+function handleChange3(event: any) {
console.log(event)
}
-function handleBlur(event) {
+function handleBlur(event: any) {
console.log('失焦', event)
}
diff --git a/src/pages/inputNumber/Index.vue b/src/pages/inputNumber/Index.vue
index 123760f3..a919168d 100644
--- a/src/pages/inputNumber/Index.vue
+++ b/src/pages/inputNumber/Index.vue
@@ -49,31 +49,31 @@ const value8 = ref(2)
const value9 = ref('')
const value10 = ref(1)
-function handleChange1({ value }) {
+function handleChange1({ value }: any) {
console.log(value)
}
-function handleChange2({ value }) {
+function handleChange2({ value }: any) {
console.log(value)
}
-function handleChange3({ value }) {
+function handleChange3({ value }: any) {
console.log(value)
}
-function handleChange4({ value }) {
+function handleChange4({ value }: any) {
console.log(value)
}
-function handleChange5({ value }) {
+function handleChange5({ value }: any) {
console.log(value)
}
-function handleChange6({ value }) {
+function handleChange6({ value }: any) {
console.log(value)
}
-function handleChange7({ value }) {
+function handleChange7({ value }: any) {
console.log(value)
}
-function handleChange8({ value }) {
+function handleChange8({ value }: any) {
console.log(value)
}
-function handleChange9({ value }) {
+function handleChange9({ value }: any) {
console.log(value)
}
diff --git a/src/pages/notify/Index.vue b/src/pages/notify/Index.vue
index 1ee973bc..fdcfd6fa 100644
--- a/src/pages/notify/Index.vue
+++ b/src/pages/notify/Index.vue
@@ -33,7 +33,7 @@
diff --git a/src/pages/pagination/Index.vue b/src/pages/pagination/Index.vue
index f6b5a783..89cd1da5 100644
--- a/src/pages/pagination/Index.vue
+++ b/src/pages/pagination/Index.vue
@@ -21,13 +21,13 @@ const page3 = ref(1)
const total3 = ref(160)
const pageSize3 = ref(20)
-function handleChange1({ value }) {
+function handleChange1({ value }: any) {
console.log(value)
}
-function handleChange2({ value }) {
+function handleChange2({ value }: any) {
console.log(value)
}
-function handleChange3({ value }) {
+function handleChange3({ value }: any) {
console.log(value)
}
diff --git a/src/pages/picker/Index.vue b/src/pages/picker/Index.vue
index c57decee..da9634f3 100644
--- a/src/pages/picker/Index.vue
+++ b/src/pages/picker/Index.vue
@@ -40,11 +40,13 @@
diff --git a/src/pages/pickerView/Index.vue b/src/pages/pickerView/Index.vue
index c9b4022e..9edb2454 100644
--- a/src/pages/pickerView/Index.vue
+++ b/src/pages/pickerView/Index.vue
@@ -1,6 +1,5 @@
-
onChange(1, e)" />
@@ -23,11 +22,10 @@
diff --git a/src/pages/popup/Index.vue b/src/pages/popup/Index.vue
index e5c97090..0972512e 100644
--- a/src/pages/popup/Index.vue
+++ b/src/pages/popup/Index.vue
@@ -1,12 +1,3 @@
-
diff --git a/src/pages/radio/Index.vue b/src/pages/radio/Index.vue
index 56ec3671..692db0e3 100644
--- a/src/pages/radio/Index.vue
+++ b/src/pages/radio/Index.vue
@@ -127,7 +127,7 @@ const value9 = ref(1)
const value10 = ref(1)
const value11 = ref(1)
-function change(e) {
+function change(e: any) {
console.log(e)
}
diff --git a/src/pages/rate/Index.vue b/src/pages/rate/Index.vue
index 943e1059..940157c9 100644
--- a/src/pages/rate/Index.vue
+++ b/src/pages/rate/Index.vue
@@ -1,10 +1,10 @@
@@ -54,10 +54,10 @@ const value5 = ref(4)
const value6 = ref(3)
const value7 = ref(5)
-function changeValue1({ value }) {
+function changeValue1({ value }: any) {
console.log(value)
}
-function changeValue2({ value }) {
+function changeValue2({ value }: any) {
console.log(value)
}
diff --git a/src/pages/search/Index.vue b/src/pages/search/Index.vue
index edb5ccd8..e70f3f1a 100644
--- a/src/pages/search/Index.vue
+++ b/src/pages/search/Index.vue
@@ -78,7 +78,7 @@ const menu = ref([
}
])
-function search(e) {
+function search(e: any) {
uni.showToast({ title: '搜索' + e.value })
}
function clear() {
@@ -87,10 +87,10 @@ function clear() {
function cancel() {
uni.showToast({ title: '取消' })
}
-function change(e) {
+function change(e: any) {
console.log(e.value)
}
-function changeSearchType({ item, index }) {
+function changeSearchType({ item, index }: any) {
// this.setData({
// searchType: e.detail.item.content
// })
diff --git a/src/pages/selectPicker/Index.vue b/src/pages/selectPicker/Index.vue
index 339b6ec3..1ba5c1e5 100644
--- a/src/pages/selectPicker/Index.vue
+++ b/src/pages/selectPicker/Index.vue
@@ -40,6 +40,7 @@
diff --git a/src/pages/swipeAction/Index.vue b/src/pages/swipeAction/Index.vue
index 098db2e4..b921e25a 100644
--- a/src/pages/swipeAction/Index.vue
+++ b/src/pages/swipeAction/Index.vue
@@ -103,14 +103,15 @@
diff --git a/src/pages/switch/Index.vue b/src/pages/switch/Index.vue
index b24f26c4..a1ad1f89 100644
--- a/src/pages/switch/Index.vue
+++ b/src/pages/switch/Index.vue
@@ -29,6 +29,7 @@
diff --git a/src/pages/table/Index.vue b/src/pages/table/Index.vue
index 9702c94d..a9d7cbd7 100644
--- a/src/pages/table/Index.vue
+++ b/src/pages/table/Index.vue
@@ -219,11 +219,11 @@ const dataList = ref[]>([
* 排序
* @param e
*/
-function doSort(e) {
+function doSort() {
dataList.value = dataList.value.reverse()
}
-function handleRowClick({ rowIndex }) {
+function handleRowClick({ rowIndex }: any) {
console.log(rowIndex)
}
diff --git a/src/pages/tabs/Index.vue b/src/pages/tabs/Index.vue
index af69d6da..1b30061a 100644
--- a/src/pages/tabs/Index.vue
+++ b/src/pages/tabs/Index.vue
@@ -109,11 +109,11 @@ const tab6 = ref(0)
const tab7 = ref(0)
const tab8 = ref(0)
const toast = useToast()
-function handleClick({ index, name }) {
+function handleClick({ index, name }: any) {
console.log('event', { index, name })
toast.show(`点击了标签${name}`)
}
-function handleChange(event) {
+function handleChange(event: any) {
console.log('change', event)
}
diff --git a/src/pages/tag/Index.vue b/src/pages/tag/Index.vue
index 7eee25f6..81113177 100644
--- a/src/pages/tag/Index.vue
+++ b/src/pages/tag/Index.vue
@@ -127,19 +127,19 @@ const tags = ref([
])
const dynamicTags = ref(['标签一', '标签二'])
-function handleClick(index) {
+function handleClick(index: number) {
console.log('click:index' + index)
}
-function handleClose(order) {
+function handleClose(order: number) {
tags.value = tags.value.filter((value, index) => index !== order)
console.log('close:index' + order)
}
-function handleClose1(order) {
+function handleClose1(order: number) {
dynamicTags.value = dynamicTags.value.filter((item, index) => {
return index !== order
})
}
-function handleConfirm({ value }) {
+function handleConfirm({ value }: any) {
if (!value) return
dynamicTags.value = [...dynamicTags.value, value]
}
diff --git a/src/pages/tooltip/Index.vue b/src/pages/tooltip/Index.vue
index ac956c57..35445459 100644
--- a/src/pages/tooltip/Index.vue
+++ b/src/pages/tooltip/Index.vue
@@ -136,56 +136,56 @@ function onShow() {
function onHide() {
toast.show('文字提示关闭')
}
-function handleChange1(event) {
- // this.setData({ show1: event.detail.show })
+function handleChange1(event: any) {
+ console.log(event)
}
-function handleChange2(event) {
- // this.setData({ show2: event.detail.show })
+function handleChange2(event: any) {
+ console.log(event)
}
-function handleChange3(event) {
- // this.setData({ show3: event.detail.show })
+function handleChange3(event: any) {
+ console.log(event)
}
-function handleChange4(event) {
- // this.setData({ show4: event.detail.show })
+function handleChange4(event: any) {
+ console.log(event)
}
-function handleChange5(event) {
- // this.setData({ show5: event.detail.show })
+function handleChange5(event: any) {
+ console.log(event)
}
-function handleChange6(event) {
- // this.setData({ show6: event.detail.show })
+function handleChange6(event: any) {
+ console.log(event)
}
-function handleChange7(event) {
- // this.setData({ show7: event.detail.show })
+function handleChange7(event: any) {
+ console.log(event)
}
-function handleChange8(event) {
- // this.setData({ show8: event.detail.show })
+function handleChange8(event: any) {
+ console.log(event)
}
-function handleChange9(event) {
- // this.setData({ show9: event.detail.show })
+function handleChange9(event: any) {
+ console.log(event)
}
-function handleChange10(event) {
- // this.setData({ show10: event.detail.show })
+function handleChange10(event: any) {
+ console.log(event)
}
-function handleChange11(event) {
- // this.setData({ show11: event.detail.show })
+function handleChange11(event: any) {
+ console.log(event)
}
-function handleChange12(event) {
- // this.setData({ show12: event.detail.show })
+function handleChange12(event: any) {
+ console.log(event)
}
-function handleChange13(event) {
- // this.setData({ show13: event.detail.show })
+function handleChange13(event: any) {
+ console.log(event)
}
-function handleChange14(event) {
- // this.setData({ show14: event.detail.show })
+function handleChange14(event: any) {
+ console.log(event)
}
-function handleChange15(event) {
- // this.setData({ show15: event.detail.show })
+function handleChange15(event: any) {
+ console.log(event)
}
-function handleChange16(event) {
- // this.setData({ show16: event.detail.show })
+function handleChange16(event: any) {
+ console.log(event)
}
-function handleChange17(event) {
- // this.setData({ show17: event.detail.show })
+function handleChange17(event: any) {
+ console.log(event)
}
+./type
diff --git a/src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts b/src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts
index 89c4230a..8e454d9c 100644
--- a/src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts
+++ b/src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts
@@ -1,3 +1,24 @@
+import type { ExtractPropTypes, PropType } from 'vue'
+import { makeStringProp } from '../common/props'
+
+export type ConfigProviderTheme = 'light' | 'dark'
+
+export const configProviderProps = {
+ /**
+ * 主题风格,设置为 dark 来开启深色模式,全局生效
+ */
+ theme: makeStringProp('light'),
+ /**
+ * 自定义主题变量
+ */
+ themeVars: {
+ type: Object as PropType,
+ default: () => ({})
+ }
+}
+
+export type ConfigProviderProps = ExtractPropTypes
+
export type baseThemeVars = {
colorTheme?: string // 主题色
colorWhite?: string // 用于mix的白色
diff --git a/src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue b/src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue
index fd19ce0e..ae256b20 100644
--- a/src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue
@@ -1,7 +1,7 @@
@@ -26,27 +17,9 @@ export default {
diff --git a/src/uni_modules/wot-design-uni/components/wd-input/types.ts b/src/uni_modules/wot-design-uni/components/wd-input/types.ts
new file mode 100644
index 00000000..122acb12
--- /dev/null
+++ b/src/uni_modules/wot-design-uni/components/wd-input/types.ts
@@ -0,0 +1,154 @@
+import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props'
+import type { FormItemRule } from '../wd-form/types'
+
+export const inputProps = {
+ ...baseProps,
+ customInputClass: makeStringProp(''),
+ customLabelClass: makeStringProp(''),
+ // 原生属性
+ /**
+ * 占位文本
+ */
+ placeholder: String,
+ /**
+ * 原生属性,指定 placeholder 的样式,目前仅支持color,font-size和font-weight
+ */
+ placeholderStyle: String,
+ /**
+ * 原生属性,指定 placeholder 的样式类
+ */
+ placeholderClass: makeStringProp(''),
+ /**
+ * 原生属性,指定光标与键盘的距离。取 input 距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离
+ */
+ cursorSpacing: makeNumberProp(0),
+ /**
+ * 原生属性,指定focus时的光标位置
+ */
+ cursor: makeNumberProp(-1),
+ /**
+ * 原生属性,光标起始位置,自动聚集时有效,需与selection-end搭配使用
+ */
+ selectionStart: makeNumberProp(-1),
+ /**
+ * 原生属性,光标结束位置,自动聚集时有效,需与selection-start搭配使用
+ */
+ selectionEnd: makeNumberProp(-1),
+ /**
+ * 原生属性,键盘弹起时,是否自动上推页面
+ */
+ adjustPosition: makeBooleanProp(true),
+ /**
+ * focus时,点击页面的时候不收起键盘
+ */
+ holdKeyboard: makeBooleanProp(false),
+ /**
+ * 设置键盘右下角按钮的文字,仅在type='text'时生效,可选值:done / go / next / search / send
+ */
+ confirmType: makeStringProp('done'),
+ /**
+ * 点击键盘右下角按钮时是否保持键盘不收起
+ */
+ confirmHold: makeBooleanProp(false),
+ /**
+ * 原生属性,获取焦点
+ */
+ focus: makeBooleanProp(false),
+ /**
+ * 类型,可选值:text / number / digit / idcard
+ */
+ type: makeStringProp('text'),
+ /**
+ * 原生属性,最大长度
+ */
+ maxlength: makeNumberProp(-1),
+ /**
+ * 原生属性,禁用
+ */
+ disabled: makeBooleanProp(false),
+ /**
+ * 微信小程序原生属性,强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)
+ */
+ alwaysEmbed: makeBooleanProp(false),
+ // 原生属性结束
+ /**
+ * 输入框的值靠右展示
+ */
+ alignRight: makeBooleanProp(false),
+ /**
+ * 绑定值
+ */
+ modelValue: makeNumericProp(''),
+ /**
+ * 显示为密码框
+ */
+ showPassword: makeBooleanProp(false),
+ /**
+ * 显示清空按钮
+ */
+ clearable: makeBooleanProp(false),
+ /**
+ * 只读
+ */
+ readonly: makeBooleanProp(false),
+ /**
+ * 使用 后置图标 插槽
+ */
+ useSuffixSlot: makeBooleanProp(false),
+ /**
+ * 使用 前置图标 插槽
+ */
+ usePrefixSlot: makeBooleanProp(false),
+ /**
+ * 前置图标,icon组件中的图标类名
+ */
+ prefixIcon: String,
+ /**
+ * 后置图标,icon组件中的图标类名
+ */
+ suffixIcon: String,
+ /**
+ * 显示字数限制,需要同时设置 maxlength
+ */
+ showWordLimit: makeBooleanProp(false),
+ /**
+ * 设置左侧标题
+ */
+ label: String,
+ /**
+ * 设置左侧标题宽度
+ */
+ labelWidth: makeStringProp('33%'),
+ /**
+ * 使用 label 插槽
+ */
+ useLabelSlot: makeBooleanProp(false),
+ /**
+ * 设置输入框大小,可选值:large
+ */
+ size: String,
+ /**
+ * 设置输入框错误状态,错误状态时为红色
+ */
+ error: makeBooleanProp(false),
+ /**
+ * 当有label属性时,设置标题和输入框垂直居中,默认为顶部居中
+ */
+ center: makeBooleanProp(false),
+ /**
+ * 非 cell 类型下是否隐藏下划线
+ */
+ noBorder: makeBooleanProp(false),
+ /**
+ * 是否必填
+ */
+ required: makeBooleanProp(false),
+ /**
+ * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的
+ */
+ prop: String,
+ /**
+ * 表单验证规则,结合wd-form组件使用
+ */
+ rules: makeArrayProp()
+}
diff --git a/src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue b/src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
index f4c05e39..72103893 100644
--- a/src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue
@@ -91,90 +91,12 @@ 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 { inputProps } from './types'
-interface Props {
- customInputClass?: string
- customLabelClass?: string
- customClass?: string
- customStyle?: string
- // 原生属性
- placeholder?: string
- placeholderStyle?: string
- placeholderClass?: string
- cursorSpacing?: number
- cursor?: number
- selectionStart?: number
- selectionEnd?: number
- adjustPosition?: boolean
- holdKeyboard?: boolean
- confirmType?: string
- confirmHold?: boolean
- focus?: boolean
- type?: string
- maxlength?: number
- disabled?: boolean
- alwaysEmbed?: boolean
- // 原生属性结束
- alignRight?: boolean
- modelValue: string | number
- showPassword?: boolean
- clearable?: boolean
- readonly?: boolean
- useSuffixSlot?: boolean
- usePrefixSlot?: boolean
- prefixIcon?: string
- suffixIcon?: string
- showWordLimit?: boolean
- label?: string
- labelWidth?: string
- useLabelSlot?: boolean
- size?: string
- error?: boolean
- center?: boolean
- noBorder?: boolean
- required?: boolean
- prop?: string
- rules?: FormItemRule[]
-}
+const props = defineProps(inputProps)
const { translate } = useTranslate('input')
-const props = withDefaults(defineProps(), {
- customInputClass: '',
- customLabelClass: '',
- customClass: '',
- customStyle: '',
- type: 'text',
- maxlength: -1,
- modelValue: '',
- clearable: false,
- showPassword: false,
- disabled: false,
- alignRight: false,
- alwaysEmbed: false,
- readonly: false,
- useSuffixSlot: false,
- usePrefixSlot: false,
- showWordLimit: false,
- confirmType: 'done',
- confirmHold: false,
- placeholderClass: '',
- focus: false,
- cursorSpacing: 0,
- cursor: -1,
- selectionStart: -1,
- selectionEnd: -1,
- adjustPosition: true,
- holdKeyboard: false,
- error: false,
- center: false,
- labelWidth: '33%',
- useLabelSlot: false,
- required: false,
- noBorder: false,
- rules: () => []
-})
-
const showClear = ref(false)
const showWordCount = ref(false)
const isPwdVisible = ref(false)
@@ -304,7 +226,7 @@ function clear() {
})
}
// 失去焦点时会先后触发change、blur,未输入内容但失焦不触发 change 只触发 blur
-function handleBlur({ detail }) {
+function handleBlur() {
isFocus.value = false
emit('change', {
value: inputValue.value
@@ -314,7 +236,7 @@ function handleBlur({ detail }) {
value: inputValue.value
})
}
-function handleFocus({ detail }) {
+function handleFocus({ detail }: any) {
if (clearing.value) {
clearing.value = false
return
@@ -327,10 +249,10 @@ function handleInput() {
emit('update:modelValue', inputValue.value)
emit('input', inputValue.value)
}
-function handleKeyboardheightchange(event) {
+function handleKeyboardheightchange(event: any) {
emit('keyboardheightchange', event.detail)
}
-function handleConfirm({ detail }) {
+function handleConfirm({ detail }: any) {
emit('confirm', detail)
}
function onClickSuffixIcon() {
diff --git a/src/uni_modules/wot-design-uni/components/wd-loading/type.ts b/src/uni_modules/wot-design-uni/components/wd-loading/type.ts
deleted file mode 100644
index 45347a2e..00000000
--- a/src/uni_modules/wot-design-uni/components/wd-loading/type.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// 'circle-outline' | 'circle-ring' 废弃
-export type LoadingType = 'outline' | 'ring' | 'circle-outline' | 'circle-ring' // 提示信息加载状态类型
diff --git a/src/uni_modules/wot-design-uni/components/wd-loading/types.ts b/src/uni_modules/wot-design-uni/components/wd-loading/types.ts
new file mode 100644
index 00000000..bb7986b7
--- /dev/null
+++ b/src/uni_modules/wot-design-uni/components/wd-loading/types.ts
@@ -0,0 +1,32 @@
+/*
+ * @Author: weisheng
+ * @Date: 2024-03-15 20:40:34
+ * @LastEditTime: 2024-03-18 14:59:32
+ * @LastEditors: weisheng
+ * @Description:
+ * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-loading\types.ts
+ * 记得注释
+ */
+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 const loadingProps = {
+ ...baseProps,
+ /**
+ * 加载指示器类型,可选值:'outline' | 'ring' | 'circle-outline' | 'circle-ring'
+ */
+ type: makeStringProp('ring'),
+ /**
+ * 设置加载指示器颜色
+ */
+ color: makeStringProp('#4D80F0'),
+ /**
+ * 设置加载指示器大小
+ */
+ size: makeNumericProp('32px')
+}
+
+export type LoadingProps = ExtractPropTypes
diff --git a/src/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue b/src/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
index 6ebb0b9e..f8b01c30 100644
--- a/src/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue
@@ -24,7 +24,7 @@ export default {
import { computed, onBeforeMount, ref, watch } from 'vue'
import base64 from '../common/base64'
import { gradient, context, objToStyle, addUnit } from '../common/util'
-import type { LoadingType } from './type'
+import { loadingProps } from './types'
const svgDefineId = context.id++
const svgDefineId1 = context.id++
@@ -39,21 +39,7 @@ const icon = {
}
}
-interface Props {
- customStyle?: string
- customClass?: string
- type?: LoadingType
- color?: string
- size?: string | number
-}
-
-const props = withDefaults(defineProps(), {
- customStyle: '',
- customClass: '',
- type: 'ring',
- color: '#4D80F0',
- size: '32px'
-})
+const props = defineProps(loadingProps)
const svg = ref('')
const intermediateColor = ref('')
@@ -100,7 +86,7 @@ onBeforeMount(() => {
function buildSvg() {
const { type, color } = props
- let adaptType = 'ring'
+ let adaptType: 'outline' | 'ring' = 'ring'
// 2.2.0 版本向下兼容 circle-outline 和 circle-ring;
if (type === 'circle-outline') {
adaptType = 'outline'
diff --git a/src/uni_modules/wot-design-uni/components/wd-loadmore/types.ts b/src/uni_modules/wot-design-uni/components/wd-loadmore/types.ts
new file mode 100644
index 00000000..558e8ac5
--- /dev/null
+++ b/src/uni_modules/wot-design-uni/components/wd-loadmore/types.ts
@@ -0,0 +1,24 @@
+import type { PropType } from 'vue'
+import { baseProps, makeStringProp } from '../common/props'
+
+export type LoadMoreState = 'loading' | 'error' | 'finished'
+
+export const loadmoreProps = {
+ ...baseProps,
+ /**
+ * 加载状态,可选值:'loading' | 'error' | 'finished'
+ */
+ state: String as PropType,
+ /**
+ * 加载提示文案
+ */
+ loadingText: String,
+ /**
+ * 全部加载完的提示文案
+ */
+ finishedText: String,
+ /**
+ * 加载失败的提示文案
+ */
+ errorText: makeStringProp('加载失败,点击重试')
+}
diff --git a/src/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue b/src/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue
index c4ee9b5f..82e17ea5 100644
--- a/src/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue
@@ -32,22 +32,9 @@ export default {
diff --git a/src/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts b/src/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts
new file mode 100644
index 00000000..d0906039
--- /dev/null
+++ b/src/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts
@@ -0,0 +1,47 @@
+import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props'
+
+export type NoticeBarType = 'warning' | 'info' | 'danger' | ''
+
+export const noticeBarProps = {
+ ...baseProps,
+ /**
+ * 设置通知栏文案
+ */
+ text: String,
+ /**
+ * 设置通知栏类型,可选值为:'warning' | 'info' | 'danger'
+ */
+ type: makeStringProp('warning'),
+ /**
+ * 是否可滚动
+ */
+ scrollable: makeBooleanProp(true),
+ /**
+ * 滚动延迟时间(秒)
+ */
+ delay: makeNumberProp(1),
+ /**
+ * 滚动速度(px/s)
+ */
+ speed: makeNumberProp(50),
+ /**
+ * 是否可关闭
+ */
+ closable: makeBooleanProp(false),
+ /**
+ * 是否换行显示
+ */
+ wrapable: makeBooleanProp(false),
+ /**
+ * 设置左侧图标,使用 icon 章节中的图标名
+ */
+ prefix: String,
+ /**
+ * 文字、图标颜色
+ */
+ color: String,
+ /**
+ * 背景颜色
+ */
+ backgroundColor: String
+}
diff --git a/src/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue b/src/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue
index a17da03d..2cecb236 100644
--- a/src/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue
@@ -28,34 +28,12 @@ import { onBeforeMount, ref, watch } from 'vue'
import { getRect } from '../common/util'
import { getCurrentInstance } from 'vue'
import { nextTick } from 'vue'
+import { noticeBarProps } from './types'
const $wrap = '.wd-notice-bar__wrap'
const $content = '.wd-notice-bar__content'
-type NoticeBarType = 'warning' | 'info' | 'danger' | ''
-interface Props {
- customClass?: string
- text?: string
- type?: NoticeBarType
- scrollable?: boolean
- delay?: number
- speed?: number
- closable?: boolean
- wrapable?: boolean
- prefix?: string
- color?: string
- backgroundColor?: string
-}
-
-const props = withDefaults(defineProps(), {
- customClass: '',
- type: 'warning',
- scrollable: true,
- delay: 1,
- speed: 50,
- closable: false,
- wrapable: false
-})
+const props = defineProps(noticeBarProps)
const firstPlay = ref(true)
const wrapWidth = ref(0)
@@ -104,7 +82,7 @@ function handleClose() {
emit('close')
}
-function initAnimation(duration, delay, translate) {
+function initAnimation(duration: number, delay: number, translate: number) {
const ani = uni
.createAnimation({
duration,
@@ -117,7 +95,7 @@ function initAnimation(duration, delay, translate) {
function scroll() {
Promise.all([getRect($wrap, false, proxy), getRect($content, false, proxy)]).then((rects) => {
- const [wrapRect, contentRect] = rects as UniApp.NodeInfo[]
+ const [wrapRect, contentRect] = rects
if (!wrapRect || !contentRect || !wrapRect.width || !contentRect.width) return
const wrapWidthTemp = wrapRect.width
diff --git a/src/uni_modules/wot-design-uni/components/wd-notify/index.ts b/src/uni_modules/wot-design-uni/components/wd-notify/index.ts
index 86bdcde9..3e457e1e 100644
--- a/src/uni_modules/wot-design-uni/components/wd-notify/index.ts
+++ b/src/uni_modules/wot-design-uni/components/wd-notify/index.ts
@@ -1,5 +1,5 @@
import { provide, reactive } from 'vue'
-import type { NotifyProps } from './type'
+import type { NotifyProps } from './types'
import { deepMerge, isString } from '../common/util'
let timer: ReturnType
diff --git a/src/uni_modules/wot-design-uni/components/wd-notify/type.ts b/src/uni_modules/wot-design-uni/components/wd-notify/types.ts
similarity index 63%
rename from src/uni_modules/wot-design-uni/components/wd-notify/type.ts
rename to src/uni_modules/wot-design-uni/components/wd-notify/types.ts
index 84db4e52..b22440d3 100644
--- a/src/uni_modules/wot-design-uni/components/wd-notify/type.ts
+++ b/src/uni_modules/wot-design-uni/components/wd-notify/types.ts
@@ -1,6 +1,6 @@
import type { PropType, ExtractPropTypes } from 'vue'
+import { makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props'
-export type NotifyMessage = string | number
export type NotifyType = 'primary' | 'success' | 'danger' | 'warning'
export type NotifyPosition = 'top' | 'bottom'
export type NotifyProps = Omit>, 'selector'> & {
@@ -22,70 +22,41 @@ export const notifyProps = {
/**
* 类型,可选值为 primary success danger warning
*/
- type: {
- type: String as PropType,
- default: 'danger'
- },
+ type: makeStringProp('danger'),
/**
* 字体颜色
*/
- color: {
- type: String,
- default: ''
- },
+ color: makeStringProp(''),
/**
* 将组件的 z-index 层级设置为一个固定值
*/
- zIndex: {
- type: Number,
- default: 99
- },
+ zIndex: makeNumberProp(99),
/**
* 显示
*/
- visible: {
- type: Boolean,
- default: false
- },
+ visible: makeBooleanProp(false),
/**
* 展示文案,支持通过\n换行
*/
- message: {
- type: [Number, String] as PropType,
- default: ''
- },
+ message: makeNumericProp(''),
/**
* 指定唯一标识
*/
- selector: {
- type: String,
- default: ''
- },
+ selector: makeStringProp(''),
/**
* 展示时长(ms),值为 0 时,notify 不会消失
*/
- duration: {
- type: Number,
- default: 3000
- },
+ duration: makeNumberProp(3000),
/**
* 弹出位置,可选值为 top bottom
*/
- position: {
- type: String as PropType,
- default: 'top'
- },
+ position: makeStringProp('top'),
/**
* 顶部安全高度(
*/
- safeHeight: {
- type: Number
- },
+ safeHeight: Number,
/**
* 背景颜色
*/
- background: {
- type: String,
- default: ''
- }
+ background: makeStringProp('')
}
diff --git a/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue b/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue
index f74d4790..d6aa40df 100644
--- a/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue
@@ -25,9 +25,9 @@ export default {
+../wd-sidebar/type
diff --git a/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts b/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts
index 5fc574e8..2d047ea8 100644
--- a/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts
+++ b/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts
@@ -1,19 +1,28 @@
/*
* @Author: weisheng
* @Date: 2024-01-05 18:03:27
- * @LastEditTime: 2024-01-05 18:08:28
+ * @LastEditTime: 2024-03-18 15:52:37
* @LastEditors: weisheng
* @Description:
- * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts
+ * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-sidebar\types.ts
* 记得注释
*/
-import { type InjectionKey } from 'vue'
+import { type ExtractPropTypes, type InjectionKey } from 'vue'
+import { baseProps, makeNumericProp } from '../common/props'
export type SidebarProvide = {
- props: {
- modelValue?: number | string
- }
+ props: Partial
setChange: (value: number | string, label: string) => void
}
export const SIDEBAR_KEY: InjectionKey = Symbol('wd-sidebar')
+
+export const sidebarProps = {
+ ...baseProps,
+ /**
+ * 当前导航项的索引
+ */
+ modelValue: makeNumericProp(0)
+}
+
+export type SidebarProps = ExtractPropTypes
diff --git a/src/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue b/src/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue
index 54015f66..22f67d42 100644
--- a/src/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue
@@ -18,21 +18,9 @@ export default {
+../wd-tabbar-item/type./type
diff --git a/src/uni_modules/wot-design-uni/components/wd-table-col/types.ts b/src/uni_modules/wot-design-uni/components/wd-table-col/types.ts
index 65386577..49034aee 100644
--- a/src/uni_modules/wot-design-uni/components/wd-table-col/types.ts
+++ b/src/uni_modules/wot-design-uni/components/wd-table-col/types.ts
@@ -1,3 +1,6 @@
+import type { ExtractPropTypes } from 'vue'
+import { makeBooleanProp, makeNumericProp, makeRequiredProp, makeStringProp } from '../common/props'
+
type AlignType = 'left' | 'center' | 'right' // 列的对齐方式
export type SortDirection = 0 | 1 | -1 // 列的排序方向
@@ -18,3 +21,32 @@ export interface TableColumn {
// 是否i固定列
fixed?: boolean
}
+
+export const tableColumnProps = {
+ /**
+ * 列对应字段
+ */
+ prop: makeRequiredProp(String),
+ /**
+ * 列对应字段标题
+ */
+ label: makeRequiredProp(String),
+ /**
+ * 列宽度,单位px
+ */
+ width: makeNumericProp(100),
+ /**
+ * 是否开启列排序
+ */
+ sortable: makeBooleanProp(false),
+ /**
+ * 是否固定本列
+ */
+ fixed: makeBooleanProp(false),
+ /**
+ * 列的对齐方式,可选值left,center,right
+ */
+ align: makeStringProp('left')
+}
+
+export type TableColumnProps = ExtractPropTypes
diff --git a/src/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue b/src/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue
index 82447143..f891634e 100644
--- a/src/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue
+++ b/src/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue
@@ -29,30 +29,9 @@ export default {