add.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="content">
  3. <view class="title"> 新增项目 </view>
  4. <view class="list"> </view>
  5. <view class="group">
  6. <button @click="onHandleSubmit(0)" class="commit">取消</button>
  7. <button
  8. @click="onHandleSubmit(1)"
  9. type="primary"
  10. class="commit"
  11. >
  12. 确定
  13. </button>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import { mapState } from "vuex";
  19. export default {
  20. data() {
  21. return { project_id: 0 };
  22. },
  23. computed: {
  24. ...mapState(["currentProject"]),
  25. },
  26. onLoad(options) {
  27. this.project_id = options.project_id;
  28. },
  29. methods: {
  30. onHandleSubmit(value) {
  31. if (value) console.log("提交成功");
  32. uni.navigateTo({
  33. url: "./list",
  34. });
  35. },
  36. },
  37. };
  38. </script>
  39. <style lang="less" scoped>
  40. .content {
  41. display: flex;
  42. flex-wrap: wrap;
  43. }
  44. .title {
  45. width: 100%;
  46. padding: 0 20px 20px 20px;
  47. background: #f8f8f8;
  48. font: 24px bold;
  49. }
  50. .list {
  51. margin-left: 10%;
  52. width: 100%;
  53. }
  54. .detail {
  55. width: 100%;
  56. padding: 15px 0;
  57. font-size: 18px;
  58. display: flex;
  59. justify-items: space-between;
  60. .subTitle {
  61. width: 30%;
  62. }
  63. .detailContent {
  64. width: 70%;
  65. }
  66. }
  67. .group {
  68. width: 100%;
  69. display: flex;
  70. position: fixed;
  71. flex-wrap: wrap;
  72. justify-content: flex-start;
  73. bottom: 0;
  74. left: 0;
  75. .commit {
  76. width: 50%;
  77. border-radius: 0;
  78. margin: inherit;
  79. }
  80. }
  81. </style>