seachGroup.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <el-row :gutter="10" class="btnsA">
  3. <el-col :span="1.5">
  4. <el-button
  5. type="primary"
  6. size="mini"
  7. @click="handleSeach"
  8. >
  9. <img :src="seach" style="margin-right: 10px">
  10. <span>搜索</span>
  11. </el-button>
  12. </el-col>
  13. <el-col :span="1.5" v-if="showRest">
  14. <el-button
  15. size="mini"
  16. @click="handleRest"
  17. >
  18. <img :src="rest" style="margin-right: 10px">
  19. <span>重置</span>
  20. </el-button>
  21. </el-col>
  22. </el-row>
  23. </template>
  24. <script>
  25. import seach from '../assets/btnIcon/seach.png'
  26. import rest from '../assets/btnIcon/rest.png'
  27. export default {
  28. props: {
  29. showRest: {
  30. type: Boolean,
  31. default: () => {
  32. return true;
  33. },
  34. }
  35. },
  36. data() {
  37. return {
  38. seach: seach,
  39. rest: rest
  40. }
  41. },
  42. methods: {
  43. handleSeach() {
  44. this.$emit('handleSeach')
  45. },
  46. handleRest() {
  47. this.$emit('handleRest')
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="less">
  53. .btnsA{
  54. padding-left: 10px;
  55. .is-disabled{
  56. opacity: 0.5;
  57. }
  58. }
  59. </style>