feat: 添加素材分组

master
绝弹 2023-10-10 23:28:34 +08:00
parent 2076a87f19
commit 177a060323
3 changed files with 65 additions and 20 deletions

View File

@ -1,17 +1,16 @@
<template> <template>
<!-- <a-config-provider> <a-config-provider>
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<page-403 v-if="Math.random() > 0.999"></page-403> <page-403 v-if="Math.random() > 0.999"></page-403>
<component v-else :is="Component"></component> <component v-else :is="Component"></component>
</router-view> </router-view>
</a-config-provider> --> </a-config-provider>
<div> <!-- <div>
<my-editor></my-editor> <my-editor></my-editor>
</div> </div> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import MyEditor from '@/components/editor/index.vue';
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -1,15 +1,55 @@
<template> <template>
<BreadPage> <BreadPage>
<Table v-bind="table"> <div class="min-h-full grid grid-cols-[auto_auto_1fr]">
<template #action> <div class="w-[220px]">
<a-button type="primary"> <!-- <div class="h-6 flex items-end justify-between gap-2">
<template #icon> <div class="text-base">
<i class="icon-park-outline-upload"></i> 素材分组
</div>
<div>
<a-link>添加</a-link>
</div>
</div> -->
<!-- <a-divider :margin="12"></a-divider> -->
<div class="flex gap-2">
<a-input-search allow-clear placeholder="分组名称..." class="mb-2"></a-input-search>
<a-button>
<template #icon>
<i class="icon-park-outline-add"></i>
</template>
</a-button>
</div>
<li
v-for="i in 10"
class="group flex items-center justify-between gap-2 h-8 rounded mb-1 pl-2 hover:bg-gray-100 cursor-pointer">
<div>
<i class="icon-file-folder"></i>
日常素材
<span class="text-xs text-gray-400">(10)</span>
</div>
<div>
<a-button size="small" type="text" class="!hidden !group-hover:inline-block">
<template #icon>
<i class="icon-park-outline-more-one text-gray-400 hover:text-gray-700"></i>
</template>
</a-button>
</div>
</li>
</div>
<a-divider direction="vertical" :margin="16"></a-divider>
<div>
<Table v-bind="table">
<template #action>
<a-button type="primary">
<template #icon>
<i class="icon-park-outline-upload"></i>
</template>
上传
</a-button>
</template> </template>
上传 </Table>
</a-button> </div>
</template> </div>
</Table>
</BreadPage> </BreadPage>
</template> </template>
@ -59,12 +99,12 @@ const table = useTable({
search: { search: {
items: [ items: [
{ {
field: 'name', field: "name",
label: '文件名称', label: "文件名称",
type: 'input', type: "input",
} },
] ],
} },
}); });
</script> </script>

View File

@ -8,7 +8,12 @@ export {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
AAvatar: typeof import('@arco-design/web-vue')['Avatar'] AAvatar: typeof import('@arco-design/web-vue')['Avatar']
ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb']
ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem']
AButton: typeof import('@arco-design/web-vue')['Button'] AButton: typeof import('@arco-design/web-vue')['Button']
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup']
AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider']
ADivider: typeof import('@arco-design/web-vue')['Divider'] ADivider: typeof import('@arco-design/web-vue')['Divider']
ADoption: typeof import('@arco-design/web-vue')['Doption'] ADoption: typeof import('@arco-design/web-vue')['Doption']
ADrawer: typeof import('@arco-design/web-vue')['Drawer'] ADrawer: typeof import('@arco-design/web-vue')['Drawer']
@ -38,6 +43,7 @@ declare module '@vue/runtime-core' {
ATag: typeof import('@arco-design/web-vue')['Tag'] ATag: typeof import('@arco-design/web-vue')['Tag']
ATextarea: typeof import('@arco-design/web-vue')['Textarea'] ATextarea: typeof import('@arco-design/web-vue')['Textarea']
ATooltip: typeof import('@arco-design/web-vue')['Tooltip'] ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
AUpload: typeof import('@arco-design/web-vue')['Upload']
Block: typeof import('./../components/editor/panel-main/components/block.vue')['default'] Block: typeof import('./../components/editor/panel-main/components/block.vue')['default']
BlockAttr: typeof import('./../components/editor/panel-right/block-attr.vue')['default'] BlockAttr: typeof import('./../components/editor/panel-right/block-attr.vue')['default']
BreadCrumb: typeof import('./../components/breadcrumb/bread-crumb.vue')['default'] BreadCrumb: typeof import('./../components/breadcrumb/bread-crumb.vue')['default']