index.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('cat-list', __DIR__ . '/component');
  4. ComponentHelper::loadComponentView('cat-transfer', __DIR__ . '/component');
  5. ComponentHelper::loadComponentView('cat-style', __DIR__ . '/component');
  6. ?>
  7. <script src="/resources/js/Sortable.min.js"></script>
  8. <script src="/resources/unpkg/vuedraggable@2.18.1/dist/vuedraggable.umd.min.js"></script>
  9. <style>
  10. .new-table-body {
  11. padding: 20px;
  12. background-color: #fff;
  13. margin-bottom: 20px;
  14. }
  15. </style>
  16. <div id="app" v-cloak>
  17. <el-card class="box-card" shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  18. <div slot="header">
  19. <div>
  20. <span>分类列表</span>
  21. <div style="float: right;margin-top: -5px">
  22. <el-button type="primary" @click="edit" size="small">添加分类</el-button>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="new-table-body">
  27. <template>
  28. <el-tabs v-model="activeName" @tab-click="handleClick">
  29. <el-tab-pane label="商户分类" name="first">
  30. <template v-if="activeName == 'first'">
  31. <cat-list></cat-list>
  32. </template>
  33. </el-tab-pane>
  34. <!-- <el-tab-pane label="门店分类转移" name="second">
  35. <template v-if="activeName == 'second'">
  36. <cat-transfer></cat-transfer>
  37. </template>
  38. </el-tab-pane> -->
  39. <!-- <el-tab-pane label="分类样式" name="third">
  40. <template v-if="activeName == 'third'">
  41. <cat-style></cat-style>
  42. </template>
  43. </el-tab-pane> -->
  44. </el-tabs>
  45. </template>
  46. </div>
  47. </el-card>
  48. </div>
  49. <script>
  50. const app = new Vue({
  51. el: '#app',
  52. data() {
  53. return {
  54. activeName: 'first',
  55. };
  56. },
  57. methods: {
  58. handleClick(tab, event) {
  59. console.log(tab, event);
  60. },
  61. // 编辑
  62. edit(id) {
  63. navigateTo({
  64. r: 'mch/store-category/storage',
  65. });
  66. },
  67. },
  68. mounted: function() {
  69. },
  70. });
  71. </script>