|
@@ -1,13 +1,12 @@
|
|
import { DesignComp } from "@/modules/editor/objects/DesignTemp/DesignComp";
|
|
import { DesignComp } from "@/modules/editor/objects/DesignTemp/DesignComp";
|
|
|
|
+import { compMasks } from "@/modules/editor/objects/DesignTemp/creates/CompMasks";
|
|
import FormUI, { ColumnItem } from "@queenjs/components/FormUI";
|
|
import FormUI, { ColumnItem } from "@queenjs/components/FormUI";
|
|
|
|
+import { InputNumber, Select } from "ant-design-vue";
|
|
import { isEmpty, set } from "lodash";
|
|
import { isEmpty, set } from "lodash";
|
|
import { defineComponent } from "vue";
|
|
import { defineComponent } from "vue";
|
|
import { any } from "vue-types";
|
|
import { any } from "vue-types";
|
|
import { GroupNumber } from "../formItems/GroupNumber";
|
|
import { GroupNumber } from "../formItems/GroupNumber";
|
|
-import { InputNumber, Select } from "ant-design-vue";
|
|
|
|
import { createColorOpts } from "./formOpts/createColorOpts";
|
|
import { createColorOpts } from "./formOpts/createColorOpts";
|
|
-import { ImagePicker } from "../formItems/ImagePicker";
|
|
|
|
-import { compMasks } from "@/modules/editor/objects/DesignTemp/creates/CompMasks";
|
|
|
|
|
|
|
|
const layoutColumns: ColumnItem[] = [
|
|
const layoutColumns: ColumnItem[] = [
|
|
{
|
|
{
|
|
@@ -91,63 +90,63 @@ const layoutColumns: ColumnItem[] = [
|
|
const bgColumns: ColumnItem[] = [
|
|
const bgColumns: ColumnItem[] = [
|
|
{
|
|
{
|
|
label: "背景颜色",
|
|
label: "背景颜色",
|
|
- dataIndex: "background.color",
|
|
|
|
|
|
+ dataIndex: "layout.background.color",
|
|
...createColorOpts(),
|
|
...createColorOpts(),
|
|
},
|
|
},
|
|
- {
|
|
|
|
- label: "背景图片",
|
|
|
|
- dataIndex: "background.image",
|
|
|
|
- component: ImagePicker,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "repeat",
|
|
|
|
- dataIndex: "background.repeat",
|
|
|
|
- component: "Select",
|
|
|
|
- props: {
|
|
|
|
- options: [
|
|
|
|
- "repeat",
|
|
|
|
- "no-repeat",
|
|
|
|
- "repeat-x",
|
|
|
|
- "repeat-y",
|
|
|
|
- "repeat-round",
|
|
|
|
- "repeat-space",
|
|
|
|
- ].map((v) => ({ label: v, value: v })),
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "position",
|
|
|
|
- dataIndex: "background.position",
|
|
|
|
- component: "Select",
|
|
|
|
- props: {
|
|
|
|
- options: [
|
|
|
|
- "center",
|
|
|
|
- "top",
|
|
|
|
- "bottom",
|
|
|
|
- "left",
|
|
|
|
- "left-top",
|
|
|
|
- "left-bottom",
|
|
|
|
- "right",
|
|
|
|
- "right-top",
|
|
|
|
- "right-bottom",
|
|
|
|
- ].map((v) => ({ label: v, value: v })),
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "size",
|
|
|
|
- dataIndex: "background.size",
|
|
|
|
- component: "Select",
|
|
|
|
- props: {
|
|
|
|
- options: ["auto", "cover", "contain"].map((v) => ({
|
|
|
|
- label: v,
|
|
|
|
- value: v,
|
|
|
|
- })),
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "clipPath",
|
|
|
|
- dataIndex: "background.clipPath",
|
|
|
|
- component: "Input",
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // label: "背景图片",
|
|
|
|
+ // dataIndex: "background.image",
|
|
|
|
+ // component: ImagePicker,
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // label: "repeat",
|
|
|
|
+ // dataIndex: "background.repeat",
|
|
|
|
+ // component: "Select",
|
|
|
|
+ // props: {
|
|
|
|
+ // options: [
|
|
|
|
+ // "repeat",
|
|
|
|
+ // "no-repeat",
|
|
|
|
+ // "repeat-x",
|
|
|
|
+ // "repeat-y",
|
|
|
|
+ // "repeat-round",
|
|
|
|
+ // "repeat-space",
|
|
|
|
+ // ].map((v) => ({ label: v, value: v })),
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // label: "position",
|
|
|
|
+ // dataIndex: "background.position",
|
|
|
|
+ // component: "Select",
|
|
|
|
+ // props: {
|
|
|
|
+ // options: [
|
|
|
|
+ // "center",
|
|
|
|
+ // "top",
|
|
|
|
+ // "bottom",
|
|
|
|
+ // "left",
|
|
|
|
+ // "left-top",
|
|
|
|
+ // "left-bottom",
|
|
|
|
+ // "right",
|
|
|
|
+ // "right-top",
|
|
|
|
+ // "right-bottom",
|
|
|
|
+ // ].map((v) => ({ label: v, value: v })),
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // label: "size",
|
|
|
|
+ // dataIndex: "background.size",
|
|
|
|
+ // component: "Select",
|
|
|
|
+ // props: {
|
|
|
|
+ // options: ["auto", "cover", "contain"].map((v) => ({
|
|
|
|
+ // label: v,
|
|
|
|
+ // value: v,
|
|
|
|
+ // })),
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // label: "clipPath",
|
|
|
|
+ // dataIndex: "background.clipPath",
|
|
|
|
+ // component: "Input",
|
|
|
|
+ // },
|
|
];
|
|
];
|
|
|
|
|
|
export function createAttrsForm(valueColumns: ColumnItem[]) {
|
|
export function createAttrsForm(valueColumns: ColumnItem[]) {
|
|
@@ -180,7 +179,7 @@ export function createAttrsForm(valueColumns: ColumnItem[]) {
|
|
columns={layoutColumns}
|
|
columns={layoutColumns}
|
|
onChange={changeVal}
|
|
onChange={changeVal}
|
|
/>
|
|
/>
|
|
- {!isEmpty(component?.background) ? (
|
|
|
|
|
|
+ {!isEmpty(component?.layout?.background) ? (
|
|
<>
|
|
<>
|
|
<div>组件背景</div>
|
|
<div>组件背景</div>
|
|
<FormUI
|
|
<FormUI
|