Browse Source

修改组件样式

yjf_v2
超级管理员 2 years ago
parent
commit
08b0fd4005
  1. 1
      src/assets/icons/bianKuang.svg
  2. 3
      src/assets/icons/bianKuangBoot.svg
  3. 3
      src/assets/icons/bianKuangLeft.svg
  4. 3
      src/assets/icons/bianKuangRight.svg
  5. 1
      src/assets/icons/bianKuangTop.svg
  6. 1
      src/assets/icons/bianKuangYuanjiao.svg
  7. 1
      src/assets/icons/siJiao.svg
  8. 268
      src/components/DesignForm/assembly/index.ts
  9. 247
      src/components/DesignForm/designLayout/bianXian.vue
  10. 107
      src/components/DesignForm/designLayout/designLayoutButPage.vue
  11. 177
      src/components/DesignForm/designLayout/designLayoutPage.vue
  12. 318
      src/components/DesignForm/designLayout/pageSize.vue
  13. 230
      src/components/DesignForm/designLayout/pageSizeSmail.vue
  14. 141
      src/components/DesignForm/designLayout/textPage.vue
  15. 82
      src/components/DesignForm/designLayout/unitBackGround.vue
  16. 165
      src/components/DesignForm/designLayout/yuanjao.vue
  17. 322
      src/components/DesignForm/formControlAttr.vue
  18. 2197
      src/components/DesignForm/formControlAttr_2024024.vue
  19. 155
      src/components/DesignForm/layoutPage/index.vue
  20. 581
      src/components/DesignForm/public/form/calculate/cssInfo.ts
  21. 15
      src/components/DesignForm/public/form/formGroup.vue
  22. 42
      src/components/DesignForm/public/form/formItem.vue
  23. 12
      src/types/components.d.ts
  24. 31
      src/widget/digitpage/index.vue

1
src/assets/icons/bianKuang.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1708329496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="46404" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M128 128v768h768V128z m720.213333 720.213333H175.786667V175.786667h672.426666z" fill="#2c2c2c" p-id="46405"></path></svg>

After

Width:  |  Height:  |  Size: 455 B

3
src/assets/icons/bianKuangBoot.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="833" height="833" viewBox="0 0 833 833">
<image id="图层_1" data-name="图层 1" x="144" y="144" width="547" height="543" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAiMAAAIfCAYAAACiktxnAAAJaUlEQVR4nO3Z0UnFQBBA0XmSgoSkAF9lzw5swVJSQIqwBEsQwRJ0L8I5sN+7zPxcktt1XS8z830AAFZ7335C5GH0AEDgfDJ1AKAkRgCAlBgBAFJiBABIiREAICVGAICUGAEAUmIEAEiJEQAgJUYAgJQYAQBSYgQASIkRACAlRgCAlBgBAFJiBABIiREAICVGAICUGAEAUmIEAEiJEQAgJUYAgJQYAQBS26LL79YMAP/O88y8/fWjl8TIcRzninsAgN9zXdeSafpNAwCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBASowAACkxAgCkxAgAkBIjAEBKjAAAKTECAKTECACQEiMAQEqMAAApMQIApMQIAJASIwBA6rbv++vMPKwBAAjcfRkBAFJiBABIiREAICVGAICUGAEAUmIEAEiJEQAgJUYAgJQYAQBSYgQASIkRACAlRgCAlBgBAFJiBABIiREAICVGAICUGAEAUmIEAEiJEQAgJUYAgJQYAQBSYgQASIkRACC1zczHzJzWAAAsN/P5BVgoEnGTOg8HAAAAAElFTkSuQmCC"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

3
src/assets/icons/bianKuangLeft.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="833" height="833" viewBox="0 0 833 833">
<image id="图层_1" data-name="图层 1" x="146" y="144" width="543" height="547" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh8AAAIjCAYAAACj5XkHAAAJfklEQVR4nO3ZUU3FQBBA0XmkApCABJJWQJ2ABeRUzXsCKgIpqOhNSc4RsJPs/NzsPtZ1/Z6Zj7nQcRxXHg8A/B+vZWa+Zma3NACg8OaWAYCS+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBILcWwbdse1goA93ae5z4zz6vnePkAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AILUUw87z3K0VAG7vsxiSxMfMPKM5AMDN+XYBAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACC1zMzPzLy7dgDgcjO/f1y3EYc+WFjdAAAAAElFTkSuQmCC"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

3
src/assets/icons/bianKuangRight.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="833" height="833" viewBox="0 0 833 833">
<image id="图层_1" data-name="图层 1" x="144" y="142" width="543" height="547" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh8AAAIjCAYAAACj5XkHAAAJg0lEQVR4nO3ZsWnEQBBA0bFRIe5BKsiZYlfg0k4FKLgSrgSXYNyCQZ+Dew8UzzKbfFZv53l+zMzfBwC8uH3fr17AzzIznzPz/erLBgASx7s9AwAl8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQWqJhXzNzd7UA8PRuVx+wio/7tm1HNAsA+Kd1XS9fnd8uAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKTEBwCQEh8AQEp8AAAp8QEApMQHAJASHwBASnwAACnxAQCkxAcAkBIfAEBKfAAAKfEBAKSWaNjtPE83CwBPbt/3yw/o5QMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgJT4AABS4gMASIkPACAlPgCAlPgAAFLiAwBIiQ8AICU+AICU+AAAUuIDAEiJDwAgJT4AgNQyM4eVAwCJmccvt7EVdZlWOOIAAAAASUVORK5CYII="/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

1
src/assets/icons/bianKuangTop.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1708328159743" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16122" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M846.24 846.24H175.59V180h670.66v666.24z m-640.65-30h610.66V210H205.59v606.24z" fill="#CCCCCC" p-id="16123"></path><path d="M175.61 180h670.63v30H175.61z" fill="#333333" p-id="16124"></path></svg>

After

Width:  |  Height:  |  Size: 530 B

1
src/assets/icons/bianKuangYuanjiao.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1708327930518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9084" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M852.8 973.7H171.2c-66.9 0-121.4-53.6-121.4-119.5V183.3c0-65.9 54.5-119.5 121.4-119.5h681.7c66.9 0 121.4 53.6 121.4 119.5v670.9c-0.1 65.9-54.5 119.5-121.5 119.5zM171.2 91.8c-51.3 0-93 41.1-93 91.6v670.9c0 50.5 41.7 91.6 93 91.6h681.7c51.3 0 93-41.1 93-91.6v-671c0-50.5-41.7-91.6-93-91.6H171.2z" fill="#D3D6E2" p-id="9085"></path></svg>

After

Width:  |  Height:  |  Size: 668 B

1
src/assets/icons/siJiao.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1708327682904" class="icon" viewBox="0 0 1329 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6884" xmlns:xlink="http://www.w3.org/1999/xlink" width="259.5703125" height="200"><path d="M808.926585 19.809079h191.520949c35.238262 0 63.906678 28.668416 63.906678 63.906679v191.520949h19.908623V83.815301c0-46.287547-37.627297-83.815301-83.815301-83.815301H808.926585v19.809079zM80.171457 275.33625V83.815301c0-35.238262 28.668416-63.906678 63.906679-63.906678H335.698628v-19.908623h-191.520949c-46.287547 0-83.815301 37.627297-83.815301 83.815301v191.520949h19.809079zM335.698628 1004.091377h-191.520949c-35.238262 0-63.906678-28.668416-63.906679-63.906678V748.66375h-19.908622v191.520949c0 46.287547 37.627297 83.815301 83.815301 83.815301H335.698628v-19.908623zM1064.453755 748.66375v191.520949c0 35.238262-28.668416 63.906678-63.906678 63.906678H808.926585v19.908623h191.520949c46.287547 0 83.815301-37.627297 83.815301-83.815301V748.66375h-19.80908z" fill="#bfbfbf" p-id="6885"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

268
src/components/DesignForm/assembly/index.ts

