浏览代码

Merge remote-tracking branch 'origin/develop' into develop

weirenchun 2 年之前
父节点
当前提交
cf8d217772
共有 2 个文件被更改,包括 90 次插入3 次删除
  1. 85 0
      src/components/area-picker/index.vue
  2. 5 3
      src/views/project/componens/info1.vue

+ 85 - 0
src/components/area-picker/index.vue

@@ -0,0 +1,85 @@
+<template>
+  <div class="full-width">
+    <div>
+      <el-cascader
+        clearable
+        class="full-width"
+        v-model="value"
+        :options="dic"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+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: [
+        {
+          value: 'guide',
+          label: 'Guide',
+          children: [
+            {
+              value: 'disciplines',
+              label: 'Disciplines',
+              children: [
+                {
+                  value: 'consistency',
+                  label: 'Consistency'
+                },
+                {
+                  value: 'feedback',
+                  label: 'Feedback'
+                },
+                {
+                  value: 'efficiency',
+                  label: 'Efficiency'
+                },
+                {
+                  value: 'controllability',
+                  label: 'Controllability'
+                }
+              ]
+            },
+            {
+              value: 'navigation',
+              label: 'Navigation',
+              children: [
+                {
+                  value: 'side nav',
+                  label: 'Side Navigation'
+                },
+                {
+                  value: 'top nav',
+                  label: 'Top Navigation'
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+:deep(.el-input) {
+  width: 100%;
+}
+</style>

+ 5 - 3
src/views/project/componens/info1.vue

@@ -24,8 +24,8 @@
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
-            <span class="title">区:</span>
-            <el-input placeholder="请选择区县"></el-input>
+            <span class="title">区:</span>
+            <area-picker />
           </div>
         </el-form-item>
       </div>
@@ -120,10 +120,12 @@
 
 <script>
 import wtCard from '@/components/wt-card/index.vue'
+import areaPicker from '@/components/area-picker/index.vue'
 
 export default {
   components: {
-    wtCard
+    wtCard,
+    areaPicker
   },
   props: {
     info: {