whj 1 gadu atpakaļ
vecāks
revīzija
1cddeedd9e
1 mainītis faili ar 32 papildinājumiem un 18 dzēšanām
  1. 32 18
      src/views/test/Test1.vue

+ 32 - 18
src/views/test/Test1.vue

@@ -1,26 +1,34 @@
 <template>
   <a-row :gutter="10">
-    <a-col :span="4">
+    <a-col :span="5">
       <a-card title="基础">
-        <VueDraggable
-          v-model="list1"
-          :animation="150"
-          :group="{ name: 'people', pull: 'clone', put: false }"
-          :sort="false"
-          :clone="onClone"
-        >
-          <div
-            v-for="item in list1"
-            :key="item.id"
-            class="hover"
-            @mousedown="handleSelect(item)"
+        <a-row>
+          <VueDraggable
+            v-model="list1"
+            :animation="150"
+            :group="{ name: 'people', pull: 'clone', put: false }"
+            :sort="false"
+            :clone="onClone"
           >
-            {{ item.name }}
-          </div>
-        </VueDraggable>
+            <a-col
+              :span="12"
+              v-for="item in list1"
+              :key="item.id">
+              <div
+                class="hover type"
+                @mousedown="handleSelect(item)"
+              >
+                <a-space>
+                  <a-icon type="profile" /> {{ item.name }}
+                </a-space>
+              </div>
+            </a-col>
+
+          </VueDraggable>
+        </a-row>
       </a-card>
     </a-col>
-    <a-col :span="16">
+    <a-col :span="15">
       <a-card>
         <a-form
           :form="form"
@@ -121,6 +129,12 @@ export default {
 }
 </script>
 
-<style>
+<style lang="less" scoped>
+.type{
+border: 1px solid #ccc;
+padding: 5px;
+margin: 5px;
+border-radius: 5px;
+}
 
 </style>