@ -28,7 +28,12 @@ const selectOption: any = [
// 组件所有属性
modelValue: ''
},
config: {} // 其他配置信息
config: {}, // 其他配置信息
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'digitpage',
@ -47,7 +52,12 @@ const selectOption: any = [
}
},
config: {}, // 其他配置信息
selectvalue: "default"
selectvalue: "default",
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'textarea',
@ -57,7 +67,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'radio',
@ -68,7 +83,12 @@ const selectOption: any = [
modelValue: ''
},
options: selectOption, // 下拉选项数据集合
config: config
config: config,
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'checkbox',
@ -79,7 +99,12 @@ const selectOption: any = [
modelValue: []
},
options: selectOption,
config: config
config: config,
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'select',
@ -91,7 +116,12 @@ const selectOption: any = [
appendToBody: true
},
options: selectOption,
config: config
config: config,
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'datePicker',
@ -102,7 +132,12 @@ const selectOption: any = [
modelValue: '',
type: 'date'
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'timePicker',
@ -112,7 +147,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'switch',
@ -122,7 +162,12 @@ const selectOption: any = [
control: {
modelValue: false
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'inputNumber',
@ -132,7 +177,12 @@ const selectOption: any = [
control: {
modelValue: 0
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'cascader',
@ -143,7 +193,12 @@ const selectOption: any = [
modelValue: []
},
options: [],
config: config
config: config,
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'rate',
@ -153,7 +208,12 @@ const selectOption: any = [
control: {
modelValue: 0
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'slider',
@ -163,7 +223,12 @@ const selectOption: any = [
control: {
modelValue: 0
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'treeSelect',
@ -177,6 +242,11 @@ const selectOption: any = [
},
config: {
optionsType: 0
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
@ -187,7 +257,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'title',
@ -197,7 +272,12 @@ const selectOption: any = [
control: {
modelValue: '标题'
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'button',
@ -207,7 +287,12 @@ const selectOption: any = [
control: {
label: '保存'
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'serialNumber',
@ -218,6 +303,11 @@ const selectOption: any = [
},
config: {
automatic:false
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
@ -227,7 +317,12 @@ const selectOption: any = [
iconFont: 'fa-link',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'organization',
@ -236,7 +331,12 @@ const selectOption: any = [
iconFont: 'fa-map-marker',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'baidumap',
@ -245,7 +345,12 @@ const selectOption: any = [
iconFont: 'fa-map-o',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
@ -256,7 +361,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'orgCentent',
@ -265,7 +375,12 @@ const selectOption: any = [
iconFont: 'fa-sliders',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'signaturemap',
@ -274,7 +389,12 @@ const selectOption: any = [
iconFont: 'fa-edit',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
]
},
@ -282,17 +402,10 @@ const selectOption: any = [
title: '高级字段',
children: [
{
type: 'table',
label: '子表',
icon: 'table',
iconFont: 'fa-table',
list: [],
tableData: [], // 子表表格列表数据集合
control: {
border: true
},
config: {
addBtnText: '添加一行'
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
@ -303,7 +416,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
/*template: '', //
component: '' // 根据template注入的组件*/
},
@ -315,7 +433,12 @@ const selectOption: any = [
control: {
modelValue: '' // 也可以是[{name:'',url:''}]形式
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'tinymce',
@ -325,7 +448,12 @@ const selectOption: any = [
control: {
modelValue: ''
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'videoUpAndPlay',
@ -355,7 +483,12 @@ const selectOption: any = [
loop: false
}]
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'lowcodeCarsusel',
@ -377,7 +510,12 @@ const selectOption: any = [
interval:2000,
}
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
]
},
@ -401,7 +539,12 @@ const selectOption: any = [
}
],
control: {},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'tabs',
@ -415,7 +558,12 @@ const selectOption: any = [
}
],
control: {},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'card',
@ -425,7 +573,12 @@ const selectOption: any = [
list: [],
control: {},
config: {},
item: {} // label标题相关
item: {}, // label标题相关
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'flex',
@ -437,6 +590,11 @@ const selectOption: any = [
control: {},
config: {
addBtnText: '添加一行'
},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
@ -445,7 +603,12 @@ const selectOption: any = [
icon: 'divider',
iconFont: '',
control: {},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'div',
@ -454,7 +617,12 @@ const selectOption: any = [
iconFont: '',
control: {},
config: {},
list: []
list: [],
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
]
},
@ -470,7 +638,12 @@ const selectOption: any = [
// 组件所有属性
modelValue: ''
},
config: {} // 其他配置信息
config: {}, // 其他配置信息
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
},
{
type: 'orgCentent',
@ -479,7 +652,12 @@ const selectOption: any = [
iconFont: 'fa-sliders',
control: {
},
config: {}
config: {},
styles:{
divStyle:{},
labelStyle:{},
inputStyle:{}
}
}
]
}

247
src/components/DesignForm/designLayout/bianXian.vue

@ -0,0 +1,247 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-23 08:29:44
@ 备注: 边线设置
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject } from 'vue'
const props = defineProps({
dataVal:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
const visible = ref(false)
const emits = defineEmits(["update:dataVal"]);
// props.dataVal.lineColorVal = ref('#000000')
const predefineColors = ref([
'#ff4500',
'#ff8c00',
'#ffd700',
'#90ee90',
'#00ced1',
'#1e90ff',
'#c71585',
'rgba(255, 69, 0, 0.68)',
'rgb(255, 120, 0)',
'hsv(51, 100, 98)',
'hsva(120, 40, 94, 0.5)',
'hsl(181, 100%, 37%)',
'hsla(209, 100%, 56%, 0.73)',
'#c7158577',
])
const boxWidth = ref<number>(0)
const lineStyle = ref<string>("")
const setDirection = (val:number) => {
// console.log("setDirection",props.dataVal)
switch (val) {
case 1:
props.dataVal["border"]=1;
// delete props.dataVal.borderTop;
// delete props.dataVal.borderleft;
// delete props.dataVal.borderRight;
// delete props.dataVal.borderBottom;
break;
case 2:
props.dataVal["border"]=2;
// props.dataVal["borderTop"]=1;
// delete props.dataVal.borderleft;
// delete props.dataVal.borderRight;
// delete props.dataVal.borderBottom;
// delete props.dataVal.border;
break;
case 3:
props.dataVal["border"]=3;
// props.dataVal["borderleft"]=1;
// delete props.dataVal.borderRight;
// delete props.dataVal.borderBottom;
// delete props.dataVal.border;
// delete props.dataVal.borderTop;
break;
case 4:
props.dataVal["border"]=4;
// props.dataVal["borderRight"]=1;
// delete props.dataVal.borderBottom;
// delete props.dataVal.border;
// delete props.dataVal.borderTop;
// delete props.dataVal.borderleft;
break;
case 5:
props.dataVal["border"]=5;
// props.dataVal["borderBottom"]=1;
// delete props.dataVal.border;
// delete props.dataVal.borderTop;
// delete props.dataVal.borderleft;
// delete props.dataVal.borderRight;
break;
default:
delete props.dataVal.border;
// delete props.dataVal.borderTop;
// delete props.dataVal.borderleft;
// delete props.dataVal.borderRight;
// delete props.dataVal.borderBottom;
}
}
/**
@ 作者: 秦东
@ 时间: 2024-02-23 14:51:03
@ 功能: 处理轮廓
*/
const contourProfile = (val:number) => {
switch(val){
case 1:
props.dataVal["contourProfile"]="solid"
break;
case 2:
props.dataVal["contourProfile"]="dashed"
break;
case 3:
props.dataVal["contourProfile"]="dotted"
break;
default:
delete props.dataVal.contourProfile;
}
}
/**
@ 作者: 秦东
@ 时间: 2024-02-23 15:19:57
@ 功能: 监听颜色
*/
watch(()=>props.dataVal.lineColorVal,(val : any)=>{
console.log("监听颜色-----1--->",val)
if(val == null || val.length == 0 || val == ""){
delete props.dataVal.lineColorVal;
}
// Object.assign(store.controlAttr.styles.divStyle, val)
},
{
deep: true
});
</script>
<template>
<table style="width:100%">
<tr>
<td width="50">方向</td>
<td>
<div class="bianXianBox allBox" title="全边框" @click="setDirection(1)"></div>
<div class="bianXianBox topBox" title="上边框" @click="setDirection(2)"></div>
<div class="bianXianBox leftBox" title="左边框" @click="setDirection(3)"></div>
<div class="bianXianBox rightBox" title="右边框" @click="setDirection(4)"></div>
<div class="bianXianBox bottomBox" title="下边框" @click="setDirection(5)"></div>
</td>
</tr>
<tr>
<td>颜色</td>
<td>
<el-color-picker v-model="props.dataVal.lineColorVal" :predefine="predefineColors" size="default" />
{{ props.dataVal.lineColorVal }}
</td>
</tr>
<tr>
<td>宽度</td>
<td>
<el-input-number v-model="props.dataVal.boxWidth" min="0" controls-position="right"></el-input-number>Px
</td>
</tr>
<tr>
<td >轮廓</td>
<td style="text-align: center;" >
<el-row>
<el-col :span="4" class="sxJz" title="none-无" @click="contourProfile(0)">
X
</el-col>
<el-col :span="4" class="sxJz" title="solid-实线" @click="contourProfile(1)">
<div class="bigBox">
<div class="smallBox solidLine"></div>
</div>
</el-col>
<el-col :span="4" class="sxJz" title="dashed-虚线" @click="contourProfile(2)">
<div class="bigBox">
<div class="smallBox dashedLine"></div>
</div>
</el-col>
<el-col :span="4" class="sxJz" title="dotted-圆点" @click="contourProfile(3)">
<div class="bigBox">
<div class="smallBox dottedLine"></div>
</div>
</el-col>
</el-row>
</td>
</tr>
</table>
</template>
<style lang='scss' scoped>
.bianXianBox{
width:25px;
height:25px;
margin-right: 10px;
display: inline-block;
cursor: pointer;
}
.allBox{
border: 1px solid #A4A4A4;
}
.topBox{
border-top: 1px solid #A4A4A4;
border-left: 1px solid #E4E4E4;
border-right: 1px solid #E4E4E4;
border-bottom: 1px solid #E4E4E4;
}
.leftBox{
border-top: 1px solid #E4E4E4;
border-left: 1px solid #A4A4A4;
border-right: 1px solid #E4E4E4;
border-bottom: 1px solid #E4E4E4;
}
.rightBox{
border-top: 1px solid #E4E4E4;
border-left: 1px solid #E4E4E4;
border-right: 1px solid #A4A4A4;
border-bottom: 1px solid #E4E4E4;
}
.bottomBox{
border-top: 1px solid #E4E4E4;
border-left: 1px solid #E4E4E4;
border-right: 1px solid #E4E4E4;
border-bottom: 1px solid #A4A4A4;
}
.sxJz{
display:flex;
text-align:center;
align-items: center;
justify-content:center;
cursor: pointer;
}
.bigBox{
width:25px;
height:25px;
margin-right: 10px;
display: inline-block;
cursor: pointer;
}
.smallBox{
width:100%;
height:12px;
cursor: pointer;
}
.solidLine{
border-bottom: 1px solid #000000;
}
.dashedLine{
border-bottom: 1px dashed #000000;
}
.dottedLine{
border-bottom: 1px dotted #000000;
}
</style>

107
src/components/DesignForm/designLayout/designLayoutButPage.vue

@ -0,0 +1,107 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-22 10:40:17
@ 备注:
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject } from 'vue'
const props = defineProps({
dataVal:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
const visible = ref(false)
const emits = defineEmits(["update:dataVal"]);
/**
@ 作者: 秦东
@ 时间: 2024-02-21 14:29:49
@ 功能: 获取和更新数值
*/
const getUpdataVal = computed({
get: () => {
console.log("获取和更新数值-->props.place",props.place);
return props.dataVal[props.place]
},
set: (val) => {
emits("update:dataVal", val);
},
});
/**
@ 作者: 秦东
@ 时间: 2024-02-21 16:32:44
@ 功能: 设定值
*/
const setGutter = (val: String) =>{
// console.log("-->getUpdataVal",props.dataVal[props.place],val);
// getUpdataVal=val;
props.dataVal[props.place] = val;
// console.log("-->getUpdataVal--end->",props.dataVal[props.place],val);
}
</script>
<template>
<el-popover :visible="visible" placement="top" :width="300">
<el-row>
<el-col :span="24">
<el-input v-model="props.dataVal[props.place]" :min="0" placeholder="请输入数值" type="number">
<template #append>Px</template>
</el-input>
</el-col>
<el-col :span="24" style="padding:10px 0 0 0">
<el-row :gutter="5">
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('auto')">Auto</el-button>
</el-col>
<el-col :span="18">
<el-row :gutter="5">
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('0')">0</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('10')">10</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('20')">20</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('40')">40</el-button>
</el-col>
</el-row>
<el-row :gutter="5" style="padding:10px 0 0 0">
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('60')">60</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('100')">100</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('140')">140</el-button>
</el-col>
<el-col :span="6">
<el-button text bg class="butwidth" @click="setGutter('220')">220</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="24" class="butCss">
<el-button type="danger" @click="visible=false">关闭</el-button>
<el-button type="warning" @click="props.dataVal[props.place]='0'">重置</el-button>
</el-col>
</el-row>
<template #reference>
<el-button link @click="visible=!visible">{{ props.dataVal[props.place]?props.dataVal[props.place]:"0" }}</el-button>
</template>
</el-popover>
</template>
<style lang='scss' scoped>
</style>

177
src/components/DesignForm/designLayout/designLayoutPage.vue

@ -0,0 +1,177 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-22 10:39:16
@ 备注: 布局设计器
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject } from 'vue'
import { subUnitStyle } from '@/types/styles'
import { useDesignStore } from '@/store/design'
/**
@ 作者: 秦东
@ 时间: 2024-02-21 14:31:00
@ 功能: 引入页面
*/
import DesignLayoutBut from "@/components/DesignForm/designLayout/designLayoutButPage.vue"
const props = withDefaults(
defineProps<{
layouytStyle: subUnitStyle
}>(),
{}
)
const emits = defineEmits(["update:layouytStyle"]);
/**
@ 作者: 秦东
@ 时间: 2024-02-21 14:29:49
@ 功能: 获取和更新数值
*/
const getUpdataMastVal = computed({
get: () => props.layouytStyle,
set: (val) => {
emits("update:layouytStyle", val);
},
});
</script>
<template>
<div class="steeringWheel"> <!--margin-->
<div class="steeringWheelCont">
<div class="swLeft h30 leftBanJiaoTop"></div>
<div class="swCentent h30 beiJingPingpu shangXia">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'marginTop'" />
</div>
<div class="swright h30 rightBanJiaoTop"></div>
</div>
<div class="steeringWheelCont">
<div class="swLeft h140 beiJingPingpus zuoYou">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'marginLeft'" />
</div>
<div class="swCentent h140">
<!--padding-->
<div class="steeringWheel_s">
<div class="steeringWheelCont">
<div class="swLeft h30 leftBanJiaoTop"></div>
<div class="swCentent_s h30 beiJingPingpu shangXia">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'paddingTop'" />
</div>
<div class="swright h30 rightBanJiaoTop"></div>
</div>
<div class="steeringWheelCont">
<div class="swLeft h30 beiJingPingpus zuoYou">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'paddingLeft'" />
</div>
<div class="swCentent_s h30"></div>
<div class="swright h30 beiJingPingpus zuoYou">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'paddingRight'" />
</div>
</div>
<div class="steeringWheelCont">
<div class="swLeft h30 leftBanJiaoBot"></div>
<div class="swCentent_s h30 beiJingPingpu shangXia">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'paddingBot'" />
</div>
<div class="swright h30 rightBanJiaoBot"></div>
</div>
</div>
</div>
<div class="swright h140 beiJingPingpus zuoYou">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'marginRight'" />
</div>
</div>
<div class="steeringWheelCont">
<div class="swLeft h30 leftBanJiaoBot"></div>
<div class="swCentent h30 beiJingPingpu shangXia">
<DesignLayoutBut v-model:data-val="getUpdataMastVal" :place="'marginBot'" />
</div>
<div class="swright h30 rightBanJiaoBot"></div>
</div>
</div>
</template>
<style lang='scss' scoped>
.steeringWheel{
width:272px;
height:162px;
border:1px solid rgba(209,209,209, 1);
margin:0 auto
}
.steeringWheelCont{
width:100%;
display: flex;
}
.swLeft{
width:30px;
}
.swright{
width:30px;
}
.swCentent{
width:210px;
overflow: hidden;
}
.h140{
display: flex;
height:100px;
text-align:center;
align-items: center;
justify-content:center;
}
.h30{
display: flex;
display:black;
height:30px;
text-align:center;
align-items: center;
justify-content:center;
}
.leftBanJiaoTop{
background: linear-gradient(
45deg,
rgba(229,229,229, 1) 50%,
rgba(209,209,209, 1) 50%,
);
}
.rightBanJiaoTop{
background: linear-gradient(
315deg,
rgba(229,229,229, 1) 50%,
rgba(209,209,209, 1) 50%,
);
}
.leftBanJiaoBot{
background: linear-gradient(
135deg,
rgba(229,229,229, 1) 50%,
rgba(209,209,209, 1) 50%,
);
}
.rightBanJiaoBot{
background: linear-gradient(
225deg,
rgba(229,229,229, 1) 50%,
rgba(209,209,209, 1) 50%,
);
}
.beiJingPingpu{
background-color:rgba(209,209,209, 1)
}
.beiJingPingpus{
background-color:rgba(229,229,229, 1)
}
.steeringWheel_s{
width: 202px;
height: 92px;
border: 1px solid rgb(209, 209, 209);
}
.swCentent_s{
width:140px;
}
.h40{
height:40px;
}
.shangXia{
cursor:ns-resize;
}
.zuoYou{
cursor:ew-resize;
}
</style>

318
src/components/DesignForm/designLayout/pageSize.vue

@ -0,0 +1,318 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-25 15:43:38
@ 备注: 尺寸
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject,onBeforeMount } from 'vue'
const props = defineProps({
layouytStyle:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
watch(()=>props.layouytStyle.widthStatus,(val:booble) => {
if(val){
delete props.layouytStyle.width;
delete props.layouytStyle.widthMax;
delete props.layouytStyle.widthMin;
}else{
delete props.layouytStyle.widthXs;
delete props.layouytStyle.widthSm;
delete props.layouytStyle.widthMd;
delete props.layouytStyle.widthLg;
delete props.layouytStyle.widthXl;
}
})
watch(()=>props.layouytStyle.width,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.width;
}
})
watch(()=>props.layouytStyle.widthMax,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthMax;
}
})
watch(()=>props.layouytStyle.widthMin,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthMin;
}
})
watch(()=>props.layouytStyle.widthXs,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthXs;
}
})
watch(()=>props.layouytStyle.widthSm,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthSm;
}
})
watch(()=>props.layouytStyle.widthMd,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthMd;
}
})
watch(()=>props.layouytStyle.widthLg,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthLg;
}
})
watch(()=>props.layouytStyle.widthXl,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthXl;
}
})
watch(()=>props.layouytStyle.height,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.height;
}
})
watch(()=>props.layouytStyle.heightMax,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.heightMax;
}
})
watch(()=>props.layouytStyle.heightMin,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.heightMin;
}
})
watch(()=>props.layouytStyle.objectFit,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.objectFit;
}
})
const objectFitOptions = [
{
value:"fill",
label:"fill-填充",
},
{
value:"contain",
label:"contain-包含",
},
{
value:"vover",
label:"vover-原始比例填充",
},
{
value:"none",
label:"none-无",
},
{
value:"scaleDown",
label:"scaleDown-缩小",
}
];
/**
@ 作者: 秦东
@ 时间: 2024-02-27 13:26:40
@ 功能: 设置溢出属性
*/
const overFlowSet = (val:any) =>{
props.layouytStyle.overflow = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 13:58:44
@ 功能: 设置对齐
*/
const duiQi = (val:any) =>{
props.layouytStyle.textAlign = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 14:03:16
@ 功能: 设置风格
*/
const fengGe = (val:any) =>{
props.layouytStyle.fontStyle = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 14:03:44
@ 功能: 设置修饰
*/
const xiuShi = (val:any) =>{
props.layouytStyle.textecoration = val
}
</script>
<template>
<el-row>
<el-col :span="24">
<el-switch
v-model="props.layouytStyle.widthStatus"
class="mb-2"
active-text="响应式宽度"
inactive-text="固定宽度"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
/>
</el-col>
<el-col :span="24">
<table v-if="!props.layouytStyle.widthStatus" style="width:100%">
<tr>
<td width="70">宽度</td>
<td>
<el-input v-model="props.layouytStyle.width">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最大宽度</td>
<td>
<el-input v-model="props.layouytStyle.widthMax">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最小宽度</td>
<td>
<el-input v-model="props.layouytStyle.widthMin">
<template #append>PX</template>
</el-input>
</td>
</tr>
</table>
<table v-if="props.layouytStyle.widthStatus" style="width:100%">
<tr>
<td width="70">Xs</td>
<td>
<el-input v-model="props.layouytStyle.widthXs">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>Sm</td>
<td>
<el-input v-model="props.layouytStyle.widthSm">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>Md</td>
<td>
<el-input v-model="props.layouytStyle.widthMd">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>Lg</td>
<td>
<el-input v-model="props.layouytStyle.widthLg">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>Xl</td>
<td>
<el-input v-model="props.layouytStyle.widthXl">
<template #append>PX</template>
</el-input>
</td>
</tr>
</table>
</el-col>
<el-col :span="24">
<table style="width:100%">
<tr>
<td width="70">高度</td>
<td>
<el-input v-model="props.layouytStyle.height">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最大高度</td>
<td>
<el-input v-model="props.layouytStyle.heightMax">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最小高度</td>
<td>
<el-input v-model="props.layouytStyle.heightMin">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>溢出</td>
<td>
<el-button title="溢出可见" text size="small" class="fa fa-eye" @click="overFlowSet('visible')"></el-button>
<el-button title="溢出隐藏" text size="small" class="fa fa-eye-slash" @click="overFlowSet('hidde')"></el-button>
<el-button title="溢出滚动" text size="small" class="fa fa-text-height" @click="overFlowSet('scrol')"></el-button>
<el-button title="溢出才自动滚动" text size="small" class="fa fa-arrows" @click="overFlowSet('auto')"></el-button>
</td>
</tr>
<tr>
<td>适应</td>
<td>
<el-select
v-model="props.layouytStyle.objectFit"
clearable
class="m-2"
style="width:100%"
>
<el-option
v-for="item in objectFitOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</td>
</tr>
<tr>
<td>对齐</td>
<td>
<el-button title="左对齐" text size="small" class="fa fa-align-left" @click="duiQi('left')"></el-button>
<el-button title="居中对齐" text size="small" class="fa fa-align-center" @click="duiQi('center')"></el-button>
<el-button title="右对齐" text size="small" class="fa fa-align-right" @click="duiQi('right')"></el-button>
<el-button title="两侧对齐" text size="small" class="fa fa-align-justify" @click="duiQi('justify')"></el-button>
</td>
</tr>
<tr>
<td>风格</td>
<td>
<el-button title="常规" text size="small" @click="fengGe('normal')">I</el-button>
<el-button title="倾斜" text size="small" class="fa fa-italic" @click="fengGe('italic')"></el-button>
</td>
</tr>
<tr>
<td>修饰</td>
<td>
<el-button title="无" text size="small" class="fa fa-times" @click="xiuShi('none')"></el-button>
<el-button title="删除线" text size="small" class="fa fa-strikethrough" @click="xiuShi('line-through')"></el-button>
<el-button title="下划线" text size="small" class="fa fa-underline" @click="xiuShi('underline')"></el-button>
<el-button title="上划线" text size="small" class="fa fa-etsy" @click="xiuShi('overline')"></el-button>
</td>
</tr>
</table>
</el-col>
</el-row>
</template>
<style lang='scss' scoped>
</style>

230
src/components/DesignForm/designLayout/pageSizeSmail.vue

@ -0,0 +1,230 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-28 09:31:39
@ 备注:
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject,onBeforeMount } from 'vue'
const props = defineProps({
layouytStyle:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
const objectFitOptions = [
{
value:"fill",
label:"fill-填充",
},
{
value:"contain",
label:"contain-包含",
},
{
value:"vover",
label:"vover-原始比例填充",
},
{
value:"none",
label:"none-无",
},
{
value:"scaleDown",
label:"scaleDown-缩小",
}
];
/**
@ 作者: 秦东
@ 时间: 2024-02-27 13:26:40
@ 功能: 设置溢出属性
*/
const overFlowSet = (val:any) =>{
props.layouytStyle.overflow = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 13:58:44
@ 功能: 设置对齐
*/
const duiQi = (val:any) =>{
props.layouytStyle.textAlign = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 14:03:16
@ 功能: 设置风格
*/
const fengGe = (val:any) =>{
props.layouytStyle.fontStyle = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-27 14:03:44
@ 功能: 设置修饰
*/
const xiuShi = (val:any) =>{
props.layouytStyle.textecoration = val
}
watch(()=>props.layouytStyle.widthStatus,(val:booble) => {
if(val){
delete props.layouytStyle.width;
delete props.layouytStyle.widthMax;
delete props.layouytStyle.widthMin;
}else{
delete props.layouytStyle.widthXs;
delete props.layouytStyle.widthSm;
delete props.layouytStyle.widthMd;
delete props.layouytStyle.widthLg;
delete props.layouytStyle.widthXl;
}
})
watch(()=>props.layouytStyle.width,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.width;
}
})
watch(()=>props.layouytStyle.widthMax,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthMax;
}
})
watch(()=>props.layouytStyle.widthMin,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.widthMin;
}
})
watch(()=>props.layouytStyle.height,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.height;
}
})
watch(()=>props.layouytStyle.heightMax,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.heightMax;
}
})
watch(()=>props.layouytStyle.heightMin,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.heightMin;
}
})
watch(()=>props.layouytStyle.objectFit,(val:any) => {
if(val == null || val == ""){
delete props.layouytStyle.objectFit;
}
})
</script>
<template>
<table style="width:100%">
<tr>
<td width="70">宽度</td>
<td>
<el-input v-model="props.layouytStyle.width">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最大宽度</td>
<td>
<el-input v-model="props.layouytStyle.widthMax">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最小宽度</td>
<td>
<el-input v-model="props.layouytStyle.widthMin">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td >高度</td>
<td>
<el-input v-model="props.layouytStyle.height">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最大高度</td>
<td>
<el-input v-model="props.layouytStyle.heightMax">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>最小高度</td>
<td>
<el-input v-model="props.layouytStyle.heightMin">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>溢出</td>
<td>
<el-button title="溢出可见" text size="small" class="fa fa-eye" @click="overFlowSet('visible')"></el-button>
<el-button title="溢出隐藏" text size="small" class="fa fa-eye-slash" @click="overFlowSet('hidde')"></el-button>
<el-button title="溢出滚动" text size="small" class="fa fa-text-height" @click="overFlowSet('scrol')"></el-button>
<el-button title="溢出才自动滚动" text size="small" class="fa fa-arrows" @click="overFlowSet('auto')"></el-button>
</td>
</tr>
<tr>
<td>适应</td>
<td>
<el-select
v-model="props.layouytStyle.objectFit"
clearable
class="m-2"
style="width:100%"
>
<el-option
v-for="item in objectFitOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</td>
</tr>
<tr>
<td>对齐</td>
<td>
<el-button title="左对齐" text size="small" class="fa fa-align-left" @click="duiQi('left')"></el-button>
<el-button title="居中对齐" text size="small" class="fa fa-align-center" @click="duiQi('center')"></el-button>
<el-button title="右对齐" text size="small" class="fa fa-align-right" @click="duiQi('right')"></el-button>
<el-button title="两侧对齐" text size="small" class="fa fa-align-justify" @click="duiQi('justify')"></el-button>
</td>
</tr>
<tr>
<td>风格</td>
<td>
<el-button title="常规" text size="small" @click="fengGe('normal')">I</el-button>
<el-button title="倾斜" text size="small" class="fa fa-italic" @click="fengGe('italic')"></el-button>
</td>
</tr>
<tr>
<td>修饰</td>
<td>
<el-button title="无" text size="small" class="fa fa-times" @click="xiuShi('none')"></el-button>
<el-button title="删除线" text size="small" class="fa fa-strikethrough" @click="xiuShi('line-through')"></el-button>
<el-button title="下划线" text size="small" class="fa fa-underline" @click="xiuShi('underline')"></el-button>
<el-button title="上划线" text size="small" class="fa fa-etsy" @click="xiuShi('overline')"></el-button>
</td>
</tr>
</table>
</template>
<style lang='scss' scoped>
</style>

