Commit fd31daa5 authored by linjw's avatar linjw

修改下拉样式

parent eee5cfa0
...@@ -20,14 +20,17 @@ module.exports = { ...@@ -20,14 +20,17 @@ module.exports = {
}, },
css: [ css: [
'~/assets/main.css', '~/assets/main.css',
'swiper/dist/css/swiper.min.css' 'swiper/dist/css/swiper.min.css',
'element-ui/lib/theme-chalk/index.css'
], ],
loading: '~/components/loading.vue', loading: '~/components/loading.vue',
plugins: [ plugins: [
{ src: '~plugins/muse-ui.js', ssr: true }, { src: '~plugins/muse-ui.js', ssr: true },
{ src: '~plugins/filters.js', srr: false } { src: '~plugins/filters.js', srr: false },
{ src: '~/plugins/elementUI.js', srr: false },
], ],
build: { build: {
extend(config, { isDev, isClient }) { extend(config, { isDev, isClient }) {
...@@ -39,8 +42,9 @@ module.exports = { ...@@ -39,8 +42,9 @@ module.exports = {
exclude: /(node_modules)/ exclude: /(node_modules)/
}) })
} }
} },
//,publicPath: '/rvwebsite/' //,publicPath: '/rvwebsite/'
vendor: ['element-ui']
}, },
render: { render: {
bundleRenderer: { bundleRenderer: {
......
...@@ -23,14 +23,27 @@ ...@@ -23,14 +23,27 @@
</div> </div>
<div class="clearfix total-div" style="background-color: #fff;padding:13px 0 19px 14px;color:#666;height:50px"> <div class="clearfix total-div" style="background-color: #fff;padding:13px 0 19px 14px;color:#666;height:50px">
{{totalCount}}个房车营地 {{totalCount}}个房车营地
<select <el-select
style="width:150px;height:30px;float:right;margin:-8px 10px 10px 0"
value-key="id"
v-model="typeList"
placeholder="营地类型"
@change="chooseSelect()">
<el-option
v-for="item in dataType"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<!-- <select
@change="chooseSelect($event)" @change="chooseSelect($event)"
style="width:145px;text-align:center;height:30px;float:right;border:none;outline: none;color:#666;padding-left:30px" style="width:145px;text-align:center;height:30px;float:right;border:none;outline: none;color:#666;padding-left:30px"
> >
<option value>营地类型</option> <option value>营地类型</option>
<option v-for="item in dataType" :value="item.id" :key="item.id">{{ item.name }}</option> <option v-for="item in dataType" :value="item.id" :key="item.id">{{ item.name }}</option>
<option value>全部</option> <option value>全部</option>
</select> </select> -->
</div> </div>
<h3 v-if="dataNull" style="margin:20px 0;background-color: #fff;padding:20px">暂无信息</h3> <h3 v-if="dataNull" style="margin:20px 0;background-color: #fff;padding:20px">暂无信息</h3>
<ul class="campsiteDetail clearfix" v-if="!dataNull"> <ul class="campsiteDetail clearfix" v-if="!dataNull">
...@@ -62,6 +75,7 @@ export default { ...@@ -62,6 +75,7 @@ export default {
}, },
data() { data() {
return { return {
typeList:"营地类型",
showBanner: !0, showBanner: !0,
looptime: 4000, // 循环时间 looptime: 4000, // 循环时间
typeId: "营地类型", typeId: "营地类型",
...@@ -91,10 +105,10 @@ export default { ...@@ -91,10 +105,10 @@ export default {
}, },
methods: { methods: {
chooseSelect(e) { chooseSelect() {
console.log(e.target.value); console.log(this.typeList);
this.listQuery.type = e.target.value; this.listQuery.type = this.typeList
this.getAll(); this.getAll();
}, },
goDetails() { goDetails() {
console.log(2222222); console.log(2222222);
...@@ -105,6 +119,7 @@ export default { ...@@ -105,6 +119,7 @@ export default {
data: { data } data: { data }
} = await axios.get("/api/campsite/campsiteTag/app/unauth/tags"); } = await axios.get("/api/campsite/campsiteTag/app/unauth/tags");
// console.log(data); // console.log(data);
data.push({id:"",name:'全部'})
this.dataType = data; this.dataType = data;
}, },
async getAll() { async getAll() {
......
...@@ -26,14 +26,28 @@ ...@@ -26,14 +26,28 @@
<div class="clearfix total-div" style="background-color: #fff;padding:13px 0 19px 14px;color:#666;height:50px"> <div class="clearfix total-div" style="background-color: #fff;padding:13px 0 19px 14px;color:#666;height:50px">
{{totalCount}}个旅行路线 {{totalCount}}个旅行路线
<!-- <div class="selectDiv"> --> <!-- <div class="selectDiv"> -->
<select <el-select
@change="chooseSelect($event)" style="width:150px;height:30px;float:right;margin:-8px 10px 10px 0"
value-key="id"
v-model="typeList"
placeholder="旅行类型"
@change="chooseSelect()">
<el-option
v-for="item in dataType"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<!-- <select
@change="choose($event)"
style="width:145px;text-align:center;height:30px;float:right;border:none;outline: none;color:#666;padding-left:30px" style="width:145px;text-align:center;height:30px;float:right;border:none;outline: none;color:#666;padding-left:30px"
> >
<option value>旅行类型</option> <option value>旅行类型</option>
<option v-for="item in dataType" :value="item.id" :key="item.id" style="outline: none;">{{ item.name }}</option> <option v-for="item in dataType" :value="item.id" :key="item.id" style="outline: none;">{{ item.name }}</option>
<option value>全部</option> <option value>全部</option>
</select> </select> -->
<!-- </div> --> <!-- </div> -->
</div> </div>
<h3 v-if="dataNull" style="margin:20px 0;background-color: #fff;padding:20px">暂无信息</h3> <h3 v-if="dataNull" style="margin:20px 0;background-color: #fff;padding:20px">暂无信息</h3>
...@@ -76,6 +90,7 @@ ...@@ -76,6 +90,7 @@
}, },
data(){ data(){
return{ return{
typeList:"旅行类型",
showBanner: !0, showBanner: !0,
looptime: 4000, // 循环时间 looptime: 4000, // 循环时间
typeId: "营地类型", typeId: "营地类型",
...@@ -97,7 +112,12 @@ ...@@ -97,7 +112,12 @@
}; };
}, },
methods:{ methods:{
chooseSelect(e) { chooseSelect() {
console.log(this.typeList);
this.listQuery.tagId = this.typeList
this.getAll();
},
choose(e) {
console.log(e.target.value); console.log(e.target.value);
this.listQuery.tagId = e.target.value; this.listQuery.tagId = e.target.value;
this.getAll(); this.getAll();
...@@ -106,7 +126,10 @@ ...@@ -106,7 +126,10 @@
const { const {
data: { data } data: { data }
} = await axios.get("/api/uccn/app/unauth/tour/tagList" ); } = await axios.get("/api/uccn/app/unauth/tour/tagList" );
data.push({id:"",name:'全部'})
this.dataType = data; this.dataType = data;
console.log(data);
this.loading = false
}, },
async getAll() { async getAll() {
let { let {
......
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment