123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <div id="top">
- <el-row>
- <el-col :span="24" class="main">
- <el-col :span="24" class="one" v-if="topType == '1'">
- <van-search v-model="searchName" placeholder="请输入信息标题" @search="search" />
- </el-col>
- <el-col :span="24" class="two" v-else-if="topType == '2'">
- <van-nav-bar :title="this.$route.meta.title" left-text="返回" left-arrow @click-left="upBack" />
- </el-col>
- <el-col :span="24" class="thr" v-else-if="topType == '3'">
- <el-col :span="4" class="back" @click.native="upBack"> <van-icon name="arrow-left" />返回 </el-col>
- <el-col :span="20" class="search">
- <van-search v-model="searchName" placeholder="请输入赠与人名称" @search="search" />
- </el-col>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'top',
- props: {
- topType: { type: String, default: () => '1' },
- },
- components: {},
- data: function() {
- return {
- searchName: '',
- };
- },
- created() {},
- methods: {
- // 查询
- search() {
- this.$emit('search', { searchName: this.searchName });
- },
- // 返回
- upBack() {
- this.$emit('upBack');
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- .one {
- /deep/.van-search {
- padding: 3px 5px;
- }
- }
- .two {
- /deep/.van-nav-bar__content {
- height: 40px;
- }
- }
- .thr {
- .back {
- color: #409eff;
- padding: 8px 0;
- text-align: center;
- .van-icon {
- top: 3px;
- }
- }
- .search {
- /deep/.van-search {
- padding: 2px 5px 2px 0px;
- }
- }
- }
- }
- </style>
|