index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <CommonStack title="商品列表" :query="Object.assign({}, query, { })">
  3. <template v-slot:default="{ stackQuery }">
  4. <CommonFilter
  5. ref="filter"
  6. action="getProductList"
  7. :actionOption="query[name]"
  8. :fixedValues="{ }" />
  9. <CommonWrapper name="product-detail">
  10. <CommonDetail
  11. name="product-detail"
  12. :query="stackQuery"
  13. resetAction="getProduct"
  14. submitAction="editProduct"
  15. :components="{ pattern, attribute, parameter, receive, tag, editor }"
  16. @on-save="save" />
  17. </CommonDetail>
  18. </CommonWrapper>
  19. </template>
  20. </CommonStack>
  21. </template>
  22. <script>
  23. import pattern from './pattern'
  24. import attribute from './attribute'
  25. import parameter from './parameter'
  26. import receive from './receive'
  27. import tag from './tag'
  28. import editor from '@/components/common/editor/detail'
  29. export default {
  30. name: 'comment',
  31. props: {
  32. query: {
  33. type: Object,
  34. required: false,
  35. default () {
  36. return {}
  37. },
  38. },
  39. name: {
  40. type: String,
  41. required: false,
  42. default: 'trash',
  43. },
  44. },
  45. data () {
  46. return {
  47. pattern,
  48. attribute,
  49. parameter,
  50. receive,
  51. tag,
  52. editor,
  53. }
  54. },
  55. methods: {
  56. save () {
  57. this.$stack.go()
  58. this.$refs.filter.request()
  59. },
  60. },
  61. }
  62. </script>