Browse Source

fix: eslint

main
xingyu 2 years ago
parent
commit
96501ceb00
  1. 2
      src/components/Application/src/AppDarkModeToggle.vue
  2. 27
      src/components/FormDesign/src/components/VFormDesign/modules/FormComponentPanel.vue

2
src/components/Application/src/AppDarkModeToggle.vue

@ -35,7 +35,7 @@ function toggleDarkMode() {
@click="toggleDarkMode"
>
<div
class="dark:(transform translateX(calc(100% + 2px))) absolute z-1 h-4.5 w-4.5 rounded-1/2 bg-white will-change-transform"
class="absolute z-1 h-4.5 w-4.5 rounded-1/2 bg-white will-change-transform"
/>
<SvgIcon size="14" name="sun" />
<SvgIcon size="14" name="moon" />

27
src/components/FormDesign/src/components/VFormDesign/modules/FormComponentPanel.vue

@ -4,7 +4,7 @@
-->
<script lang="ts" setup>
import draggable from 'vuedraggable'
import { computed, defineComponent } from 'vue'
import { computed } from 'vue'
import { cloneDeep } from 'lodash-es'
import { Empty, Form } from 'ant-design-vue'
import { useFormDesignState } from '../../../hooks/useFormDesignState'
@ -46,30 +46,17 @@ const layoutTag = computed(() => {
<template>
<div class="v-form-container form-panel">
<Empty
v-show="formConfig.schemas.length === 0"
class="empty-text"
description="从左侧选择控件添加"
/>
<Empty v-show="formConfig.schemas.length === 0" class="empty-text" description="从左侧选择控件添加" />
<Form v-bind="formConfig">
<div class="draggable-box">
<Draggable
v-model="formConfig.schemas"
class="list-main ant-row"
group="form-draggable"
:component-data="{ name: 'list', tag: 'div', type: 'transition-group' }"
ghost-class="moving"
:animation="180"
handle=".drag-move"
item-key="key"
@add="addItem"
@start="handleDragStart"
v-model="formConfig.schemas" class="list-main ant-row" group="form-draggable"
:component-data="{ name: 'list', tag: 'div', type: 'transition-group' }" ghost-class="moving" :animation="180"
handle=".drag-move" item-key="key" @add="addItem" @start="handleDragStart"
>
<template #item="{ element }">
<LayoutItem
class="drag-move"
:schema="element"
:data="formConfig"
class="drag-move" :schema="element" :data="formConfig"
:current-item="formConfig.currentItem || {}"
/>
</template>
@ -84,6 +71,7 @@ const layoutTag = computed(() => {
@import url('../styles/drag.less');
.v-form-container {
//
.ant-form-inline {
.list-main {
@ -127,6 +115,7 @@ const layoutTag = computed(() => {
}
.list-main {
//
.list-enter-active {
transition: all 0.5s;