index.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div v-if="false">
  3. <basic-container v-show="!show">
  4. <avue-crud :option="option" :data="dataList" :page.sync="page">
  5. <template slot-scope="scope" slot="menuLeft">
  6. <el-button type="primary"
  7. icon="el-icon-plus"
  8. size="small"
  9. @click="rowSave">新增</el-button>
  10. </template>
  11. </avue-crud>
  12. </basic-container>
  13. <details-page-edit v-if="show" @backToList="backToList"></details-page-edit>
  14. </div>
  15. </template>
  16. <script>
  17. import detailsPageEdit from './detailsPageEdit'
  18. export default {
  19. components: {
  20. detailsPageEdit
  21. },
  22. data(){
  23. return {
  24. page: {
  25. pageSize: 10,
  26. currentPage: 1,
  27. total: 0,
  28. pageSizes: [10, 50, 100, 200, 300]
  29. },
  30. dataList:[],
  31. show:false,
  32. option:{
  33. addBtn:false
  34. }
  35. }
  36. },
  37. methods:{
  38. rowSave(){
  39. this.show = true
  40. },
  41. backToList(args){
  42. this.show = false
  43. console.log(args)
  44. }
  45. }
  46. }
  47. </script>
  48. <style scoped>
  49. </style>