From 282785fedca9274eb2e0d89cf40161681e9d6cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=87?= <2020377497@qq.com> Date: Wed, 10 Jan 2024 18:07:19 +0800 Subject: [PATCH] upda --- api/store/order.js | 11 +- api/store/userMembers.js | 48 +++ components/yGoods/index.vue | 176 +++++++++++ components/yUpload/index.vue | 4 +- hooks/useApi.js | 58 ++++ pages.json | 60 ++++ store/check/edit.vue | 221 +++++++++++++ store/check/list.vue | 174 ++++++++++ store/goods/index.vue | 2 +- store/index/index.vue | 46 ++- store/shop/list.vue | 18 +- store/user/editGoods.vue | 191 +++++++++++ store/user/editMember.vue | 197 ++++++++++++ store/user/list.vue | 31 +- store/user/memberList.vue | 298 ++++++++++++++++++ store/user/setUp.vue | 156 +++++++++ uni_modules/wot-design-uni/changelog.md | 72 ++++- .../components/common/abstracts/variable.scss | 4 +- .../components/composables/useCell.ts | 46 +-- .../components/wd-calendar-view/types.ts | 5 + .../components/wd-calendar/wd-calendar.vue | 4 +- .../components/wd-cell-group/types.ts | 18 ++ .../wd-cell-group/wd-cell-group.vue | 10 +- .../components/wd-cell/wd-cell.vue | 4 +- .../components/wd-checkbox-group/types.ts | 30 ++ .../wd-checkbox-group/wd-checkbox-group.vue | 77 +---- .../components/wd-checkbox/wd-checkbox.vue | 119 +++---- .../components/wd-col-picker/index.scss | 4 + .../wd-col-picker/wd-col-picker.vue | 14 +- .../components/wd-col/wd-col.vue | 23 +- .../wd-collapse-item/wd-collapse-item.vue | 78 ++--- .../components/wd-collapse/types.ts | 30 +- .../components/wd-collapse/wd-collapse.vue | 113 +++---- .../wd-datetime-picker/wd-datetime-picker.vue | 4 +- .../wd-drop-menu-item/wd-drop-menu-item.vue | 77 ++--- .../components/wd-drop-menu/types.ts | 17 + .../components/wd-drop-menu/wd-drop-menu.vue | 92 ++---- .../components/wd-form-item/wd-form-item.vue | 6 +- .../components/wd-form/types.ts | 12 +- .../components/wd-form/wd-form.vue | 2 +- .../components/wd-grid-item/wd-grid-item.vue | 54 ++-- .../components/wd-grid/types.ts | 16 + .../components/wd-grid/wd-grid.vue | 56 ++-- .../components/wd-input/index.scss | 1 + .../components/wd-input/wd-input.vue | 4 +- .../components/wd-picker/wd-picker.vue | 54 +++- .../components/wd-radio-group/types.ts | 18 ++ .../wd-radio-group/wd-radio-group.vue | 56 +--- .../components/wd-radio/wd-radio.vue | 80 ++--- .../wot-design-uni/components/wd-row/types.ts | 7 + .../components/wd-row/wd-row.vue | 10 +- .../wd-select-picker/wd-select-picker.vue | 4 +- .../wd-sidebar-item/wd-sidebar-item.vue | 38 +-- .../components/wd-sidebar/types.ts | 19 ++ .../components/wd-sidebar/wd-sidebar.vue | 44 +-- .../components/wd-step/wd-step.vue | 111 ++++--- .../components/wd-steps/types.ts | 7 + .../components/wd-steps/wd-steps.vue | 52 +-- .../wd-swiper-nav/wd-swiper-nav.vue | 2 +- .../components/wd-tab/wd-tab.vue | 55 ++-- .../components/wd-tabbar-item/types.ts | 11 +- .../wd-tabbar-item/wd-tabbar-item.vue | 72 ++--- .../components/wd-tabbar/types.ts | 39 +++ .../components/wd-tabbar/wd-tabbar.vue | 43 +-- .../components/wd-table/wd-table.vue | 98 ------ .../components/wd-tabs/types.ts | 9 + .../components/wd-tabs/wd-tabs.vue | 130 +++----- .../components/wd-textarea/index.scss | 3 +- .../components/wd-textarea/wd-textarea.vue | 4 +- uni_modules/wot-design-uni/global.d.ts | 5 +- uni_modules/wot-design-uni/package.json | 2 +- uni_modules/wot-design-uni/readme.md | 1 + utils/utils.js | 22 ++ 73 files changed, 2531 insertions(+), 1148 deletions(-) create mode 100644 api/store/userMembers.js create mode 100644 components/yGoods/index.vue create mode 100644 hooks/useApi.js create mode 100644 store/check/edit.vue create mode 100644 store/check/list.vue create mode 100644 store/user/editGoods.vue create mode 100644 store/user/editMember.vue create mode 100644 store/user/memberList.vue create mode 100644 store/user/setUp.vue create mode 100644 uni_modules/wot-design-uni/components/wd-calendar-view/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-cell-group/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-checkbox-group/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-drop-menu/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-grid/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-radio-group/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-row/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-sidebar/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-steps/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-tabbar/types.ts create mode 100644 uni_modules/wot-design-uni/components/wd-tabs/types.ts diff --git a/api/store/order.js b/api/store/order.js index 0584f73..8802ac9 100644 --- a/api/store/order.js +++ b/api/store/order.js @@ -43,6 +43,15 @@ export default { }); }, + // 核销记录 + checkLog(data) { + return request({ + url: "/admin/shop/checkLog", + method: "POST", + data, + }); + }, + confirmCancel(data) { return request({ url: "/admin/order/confirmCancel", @@ -92,8 +101,6 @@ export default { }); }, - - } }; \ No newline at end of file diff --git a/api/store/userMembers.js b/api/store/userMembers.js new file mode 100644 index 0000000..1c0e492 --- /dev/null +++ b/api/store/userMembers.js @@ -0,0 +1,48 @@ +import { + request +} from "@/utils/request"; + +export default { + + LevelShow(data) { + return request({ + url: "/admin/UserMembers/LevelShow", + method: "GET", + data, + }) + }, + + LevelSave(data) { + return request({ + url: "/admin/UserMembers/LevelSave", + method: "GET", + data, + }) + }, + + SetList(data) { + return request({ + url: "/admin/UserMembers/SetList", + method: "GET", + data, + }) + }, + + SetSave(data) { + return request({ + url: "/admin/UserMembers/SetSave", + method: "GET", + data, + }) + }, + + DiscountList(data) { + return request({ + url: "/admin/UserMembers/DiscountList", + method: "GET", + data, + }) + }, + + +}; \ No newline at end of file diff --git a/components/yGoods/index.vue b/components/yGoods/index.vue new file mode 100644 index 0000000..2842e62 --- /dev/null +++ b/components/yGoods/index.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/components/yUpload/index.vue b/components/yUpload/index.vue index 477cf22..87830e4 100644 --- a/components/yUpload/index.vue +++ b/components/yUpload/index.vue @@ -16,7 +16,7 @@ - + @@ -29,7 +29,7 @@ - 已选择 ({{ LArr.length }} 张) + 已选择 ( {{ LArr.length || 0 }} / {{ size }} 张) diff --git a/hooks/useApi.js b/hooks/useApi.js new file mode 100644 index 0000000..0b86e4d --- /dev/null +++ b/hooks/useApi.js @@ -0,0 +1,58 @@ +import { ref } from "vue" + +/** + * 用于执行 API 请求和管理相关状态的自定义钩子。 + * + * @param {Function} apiF - 表示 API 请求的异步函数。 + * @param {Object} [opt={}] - 可选配置选项。 + * @param {Ref} [opt.loading=false] - 可选的 loading 状态变量。 + * + * @returns {Object} - 包含响应式变量和 fetchData 函数的对象。 + * @property {Ref} loading - 表示 API 请求加载状态的 ref。 + * @property {Ref} result - 表示 API 请求结果的 ref。 + * @property {Ref} error - 表示 API 请求失败时的错误的 ref。 + * @property {Function} fetchData - 用于执行 API 请求并更新状态变量的函数。 + */ +export const useApi = (apiF, opt = {}) => { + // 使用 ref 包装状态变量 + const loading = opt.loading || ref(false) + const result = ref(null) + const error = ref(null) + + /** + * 执行 API 请求并更新状态的函数。 + * + * @param {*} p - 用于 API 请求的参数。 + * @returns {Promise} - 包含 API 响应对象的 Promise。 + */ + const fetchData = async (p) => { + try { + // 开始请求,设置 loading 为 true + loading.value = true + // 执行异步 API 请求 + const res = await apiF(p) + + // 根据返回的 code 判断请求是否成功 + if (res.code === 0) { + // 请求成功,更新 result 变量 + result.value = res + } else { + // 请求失败,更新 error 变量 + error.value = res + } + + // 返回 API 响应对象 + return res + } catch (err) { + // 捕获异常,更新 error 变量并抛出错误 + error.value = err + throw err + } finally { + // 无论请求成功或失败,都会在最终阶段设置 loading 为 false + loading.value = false + } + } + + // 返回包含状态变量和 fetchData 函数的对象 + return { loading, result, error, fetchData } +} diff --git a/pages.json b/pages.json index 5d4accf..8cceabd 100644 --- a/pages.json +++ b/pages.json @@ -161,6 +161,42 @@ } } }, + { + "path": "user/memberList", + "style": { + "navigationBarTitleText": "用户等级", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "user/editMember", + "style": { + "navigationBarTitleText": "等级编辑", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "user/editGoods", + "style": { + "navigationBarTitleText": "折扣编辑", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, { "path": "user/edit", "style": { @@ -172,6 +208,30 @@ "gestureBack": "YES" } } + }, + { + "path": "user/setUp", + "style": { + "navigationBarTitleText": "页面配置", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "check/list", + "style": { + "navigationBarTitleText": "核销记录", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } } ] } diff --git a/store/check/edit.vue b/store/check/edit.vue new file mode 100644 index 0000000..0208378 --- /dev/null +++ b/store/check/edit.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/store/check/list.vue b/store/check/list.vue new file mode 100644 index 0000000..e88f6ae --- /dev/null +++ b/store/check/list.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/store/goods/index.vue b/store/goods/index.vue index a5030d6..37a44bd 100644 --- a/store/goods/index.vue +++ b/store/goods/index.vue @@ -26,7 +26,7 @@ + + + + diff --git a/store/user/editMember.vue b/store/user/editMember.vue new file mode 100644 index 0000000..c7f8c75 --- /dev/null +++ b/store/user/editMember.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/store/user/list.vue b/store/user/list.vue index 3f08829..5963953 100644 --- a/store/user/list.vue +++ b/store/user/list.vue @@ -9,19 +9,24 @@ --> - - - - - + + + + + + + +
+ 用户等级 +
diff --git a/store/user/memberList.vue b/store/user/memberList.vue new file mode 100644 index 0000000..39aea9b --- /dev/null +++ b/store/user/memberList.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/store/user/setUp.vue b/store/user/setUp.vue new file mode 100644 index 0000000..932db4b --- /dev/null +++ b/store/user/setUp.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/uni_modules/wot-design-uni/changelog.md b/uni_modules/wot-design-uni/changelog.md index 638fdcc..e9fc741 100644 --- a/uni_modules/wot-design-uni/changelog.md +++ b/uni_modules/wot-design-uni/changelog.md @@ -1,15 +1,79 @@ -## 0.2.5(2023-12-28) -## [0.2.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.4...v0.2.5) (2023-12-28) +## 0.2.11(2024-01-09) +### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09) ### Bug Fixes | Bug 修复 -* 修复 Form 导入FormRules、ErrorMessage时未指定为type的问题 ([c88c84e](https://github.com/Moonofweisheng/wot-design-uni/commit/c88c84e8b71fc2404643a623c28f4953ffe36e71)) -* 修复 SwipeAction 组件在H5端导致页面无法上下滚动的问题 ([1f68ce1](https://github.com/Moonofweisheng/wot-design-uni/commit/1f68ce13c8109dd92ca4bf055f66aa8dff24c83d)), closes [#149](https://github.com/Moonofweisheng/wot-design-uni/issues/149) +* 修复 Overlay 类型声明错误的问题 ([930e59a](https://github.com/Moonofweisheng/wot-design-uni/commit/930e59a9b09aee535ec4c316e44ed3c0e31be628)) + + +### Documentation | 文档 + +* 提供托管在Giteee上的文档网站 ([6d62e9e](https://github.com/Moonofweisheng/wot-design-uni/commit/6d62e9e7ddda0bd9f51f2ad9e2893f1ed3709c63)) # 更新日志 +### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Overlay 类型声明错误的问题 ([930e59a](https://github.com/Moonofweisheng/wot-design-uni/commit/930e59a9b09aee535ec4c316e44ed3c0e31be628)) + + +### ✏️ Documentation | 文档 + +* ✏️ 提供托管在Giteee上的文档网站 ([6d62e9e](https://github.com/Moonofweisheng/wot-design-uni/commit/6d62e9e7ddda0bd9f51f2ad9e2893f1ed3709c63)) + +### [0.2.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.9...v0.2.10) (2024-01-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 col-picker 暗黑模式下标题文字颜色不清楚的问题 ([217ffb7](https://github.com/Moonofweisheng/wot-design-uni/commit/217ffb7dacb66b2017145c6e43fc8c873a6e9dd2)) +* 🐛 修复 steps 组件自定义图标显示异常的问题 ([0300f63](https://github.com/Moonofweisheng/wot-design-uni/commit/0300f63f35a5afcd278aba3b4ab721f498716d94)) +* 🐛 修复支付宝小程序暗黑模式下 Input、Textarea 组件显示异常的问题 ([8a9c344](https://github.com/Moonofweisheng/wot-design-uni/commit/8a9c344872bfcd81a73f71520f51b6b849f516d5)) + +### [0.2.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.8...v0.2.9) (2024-01-07) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 col-picker 组件首次打开指示线位置异常的问题 ([323fb00](https://github.com/Moonofweisheng/wot-design-uni/commit/323fb00942b7032b678d92ab03360dc7bb8faae8)) + +### [0.2.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.7...v0.2.8) (2024-01-06) + + +### ✏️ Documentation | 文档 + +* ✏️ 展示netlify支持 ([410b180](https://github.com/Moonofweisheng/wot-design-uni/commit/410b180ec9c660ab9c49d6eb203d53c35919c512)) + +### [0.2.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.5...v0.2.7) (2024-01-06) + + +### ✨ Features | 新功能 + +* ✨ 优化provide/inject的使用方式 ([892f467](https://github.com/Moonofweisheng/wot-design-uni/commit/892f4675a848ee3d4c965c36d5c4034aa5806b6d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档网站增加自定义footer ([dd8bc00](https://github.com/Moonofweisheng/wot-design-uni/commit/dd8bc003eedcdc43cdd60bb896c897d108dd4a51)) +* ✏️ 修复vitepress自定义footer展示错误的问题 ([c0701d5](https://github.com/Moonofweisheng/wot-design-uni/commit/c0701d584e5d9b84e6d913dd23666b80d803407b)) + +### [0.2.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.5...v0.2.6) (2024-01-06) + + +### ✨ Features | 新功能 + +* ✨ 优化provide/inject的使用方式 ([892f467](https://github.com/Moonofweisheng/wot-design-uni/commit/892f4675a848ee3d4c965c36d5c4034aa5806b6d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档网站增加自定义footer ([dd8bc00](https://github.com/Moonofweisheng/wot-design-uni/commit/dd8bc003eedcdc43cdd60bb896c897d108dd4a51)) + ### [0.2.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.4...v0.2.5) (2023-12-28) diff --git a/uni_modules/wot-design-uni/components/common/abstracts/variable.scss b/uni_modules/wot-design-uni/components/common/abstracts/variable.scss index d45a767..0417fb4 100644 --- a/uni_modules/wot-design-uni/components/common/abstracts/variable.scss +++ b/uni_modules/wot-design-uni/components/common/abstracts/variable.scss @@ -83,8 +83,8 @@ $-color-icon: var(--wot-color-icon, #d9d9d9) !default; // icon颜色 $-color-icon-active: var(--wot-color-icon-active, #eee) !default; // icon颜色hover $-color-icon-disabled: var(--wot-color-icon-disabled, #a7a7a7) !default; // icon颜色disabled /* overlay */ -$-overlay-bg: rgba(0, 0, 0, 0.65) !default; -$-overlay-bg-dark: rgba(0, 0, 0, 0.75) !default; +$-overlay-bg: var(--wot-overlay-bg, rgba(0, 0, 0, 0.65)) !default; +$-overlay-bg-dark: var(--wot-overlay-bg-dark, rgba(0, 0, 0, 0.75)) !default; /*----------------------------------------- Theme color. end -------------------------------------------*/ diff --git a/uni_modules/wot-design-uni/components/composables/useCell.ts b/uni_modules/wot-design-uni/components/composables/useCell.ts index e5d4f60..d245312 100644 --- a/uni_modules/wot-design-uni/components/composables/useCell.ts +++ b/uni_modules/wot-design-uni/components/composables/useCell.ts @@ -1,45 +1,13 @@ -import { getCurrentInstance, inject, onBeforeMount, ref, watch } from 'vue' +import { computed } from 'vue' +import { useParent } from './useParent' +import { CELL_GROUP_KEY } from '../wd-cell-group/types' export function useCell() { - const border = ref(false) // 是否展示边框 - const cellGroup: any = inject('cell-group', null) || {} - const cellList: any = inject('cell-list', null) || ref([]) - const { proxy } = getCurrentInstance() as any + const { parent: cellGroup, index } = useParent(CELL_GROUP_KEY) - watch( - () => cellGroup.border, - (newVal) => { - setIndexAndStatus(Boolean(newVal), proxy.$.uid) - }, - { - deep: true, - immediate: true - } - ) - - onBeforeMount(() => { - cellList.value = [...cellList.value.concat([{ uid: proxy.$.uid }])] - setIndexAndStatus(cellGroup.border, proxy.$.uid) + const border = computed(() => { + return cellGroup && cellGroup.props.border && index.value }) - /** - * @description 从cellGroup获取此组件的索引 - * @return {Number} 此组件的索引 - */ - function getIndex(uuid: string) { - if (!cellList || !cellList.value) return - return cellList.value.findIndex((cell) => { - return cell.uid === uuid - }) - } - - /** - * @description 为所有索引非0的组件设置刘海线,此方法由cellGroup调用 - */ - function setIndexAndStatus(isBorder: boolean, uuid: string) { - const index = getIndex(uuid) - border.value = isBorder && index - } - - return { border, cellGroup, cellList, setIndexAndStatus, getIndex } + return { border } } diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts new file mode 100644 index 0000000..7e1170c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts @@ -0,0 +1,5 @@ +import type { ComponentPublicInstance } from 'vue' + +export type CalendarViewInstance = ComponentPublicInstance<{ + scrollIntoView: () => void +}> diff --git a/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue b/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue index 6e41888..6b13416 100644 --- a/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue +++ b/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue @@ -353,8 +353,8 @@ const errorMessage = computed(() => { // 是否展示必填 const isRequired = computed(() => { let formRequired = false - if (form && form.rules) { - const rules = form.rules + if (form && form.props.rules) { + const rules = form.props.rules for (const key in rules) { if (Object.prototype.hasOwnProperty.call(rules, key) && key === props.prop && Array.isArray(rules[key])) { formRequired = rules[key].some((rule: FormItemRule) => rule.required) diff --git a/uni_modules/wot-design-uni/components/wd-cell-group/types.ts b/uni_modules/wot-design-uni/components/wd-cell-group/types.ts new file mode 100644 index 0000000..8590fa2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell-group/types.ts @@ -0,0 +1,18 @@ +/* + * @Author: weisheng + * @Date: 2023-12-14 11:21:58 + * @LastEditTime: 2024-01-03 21:51:36 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-cell-group/types.ts + * 记得注释 + */ +import { type InjectionKey } from 'vue' + +export type CelllGroupProvide = { + props: { + border?: boolean + } +} + +export const CELL_GROUP_KEY: InjectionKey = Symbol('wd-cell-group') diff --git a/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue b/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue index 1658b57..f0dd56b 100644 --- a/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue +++ b/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue @@ -30,7 +30,8 @@ export default { diff --git a/uni_modules/wot-design-uni/components/wd-tabs/types.ts b/uni_modules/wot-design-uni/components/wd-tabs/types.ts new file mode 100644 index 0000000..6517746 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabs/types.ts @@ -0,0 +1,9 @@ +import { type InjectionKey } from 'vue' + +export type TabsProvide = { + state: { + activeIndex: number + } +} + +export const TABS_KEY: InjectionKey = Symbol('wd-tabs') diff --git a/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue b/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue index f1fd302..6e340ca 100644 --- a/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue +++ b/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue @@ -15,8 +15,8 @@ @click="handleSelect(index)" v-for="(item, index) in items" :key="index" - :class="`wd-tabs__nav-item ${activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`" - :style="activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''" + :class="`wd-tabs__nav-item ${state.activeIndex === index ? 'is-active' : ''} ${item.disabled ? 'is-disabled' : ''}`" + :style="state.activeIndex === index ? (color ? 'color:' + color : '') : inactiveColor ? 'color:' + inactiveColor : ''" > {{ item.title }} @@ -36,9 +36,9 @@ {{ item.title }} @@ -100,7 +100,7 @@ 全部 - + {{ item.title }} @@ -131,9 +131,11 @@ export default { }