|
@@ -1,3 +1,4 @@
|
|
|
|
+import { InputNumber } from "ant-design-vue";
|
|
import { createAttrsForm } from "../../../defines/createAttrsForm";
|
|
import { createAttrsForm } from "../../../defines/createAttrsForm";
|
|
import { createCompHooks } from "../../../defines/createCompHooks";
|
|
import { createCompHooks } from "../../../defines/createCompHooks";
|
|
import { createCompId } from "../../../defines/createCompId";
|
|
import { createCompId } from "../../../defines/createCompId";
|
|
@@ -9,15 +10,18 @@ export const options = {
|
|
thumbnail: require("@/assets/comps/Card11/thumbnail.jpg"),
|
|
thumbnail: require("@/assets/comps/Card11/thumbnail.jpg"),
|
|
};
|
|
};
|
|
|
|
|
|
-export const { createComp, useCompData } = createCompHooks({
|
|
|
|
- value: {},
|
|
|
|
|
|
+export const { createComp, useCompData, useCreateChild } = createCompHooks({
|
|
layout: {
|
|
layout: {
|
|
- padding: "0.5rem 0",
|
|
|
|
|
|
+ padding: "0.2rem 0",
|
|
|
|
+ margin: "0.3rem 0.35rem",
|
|
|
|
+ },
|
|
|
|
+ value: {
|
|
|
|
+ columns: 3,
|
|
},
|
|
},
|
|
children: {
|
|
children: {
|
|
text: () =>
|
|
text: () =>
|
|
createCompId("Text", {
|
|
createCompId("Text", {
|
|
- value: `<p><span style="color:#666;font-size:12px;"><strong>皮中贵族,触及之处皆舒适,柔韧度高的细腻肌理皮革,触感柔润亲肤,透气</strong></span></p><p><span style="color:#666;font-size:12px;"><strong>质量经久耐磨,性价比高, 经典之作用不过时。 潮流耐磨的2023年最新款皮革材料</strong></span></p>`,
|
|
|
|
|
|
+ value: `<p><span style="color:hsl(0, 0%, 30%);font-size:12px;">皮中贵族,触及之处皆舒适,柔韧度高的细腻肌理皮革,触感柔润亲肤,透气</span></p><p><span style="color:hsl(0, 0%, 30%);font-size:12px;">质量经久耐磨,性价比高, 经典之作用不过时。 </span></p>`,
|
|
layout: {
|
|
layout: {
|
|
textAlign: "center",
|
|
textAlign: "center",
|
|
},
|
|
},
|
|
@@ -34,7 +38,24 @@ export const { createComp, useCompData } = createCompHooks({
|
|
url: require("@/assets/comps/Card11/img_shoe.png"),
|
|
url: require("@/assets/comps/Card11/img_shoe.png"),
|
|
},
|
|
},
|
|
}),
|
|
}),
|
|
|
|
+ list: (defaultOpts: any, length = 3) => {
|
|
|
|
+ let i = 0;
|
|
|
|
+ return Array.from({ length }, () => {
|
|
|
|
+ i = i + 1;
|
|
|
|
+ return createCompId("Image", {
|
|
|
|
+ value: {
|
|
|
|
+ url: require(`@/assets/comps/Card11/cover_${i}.png`),
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
-export const Form = createAttrsForm([]);
|
|
|
|
|
|
+export const Form = createAttrsForm([
|
|
|
|
+ {
|
|
|
|
+ label: "列表行数",
|
|
|
|
+ dataIndex: "value.columns",
|
|
|
|
+ component: InputNumber,
|
|
|
|
+ },
|
|
|
|
+]);
|