diff --git a/README.md b/README.md index d4ddd4f2..f5619e8b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ * nodejs > 16.0.0 && pnpm > 7.30.0 * 演示地址【Vue3 + element-plus】: +* 演示地址【Vue3 + vben(ant-design-vue)】: * 演示地址【Vue2 + element-ui】: * 启动文档: * 视频教程: @@ -19,8 +20,8 @@ **芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。 -* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) -* 改换saas,自动引入等功能 [vue-element-plus-admin](https://gitee.com/yudaocode/vue-element-plus-admin) +* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) 实现 +* 改换 saas,自动引入等功能 * 使用 Element Plus 免费开源的中后台模版,具备如下特性: ![首页](preview/home.png) @@ -38,11 +39,11 @@ | 框架 | 说明 | 版本 | |----------------------------------------------------------------------|------------------|--------| | [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.47 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.1.4 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.34 | -| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.9.5 | -| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.33 | -| [vueuse](https://vueuse.org/) | 常用工具集 | 9.13.0 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.3.1 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.3.3 | +| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.0.4 | +| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.35 | +| [vueuse](https://vueuse.org/) | 常用工具集 | 10.1.0 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.1.6 | | [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 | diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts index 1a7a1b2f..70fc3b8f 100644 --- a/build/vite/optimize.ts +++ b/build/vite/optimize.ts @@ -17,7 +17,6 @@ const include = [ 'cropperjs', 'lodash-es', 'nprogress', - 'animate.css', 'web-storage-cache', '@iconify/iconify', '@vueuse/core', @@ -33,38 +32,58 @@ const include = [ 'element-plus/es', 'element-plus/es/locale/lang/zh-cn', 'element-plus/es/locale/lang/en', - 'element-plus/es/components/backtop/style/index', - 'element-plus/es/components/form/style/index', - 'element-plus/es/components/radio-group/style/index', - 'element-plus/es/components/radio/style/index', - 'element-plus/es/components/checkbox/style/index', - 'element-plus/es/components/checkbox-group/style/index', - 'element-plus/es/components/switch/style/index', - 'element-plus/es/components/time-picker/style/index', - 'element-plus/es/components/date-picker/style/index', - 'element-plus/es/components/col/style/index', - 'element-plus/es/components/form-item/style/index', - 'element-plus/es/components/alert/style/index', - 'element-plus/es/components/breadcrumb/style/index', - 'element-plus/es/components/select/style/index', - 'element-plus/es/components/input/style/index', - 'element-plus/es/components/breadcrumb-item/style/index', - 'element-plus/es/components/tag/style/index', - 'element-plus/es/components/pagination/style/index', - 'element-plus/es/components/table/style/index', - 'element-plus/es/components/table-column/style/index', - 'element-plus/es/components/card/style/index', - 'element-plus/es/components/row/style/index', - 'element-plus/es/components/button/style/index', - 'element-plus/es/components/menu/style/index', - 'element-plus/es/components/sub-menu/style/index', - 'element-plus/es/components/menu-item/style/index', - 'element-plus/es/components/option/style/index', - 'element-plus/es/components/dropdown/style/index', - 'element-plus/es/components/dropdown-menu/style/index', - 'element-plus/es/components/dropdown-item/style/index', - 'element-plus/es/components/skeleton/style/index', - + 'element-plus/es/components/backtop/style/css', + 'element-plus/es/components/form/style/css', + 'element-plus/es/components/radio-group/style/css', + 'element-plus/es/components/radio/style/css', + 'element-plus/es/components/checkbox/style/css', + 'element-plus/es/components/checkbox-group/style/css', + 'element-plus/es/components/switch/style/css', + 'element-plus/es/components/time-picker/style/css', + 'element-plus/es/components/date-picker/style/css', + 'element-plus/es/components/descriptions/style/css', + 'element-plus/es/components/descriptions-item/style/css', + 'element-plus/es/components/link/style/css', + 'element-plus/es/components/tooltip/style/css', + 'element-plus/es/components/drawer/style/css', + 'element-plus/es/components/dialog/style/css', + 'element-plus/es/components/checkbox-button/style/css', + 'element-plus/es/components/option-group/style/css', + 'element-plus/es/components/radio-button/style/css', + 'element-plus/es/components/cascader/style/css', + 'element-plus/es/components/color-picker/style/css', + 'element-plus/es/components/input-number/style/css', + 'element-plus/es/components/rate/style/css', + 'element-plus/es/components/select-v2/style/css', + 'element-plus/es/components/tree-select/style/css', + 'element-plus/es/components/slider/style/css', + 'element-plus/es/components/time-select/style/css', + 'element-plus/es/components/autocomplete/style/css', + 'element-plus/es/components/image-viewer/style/css', + 'element-plus/es/components/upload/style/css', + 'element-plus/es/components/col/style/css', + 'element-plus/es/components/form-item/style/css', + 'element-plus/es/components/alert/style/css', + 'element-plus/es/components/breadcrumb/style/css', + 'element-plus/es/components/select/style/css', + 'element-plus/es/components/input/style/css', + 'element-plus/es/components/breadcrumb-item/style/css', + 'element-plus/es/components/tag/style/css', + 'element-plus/es/components/pagination/style/css', + 'element-plus/es/components/table/style/css', + 'element-plus/es/components/table-v2/style/css', + 'element-plus/es/components/table-column/style/css', + 'element-plus/es/components/card/style/css', + 'element-plus/es/components/row/style/css', + 'element-plus/es/components/button/style/css', + 'element-plus/es/components/menu/style/css', + 'element-plus/es/components/sub-menu/style/css', + 'element-plus/es/components/menu-item/style/css', + 'element-plus/es/components/option/style/css', + 'element-plus/es/components/dropdown/style/css', + 'element-plus/es/components/dropdown-menu/style/css', + 'element-plus/es/components/dropdown-item/style/css', + 'element-plus/es/components/skeleton/style/css', 'element-plus/es/components/skeleton/style/css', 'element-plus/es/components/backtop/style/css', 'element-plus/es/components/menu/style/css', @@ -78,20 +97,13 @@ const include = [ 'element-plus/es/components/breadcrumb/style/css', 'element-plus/es/components/breadcrumb-item/style/css', 'element-plus/es/components/image/style/css', - 'element-plus/es/components/tag/style/css', - 'element-plus/es/components/dialog/style/css', - 'element-plus/es/components/form/style/css', - 'element-plus/es/components/form-item/style/css', - 'element-plus/es/components/card/style/css', - 'element-plus/es/components/tooltip/style/css', - 'element-plus/es/components/radio-group/style/css', - 'element-plus/es/components/radio/style/css', - 'element-plus/es/components/input-number/style/css', - 'element-plus/es/components/tree-select/style/css', - 'element-plus/es/components/drawer/style/css', - 'element-plus/es/components/image-viewer/style/css', - 'element-plus/es/components/upload/style/css', - 'element-plus/es/components/switch/style/css' + 'element-plus/es/components/collapse-transition/style/css', + 'element-plus/es/components/timeline/style/css', + 'element-plus/es/components/timeline-item/style/css', + 'element-plus/es/components/collapse/style/css', + 'element-plus/es/components/collapse-item/style/css', + 'element-plus/es/components/button-group/style/css', + 'element-plus/es/components/text/style/css' ] const exclude = ['@iconify/json'] diff --git a/package.json b/package.json index 1a836c5a..7a00c122 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,12 @@ "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", "@videojs-player/vue": "^1.0.0", - "@vueuse/core": "^9.13.0", + "@vueuse/core": "^10.1.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", - "axios": "^1.3.5", + "axios": "^1.3.6", "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", @@ -46,19 +46,19 @@ "crypto-js": "^4.1.1", "dayjs": "^1.11.7", "diagram-js": "^11.6.0", - "echarts": "^5.4.1", + "echarts": "^5.4.2", "echarts-wordcloud": "^2.1.0", "element-plus": "2.3.3", - "fast-xml-parser": "^4.1.3", + "fast-xml-parser": "^4.2.2", "highlight.js": "^11.7.0", "intro.js": "^7.0.1", "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", - "min-dash": "^4.0.0", + "min-dash": "^4.1.0", "mitt": "^3.0.0", "nprogress": "^0.2.0", - "pinia": "^2.0.34", - "qrcode": "^1.5.1", + "pinia": "^2.0.35", + "qrcode": "^1.5.3", "qs": "^6.11.1", "steady-xml": "^0.1.0", "url": "^0.11.0", @@ -73,61 +73,60 @@ "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.5.0", - "@commitlint/config-conventional": "^17.4.4", - "@iconify/json": "^2.2.38", + "@commitlint/cli": "^17.6.1", + "@commitlint/config-conventional": "^17.6.1", + "@iconify/json": "^2.2.54", "@intlify/unplugin-vue-i18n": "^0.10.0", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", "@types/lodash-es": "^4.17.7", - "@types/node": "^18.15.5", + "@types/node": "^18.16.0", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", "@vitejs/plugin-legacy": "^4.0.2", "@vitejs/plugin-vue": "^4.1.0", "@vitejs/plugin-vue-jsx": "^3.0.1", "autoprefixer": "^10.4.14", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", - "consola": "^2.15.3", - "eslint": "^8.36.0", + "consola": "^3.1.0", + "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", - "eslint-define-config": "^1.17.0", + "eslint-define-config": "^1.18.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.2.0", - "postcss": "^8.4.21", + "eslint-plugin-vue": "^9.11.0", + "lint-staged": "^13.2.1", + "postcss": "^8.4.23", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", - "prettier": "^2.8.6", - "rimraf": "^4.4.1", - "rollup": "^3.20.0", - "sass": "^1.59.3", - "stylelint": "^15.3.0", + "prettier": "^2.8.8", + "rimraf": "^5.0.0", + "rollup": "^3.20.7", + "sass": "^1.62.0", + "stylelint": "^15.6.0", "stylelint-config-html": "^1.1.0", - "stylelint-config-prettier": "^9.0.5", - "stylelint-config-recommended": "^11.0.0", - "stylelint-config-standard": "^31.0.0", + "stylelint-config-recommended": "^12.0.0", + "stylelint-config-standard": "^33.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.16.6", - "typescript": "5.0.2", - "unplugin-auto-import": "^0.15.1", - "unplugin-element-plus": "^0.7.0", + "terser": "^5.17.1", + "typescript": "5.0.4", + "unplugin-auto-import": "^0.15.3", + "unplugin-element-plus": "^0.7.1", "unplugin-vue-components": "^0.24.1", - "vite": "4.2.1", + "vite": "4.3.1", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", - "vite-plugin-progress": "^0.0.6", + "vite-plugin-progress": "^0.0.7", "vite-plugin-purge-icons": "^0.9.2", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-top-level-await": "^1.3.0", "vite-plugin-vue-setup-extend-plus": "^0.1.0", "vite-plugin-windicss": "^1.8.10", - "vue-tsc": "^1.2.0", + "vue-tsc": "^1.4.4", "windicss": "^3.5.6" }, "engines": { diff --git a/src/api/mall/product/brand.ts b/src/api/mall/product/brand.ts index dc8acc2a..94d53704 100644 --- a/src/api/mall/product/brand.ts +++ b/src/api/mall/product/brand.ts @@ -54,3 +54,8 @@ export const getBrand = (id: number) => { export const getBrandParam = (params: PageParam) => { return request.get({ url: '/product/brand/page', params }) } + +// 获得商品品牌精简信息列表 +export const getSimpleBrandList = () => { + return request.get({ url: '/product/brand/list-all-simple' }) +} diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts index 01c79f9f..ac8bac59 100644 --- a/src/api/mall/product/property.ts +++ b/src/api/mall/product/property.ts @@ -71,8 +71,8 @@ export const getPropertyList = (params: any) => { } // 获得属性项列表 -export const getPropertyListAndValue = (params: any) => { - return request.get({ url: '/product/property/get-value-list', params }) +export const getPropertyListAndValue = (data: any) => { + return request.post({ url: '/product/property/get-value-list', data }) } // ------------------------ 属性值 ------------------- diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 2cfe722c..fd55e126 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -1,46 +1,92 @@ import request from '@/config/axios' -// 创建商品 SPU -export function createSpu(data) { - return request.post({ - url: '/product/spu/create', - data: data - }) +export interface Property { + propertyId?: number // 属性编号 + propertyName?: string // 属性名称 + valueId?: number // 属性值编号 + valueName?: string // 属性值名称 } -// 更新商品 SPU -export function updateSpu(data) { - return request.put({ - url: '/product/spu/update', - data: data - }) +// TODO puhui999:是不是直接叫 Sku 更简洁一点哈。type 待后面,总感觉有个类型? +export interface SkuType { + id?: number // 商品 SKU 编号 + spuId?: number // SPU 编号 + properties?: Property[] // 属性数组 + price?: number // 商品价格 + marketPrice?: number // 市场价 + costPrice?: number // 成本价 + barCode?: string // 商品条码 + picUrl?: string // 图片地址 + stock?: number // 库存 + weight?: number // 商品重量,单位:kg 千克 + volume?: number // 商品体积,单位:m^3 平米 + subCommissionFirstPrice?: number // 一级分销的佣金 + subCommissionSecondPrice?: number // 二级分销的佣金 + salesCount?: number // 商品销量 } -// 删除商品 SPU -export function deleteSpu(id) { - return request.delete({ - url: `/product/spu/delete?id=${id}` - }) +// TODO puhui999:是不是直接叫 Spu 更简洁一点哈。type 待后面,总感觉有个类型? +export interface SpuType { + id?: number + name?: string // 商品名称 + categoryId?: number | null // 商品分类 + keyword?: string // 关键字 + unit?: number | null // 单位 + picUrl?: string // 商品封面图 + sliderPicUrls?: string[] // 商品轮播图 + introduction?: string // 商品简介 + deliveryTemplateId?: number | null // 运费模版 + brandId?: number | null // 商品品牌编号 + specType?: boolean // 商品规格 + subCommissionType?: boolean // 分销类型 + skus: SkuType[] // sku数组 + description?: string // 商品详情 + sort?: string // 商品排序 + giveIntegral?: number // 赠送积分 + virtualSalesCount?: number // 虚拟销量 + recommendHot?: boolean // 是否热卖 + recommendBenefit?: boolean // 是否优惠 + recommendBest?: boolean // 是否精品 + recommendNew?: boolean // 是否新品 + recommendGood?: boolean // 是否优品 } -// 获得商品 SPU 详情 -export function getSpuDetail(id) { - return request.get({ - url: `/product/spu/get-detail?id=${id}` - }) +// 获得 Spu 列表 +export const getSpuPage = (params: PageParam) => { + return request.get({ url: '/product/spu/page', params }) } -// 获得商品 SPU 分页 -export function getSpuPage(query) { - return request.get({ - url: '/product/spu/page', - params: query - }) +// 获得 Spu 列表 tabsCount +export const getTabsCount = () => { + return request.get({ url: '/product/spu/get-count' }) } -// 获得商品 SPU 精简列表 -export function getSpuSimpleList() { - return request.get({ - url: '/product/spu/get-simple-list' - }) +// 创建商品 Spu +export const createSpu = (data: SpuType) => { + return request.post({ url: '/product/spu/create', data }) +} + +// 更新商品 Spu +export const updateSpu = (data: SpuType) => { + return request.put({ url: '/product/spu/update', data }) +} + +// 更新商品 Spu status +export const updateStatus = (data: { id: number; status: number }) => { + return request.put({ url: '/product/spu/update-status', data }) +} + +// 获得商品 Spu +export const getSpu = (id: number) => { + return request.get({ url: `/product/spu/get-detail?id=${id}` }) +} + +// 删除商品 Spu +export const deleteSpu = (id: number) => { + return request.delete({ url: `/product/spu/delete?id=${id}` }) +} + +// 导出商品 Spu Excel +export const exportSpu = async (params) => { + return await request.download({ url: '/product/spu/export', params }) } diff --git a/src/api/mall/trade/delivery/express/index.ts b/src/api/mall/trade/delivery/express/index.ts new file mode 100644 index 00000000..95429a40 --- /dev/null +++ b/src/api/mall/trade/delivery/express/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +export interface DeliveryExpressVO { + id: number + code: string + name: string + logo: string + sort: number + status: number +} + +// 查询快递公司列表 +export const getDeliveryExpressPage = async (params: PageParam) => { + return await request.get({ url: '/trade/delivery/express/page', params }) +} + +// 查询快递公司详情 +export const getDeliveryExpress = async (id: number) => { + return await request.get({ url: '/trade/delivery/express/get?id=' + id }) +} + +// 新增快递公司 +export const createDeliveryExpress = async (data: DeliveryExpressVO) => { + return await request.post({ url: '/trade/delivery/express/create', data }) +} + +// 修改快递公司 +export const updateDeliveryExpress = async (data: DeliveryExpressVO) => { + return await request.put({ url: '/trade/delivery/express/update', data }) +} + +// 删除快递公司 +export const deleteDeliveryExpress = async (id: number) => { + return await request.delete({ url: '/trade/delivery/express/delete?id=' + id }) +} + +// 导出快递公司 Excel +export const exportDeliveryExpressApi = async (params) => { + return await request.download({ url: '/trade/delivery/express/export-excel', params }) +} diff --git a/src/api/mall/trade/delivery/expressTemplate/index.ts b/src/api/mall/trade/delivery/expressTemplate/index.ts new file mode 100644 index 00000000..9414c847 --- /dev/null +++ b/src/api/mall/trade/delivery/expressTemplate/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +export interface DeliveryExpressTemplateVO { + id: number + name: string + chargeMode: number + sort: number + templateCharge: ExpressTemplateChargeVO[] + templateFree: ExpressTemplateFreeVO[] +} + +export declare type ExpressTemplateChargeVO = { + areaIds: number[] + startCount: number + startPrice: number + extraCount: number + extraPrice: number +} + +export declare type ExpressTemplateFreeVO = { + areaIds: number[] + freeCount: number + freePrice: number +} + +// 查询快递运费模板列表 +export const getDeliveryExpressTemplatePage = async (params: PageParam) => { + return await request.get({ url: '/trade/delivery/express-template/page', params }) +} + +// 查询快递运费模板详情 +export const getDeliveryExpressTemplate = async (id: number) => { + return await request.get({ url: '/trade/delivery/express-template/get?id=' + id }) +} + +// 新增快递运费模板 +export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { + return await request.post({ url: '/trade/delivery/express-template/create', data }) +} + +// 修改快递运费模板 +export const updateDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { + return await request.put({ url: '/trade/delivery/express-template/update', data }) +} + +// 删除快递运费模板 +export const deleteDeliveryExpressTemplate = async (id: number) => { + return await request.delete({ url: '/trade/delivery/express-template/delete?id=' + id }) +} + +// 导出快递运费模板 Excel +export const exportDeliveryExpressTemplateApi = async (params) => { + return await request.download({ url: '/trade/delivery/express-template/export-excel', params }) +} diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts index e91a4997..b7da941f 100644 --- a/src/api/system/area/index.ts +++ b/src/api/system/area/index.ts @@ -5,6 +5,14 @@ export const getAreaTree = async () => { return await request.get({ url: '/system/area/tree' }) } +export const getChildrenArea = async (id: number) => { + return await request.get({ url: '/system/area/get-children?id=' + id }) +} + +export const getAreaListByIds = async (ids) => { + return await request.get({ url: '/system/area/get-by-ids?ids=' + ids }) +} + // 获得 IP 对应的地区名 export const getAreaByIp = async (ip: string) => { return await request.get({ url: '/system/area/get-by-ip?ip=' + ip }) diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts index 50196e85..cd0e1223 100644 --- a/src/api/system/notify/template/index.ts +++ b/src/api/system/notify/template/index.ts @@ -39,7 +39,7 @@ export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { } // 删除站内信模板 -export const deleteNotifyTemplateApi = async (id: number) => { +export const deleteNotifyTemplate = async (id: number) => { return await request.delete({ url: '/system/notify-template/delete?id=' + id }) } diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts index 8e9dca1e..ac89ae89 100644 --- a/src/api/system/oauth2/token.ts +++ b/src/api/system/oauth2/token.ts @@ -17,6 +17,6 @@ export const getAccessTokenPage = (params: PageParam) => { } // 删除 token -export const deleteAccessToken = (accessToken: number) => { +export const deleteAccessToken = (accessToken: string) => { return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) } diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts index 9cab8ff1..cdfc8caa 100644 --- a/src/components/Form/src/helper.ts +++ b/src/components/Form/src/helper.ts @@ -1,6 +1,6 @@ import type { Slots } from 'vue' import { getSlot } from '@/utils/tsxHelper' -import { PlaceholderMoel } from './types' +import { PlaceholderModel } from './types' import { FormSchema } from '@/types/form' import { ColProps } from '@/types/components' @@ -10,7 +10,7 @@ import { ColProps } from '@/types/components' * @returns 返回提示信息对象 * @description 用于自动设置placeholder */ -export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel => { +export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => { const { t } = useI18n() const textMap = ['Input', 'Autocomplete', 'InputNumber', 'InputPassword'] const selectMap = ['Select', 'SelectV2', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect'] @@ -108,8 +108,8 @@ export const setItemComponentSlots = ( /** * * @param schema Form表单结构化数组 - * @param formModel FormMoel - * @returns FormMoel + * @param formModel FormModel + * @returns FormModel * @description 生成对应的formModel */ export const initModel = (schema: FormSchema[], formModel: Recordable) => { diff --git a/src/components/Form/src/types.ts b/src/components/Form/src/types.ts index 92a49d85..dcd01e78 100644 --- a/src/components/Form/src/types.ts +++ b/src/components/Form/src/types.ts @@ -1,6 +1,6 @@ import { FormSchema } from '@/types/form' -export interface PlaceholderMoel { +export interface PlaceholderModel { placeholder?: string startPlaceholder?: string endPlaceholder?: string diff --git a/src/components/UploadFile/src/UploadImgs.vue b/src/components/UploadFile/src/UploadImgs.vue index 82e5030c..857959bf 100644 --- a/src/components/UploadFile/src/UploadImgs.vue +++ b/src/components/UploadFile/src/UploadImgs.vue @@ -1,19 +1,19 @@ - - diff --git a/src/views/mall/trade/delivery/express/ExpressForm.vue b/src/views/mall/trade/delivery/express/ExpressForm.vue new file mode 100644 index 00000000..ea7656e7 --- /dev/null +++ b/src/views/mall/trade/delivery/express/ExpressForm.vue @@ -0,0 +1,124 @@ + + diff --git a/src/views/mall/trade/delivery/express/index.vue b/src/views/mall/trade/delivery/express/index.vue new file mode 100644 index 00000000..323a297f --- /dev/null +++ b/src/views/mall/trade/delivery/express/index.vue @@ -0,0 +1,184 @@ + + diff --git a/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue new file mode 100644 index 00000000..5b25422d --- /dev/null +++ b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue @@ -0,0 +1,405 @@ + + diff --git a/src/views/mall/trade/delivery/expressTemplate/index.vue b/src/views/mall/trade/delivery/expressTemplate/index.vue new file mode 100644 index 00000000..e9f670f5 --- /dev/null +++ b/src/views/mall/trade/delivery/expressTemplate/index.vue @@ -0,0 +1,160 @@ + + diff --git a/src/views/system/dict/data/DictDataForm.vue b/src/views/system/dict/data/DictDataForm.vue index 8b9bb1db..26932e5b 100644 --- a/src/views/system/dict/data/DictDataForm.vue +++ b/src/views/system/dict/data/DictDataForm.vue @@ -122,7 +122,9 @@ const open = async (type: string, id?: number, dictType?: string) => { dialogTitle.value = t('action.' + type) formType.value = type resetForm() - formData.value.dictType = dictType + if (dictType) { + formData.value.dictType = dictType + } // 修改时,设置数据 if (id) { formLoading.value = true diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index bbcd8a2c..755b9415 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -2,36 +2,36 @@ - 搜索 - 重置 - - 新增 + + + 搜索 + + + + 重置 - 导出 + + 新增 + + + + 导出 @@ -79,29 +87,29 @@ - - - - + + + + - + - + - diff --git a/src/views/system/oauth2/token/index.vue b/src/views/system/oauth2/token/index.vue index 803cd7d1..b97506ff 100644 --- a/src/views/system/oauth2/token/index.vue +++ b/src/views/system/oauth2/token/index.vue @@ -80,7 +80,7 @@ 强退 @@ -142,12 +142,12 @@ const resetQuery = () => { } /** 强制退出操作 */ -const handleForceLogout = async (id: number) => { +const handleForceLogout = async (accessToken: string) => { try { // 删除的二次确认 await message.confirm('是否要强制退出用户') // 发起删除 - await OAuth2AccessTokenApi.deleteAccessToken(id) + await OAuth2AccessTokenApi.deleteAccessToken(accessToken) message.success(t('common.success')) // 刷新列表 await getList() diff --git a/src/views/system/post/PostForm.vue b/src/views/system/post/PostForm.vue index e4ea8ad7..a314806b 100644 --- a/src/views/system/post/PostForm.vue +++ b/src/views/system/post/PostForm.vue @@ -117,7 +117,7 @@ const resetForm = () => { sort: undefined, status: CommonStatusEnum.ENABLE, remark: '' - } + } as any formRef.value?.resetFields() } diff --git a/stylelint.config.js b/stylelint.config.js index d4005726..a8ba3d30 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -2,7 +2,7 @@ module.exports = { root: true, plugins: ['stylelint-order'], customSyntax: 'postcss-html', - extends: ['stylelint-config-standard', 'stylelint-config-prettier'], + extends: ['stylelint-config-standard'], rules: { 'selector-pseudo-class-no-unknown': [ true,