瀏覽代碼

新增项目 空页面

XuZinan 3 年之前
父節點
當前提交
9a138a5942
共有 1 個文件被更改,包括 77 次插入6 次删除
  1. 77 6
      pages/Project/add.vue

+ 77 - 6
pages/Project/add.vue

@@ -1,14 +1,85 @@
 <template>
-    
-</template>
+  <view class="content">
+    <view class="title"> 新增项目 </view>
+    <view class="list"> </view>
 
+    <view class="group">
+      <button @click="onHandleSubmit(0)" class="commit">取消</button>
+      <button
+        @click="onHandleSubmit(1)"
+        type="primary"
+        class="commit"
+      >
+        确定
+      </button>
+    </view>
+  </view>
+</template>
 
 <script>
+import { mapState } from "vuex";
 export default {
-}
+  data() {
+    return { project_id: 0 };
+  },
+  computed: {
+    ...mapState(["currentProject"]),
+  },
+  onLoad(options) {
+    this.project_id = options.project_id;
+  },
+  methods: {
+    onHandleSubmit(value) {
+      if (value) console.log("提交成功");
+      uni.navigateTo({
+        url: "./list",
+      });
+    },
+  },
+};
 </script>
 
+<style lang="less" scoped>
+.content {
+  display: flex;
+  flex-wrap: wrap;
+}
+.title {
+  width: 100%;
+  padding: 0 20px 20px 20px;
+  background: #f8f8f8;
+  font: 24px bold;
+}
+.list {
+  margin-left: 10%;
+  width: 100%;
+}
+.detail {
+  width: 100%;
+  padding: 15px 0;
+  font-size: 18px;
+  display: flex;
+  justify-items: space-between;
+  .subTitle {
+    width: 30%;
+  }
+  .detailContent {
+    width: 70%;
+  }
+}
 
-<style scoped>
-
-</style>
+.group {
+  width: 100%;
+  display: flex;
+  position: fixed;
+  flex-wrap: wrap;
+  justify-content: flex-start;
+  bottom: 0;
+  left: 0;
+  .commit {
+    width: 50%;
+    border-radius: 0;
+    margin: inherit;
+  }
+}
+</style>