35 lines
540 B
JavaScript
35 lines
540 B
JavaScript
// components/searchBar/index.js
|
|
import _ from '../../commons/js/commons';
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
searchType: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
placeholder: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
url: {
|
|
type: String,
|
|
value: '/pages/search/index'
|
|
}
|
|
},
|
|
attached: function () {
|
|
},
|
|
data: {
|
|
},
|
|
pageLifetimes: {
|
|
show: function () {
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
goPage(e){
|
|
_.$router.push(e.currentTarget.dataset.url)
|
|
}
|
|
}
|
|
}) |