Dtl2.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <base-form slot="content" ref="ruleForm" :data="searchData">
  3. <div slot="footer">
  4. <!-- <el-button icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">搜索</el-button> -->
  5. <el-button icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
  6. </div>
  7. </base-form>
  8. </template>
  9. <script>
  10. export default {
  11. mixins,
  12. data() {
  13. return {
  14. searchData: [],
  15. isHidePut: false,
  16. }
  17. },
  18. computed: {
  19. name () {
  20. return this.parentData.$route.query.name || ''
  21. }
  22. },
  23. mounted () {
  24. this.getDef()
  25. },
  26. methods: {
  27. getDef (str) {
  28. let params = { ...this.$refs.ruleForm.baseForm }
  29. this.searchData = [
  30. // { label: '标题', key: 'title' },
  31. ]
  32. this.setDefaultValue(params, 'searchData')
  33. },
  34. addHandle() {
  35. this.$emit('add')
  36. },
  37. searchHandle() {
  38. const oldform = this.$refs.ruleForm.baseForm
  39. const newForm = { ...oldform }
  40. this.$emit('change', newForm)
  41. }
  42. }
  43. }
  44. </script>