From 5f193a7474fcbf0257d82bbe07bf18a9d12093e6 Mon Sep 17 00:00:00 2001 From: baishun Date: Mon, 27 Feb 2023 10:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/App.vue | 14 ++++++++++---- src/bg-ui/bg-detail-table.vue | 15 ++++++--------- src/bg-ui/bg-info.vue | 8 +++----- src/bg-ui/bg-layout-card.vue | 3 +-- src/bg-ui/bg-list.vue | 7 ++++--- src/bg-ui/bg-nav-list.vue | 2 +- src/bg-ui/bg-nav.vue | 2 +- src/bg-ui/bg-rich-text.vue | 12 ++++-------- src/bg-ui/bg-table-btns2.vue | 4 +--- src/bg-ui/bg-table-pro.vue | 4 ++-- src/bg-ui/bg-table.vue | 2 +- src/bg-ui/bg-upload-image.vue | 2 +- src/bg-ui/bg-upload.vue | 15 +++++++-------- src/bg-ui/debounce.js | 2 +- src/bg-ui/utils/index.js | 2 +- 16 files changed, 45 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 5af2250..a313922 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "vite build", "preview": "vite preview", "lint": "eslint --ext .js,vue --ignore-pattern '!.*ignore' .", - "lint:fix": "eslint --fix && prettier --config .prettierrc --write ." + "lint:fix": "prettier --config .prettierrc --write . && yarn lint --fix" }, "dependencies": { "@element-plus/icons-vue": "^2.0.10", diff --git a/src/App.vue b/src/App.vue index f6e0918..cdc9df6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -79,6 +79,8 @@ const info = reactive({ ], }); +const aFileList = ref([]); + const { options: btnsOption, currentValue: btnsCurrentValue } = toRefs(btns); const { title: cardTitle, icon: cardIcon } = toRefs(card); @@ -220,10 +222,14 @@ const { title: cardTitle, icon: cardIcon } = toRefs(card); + v-model="aFileList" + :el-attrs="{ + multiple: false, + drag: true, + }" + :auto="false" + :custom-tips="true" + :file-types="['zip', 'tgz', 'tar', 'gz']" /> diff --git a/src/bg-ui/bg-detail-table.vue b/src/bg-ui/bg-detail-table.vue index 129d624..006a975 100644 --- a/src/bg-ui/bg-detail-table.vue +++ b/src/bg-ui/bg-detail-table.vue @@ -18,17 +18,13 @@ v-if="!item.urls" :title="item.info" :style="item.url ? { color: '#515fe7', cursor: 'pointer' } : ''" - @click="down_file(item.url)" - >{{ item.info }} + @click="down_file(item.url)">{{ item.info }} {{ helper.downloadFileFormatNew(it) }}、 + @click="down_file(it)">{{ helper.downloadFileFormatNew(it) }}、 @@ -43,6 +39,7 @@ diff --git a/src/bg-ui/bg-nav-list.vue b/src/bg-ui/bg-nav-list.vue index 89a944a..7764587 100644 --- a/src/bg-ui/bg-nav-list.vue +++ b/src/bg-ui/bg-nav-list.vue @@ -81,7 +81,7 @@ const props = defineProps({ }, highlightParentRule: { type: Function, - default: () => null, + default: () => {}, }, }); diff --git a/src/bg-ui/bg-nav.vue b/src/bg-ui/bg-nav.vue index 1f18e4c..b26a2a2 100644 --- a/src/bg-ui/bg-nav.vue +++ b/src/bg-ui/bg-nav.vue @@ -27,7 +27,7 @@ const props = defineProps({ }, // 导航列表 [ { name: "xxx", path: "xxx" } ] highlightParentRule: { type: Function, - default: () => null, + default: () => {}, }, }); diff --git a/src/bg-ui/bg-rich-text.vue b/src/bg-ui/bg-rich-text.vue index 83812cd..3876373 100644 --- a/src/bg-ui/bg-rich-text.vue +++ b/src/bg-ui/bg-rich-text.vue @@ -18,8 +18,10 @@