scorpio 2 yıl önce
ebeveyn
işleme
3e1e102a63

+ 56 - 15
src/components/area-picker/index.vue

@@ -1,10 +1,13 @@
 <template>
   <div class="full-width">
-    <avue-input-tree
-      v-model="form"
-      placeholder="请选择内容"
-      :dic="dic"
-    ></avue-input-tree>
+    <div>
+      <el-cascader
+        clearable
+        class="full-width"
+        v-model="value"
+        :options="dic"
+      />
+    </div>
   </div>
 </template>
 
@@ -12,25 +15,62 @@
 export default {
   data() {
     return {
+      treeOption: {
+        nodeKey: 'id',
+        lazy: true,
+        addBtn: false,
+        menu: false,
+        size: 'small',
+        props: {
+          labelText: '标题',
+          label: 'title',
+          value: 'value',
+          children: 'children'
+        }
+      },
       form: {},
       dic: [
         {
-          label: '选项1',
-          value: 0,
+          value: 'guide',
+          label: 'Guide',
           children: [
             {
-              label: '选项3',
-              value: 2
+              value: 'disciplines',
+              label: 'Disciplines',
+              children: [
+                {
+                  value: 'consistency',
+                  label: 'Consistency'
+                },
+                {
+                  value: 'feedback',
+                  label: 'Feedback'
+                },
+                {
+                  value: 'efficiency',
+                  label: 'Efficiency'
+                },
+                {
+                  value: 'controllability',
+                  label: 'Controllability'
+                }
+              ]
             },
             {
-              label: '选项4',
-              value: 3
+              value: 'navigation',
+              label: 'Navigation',
+              children: [
+                {
+                  value: 'side nav',
+                  label: 'Side Navigation'
+                },
+                {
+                  value: 'top nav',
+                  label: 'Top Navigation'
+                }
+              ]
             }
           ]
-        },
-        {
-          label: '选项2',
-          value: 1
         }
       ]
     }
@@ -40,5 +80,6 @@ export default {
 
 <style lang="scss" scoped>
 :deep(.el-input) {
+  width: 100%;
 }
 </style>

+ 1 - 1
src/views/project/componens/info1.vue

@@ -25,7 +25,7 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">地区:</span>
-            <area-picker class="light-green-bg" />
+            <area-picker />
           </div>
         </el-form-item>
       </div>