|
@@ -1,33 +1,59 @@
|
|
|
-import { Button } from "ant-design-vue";
|
|
|
+import { css, cx } from "@linaria/core";
|
|
|
+import { Button, Tooltip } from "ant-design-vue";
|
|
|
import { computed, reactive } from "vue";
|
|
|
|
|
|
-import { IconImage, IconShape, IconTpl, IconVideo } from "@/assets/icons";
|
|
|
-import { css, cx } from "@linaria/core";
|
|
|
+import {
|
|
|
+ IconAi,
|
|
|
+ IconApplication,
|
|
|
+ IconCloud,
|
|
|
+ IconImage,
|
|
|
+ IconText,
|
|
|
+ IconTpl,
|
|
|
+ IconVideo,
|
|
|
+} from "@/assets/icons";
|
|
|
import { IconCube, IconLayers } from "@queenjs/icons";
|
|
|
import { defineUI } from "queenjs";
|
|
|
+import { CompTree } from "../SliderRight/CompTree";
|
|
|
+import AiText from "./AiText";
|
|
|
+import Application from "./Application";
|
|
|
import CustomComps from "./CustomComps";
|
|
|
-import Shapes from "./Shapes";
|
|
|
import { Sources } from "./Sources";
|
|
|
import Templates from "./Templates";
|
|
|
-import { CompTree } from "../SliderRight/CompTree";
|
|
|
+import Text from "./Text";
|
|
|
|
|
|
const tabs = [
|
|
|
{
|
|
|
- title: "图片",
|
|
|
- icon: IconImage,
|
|
|
+ title: "模板",
|
|
|
+ icon: IconTpl,
|
|
|
+ component: Templates,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "组合",
|
|
|
+ icon: IconCube,
|
|
|
content: [
|
|
|
{
|
|
|
title: "平台",
|
|
|
- component: Sources,
|
|
|
- props: { sourceType: "Image", sourceFrom: "system" },
|
|
|
+ component: CustomComps,
|
|
|
+ props: { compType: "senior" },
|
|
|
},
|
|
|
{
|
|
|
title: "我的",
|
|
|
- component: Sources,
|
|
|
- props: { sourceType: "Image", sourceFrom: "user" },
|
|
|
+ component: CustomComps,
|
|
|
+ props: { compType: "user" },
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "文字",
|
|
|
+ icon: IconText,
|
|
|
+ component: Text,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "图片",
|
|
|
+ icon: IconImage,
|
|
|
+ component: Sources,
|
|
|
+ props: { sourceType: "Image", sourceFrom: "system" },
|
|
|
+ },
|
|
|
// {
|
|
|
// title: "形状",
|
|
|
// icon: IconShape,
|
|
@@ -36,39 +62,34 @@ const tabs = [
|
|
|
{
|
|
|
title: "视频",
|
|
|
icon: IconVideo,
|
|
|
- content: [
|
|
|
- {
|
|
|
- title: "平台",
|
|
|
- component: Sources,
|
|
|
- props: { sourceType: "Video", sourceFrom: "system" },
|
|
|
- },
|
|
|
- {
|
|
|
- title: "我的",
|
|
|
- component: Sources,
|
|
|
- props: { sourceType: "Video", sourceFrom: "user" },
|
|
|
- },
|
|
|
- ],
|
|
|
+ component: Sources,
|
|
|
+ props: { sourceType: "Video", sourceFrom: "system" },
|
|
|
},
|
|
|
{
|
|
|
title: "组件",
|
|
|
- icon: IconCube,
|
|
|
+ icon: IconApplication,
|
|
|
+ component: Application,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "已上传",
|
|
|
+ icon: IconCloud,
|
|
|
content: [
|
|
|
{
|
|
|
- title: "平台",
|
|
|
- component: CustomComps,
|
|
|
- props: { compType: "senior" },
|
|
|
+ title: "图片",
|
|
|
+ component: Sources,
|
|
|
+ props: { sourceType: "Image", sourceFrom: "user" },
|
|
|
},
|
|
|
{
|
|
|
- title: "我的",
|
|
|
- component: CustomComps,
|
|
|
- props: { compType: "user" },
|
|
|
+ title: "视频",
|
|
|
+ component: Sources,
|
|
|
+ props: { sourceType: "Video", sourceFrom: "user" },
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
- title: "模板",
|
|
|
- icon: IconTpl,
|
|
|
- component: Templates,
|
|
|
+ title: "AI",
|
|
|
+ icon: IconAi,
|
|
|
+ component: AiText,
|
|
|
},
|
|
|
{
|
|
|
title: "图层",
|
|
@@ -82,7 +103,7 @@ export default defineUI({
|
|
|
// @ts-ignore
|
|
|
const state = reactive({
|
|
|
tabIndex: 0,
|
|
|
- compIndexs: [0, 0, 0, 0, 0],
|
|
|
+ compIndexs: [0, 0, 0, 0, 0, 0, 0],
|
|
|
currentTab: computed(() => {
|
|
|
return tabs[state.tabIndex];
|
|
|
}),
|
|
@@ -103,7 +124,7 @@ export default defineUI({
|
|
|
{tabs.map((record, index) => {
|
|
|
return (
|
|
|
<>
|
|
|
- {index === tabs.length - 1 && <div class="flex-1"></div>}
|
|
|
+ {index === tabs.length - 2 && <div class="flex-1"></div>}
|
|
|
<div
|
|
|
key={index}
|
|
|
class={cx(
|
|
@@ -113,8 +134,9 @@ export default defineUI({
|
|
|
)}
|
|
|
onClick={() => (state.tabIndex = index)}
|
|
|
>
|
|
|
- <record.icon class="text-24px" />
|
|
|
- <div class="text-center mt-2px">{record.title}</div>
|
|
|
+ <Tooltip title={record.title} placement="right">
|
|
|
+ <record.icon class="text-28px p-10px" />
|
|
|
+ </Tooltip>
|
|
|
</div>
|
|
|
</>
|
|
|
);
|