index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <CommonStack title="商品属性" :query="query">
  3. <template v-slot:default="{ stackQuery }">
  4. <CommonFilter ref="filter" action="getAttributeMainList" />
  5. <CommonWrapper name="attribute-main">
  6. <CommonDetail
  7. name="attribute-main"
  8. :query="stackQuery"
  9. resetAction="getAttributeMain"
  10. submitAction="editAttributeMain"
  11. @on-save="onMainSave" />
  12. </CommonWrapper>
  13. <CommonWrapper name="attribute-list">
  14. <AttributeList
  15. :query="stackQuery"
  16. name="attribute-list"
  17. @on-save="init" />
  18. </CommonWrapper>
  19. </template>
  20. </CommonStack>
  21. </template>
  22. <script>
  23. import AttributeList from './AttributeList'
  24. export default {
  25. name: 'attribute',
  26. components: {
  27. AttributeList,
  28. },
  29. props: {
  30. query: {
  31. type: Object,
  32. required: false,
  33. default () {
  34. return {}
  35. },
  36. },
  37. },
  38. methods: {
  39. init () {
  40. this.$refs.filter.request()
  41. },
  42. onMainSave () {
  43. this.$stack.go()
  44. this.init()
  45. },
  46. },
  47. }
  48. </script>