PageConfig.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div class="flex flex-col page-config-content">
  3. <el-card shadow="never">
  4. <div style="display: flex; justify-content: space-between">
  5. <el-input v-model="searchCom" class="search-btn w-50" placeholder="搜索公司主页">
  6. <template #suffix>
  7. <el-icon @click="searchPageConfig" @keyup.enter="searchPageConfig"><Search /></el-icon>
  8. </template>
  9. </el-input>
  10. <el-button
  11. style="width: 102px; background-color: rgb(24, 144, 255); border: none"
  12. type="primary"
  13. @click="broadcast"
  14. >
  15. 主页发布
  16. </el-button>
  17. </div>
  18. </el-card>
  19. <el-card shadow="never" class="flex-1" style="margin-top: 8px; overflow: auto">
  20. <PageMain ref="pageMain" />
  21. </el-card>
  22. </div>
  23. </template>
  24. <script lang="ts" setup>
  25. import { ref } from 'vue';
  26. import { ElMessage } from 'element-plus';
  27. import { Search } from '@element-plus/icons-vue';
  28. import PageMain from './component/PageMain.vue';
  29. const searchCom = ref('');
  30. const pageMain = ref();
  31. const searchPageConfig = () => {
  32. pageMain.value.getList(searchCom.value);
  33. };
  34. const broadcast = () => {
  35. ElMessage({
  36. message: '发布已勾选的主页',
  37. type: 'success',
  38. });
  39. };
  40. </script>
  41. <style lang="scss" sctep>
  42. .page-config-content {
  43. width: 100%;
  44. height: calc(100vh - 64px - 12px);
  45. }
  46. </style>