From 1e02395b50f42bf4ea4a6feacf7e3e836a461129 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Thu, 22 Aug 2024 17:53:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1.=E4=BF=9D=E5=AD=98=E6=95=B0=E6=8D=AE=20sw?= =?UTF-8?q?s=202024-08-22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/diy.ts | 36 +++++++ src/components/base/no-data/index.vue | 19 +++- src/components/common/upload/index.vue | 2 +- src/components/common/upload/upload-model.vue | 2 +- .../common/url-value/link-articles.vue | 2 +- .../common/url-value/link-brand.vue | 2 +- .../common/url-value/link-goods-category.vue | 2 +- .../common/url-value/link-goods.vue | 2 +- src/components/common/url-value/link-list.vue | 4 +- src/layout/components/navbar/index.vue | 1 + src/layout/index.vue | 100 +++++++++++++++--- 11 files changed, 146 insertions(+), 26 deletions(-) create mode 100644 src/api/diy.ts diff --git a/src/api/diy.ts b/src/api/diy.ts new file mode 100644 index 00000000..0f1b0043 --- /dev/null +++ b/src/api/diy.ts @@ -0,0 +1,36 @@ +import { id } from 'element-plus/es/locale'; +import request from '@/utils/request'; + +class DiyAPI { + /** diy初始化接口--获取详情 */ + static getInit(data: diy) { + return request({ + url: `diyapi/diydetail`, + method: 'post', + data, + }); + } + /** diy接口--保存 */ + static save(data: diyData) { + return request({ + url: `diyapi/diysave`, + method: 'post', + data, + }); + } +} + +export default DiyAPI; + +interface diy { + /** 主键 */ + id: string; +} +export interface diyData { + id: string; + logo: string; + name: string; + describe: string; + config: string; + is_enable: string; +} diff --git a/src/components/base/no-data/index.vue b/src/components/base/no-data/index.vue index ace2f568..e79f441a 100644 --- a/src/components/base/no-data/index.vue +++ b/src/components/base/no-data/index.vue @@ -1,7 +1,7 @@ @@ -9,20 +9,29 @@ interface Props { imgWidth?: string; height?: string; + size?: string; + text?: string; } const props = withDefaults(defineProps(), { - imgWidth: '100', - height: '200', + imgWidth: '100px', + height: '200px', + size: '14px', + text: '暂无数据', }); const noData_image = ref(new URL(`../../../assets/images/noData.png`, import.meta.url).href); const style = computed(() => { return { - width: props.imgWidth.search('px') > -1 ? props.imgWidth : props.imgWidth + 'px', + width: props.imgWidth, }; }); const container_style = computed(() => { return { - height: props.height.search('px') > -1 ? props.height : props.height + 'px', + height: props.height, + }; +}); +const text_style = computed(() => { + return { + fontSize: props.size, }; }); diff --git a/src/components/common/upload/index.vue b/src/components/common/upload/index.vue index 65048d1e..821bd7c0 100644 --- a/src/components/common/upload/index.vue +++ b/src/components/common/upload/index.vue @@ -121,7 +121,7 @@
- +
diff --git a/src/components/common/upload/upload-model.vue b/src/components/common/upload/upload-model.vue index 4d720356..5c30aeda 100644 --- a/src/components/common/upload/upload-model.vue +++ b/src/components/common/upload/upload-model.vue @@ -136,7 +136,7 @@
- +
diff --git a/src/components/common/url-value/link-articles.vue b/src/components/common/url-value/link-articles.vue index bc96b7a5..32cd0c6b 100644 --- a/src/components/common/url-value/link-articles.vue +++ b/src/components/common/url-value/link-articles.vue @@ -40,7 +40,7 @@