141
src/components/DesignForm/designLayout/textPage.vue

@ -0,0 +1,141 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-28 08:43:59
@ 备注: 文本设置
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject,onBeforeMount } from 'vue'
const props = defineProps({
layouytStyle:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
const ziTiList = [
{
value:"宋体",
label:"宋体",
},
{
value:"微软雅黑",
label:"微软雅黑",
},
{
value:"黑体",
label:"黑体",
},
{
value:"Arial",
label:"Arial",
},
{
value:"Bitter",
label:"Bitter",
},
{
value:"Verdana",
label:"Verdana",
},
{
value:"Geneva",
label:"Geneva",
},
{
value:"sans-serif",
label:"sans-serif",
}
];
const fontWeightList = [
{
value:"100",
label:"100",
},
{
value:"400",
label:"400",
},
{
value:"700",
label:"700",
},
{
value:"900",
label:"900",
},
{
value:"bolder",
label:"bolder",
}
];
</script>
<template>
<table style="width:100%">
<tr>
<td width="70">字号</td>
<td>
<el-input v-model="props.layouytStyle.fontSize">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td>字体</td>
<td>
<el-select
v-model="props.layouytStyle.fontFamily"
class="m-2"
placeholder="选择字体"
>
<el-option
v-for="item in ziTiList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</td>
</tr>
<tr>
<td width="70">行高</td>
<td>
<el-input v-model="props.layouytStyle.fontHight">
<template #append>PX</template>
</el-input>
</td>
</tr>
<tr>
<td >字重</td>
<td>
<el-select
v-model="props.layouytStyle.fontWeight"
class="m-2"
placeholder="选择字重"
>
<el-option
v-for="item in fontWeightList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</td>
</tr>
<tr>
<td width="50">颜色</td>
<td>
<el-color-picker v-model="props.layouytStyle.fontColor" size="default" />
{{ props.layouytStyle.backgroundColor }}
</td>
</tr>
</table>
</template>
<style lang='scss' scoped>
</style>

82
src/components/DesignForm/designLayout/unitBackGround.vue

@ -0,0 +1,82 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-23 14:58:56
@ 备注: 组件背景
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject } from 'vue'
const props = defineProps({
layouytStyle:{
type:Object,
default(){
return {}
}
}
});
/**
@ 作者: 秦东
@ 时间: 2024-02-23 15:19:57
@ 功能: 监听颜色
*/
watch(()=>props.layouytStyle.backgroundColor,(val : any)=>{
console.log("监听颜色-----1--->",val)
if(val == null || val.length == 0 || val == ""){
delete props.layouytStyle.backgroundColor;
}
// Object.assign(store.controlAttr.styles.divStyle, val)
},
{
deep: true
});
const transparency = ref(100)
watch(()=>transparency,(val : any)=>{
// if(val.value == null || val.value.length == 0 || val.value == "" || val.value == 0 || val.value == "0"){
// delete props.layouytStyle.transparency;
// }else{
// props.layouytStyle.transparency = val.value
// }
props.layouytStyle.transparency = val.value
},
{
deep: true
});
if(props.layouytStyle.backgroundColor){
props.layouytStyle.backgroundColor = 100
}
</script>
<template>
<table style="width:100%">
<tr>
<td width="50">颜色</td>
<td>
<el-color-picker v-model="props.layouytStyle.backgroundColor" size="default" />
{{ props.layouytStyle.backgroundColor }}
</td>
</tr>
<tr>
<td>透明度</td>
<td>
<el-row :gutter="15">
<el-col :span="14">
<el-slider v-model="props.layouytStyle.transparency" :min="0" :max="100" />
</el-col>
<el-col :span="10">
<el-input
v-model="props.layouytStyle.transparency"
disabled
:formatter="(value) => `${value} %`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="(value) => value.replace(/\$\s?|(,*)/g, '')"
input-style="text-align: right;"
/>
</el-col>
</el-row>
</td>
</tr>
</table>
</template>
<style lang='scss' scoped>
.text_right{
text-align: right;
}
</style>

165
src/components/DesignForm/designLayout/yuanjao.vue

@ -0,0 +1,165 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-23 14:16:51
@ 备注: 圆角处理
-->
<script lang='ts' setup>
import { reactive, computed, toRefs, ref, watch, inject,onBeforeMount } from 'vue'
// import SvgIcon from '@/views/design/form/components/svgicon.vue'
import SvgIcon from "@/components/SvgIcon/index.vue";
import BianKuang from "@/assets/icons/bianKuang.svg"
import BianKuangBoot from "@/assets/icons/bianKuangBoot.svg"
import BianKuangLeft from "@/assets/icons/bianKuangLeft.svg"
import BianKuangRight from "@/assets/icons/bianKuangRight.svg"
import BianKuangTop from "@/assets/icons/bianKuangTop.svg"
import BianKuangYj from "@/assets/icons/bianKuangYuanjiao.svg"
import SiJiaoBianKuang from "@/assets/icons/siJiao.svg"
const props = defineProps({
layouytStyle:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
/**
@ 作者: 秦东
@ 时间: 2024-02-20 14:05:40
@ 功能: 处理边框圆角
*/
const boxHornCope = (val:number) => {
console.log("处理边框圆角",val)
if(val == 1){
props.layouytStyle.divbox="all"
}else{
props.layouytStyle.divbox = "gap"
delete props.layouytStyle.borderRadius;
}
// radiusLeftTop = 0
// radiusrightTop.value = 0
// radiusLeftBot.value = 0
// radiusrightBot.value = 0
console.log("处理边框圆角",props.layouytStyle)
}
onBeforeMount(() => {
props.layouytStyle.divbox = "all"
})
/**
@ 作者: 秦东
@ 时间: 2024-02-22 11:32:14
@ 功能: 滑块处理值
*/
const sliderChange = (val:number) => {
console.log("处理边框圆角112",val)
props.layouytStyle.borderRadius = val
}
/**
@ 作者: 秦东
@ 时间: 2024-02-23 14:42:56
@ 功能: 监听四角变化
*/
watch(()=>props.layouytStyle.radiusLeftTop,(val:number)=>{
calculationProperties();
},
{
deep: true
})
watch(()=>props.layouytStyle.radiusrightTop,(val:number)=>{
calculationProperties();
},
{
deep: true
})
watch(()=>props.layouytStyle.radiusLeftBot,(val:number)=>{
calculationProperties();
},
{
deep: true
})
watch(()=>props.layouytStyle.radiusrightBot,(val:number)=>{
calculationProperties();
},
{
deep: true
})
/**
@ 作者: 秦东
@ 时间: 2024-02-22 14:30:57
@ 功能: 计算属性
*/
const calculationProperties = () =>{
if( props.layouytStyle.radiusLeftTop == 0 && props.layouytStyle.radiusrightTop == 0 && props.layouytStyle.radiusLeftBot == 0 && props.layouytStyle.radiusrightBot == 0){
delete props.layouytStyle.borderRadius;
delete props.layouytStyle.radiusLeftTop;
delete props.layouytStyle.radiusrightTop;
delete props.layouytStyle.radiusLeftBot;
delete props.layouytStyle.radiusrightBot;
}else if( props.layouytStyle.radiusLeftTop != 0 && props.layouytStyle.radiusrightTop != 0 && props.layouytStyle.radiusLeftBot != 0 && props.layouytStyle.radiusrightBot != 0){
delete props.layouytStyle.borderRadius;
}else{
if(props.layouytStyle.radiusLeftTop == 0){
delete props.layouytStyle.radiusLeftTop;
}
if(props.layouytStyle.radiusrightTop == 0){
delete props.layouytStyle.radiusrightTop;
}
if(props.layouytStyle.radiusLeftBot == 0){
delete props.layouytStyle.radiusLeftBot;
}
if(props.layouytStyle.radiusrightBot == 0){
delete props.layouytStyle.radiusrightBot;
}
}
}
</script>
<template>
<table style="width:100%">
<tr>
<td style="width:55px">
<el-image style="width: 20px; height: 20px; cursor: pointer;" :src="BianKuangYj" :fit="'fit'" @click.top="boxHornCope(1)" />
<el-image style="width: 20px; height: 20px; cursor: pointer;" :src="SiJiaoBianKuang" :fit="'fit'" @click.top="boxHornCope(2)" />
</td>
<td>
<el-slider v-if="props.layouytStyle.divbox!='gap'" v-model="props.layouytStyle.borderRadius" :min="0" :max="100" />
<table v-if="props.layouytStyle.divbox=='gap'" style="width:100%">
<tr>
<td>
<el-input v-model="props.layouytStyle.radiusLeftTop" placeholder="0" :min="0" type="number">
</el-input>
</td>
<td>
<el-input v-model="props.layouytStyle.radiusrightTop" placeholder="0" :min="0" type="number">
</el-input>
</td>
<td>
<el-input v-model="props.layouytStyle.radiusLeftBot" placeholder="0" :min="0" type="number">
</el-input>
</td>
<td>
<el-input v-model="props.layouytStyle.radiusrightBot" placeholder="0" :min="0" type="number">
</el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
</template>
<style lang='scss' scoped>
</style>

322
src/components/DesignForm/formControlAttr.vue

@ -22,6 +22,9 @@ import { uploadUrl } from '@/api/DesignForm'
import { UploadFilled } from '@element-plus/icons-vue'
import { UploadFile, UploadFiles } from 'element-plus/es/components/upload/src/upload';
//
import LayoutPage from '@/components/DesignForm/layoutPage/index.vue'
const props = withDefaults( //
defineProps<{
@ -57,6 +60,11 @@ const controlData = computed(() => {
// console.log("--------1--------->",store.controlAttr)
return store.controlAttr
})
//Demo
const controlDataStyls = computed(() => {
return store.controlAttr.styles
})
const dataSourceOption = ref([])
const designType = inject('formDesignType')
const state = reactive({
@ -131,45 +139,45 @@ const formAttr = computed(() => {
placeholder: '表单唯一标识,可为空',
key: 'name',
hide: isSearch
},
{
label: '表单标签宽度',
value: formData.value.labelWidth,
placeholder: '表单label宽,如180px',
key: 'labelWidth'
},
{
label: '表单样式名称',
value: formData.value.class,
placeholder: '额外添加的表单class类名',
key: 'class',
type: 'select',
options: [
{ label: '无样式', value: '',name:'',id:'' },
{ label: '每行两列', value: 'form-row-2',name:'',id:'' },
{ label: '每行三列', value: 'form-row-3',name:'',id:'' },
{ label: '每行四列', value: 'form-row-4',name:'',id:'' }
],
hide: isSearch,
clearable: true
},
{
label: '字段名后添加冒号',
value: formData.value.showColon,
key: 'showColon',
type: 'switch'
},
{
label: '组件尺寸',
value: formData.value.size,
type: 'select',
key: 'size',
options: [
{ label: 'large', value: 'large',name:'',id:'' },
{ label: 'default', value: 'default',name:'',id:'' },
{ label: 'small', value: 'small',name:'',id:'' }
]
}
// {
// label: '',
// value: formData.value.labelWidth,
// placeholder: 'label180px',
// key: 'labelWidth'
// },
// {
// label: '',
// value: formData.value.class,
// placeholder: 'class',
// key: 'class',
// type: 'select',
// options: [
// { label: '', value: '',name:'',id:'' },
// { label: '', value: 'form-row-2',name:'',id:'' },
// { label: '', value: 'form-row-3',name:'',id:'' },
// { label: '', value: 'form-row-4',name:'',id:'' }
// ],
// hide: isSearch,
// clearable: true
// },
// {
// label: '',
// value: formData.value.showColon,
// key: 'showColon',
// type: 'switch'
// },
// {
// label: '',
// value: formData.value.size,
// type: 'select',
// key: 'size',
// options: [
// { label: 'large', value: 'large',name:'',id:'' },
// { label: 'default', value: 'default',name:'',id:'' },
// { label: 'small', value: 'small',name:'',id:'' }
// ]
// }
/*{
label: '筛选条件展开/收起',
value: formConfig.value.expand,
@ -859,6 +867,7 @@ watch(
if (val) {
//
state.tabsName = 'first'
cssIsShouw(attrList)
}
}
)
@ -1504,19 +1513,51 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
currentUploadImgid = clickedRow.imgId
}
const optionsCss = [
{ label: '无样式', value: '' },
{ label: '每行两列', value: 'form-row-2' },
{ label: '每行三列', value: 'form-row-3' },
{ label: '每行四列', value: 'form-row-4' }
]
const layouytStyle = reactive<any>(controlData.value.styles)
watch(()=>layouytStyle,(val : any)=>{
console.log("监听样式处理",val)
controlData.value.styles = val
// Object.assign(store.controlAttr.styles.divStyle, val)
},
{
deep: true
});
const setStylefield = ref<string>("divStyle")
//liwenxuan 20240111 carousel end
const activeFormName = ref("0")
/**
@ 作者: 秦东
@ 时间: 2024-03-01 08:16:45
@ 功能: 判断是否是组件
*/
const cssIsShouw = (val:any) => {
if(val.length && val.length > 0){
return true;
}
return false;
}
</script>
<template>
<div class="sidebar-tools">
<el-tabs v-model="state.tabsName">
<el-tab-pane label="字段配置" name="first">
<el-form size="small" class="form">
<div class=""><h3>通用属性</h3></div>
<!-- <div class=""><h3>通用属性</h3></div> -->
<el-divider content-position="left">通用属性</el-divider>
<template v-for="(item, index) in attrList" :key="index">
<el-form-item :label="item.label">
<el-form-item :label="item.label" class="form_cont">
<el-select
v-if="item.type === 'select'"
:placeholder="item.placeholder"
@ -1649,11 +1690,11 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</template>
<template v-if="controlData.config">
<el-form-item label="联动条件">
<el-form-item label="联动条件" class="form_cont">
<el-switch v-model="controlData.config.linkKey" />
</el-form-item>
<template v-if="controlData.config.linkKey">
<el-form-item>
<el-form-item class="form_cont">
<el-input
v-model="controlData.config.linkValue"
type="textarea"
@ -1661,6 +1702,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
/>
</el-form-item>
<el-form-item
class="form_cont"
v-if="
showHide(
[
@ -1697,8 +1739,10 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</template>
</template>
<template v-if="showHide(['tabs'], true)">
<div class="h3"><h3>标签配置项</h3></div>
<!-- <div class="h3"><h3>标签配置项</h3></div> -->
<el-divider content-position="left">标签配置项</el-divider>
<el-form-item
class="form_cont"
v-for="(item, index) in controlData.columns"
:key="index"
>
@ -1712,7 +1756,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
></i>
</el-col>
</el-form-item>
<el-form-item>
<el-form-item class="form_cont">
<el-button @click="addSelectOption('tabs')">增加标签</el-button>
</el-form-item>
</template>
@ -1720,12 +1764,13 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
<div
v-if="showHide(['serialNumber'],true)"
>
<div class="h3"><h3>编码规则配置</h3></div>
<el-form-item label="编码方式">
<!-- <div class="h3"><h3>编码规则配置</h3></div> -->
<el-divider content-position="left">编码规则配置</el-divider>
<el-form-item label="编码方式" class="form_cont">
<el-switch v-model="controlData.config.automatic" inline-prompt active-text="自动编码" inactive-text="手动编码" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C" />
</el-form-item>
<div v-if="controlData.config.automatic">
<el-form-item v-for="(item, index) in controlData.config.customRules" :key="index">
<el-form-item v-for="(item, index) in controlData.config.customRules" :key="index" class="form_cont">
<el-input v-model="item.rule" :placeholder="item.message?item.message:'请输入自定义字符'">
<template #prepend>
@ -1752,7 +1797,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-form-item>
<el-form-item>
<el-form-item class="form_cont">
<el-button @click="addNumRules">添加规则</el-button>
</el-form-item>
</div>
@ -1772,14 +1817,15 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
)
"
>
<div class="h3"><h3>选项配置</h3></div>
<el-form-item v-if="showHide(['select'], true)" label="添加全部项">
<!-- <div class="h3"><h3>选项配置</h3></div> -->
<el-divider content-position="left">选项配置</el-divider>
<el-form-item v-if="showHide(['select'], true)" label="添加全部项" class="form_cont">
<el-input
v-model="controlData.config.addAll"
placeholder="请输入全部项文案"
/>
</el-form-item>
<el-form-item label="选项数据源">
<el-form-item label="选项数据源" class="form_cont">
<el-select
v-model="controlData.config.optionsType"
@change="controlData.config.optionsFun = ''"
@ -1794,6 +1840,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
<el-form-item
v-for="(item, index) in controlData.options"
:key="index"
class="form_cont"
>
<el-col :span="10">
<el-input v-model="item.label" placeholder="选项标签" />
@ -1809,12 +1856,12 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-col>
</el-form-item>
</div>
<el-form-item>
<el-form-item class="form_cont">
<el-button @click="addSelectOption">{{ controlData.type === 'cascader' ? '编辑' : '新增' }}</el-button>
</el-form-item>
</template>
<template v-else>
<el-form-item>
<el-form-item class="form_cont">
<el-input
v-model="controlData.config.optionsFun"
:placeholder="
@ -1836,20 +1883,20 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-input>
</el-form-item>
<template v-if="controlData.config.optionsType === 1">
<el-form-item label="指定label属性值">
<el-form-item label="指定label属性值" class="form_cont">
<el-input
v-model="controlData.config.label"
placeholder="返回数据中没有label时可设置"
/>
</el-form-item>
<el-form-item label="指定value属性值">
<el-form-item label="指定value属性值" class="form_cont">
<el-input
v-model="controlData.config.value"
placeholder="返回数据中没有value时可设置"
/>
</el-form-item>
</template>
<el-form-item v-if="controlData.config.optionsType === 1">
<el-form-item v-if="controlData.config.optionsType === 1" class="form_cont">
<el-button
@click="
optionsEvent(
@ -1868,7 +1915,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
>afterResponse</el-button>
</el-form-item>
</template>
<el-form-item label="尝试转换value值为">
<el-form-item label="尝试转换value值为" class="form_cont">
<el-select
v-model="controlData.config.transformData"
placeholder="默认为number"
@ -1898,11 +1945,14 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
])
"
>
<div class="h3"><h3>校验设置</h3></div>
<!-- <div class="h3"><h3>校验设置</h3></div> -->
<el-divider content-position="left">校验设置</el-divider>
<div v-if="showHide(['input', 'password', 'component'], true)">
<el-form-item
v-for="(item, index) in controlData.customRules"
:key="item.type"
class="form_cont"
>
<el-input v-model="item.message" placeholder="校验提示信息">
<template #prepend>
@ -1937,7 +1987,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
placeholder="方法名称,此方法仅适用于导出vue文件"
/>
</el-form-item>
<el-form-item>
<el-form-item class="form_cont">
<el-button @click="addRulesFast">快速添加</el-button>
<el-button @click="addRules(state.tooltip.rules)"
>编写校验规则
@ -1953,7 +2003,7 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-button>
</el-form-item>
</div>
<el-form-item v-else>
<el-form-item class="form_cont" v-else>
<el-checkbox
:model-value="checkboxRequired"
@change="requiredChange"
@ -1966,8 +2016,10 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
/>
</el-form-item>
</template>
<div v-if="showHide(['grid', 'card', 'gridChild', 'divider', 'div'])">
<div class="h3"><h3>其他属性</h3></div>
<!-- <div class="h3"><h3>其他属性</h3></div> -->
<el-divider content-position="left">其他属性</el-divider>
<div v-if="showHide(['grid', 'card', 'gridChild', 'divider', 'div'])" class="form_cont">
<el-button
size="small"
@ -1980,14 +2032,24 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-tooltip>
</el-button>
</div>
<el-divider content-position="left">组件布局</el-divider>
<LayoutPage v-if="cssIsShouw(attrList)" v-model:styles-val="controlDataStyls" :place="controlData.type" />
</el-form>
</el-tab-pane>
<el-tab-pane label="表单配置" name="second">
<el-form size="small" class="form">
<el-divider content-position="left">基础配置</el-divider>
<el-form-item
v-for="(item, index) in formAttr.filter(item => !item.hide)"
:label="item.label"
:key="index"
class="form_cont"
>
<el-select
v-if="item.type === 'select'"
@ -2019,7 +2081,13 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
@input="formAttrChange(item)"
/>
</el-form-item>
<el-form-item v-if="!state.isSearch">
<template v-if="!state.isSearch">
<el-divider content-position="left">接口数据事件</el-divider>
<el-form-item v-if="!state.isSearch" class="form_cont">
<template #label
>
添加时获取请求
@ -2039,47 +2107,25 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
"
/>
</el-form-item>
<el-form-item>
<el-button @click="editFormStyle(state.tooltip.css)"
>
编辑表单样式
<el-tooltip :content="state.tooltip.css" placement="top">
<el-icon>
<QuestionFilled />
</el-icon>
</el-tooltip>
</el-button>
<el-button @click="editFormDict(state.tooltip.dict)"
>
设置数据字典
<el-tooltip :content="state.tooltip.dict" placement="top">
<el-icon>
<QuestionFilled />
</el-icon>
</el-tooltip>
</el-button>
</el-form-item>
<template v-if="!state.isSearch">
<div class="h3"><h3>接口数据事件</h3></div>
<el-form-item label="新增数据保存url">
<el-form-item label="新增数据保存url" class="form_cont">
<el-input
v-model="formConfig.addUrl"
placeholder="表单提交的url,非特殊不需要设置"
/>
</el-form-item>
<el-form-item label="修改数据保存url">
<el-form-item label="修改数据保存url" class="form_cont">
<el-input
v-model="formConfig.editUrl"
placeholder="修改提交的url,非特殊不需要设置"
/>
</el-form-item>
<el-form-item label="获取表单数据url">
<el-form-item label="获取表单数据url" class="form_cont">
<el-input
v-model="formConfig.requestUrl"
placeholder="获取表单数据url,非特殊不需要设置"
/>
</el-form-item>
<el-form-item class="event-btn">
<el-form-item class="event-btn form_cont">
<el-button
@click="
eventClick(
@ -2122,6 +2168,85 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
</el-button>
</el-form-item>
</template>
<el-divider content-position="left">表单整体布局</el-divider>
<el-form-item label="组件尺寸" class="form_cont">
<el-radio-group v-model="formData.size">
<el-radio-button label="large"></el-radio-button>
<el-radio-button label="default">适中</el-radio-button>
<el-radio-button label="small"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="表单样式名称" class="form_cont">
<el-select
v-model="formData.class"
class="m-2"
placeholder="额外添加的表单class类名"
>
<el-option
v-for="item in optionsCss"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="行内表单模式" class="form_cont">
<el-switch v-model="formData.inline" active-text="开启" inactive-text="关闭" />
</el-form-item>
<el-form-item label="标签宽度" class="form_cont">
<el-input v-model="formData.labelWidth" clearable placeholder="表单标签宽度">
<template #append >PX</template>
</el-input>
</el-form-item>
<el-form-item label="标签后缀" class="form_cont">
<el-input v-model="formData.labelSuffix" placeholder="表单标签后缀" />
</el-form-item>
<el-form-item label="表单标签对齐方式" class="form_cont">
<el-radio-group v-model="formData.labelPosition">
<el-radio-button label="left"></el-radio-button>
<el-radio-button label="right"></el-radio-button>
<el-radio-button label="top"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="必填项星号位置" class="form_cont">
<el-radio-group v-model="formData.requireAsteriskPosition">
<el-radio-button label="left"></el-radio-button>
<el-radio-button label="right"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="是否隐藏星号" class="form_cont">
<el-switch v-model="formData.hideRequiredAsterisk" active-text="显示" inactive-text="隐藏" />
</el-form-item>
<el-form-item label="校验错误信息" class="form_cont">
<el-switch v-model="formData.showMessage" active-text="显示" inactive-text="隐藏" />
</el-form-item>
<el-form-item label="以行内形式展示校验信息" class="form_cont">
<el-switch v-model="formData.inlineMessage" active-text="显示" inactive-text="隐藏" />
</el-form-item>
<el-form-item label="是否显示校验结果反馈图标" class="form_cont">
<el-switch v-model="formData.statusIcon" active-text="显示" inactive-text="隐藏" />
</el-form-item>
<el-divider content-position="left">表单功能补充</el-divider>
<el-form-item class="form_cont">
<el-button @click="editFormStyle(state.tooltip.css)"
>
编辑表单样式
<el-tooltip :content="state.tooltip.css" placement="top">
<el-icon>
<QuestionFilled />
</el-icon>
</el-tooltip>
</el-button>
<el-button @click="editFormDict(state.tooltip.dict)"
>
设置数据字典
<el-tooltip :content="state.tooltip.dict" placement="top">
<el-icon>
<QuestionFilled />
</el-icon>
</el-tooltip>
</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
@ -2192,6 +2317,21 @@ const changeCurrentUploadImgid = (clickedRow:any) => {
<!-- 轮播图设置弹窗 liwenxuan 20240122 end -->
</template>
<style lang='scss' scoped>
<style>
.form_cont{
padding: 0 10px;
}
</style>
<style >
.sidebar-tools .el-tabs__content{
padding: 0;
}
.el-collapse-item__header {
padding-left: 10px;
background-color: rgb(229, 229, 229);
}
.el-collapse-item__header{
padding-left: 10px;
background-color: rgb(229, 229, 229);
}
</style>

2197
src/components/DesignForm/formControlAttr_2024024.vue

File diff suppressed because it is too large

155
src/components/DesignForm/layoutPage/index.vue

@ -0,0 +1,155 @@
<!--
@ 作者: 秦东
@ 时间: 2024-02-29 14:18:54
@ 备注: 样式布局
-->
<script lang='ts' setup>
import DesignLayout from "@/components/DesignForm/designLayout/designLayoutPage.vue"
import BianXian from "@/components/DesignForm/designLayout/bianXian.vue"
import YuanJiao from "@/components/DesignForm/designLayout/yuanjao.vue"
import UnitBackGround from "@/components/DesignForm/designLayout/unitBackGround.vue"
import PageSize from "@/components/DesignForm/designLayout/pageSize.vue"
import PageSizeSmail from "@/components/DesignForm/designLayout/pageSizeSmail.vue"
import TextPage from "@/components/DesignForm/designLayout/textPage.vue"
const props = defineProps({
stylesVal:{
type:Object,
default(){
return {}
}
},
place:{
type:String,
default:""
}
});
const unitIsShow = ref(true)
const labelIsShow = ref(true)
const inputUnitTitle = (val:string) => {
console.log("inputUnitTitle",val);
switch (val) {
case "radio":
return "Radio布局"
break;
case "select":
unitIsShow.value = false;
break;
case "datePicker":
unitIsShow.value = false;
break;
case "timePicker":
unitIsShow.value = false;
break;
case "switch":
unitIsShow.value = false;
break;
case "inputNumber":
unitIsShow.value = false;
break;
case "cascader":
unitIsShow.value = false;
break;
case "rate":
unitIsShow.value = false;
break;
case "slider":
unitIsShow.value = false;
break;
case "treeSelect":
unitIsShow.value = false;
break;
case "txt":
unitIsShow.value = false;
labelIsShow.value = false;
break;
case "title":
unitIsShow.value = false;
break;
default:
return "Input布局"
break;
}
return "Input布局"
}
// const divStyle = reactive<any>({})
// watch(()=>divStyle,(val : any)=>{
// // console.log("-----1--->",val)
// props.stylesVal[props.place] = val
// // Object.assign(store.controlAttr.styles.divStyle, val)
// },
// {
// deep: true
// });
watch(()=>props.place,(val : any)=>{
console.log("格式布局-----1--->",val)
inputUnitTitle(val);
// props.stylesVal[props.place] = val
// Object.assign(store.controlAttr.styles.divStyle, val)
},
{
deep: true
});
const activeName = ref('0')
</script>
<template>
<div class="jhk_kjh">
当前组件类别======>{{props.place}}
<el-collapse v-model="activeName" accordion>
<el-collapse-item title="边框布局" name="1">
<el-divider content-position="left">外框</el-divider>
<DesignLayout v-model:layouyt-style="props.stylesVal.divStyle" />
<el-divider content-position="left">圆角</el-divider>
<YuanJiao v-model:layouyt-style="props.stylesVal.divStyle" />
<el-divider content-position="left">边线</el-divider>
<BianXian v-model:dataVal="props.stylesVal.divStyle" />
<el-divider content-position="left">背景</el-divider>
<UnitBackGround v-model:layouyt-style="props.stylesVal.divStyle" />
<el-divider content-position="left">尺寸</el-divider>
<PageSize v-model:layouyt-style="props.stylesVal.divStyle" :place="'div'" />
<el-divider v-if="props.place=='txt'" content-position="left">文本</el-divider>
<TextPage v-if="props.place=='txt'" v-model:layouyt-style="props.stylesVal.divStyle" :place="'div'" />
</el-collapse-item>
<el-collapse-item v-if="labelIsShow" title="Lable布局" name="2">
<el-divider content-position="left">外框</el-divider>
<DesignLayout v-model:layouyt-style="props.stylesVal.labelStyle" />
<el-divider content-position="left">圆角</el-divider>
<YuanJiao v-model:layouyt-style="props.stylesVal.labelStyle" />
<el-divider content-position="left">边线</el-divider>
<BianXian v-model:dataVal="props.stylesVal.labelStyle" />
<el-divider content-position="left">背景</el-divider>
<UnitBackGround v-model:layouyt-style="props.stylesVal.labelStyle" />
<el-divider content-position="left">尺寸</el-divider>
<PageSizeSmail v-model:layouyt-style="props.stylesVal.labelStyle" :place="'div'" />
<el-divider content-position="left">文本</el-divider>
<TextPage v-model:layouyt-style="props.stylesVal.labelStyle" :place="'div'" />
</el-collapse-item>
<el-collapse-item v-if="unitIsShow" :title="inputUnitTitle(props.place)" name="3">
<el-divider content-position="left">外框</el-divider>
<DesignLayout v-model:layouyt-style="props.stylesVal.inputStyle" />
<el-divider content-position="left">边线</el-divider>
<BianXian v-model:dataVal="props.stylesVal.inputStyle" />
<el-divider content-position="left">背景</el-divider>
<UnitBackGround v-model:layouyt-style="props.stylesVal.inputStyle" />
<el-divider content-position="left">尺寸</el-divider>
<PageSizeSmail v-model:layouyt-style="props.stylesVal.inputStyle" :place="'div'" />
<el-divider content-position="left">文本</el-divider>
<TextPage v-model:layouyt-style="props.stylesVal.inputStyle" :place="'div'" />
</el-collapse-item>
</el-collapse>
</div>
</template>
<style >
.jhk_kjh .el-collapse-item__header{
padding-left: 10px;
background-color: rgb(229, 229, 229);
}
</style>

581
src/components/DesignForm/public/form/calculate/cssInfo.ts

@ -0,0 +1,581 @@
export const AnalysisCss = (ele:any) =>{
let styleObject:any = {}
if(ele['marginTop']){
if(ele['marginTop'] != "auto"){
styleObject['margin-top'] = ele['marginTop']+"px";
}else{
styleObject['margin-top'] = "0px";
}
}
if(ele['marginLeft']){
if(ele['marginLeft'] != "auto"){
styleObject['margin-left'] = ele['marginLeft']+"px";
}else{
styleObject['margin-left'] = "0px";
}
}
if(ele['marginRight']){
if(ele['marginRight'] != "auto"){
styleObject['margin-right'] = ele['marginRight']+"px";
}else{
styleObject['margin-right'] = "0px";
}
}
if(ele['marginBot']){
if(ele['marginBot'] != "auto"){
styleObject['margin-bottom'] = ele['marginBot']+"px";
}else{
styleObject['margin-bottom'] = "0px";
}
}
if(ele['paddingTop']){
if(ele['paddingTop'] != "auto"){
styleObject['padding-top'] = ele['paddingTop']+"px";
}else{
styleObject['padding-top'] = "0px";
}
}
if(ele['paddingLeft']){
if(ele['paddingLeft'] != "auto"){
styleObject['padding-left'] = ele['paddingLeft']+"px";
}else{
styleObject['padding-left'] = "0px";
}
}
if(ele['paddingRight']){
if(ele['paddingRight'] != "auto"){
styleObject['padding-right'] = ele['paddingRight']+"px";
}else{
styleObject['padding-right'] = "0px";
}
}
if(ele['paddingBot']){
if(ele['paddingBot'] != "auto"){
styleObject['padding-bottom'] = ele['paddingBot']+"px";
}else{
styleObject['padding-bottom'] = "0px";
}
}
if(ele['divbox']){
if(ele['divbox'] == "gap"){
Object.assign(styleObject, yuanJiaoAnalysis(ele,'gap'));
}else{
// styleObject['border-radius'] = yuanJiaoAnalysis(ele,'gap');
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
}else{
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
let borderLink = ""
if(ele["boxWidth"]){
borderLink+=ele["boxWidth"]+"px "
}
if(ele["contourProfile"]) {
borderLink+=" " +ele["contourProfile"] + " "
}
if(ele["lineColorVal"]) {
borderLink+=" " +ele["lineColorVal"] + " "
}
if(ele["border"] && borderLink != ""){
switch(ele["border"]){
case 1:
styleObject['border']=borderLink
break;
case 2:
styleObject['border-top']=borderLink
break;
case 3:
styleObject['border-left']=borderLink
break;
case 4:
styleObject['border-right']=borderLink
break;
case 5:
styleObject['border-bottom']=borderLink
break;
default:
styleObject['border']= "0px"
}
}
if(ele["transparency"] || ele["transparency"] == 0) {
styleObject['opacity'] = ele['transparency']/100;
}
if(ele["backgroundColor"]) {
styleObject['background-color'] = ele['backgroundColor']
}
if(ele['width']){
if(ele['width'] != ""){
styleObject['width'] = ele['width'].toString()+"px";
}
}
if(ele['widthMax'] && ele['widthMax'] != ""){
styleObject['max-width'] = ele['widthMax'].toString()+"px";
}
if(ele['widthMin'] && ele['widthMin'] != ""){
styleObject['min-width'] = ele['widthMin'].toString()+"px";
}
if(ele['height'] && ele['height'] != ""){
styleObject['height'] = ele['height'].toString()+"px";
}
if(ele['heightMax'] && ele['heightMax'] != ""){
styleObject['max-height'] = ele['heightMax'].toString()+"px";
}
if(ele['heightMin'] && ele['heightMin'] != ""){
styleObject['min-height'] = ele['heightMin'].toString()+"px";
}
if(ele['objectFit'] && ele['objectFit'] != ""){
switch(ele['objectFit']){
case "fill":
styleObject['object-fit'] = "fill";
break;
case "contain":
styleObject['object-fit'] = "contain";
break;
case "vover":
styleObject['object-fit'] = "cover";
break;
case "none":
styleObject['object-fit'] = "none";
break;
case "scaleDown":
styleObject['object-fit'] = "scale-down";
break;
default:
break;
}
}
if(ele['textAlign'] && ele['textAlign'] != ""){
styleObject['text-align'] = ele['textAlign'];
}
if(ele['fontStyle'] && ele['fontStyle'] != ""){
styleObject['font-style'] = ele['fontStyle'];
}
if(ele['textecoration'] && ele['textecoration'] != ""){
styleObject['text-decoration'] = ele['textecoration'];
}
if(ele['fontSize'] && ele['fontSize'] != ""){
styleObject['font-size'] = ele['fontSize'].toString()+"px";
}
if(ele['fontFamily'] && ele['fontFamily'] != ""){
styleObject['font-family'] = ele['fontFamily'];
}
if(ele['fontHight'] && ele['fontHight'] != ""){
styleObject['line-height'] = ele['fontHight'].toString()+"px";
}
if(ele['fontWeight'] && ele['fontWeight'] != ""){
styleObject['font-weight'] = ele['fontWeight'];
}
if(ele['fontColor'] && ele['fontColor'] != ""){
styleObject['color'] = ele['fontColor'];
}
console.log("分析css==>",styleObject);
return styleObject
}
const yuanJiaoAnalysis = (ele:any,types:string) => {
if(types == "gap"){
let borRad:any = {}
for(let k in ele){
if(k == 'radiusLeftTop'){
if(ele[k] != ""){
borRad['border-top-left-radius'] = ele[k]+"px";
}else{
borRad['border-top-left-radius'] = "0px";
}
}
if(k == 'radiusrightTop'){
if(ele[k] != ""){
borRad['border-top-right-radius'] = ele[k]+"px";
}else{
borRad['border-top-right-radius'] = "0px";
}
}
if(k == 'radiusLeftBot'){
if(ele[k] != ""){
borRad['border-bottom-left-radius'] = ele[k]+"px";
}else{
borRad['border-bottom-left-radius'] = "0px";
}
}
if(k == 'radiusrightBot'){
if(ele[k] != ""){
borRad['border-bottom-right-radius'] = ele[k]+"px";
}else{
borRad['border-bottom-right-radius'] = "0px";
}
}
}
// console.log("borRad",borRad)
return borRad;
}else{
let borRad:any = {}
for(let k in ele){
if(k == 'borderRadius'){
if(ele[k] != ""){
borRad['border-radius'] = ele[k]+"px";
}else{
borRad['border-radius'] = "0px";
}
}
}
return borRad;
}
}
export const AnalysisInputCss = (ele:any,sty:number) =>{
let styleObject:any = {}
if(sty == 1 || sty == 2){
if(ele['marginTop']){
if(ele['marginTop'] != "auto"){
styleObject['margin-top'] = ele['marginTop']+"px";
}else{
styleObject['margin-top'] = "0px";
}
}
if(ele['marginLeft']){
if(ele['marginLeft'] != "auto"){
styleObject['margin-left'] = ele['marginLeft']+"px";
}else{
styleObject['margin-left'] = "0px";
}
}
if(ele['marginRight']){
if(ele['marginRight'] != "auto"){
styleObject['margin-right'] = ele['marginRight']+"px";
}else{
styleObject['margin-right'] = "0px";
}
}
if(ele['marginBot']){
if(ele['marginBot'] != "auto"){
styleObject['margin-bottom'] = ele['marginBot']+"px";
}else{
styleObject['margin-bottom'] = "0px";
}
}
if(ele['divbox']){
if(ele['divbox'] == "gap"){
Object.assign(styleObject, yuanJiaoAnalysis(ele,'gap'));
}else{
// styleObject['border-radius'] = yuanJiaoAnalysis(ele,'gap');
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
}else{
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
let borderLink = ""
if(ele["boxWidth"]){
borderLink+=ele["boxWidth"]+"px "
}
if(ele["contourProfile"]) {
borderLink+=" " +ele["contourProfile"] + " "
}
if(ele["lineColorVal"]) {
borderLink+=" " +ele["lineColorVal"] + " "
}
if(ele["border"] && borderLink != ""){
switch(ele["border"]){
case 1:
styleObject['border']=borderLink
break;
case 2:
styleObject['border-top']=borderLink
break;
case 3:
styleObject['border-left']=borderLink
break;
case 4:
styleObject['border-right']=borderLink
break;
case 5:
styleObject['border-bottom']=borderLink
break;
default:
styleObject['border']= "0px"
}
}
if(ele['width']){
if(ele['width'] != ""){
styleObject['width'] = ele['width'].toString()+"px";
}
}
if(ele['widthMax'] && ele['widthMax'] != ""){
styleObject['max-width'] = ele['widthMax'].toString()+"px";
}
if(ele['widthMin'] && ele['widthMin'] != ""){
styleObject['min-width'] = ele['widthMin'].toString()+"px";
}
if(ele['height'] && ele['height'] != ""){
styleObject['height'] = ele['height'].toString()+"px";
}
if(ele['heightMax'] && ele['heightMax'] != ""){
styleObject['max-height'] = ele['heightMax'].toString()+"px";
}
if(ele['heightMin'] && ele['heightMin'] != ""){
styleObject['min-height'] = ele['heightMin'].toString()+"px";
}
if(ele['objectFit'] && ele['objectFit'] != ""){
switch(ele['objectFit']){
case "fill":
styleObject['object-fit'] = "fill";
break;
case "contain":
styleObject['object-fit'] = "contain";
break;
case "vover":
styleObject['object-fit'] = "cover";
break;
case "none":
styleObject['object-fit'] = "none";
break;
case "scaleDown":
styleObject['object-fit'] = "scale-down";
break;
default:
break;
}
}
}
if(sty == 1 || sty == 3){
if(ele['paddingTop']){
if(ele['paddingTop'] != "auto"){
styleObject['padding-top'] = ele['paddingTop']+"px";
}else{
styleObject['padding-top'] = "0px";
}
}
if(ele['paddingLeft']){
if(ele['paddingLeft'] != "auto"){
styleObject['padding-left'] = ele['paddingLeft']+"px";
}else{
styleObject['padding-left'] = "0px";
}
}
if(ele['paddingRight']){
if(ele['paddingRight'] != "auto"){
styleObject['padding-right'] = ele['paddingRight']+"px";
}else{
styleObject['padding-right'] = "0px";
}
}
if(ele['paddingBot']){
if(ele['paddingBot'] != "auto"){
styleObject['padding-bottom'] = ele['paddingBot']+"px";
}else{
styleObject['padding-bottom'] = "0px";
}
}
if(ele['textAlign'] && ele['textAlign'] != ""){
styleObject['text-align'] = ele['textAlign'];
}
if(ele['fontStyle'] && ele['fontStyle'] != ""){
styleObject['font-style'] = ele['fontStyle'];
}
if(ele['textecoration'] && ele['textecoration'] != ""){
styleObject['text-decoration'] = ele['textecoration'];
}
if(ele['fontSize'] && ele['fontSize'] != ""){
styleObject['font-size'] = ele['fontSize'].toString()+"px";
}
if(ele['fontFamily'] && ele['fontFamily'] != ""){
styleObject['font-family'] = ele['fontFamily'];
}
if(ele['fontHight'] && ele['fontHight'] != ""){
styleObject['line-height'] = ele['fontHight'].toString()+"px";
}
if(ele['fontWeight'] && ele['fontWeight'] != ""){
styleObject['font-weight'] = ele['fontWeight'];
}
if(ele['fontColor'] && ele['fontColor'] != ""){
styleObject['color'] = ele['fontColor'];
}
}
if(sty == 1 || sty == 4){
if(ele['marginTop']){
if(ele['marginTop'] != "auto"){
styleObject['margin-top'] = ele['marginTop']+"px";
}else{
styleObject['margin-top'] = "0px";
}
}
if(ele['marginLeft']){
if(ele['marginLeft'] != "auto"){
styleObject['margin-left'] = ele['marginLeft']+"px";
}else{
styleObject['margin-left'] = "0px";
}
}
if(ele['marginRight']){
if(ele['marginRight'] != "auto"){
styleObject['margin-right'] = ele['marginRight']+"px";
}else{
styleObject['margin-right'] = "0px";
}
}
if(ele['marginBot']){
if(ele['marginBot'] != "auto"){
styleObject['margin-bottom'] = ele['marginBot']+"px";
}else{
styleObject['margin-bottom'] = "0px";
}
}
if(ele['divbox']){
if(ele['divbox'] == "gap"){
Object.assign(styleObject, yuanJiaoAnalysis(ele,'gap'));
}else{
// styleObject['border-radius'] = yuanJiaoAnalysis(ele,'gap');
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
}else{
Object.assign(styleObject, yuanJiaoAnalysis(ele,'all'));
}
let borderLink = ""
if(ele["boxWidth"]){
borderLink+=ele["boxWidth"]+"px "
}
if(ele["contourProfile"]) {
borderLink+=" " +ele["contourProfile"] + " "
}
if(ele["lineColorVal"]) {
borderLink+=" " +ele["lineColorVal"] + " "
}
if(ele["border"] && borderLink != ""){
switch(ele["border"]){
case 1:
styleObject['border']=borderLink
break;
case 2:
styleObject['border-top']=borderLink
break;
case 3:
styleObject['border-left']=borderLink
break;
case 4:
styleObject['border-right']=borderLink
break;
case 5:
styleObject['border-bottom']=borderLink
break;
default:
styleObject['border']= "0px"
}
}
if(ele['width']){
if(ele['width'] != ""){
styleObject['width'] = ele['width'].toString()+"px";
}
}
if(ele['widthMax'] && ele['widthMax'] != ""){
styleObject['max-width'] = ele['widthMax'].toString()+"px";
}
if(ele['widthMin'] && ele['widthMin'] != ""){
styleObject['min-width'] = ele['widthMin'].toString()+"px";
}
if(ele['height'] && ele['height'] != ""){
styleObject['height'] = ele['height'].toString()+"px";
}
if(ele['heightMax'] && ele['heightMax'] != ""){
styleObject['max-height'] = ele['heightMax'].toString()+"px";
}
if(ele['heightMin'] && ele['heightMin'] != ""){
styleObject['min-height'] = ele['heightMin'].toString()+"px";
}
if(ele['objectFit'] && ele['objectFit'] != ""){
switch(ele['objectFit']){
case "fill":
styleObject['object-fit'] = "fill";
break;
case "contain":
styleObject['object-fit'] = "contain";
break;
case "vover":
styleObject['object-fit'] = "cover";
break;
case "none":
styleObject['object-fit'] = "none";
break;
case "scaleDown":
styleObject['object-fit'] = "scale-down";
break;
default:
break;
}
}
if(ele['textAlign'] && ele['textAlign'] != ""){
styleObject['text-align'] = ele['textAlign'];
}
}
if(sty == 1 || sty == 5){
if(ele['paddingTop']){
if(ele['paddingTop'] != "auto"){
styleObject['padding-top'] = ele['paddingTop']+"px";
}else{
styleObject['padding-top'] = "0px";
}
}
if(ele['paddingLeft']){
if(ele['paddingLeft'] != "auto"){
styleObject['padding-left'] = ele['paddingLeft']+"px";
}else{
styleObject['padding-left'] = "0px";
}
}
if(ele['paddingRight']){
if(ele['paddingRight'] != "auto"){
styleObject['padding-right'] = ele['paddingRight']+"px";
}else{
styleObject['padding-right'] = "0px";
}
}
if(ele['paddingBot']){
if(ele['paddingBot'] != "auto"){
styleObject['padding-bottom'] = ele['paddingBot']+"px";
}else{
styleObject['padding-bottom'] = "0px";
}
}
if(ele['fontStyle'] && ele['fontStyle'] != ""){
styleObject['font-style'] = ele['fontStyle'];
}
if(ele['textecoration'] && ele['textecoration'] != ""){
styleObject['text-decoration'] = ele['textecoration'];
}
if(ele['fontSize'] && ele['fontSize'] != ""){
styleObject['font-size'] = ele['fontSize'].toString()+"px";
}
if(ele['fontFamily'] && ele['fontFamily'] != ""){
styleObject['font-family'] = ele['fontFamily'];
}
if(ele['fontHight'] && ele['fontHight'] != ""){
styleObject['line-height'] = ele['fontHight'].toString()+"px";
}
if(ele['fontWeight'] && ele['fontWeight'] != ""){
styleObject['font-weight'] = ele['fontWeight'];
}
if(ele['fontColor'] && ele['fontColor'] != ""){
styleObject['color'] = ele['fontColor'];
}
}
if(ele["backgroundColor"]) {
styleObject['background-color'] = ele['backgroundColor']
}
if(ele["transparency"] || ele["transparency"] == 0) {
styleObject['opacity'] = ele['transparency']/100;
}
return styleObject;
}

15
src/components/DesignForm/public/form/formGroup.vue

@ -19,6 +19,8 @@ import {
import { Md5 } from 'ts-md5';
import { jsonParseStringify } from '@/utils/DesignForm'
import { AnalysisCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts'
const props = withDefaults(
defineProps<{
data: FormList[]
@ -185,6 +187,10 @@ const getFormItemStyle = (ele: FormList) => {
if (ele.config && ele.config.span) {
return { width: (ele.config.span / 24) * 100 + '%' }
}
if(ele.styles?.divStyle){
console.log("返回栅格宽度3",AnalysisCss(ele.styles.divStyle))
return AnalysisCss(ele.styles.divStyle)
}
}
//
const linksShow = (el: FormList, index: number) => {
@ -256,6 +262,13 @@ onUnmounted(() => {
onMounted(()=>{
console.log('formGroup onMounted',dataList,props.tableinfo)
})
const getFormItemLableStyle = (ele: any) => {
if(ele?.labelStyle){
console.log("返回栅格宽度3",AnalysisCss(ele?.labelStyle))
return AnalysisCss(ele?.labelStyle)
}
}
</script>
<template>
<draggable
@ -286,6 +299,7 @@ onMounted(()=>{
v-show="linksShow(element, index)"
v-if="linksIf(element)"
>
{{element}}
<!--选项卡组件-->
<template v-if="element.type === 'tabs'">
<div class="form-tabs">
@ -309,6 +323,7 @@ onMounted(()=>{
class="title"
:class="[element.config.className]"
v-bind="element.control"
:style="getFormItemLableStyle(element.styles)"
>
<span v-html="element.control.modelValue"></span>
<Tooltips

42
src/components/DesignForm/public/form/formItem.vue

@ -35,6 +35,8 @@ import { useRoute } from 'vue-router'
import TextImg from "@/assets/image/tinymce.png"
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts'
const props = withDefaults(
defineProps<{
data: FormList
@ -54,6 +56,11 @@ const type = computed(() => {
const config = computed(() => {
return props.data.config || {}
})
//css
const configStyle = computed(() => {
return props.data.styles || {}
})
const control = computed(() => {
if(props.data.type == "upload"){
props.data.control.action = uploadUrl
@ -455,7 +462,23 @@ onMounted(() => {
getAxiosOptions()
})
onUnmounted(() => {})
/**
@ 作者: 秦东
@ 时间: 2024-03-01 09:07:11
@ 功能: 布局处理
*/
const getFormItemLableStyle = (ele: any) => {
if(ele?.labelStyle){
console.log("返回栅格宽度3",AnalysisCss(ele?.labelStyle))
return AnalysisCss(ele?.labelStyle)
}
}
const getFormItemInputStyle = (ele: any,sty:number) => {
if(ele?.inputStyle){
console.log("返回栅格宽度4",AnalysisInputCss(ele?.inputStyle,sty))
return AnalysisInputCss(ele?.inputStyle,sty)
}
}
const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
</script>
<template>
@ -466,10 +489,14 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
:rules="itemRules as any"
:label="getLabel(data.item as FormItem)"
>
<template #label v-if="config.help">
{{ getLabel(data.item) }}
<span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span>
<Tooltips :content="config.help" />
</template>
<template #label v-else>
<span :style="getFormItemLableStyle(configStyle)" >{{ getLabel(data.item) }}</span>
</template>
<div class="form-value" v-if="type === 4" v-html="value"></div>
<template v-else>
<el-input
@ -477,6 +504,8 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
v-model="value"
:disabled="editDisabled"
:type="data.type === 'password' ? 'password' : 'text'"
:style="getFormItemInputStyle(configStyle,2)"
:input-style="getFormItemInputStyle(configStyle,3)"
v-if="['input', 'password'].includes(data.type)"
>
<template #prepend v-if="config.prepend">
@ -509,6 +538,8 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
v-model="value"
:disabled="editDisabled"
type="textarea"
:style="getFormItemInputStyle(configStyle,2)"
:input-style="getFormItemInputStyle(configStyle,3)"
v-if="data.type === 'textarea'"
/>
<el-radio-group
@ -516,13 +547,15 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
:disabled="editDisabled"
v-model="value"
v-if="data.type === 'radio'"
:style="getFormItemInputStyle(configStyle,4)"
>
<el-radio
:key="index"
:label="transformOption(item.value)"
v-for="(item, index) in options"
>
{{ item.label }}
<span :style="getFormItemInputStyle(configStyle,5)">{{ item.label }}</span>
</el-radio>
</el-radio-group>
<el-checkbox-group
@ -530,13 +563,14 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
:disabled="editDisabled"
v-model="value"
v-if="data.type === 'checkbox'"
:style="getFormItemInputStyle(configStyle,4)"
>
<el-checkbox
v-for="(item, index) in options"
:key="index"
:label="transformOption(item.value)"
>
{{ item.label }}
<span :style="getFormItemInputStyle(configStyle,5)">{{ item.label }}</span>
</el-checkbox>
</el-checkbox-group>
<AKSelect

12
src/types/components.d.ts

@ -9,13 +9,17 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
'副本': typeof import('./../components/DesignForm/formControlAttr - 副本.vue')['default']
AceDrawer: typeof import('./../components/DesignForm/aceDrawer.vue')['default']
AddNode: typeof import('./../components/workflow/addNode.vue')['default']
ApproverDrawer: typeof import('./../components/workflow/drwer/approverDrawer.vue')['default']
BianXian: typeof import('./../components/DesignForm/designLayout/bianXian.vue')['default']
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
ChildTable: typeof import('./../components/DesignForm/public/form/childTable.vue')['default']
ConditionDrawer: typeof import('./../components/workflow/drwer/conditionDrawer.vue')['default']
CopyerDrawer: typeof import('./../components/workflow/drwer/copyerDrawer.vue')['default']
DesignLayoutButPage: typeof import('./../components/DesignForm/designLayout/designLayoutButPage.vue')['default']
DesignLayoutPage: typeof import('./../components/DesignForm/designLayout/designLayoutPage.vue')['default']
DiyIconfont: typeof import('./../components/DesignForm/public/expand/diy-iconfont.vue')['default']
DragControl: typeof import('./../components/DesignForm/dragControl.vue')['default']
ElAffix: typeof import('element-plus/es')['ElAffix']
@ -68,6 +72,7 @@ declare module '@vue/runtime-core' {
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps']
@ -95,6 +100,7 @@ declare module '@vue/runtime-core' {
Form: typeof import('./../components/DesignForm/public/form/form.vue')['default']
Form2: typeof import('./../components/DesignForm/public/form/form2.vue')['default']
FormControlAttr: typeof import('./../components/DesignForm/formControlAttr.vue')['default']
FormControlAttr_2024024: typeof import('./../components/DesignForm/formControlAttr_2024024.vue')['default']
FormControlAttres: typeof import('./../components/DesignForm/formControlAttres.vue')['default']
FormGroup: typeof import('./../components/DesignForm/public/form/formGroup.vue')['default']
FormGroup1: typeof import('./../components/DesignForm/public/form/formGroup1.vue')['default']
@ -127,12 +133,15 @@ declare module '@vue/runtime-core' {
IEpUser: typeof import('~icons/ep/user')['default']
IEpView: typeof import('~icons/ep/view')['default']
LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
LayoutPage: typeof import('./../components/DesignForm/layoutPage/index.vue')['default']
List: typeof import('./../components/DesignForm/public/form/components/list.vue')['default']
ListTreeSide: typeof import('./../components/DesignForm/public/form/components/listTreeSide.vue')['default']
MathFormula: typeof import('./../components/DesignForm/math/mathFormula.vue')['default']
Matrix: typeof import('./../components/workflow/dialog/matrix.vue')['default']
MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default']
NodeWrap: typeof import('./../components/workflow/nodeWrap.vue')['default']
PageSize: typeof import('./../components/DesignForm/designLayout/pageSize.vue')['default']
PageSizeSmail: typeof import('./../components/DesignForm/designLayout/pageSizeSmail.vue')['default']
Pagination: typeof import('./../components/Pagination/index.vue')['default']
PositionDialog: typeof import('./../components/workflow/dialog/positionDialog.vue')['default']
PromoterDrawer: typeof import('./../components/workflow/drwer/promoterDrawer.vue')['default']
@ -148,13 +157,16 @@ declare module '@vue/runtime-core' {
SizeSelect: typeof import('./../components/SizeSelect/index.vue')['default']
SvgIcon: typeof import('./../components/SvgIcon/index.vue')['default']
Template: typeof import('./../components/DesignForm/template.vue')['default']
TextPage: typeof import('./../components/DesignForm/designLayout/textPage.vue')['default']
Tinymce: typeof import('./../components/DesignForm/public/form/tinymce.vue')['default']
Tinymce_1: typeof import('./../components/DesignForm/public/form/tinymce_1.vue')['default']
Tooltip: typeof import('./../components/DesignForm/tooltip.vue')['default']
UnitBackGround: typeof import('./../components/DesignForm/designLayout/unitBackGround.vue')['default']
User: typeof import('./../components/DesignForm/public/expand/user.vue')['default']
UserDialog: typeof import('./../components/DesignForm/public/expand/userDialog.vue')['default']
VueFile: typeof import('./../components/DesignForm/vueFile.vue')['default']
WangEditor: typeof import('./../components/WangEditor/index.vue')['default']
Yuanjao: typeof import('./../components/DesignForm/designLayout/yuanjao.vue')['default']
}
export interface ComponentCustomProperties {
vLoading: typeof import('element-plus/es')['ElLoadingDirective']

31
src/widget/digitpage/index.vue

@ -12,16 +12,20 @@
:label="getLabel(data.item as FormItem)"
>
<template v-if="config.help" #label >
{{ getLabel(data.item) }}
<span :style="getFormItemLableStyle(configStyle)">{{ getLabel(data.item) }}</span>
<Tooltips :content="config.help" />
</template>
<template #label v-else>1
<span :style="getFormItemLableStyle(configStyle)" >{{ getLabel(data.item) }}</span>
</template>
<div v-if="type === 4" class="form-value" v-html="value"></div>
<template v-else>
<el-input v-model="value" oninput ="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^\./g, '')" placeholder="请输入"></el-input>
<el-input v-model="value" :style="getFormItemInputStyle(configStyle,2)" :input-style="getFormItemInputStyle(configStyle,3)" oninput ="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^\./g, '')" placeholder="请输入"></el-input>
</template>
</el-form-item>
</template>
<script lang='ts' setup>
import { AnalysisCss,AnalysisInputCss } from '@/components/DesignForm/public/form/calculate/cssInfo.ts'
import { orgInfo } from '@/api/hr/org/type'
import { getOrgTreeList } from '@/api/hr/org/index'
import {
@ -51,7 +55,10 @@ const type = computed(() => {
const config = computed(() => {
return props.data.config || {}
})
//css
const configStyle = computed(() => {
return props.data.styles || {}
})
const changeEvent = inject(constControlChange, '') as any
const value = computed({
@ -169,7 +176,23 @@ const formatCustomRules = () => {
})
return temp
}
/**
@ 作者: 秦东
@ 时间: 2024-03-01 09:07:11
@ 功能: 布局处理
*/
const getFormItemLableStyle = (ele: any) => {
if(ele?.labelStyle){
console.log("返回栅格宽度3",AnalysisCss(ele?.labelStyle))
return AnalysisCss(ele?.labelStyle)
}
}
const getFormItemInputStyle = (ele: any,sty:number) => {
if(ele?.inputStyle){
console.log("返回栅格宽度4",AnalysisInputCss(ele?.inputStyle,sty))
return AnalysisInputCss(ele?.inputStyle,sty)
}
}
</script>
<style lang='scss' scoped>

Loading…
Cancel
Save