1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| <template>
| <!-- 企业地址搜索框-->
| <div class="search-group-input">
| <el-input size="small" clearable v-model="searchContent" placeholder="请输入内容"></el-input>
| <el-button size="small" @click="searchClick" type="primary" icon="el-icon-search" plain></el-button>
| </div>
| </template>
|
| <script>
| export default {
| //import引入的组件需要注入到对象中才能使用
| components: {},
| // 父组件给子组件传过来的参数
| props: {
| },
| data () {
| //这里存放数据
| return {
| searchContent: '',
| }
| },
| //监听属性 类似于data概念
| computed: {},
| //监控data中的数据变化
| watch: {},
| //方法集合
| methods: {
| searchClick () {
| this.$parent.searchBtn({
| searchContent: this.searchContent
| })
| },
|
| }
| }
| </script>
| <style lang='scss' scoped></style>
|
|