-
{{ item.label }}
+
diff --git a/src/engineer/configs/BaseConfig.vue b/src/engineer/configs/BaseConfig.vue
index e69de29..a9924bc 100644
--- a/src/engineer/configs/BaseConfig.vue
+++ b/src/engineer/configs/BaseConfig.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/src/engineer/configs/BooleanConfig.vue b/src/engineer/configs/BooleanConfig.vue
index 27e439c..d168c0c 100644
--- a/src/engineer/configs/BooleanConfig.vue
+++ b/src/engineer/configs/BooleanConfig.vue
@@ -1,5 +1,7 @@
-
diff --git a/src/engineer/configs/ColorConfig.vue b/src/engineer/configs/ColorConfig.vue
new file mode 100644
index 0000000..1c6e8d4
--- /dev/null
+++ b/src/engineer/configs/ColorConfig.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/src/engineer/configs/ImageConfig.vue b/src/engineer/configs/ImageConfig.vue
index e69de29..fe65cdd 100644
--- a/src/engineer/configs/ImageConfig.vue
+++ b/src/engineer/configs/ImageConfig.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
diff --git a/src/engineer/configs/ListConfig.vue b/src/engineer/configs/ListConfig.vue
index 052fe4b..aced9b5 100644
--- a/src/engineer/configs/ListConfig.vue
+++ b/src/engineer/configs/ListConfig.vue
@@ -35,18 +35,19 @@ const add = () => {
-
-
-
-
+
+
+
+
+
diff --git a/src/engineer/configs/MarkConfig.vue b/src/engineer/configs/MarkConfig.vue
index 2514b70..2b063a0 100644
--- a/src/engineer/configs/MarkConfig.vue
+++ b/src/engineer/configs/MarkConfig.vue
@@ -14,21 +14,44 @@ const props = defineProps<{
const tempString = useSource
(props.field)
-function selectChange(e: any){
- console.log(e.target.value)
-}
-
-
-
-
+
+
+
diff --git a/src/engineer/configs/ObjectConfig.vue b/src/engineer/configs/ObjectConfig.vue
index c569c03..bbf3b7a 100644
--- a/src/engineer/configs/ObjectConfig.vue
+++ b/src/engineer/configs/ObjectConfig.vue
@@ -1,6 +1,5 @@
-
-
+
+
diff --git a/src/engineer/configs/render.ts b/src/engineer/configs/render.ts
index b42ac23..9610841 100644
--- a/src/engineer/configs/render.ts
+++ b/src/engineer/configs/render.ts
@@ -6,6 +6,8 @@ import ObjectConfig from './ObjectConfig.vue'
import MarkConfig from "./MarkConfig.vue";
import BooleanConfig from "./BooleanConfig.vue"
import BackgroundConfig from "./BackgroundConfig.vue";
+import ImageConfig from "./ImageConfig.vue";
+import ColorConfig from './ColorConfig.vue'
const configs: Record
= {
text: TextConfig,
@@ -13,7 +15,9 @@ const configs: Record = {
object: ObjectConfig,
mark: MarkConfig,
boolean: BooleanConfig,
- background:BackgroundConfig,
+ background: BackgroundConfig,
+ image: ImageConfig,
+ color: ColorConfig,
}
function render(type: string, props: Record) {
diff --git a/src/engineer/utils/clone.ts b/src/engineer/utils/clone.ts
new file mode 100644
index 0000000..d18e581
--- /dev/null
+++ b/src/engineer/utils/clone.ts
@@ -0,0 +1,27 @@
+import { error } from "console"
+
+export function clone(v: T): T {
+ switch (typeof v) {
+ case "string":
+ case "boolean":
+ case "number":
+ case "undefined":
+ return v
+ case "symbol":
+ case "function":
+ case "bigint":
+ throw new Error("invalid type")
+ case "object":
+ if (v == null) {
+ return v
+ }
+ if (Array.isArray(v)) {
+ return v.map(clone) as T
+ }
+ const obj = Object.create(null)
+ for (const [key, value] of Object.entries(v)) {
+ obj[key] = clone(value)
+ }
+ return obj
+ }
+}
diff --git a/src/engineer/utils/index.ts b/src/engineer/utils/index.ts
index 4d18ef1..d54e190 100644
--- a/src/engineer/utils/index.ts
+++ b/src/engineer/utils/index.ts
@@ -1,6 +1,7 @@
export * from './align'
export * from './background'
export * from './border'
+export * from './clone'
export * from './clip'
export * from './gap'
export * from './hash'