Procházet zdrojové kódy

✨ feat(组态编辑器): 优化文本与键值对组件初始样式

- 将文本和键值对组件的初始文字颜色调整为黑色
- 将键值对组件的初始宽度由 50px 增加至 100px
Zimo před 1 týdnem
rodič
revize
261ce3d53c

+ 4 - 1
src/components/mt-edit/components/layout/main-panel/index.vue

@@ -333,6 +333,7 @@ const onDrop = (e: DragEvent | TouchEvent, isTouch?: boolean) => {
   const is_horizontal_line = deep_find_cfg.id === 'sys-line-vertical'
   const is_status = deep_find_cfg.id === 'status-vue'
   const is_hikvision_video = deep_find_cfg.id === 'hikvision-video-vue'
+  const is_key_value = deep_find_cfg.id === 'kv-vue'
   //根据配置创建图形
   const { realityX, realityY } = getRealityXY(e, canvasAreaRef.value?.getBoundingClientRect())
   const create_item: IDoneJson = {
@@ -350,7 +351,9 @@ const onDrop = (e: DragEvent | TouchEvent, isTouch?: boolean) => {
             ? 36
             : is_hikvision_video
               ? 480
-              : 50,
+              : is_key_value
+                ? 100
+                : 50,
       height: is_horizontal_line
         ? 100
         : is_vertical_line

+ 2 - 2
src/components/mt-edit/store/config.ts

@@ -340,7 +340,7 @@ const sysComponentItems: ILeftAsideConfigItem[] = [
       fill: {
         title: '文字颜色',
         type: 'color',
-        val: '#FFF700',
+        val: '#000000',
         group: '文字样式',
         bindable: false
       },
@@ -729,7 +729,7 @@ const sysComponentItems: ILeftAsideConfigItem[] = [
       color: {
         title: '文字颜色',
         type: 'color',
-        val: '#FFF700'
+        val: '#000000'
       },
       borderColor: {
         title: '边框颜色',