当前位置: 首页 > news >正文

seo是什么生肖什么是seo优化

seo是什么生肖,什么是seo优化,做内销的网站推荐,网站跟app的区别是什么意思在做后台的时候需要用到地区级联选择器 然后就自己封装了一个 其中 组件页面中 export default {props: { //使用value接收引用页面的绑定值value: [String]},watch: {value: {handler(val) {//val 以及 this.value 都可以获取到引用页面的绑定值},deep: true,immediate: tr…

在做后台的时候需要用到地区级联选择器 然后就自己封装了一个

其中 组件页面中

export default {props: {		//使用value接收引用页面的绑定值value: [String]},watch: {value: {handler(val) {//val 以及 this.value 都可以获取到引用页面的绑定值},deep: true,immediate: true}},
}
//this.$emit("input", this.changeForm()); 这句代码是给引用页面绑定值返回内容

完整地区json文件在网盘中

链接:https://pan.quark.cn/s/0b70e60fd377
提取码:4sSe

下面是完整代码:

引用页面中

<select-address v-model="form.applicableRange"/>

main.js中注册组件

import SelectAddress from '@/components/SelectAddress'Vue.component('SelectAddress', SelectAddress)

组件页面

<template><div class="selectAddress"><el-form :model="form"><el-select v-model="form.provincial" @change="updateProvincials()" clearableplaceholder="请选择省份"><el-option v-for="provincial in provincials" :key="provincial.label" :value="provincial.label":label="provincial.label"/></el-select><el-select v-model="form.municipal" @change="updateMunicipals()"placeholder="请选择城市"><el-option v-for="municipal in municipals" :key="municipal.label" :value="municipal.label":label="municipal.label"/></el-select><el-select v-model="form.regional" @change="updateRegionals()"placeholder="请选择地区"><el-option v-for="regional in regionals" :key="regional.label" :value="regional.label":label="regional.label"/></el-select><el-select v-model="form.streets" @change="updateStreetss()"placeholder="请选择街道"><el-option v-for="streets in streetss" :key="streets.label" :value="streets.label" :label="streets.label"/></el-select></el-form></div>
</template>
<script>
const options = require("@/assets/images/pcas-code.json");
export default {props: {value: [String]},data() {return {form: {provincial: null,municipal: null,regional: null,streets: null,},provincials: options,municipals: [],regionals: [],streetss: [],}},watch: {value: {handler(val) {if (val) {const list = this.value.split(' ');if(list.length == 1){this.form.provincial = list[0];this.updateProvincials();}else if(list.length == 2){this.form.provincial = list[0];this.updateProvincials();this.form.municipal = list[1];this.updateMunicipals();}else if(list.length == 3){this.form.provincial = list[0];this.updateProvincials();this.form.municipal = list[1];this.updateMunicipals();this.form.regional = list[2];this.updateRegionals();}} else {this.reset();return [];}},deep: true,immediate: true}},mounted() {},created() {},computed: {},methods: {reset() {this.form = {provincial: null,municipal: null,regional: null,streets: null}},updateProvincials() {this.form.municipal = "";this.form.regional = "";this.form.streets = "";this.municipals = [];this.regionals = [];this.streetss = [];this.$emit("input", this.changeForm());if(this.form.provincial){this.municipals = this.provincials.find(provincial => provincial.label == this.form.provincial).children;}},updateMunicipals() {this.form.regional = "";this.form.streets = "";this.regionals = [];this.streetss = [];this.$emit("input", this.changeForm());this.regionals = this.municipals.find(municipal => municipal.label == this.form.municipal).children;},updateRegionals() {this.form.streets = "";this.streetss = [];this.$emit("input", this.changeForm());this.streetss = this.regionals.find(regional => regional.label == this.form.regional).children;},updateStreetss() {this.$emit("input", this.changeForm());},changeForm(){let applicableRange = "";if(this.form.provincial){applicableRange = this.form.provincial}if(this.form.provincial && this.form.municipal){applicableRange = this.form.provincial + " " + this.form.municipal}if(this.form.provincial && this.form.municipal && this.form.regional){applicableRange = this.form.provincial + " " + this.form.municipal + " " + this.form.regional}if(this.form.provincial && this.form.municipal && this.form.regional && this.form.streets){applicableRange = this.form.provincial + " " + this.form.municipal + " " + this.form.regional + " " + this.form.streets}return applicableRange;}},
}
</script><style scoped lang="scss">
.el-select {width: 18%;margin-left: 1%;
}
</style>
http://www.yayakq.cn/news/306099/

相关文章:

  • 呼伦贝尔建设工程检测网站广东深圳广东深圳网站建设
  • 海南七星彩网站建设网络营销产品策略
  • 做网站可以用微软雅黑字体么谁给个网站呀
  • 上海网站建设网站优化app建设网站公司怎么分工
  • ftp如何备份网站山东省城乡住房和建设厅网站首页
  • 网站 做 app开发wordpress无插件下载
  • 重庆教育集团建设公司网站wordpress关闭发表评论
  • 外贸网站好做吗it行业哪个专业最吃香
  • 如何做外贸品牌网站建设访问不了服务器的网站
  • 工艺品商城网站建设大连品牌官网建站
  • ftp 上传网站公司的网站建设费应该怎么入账
  • 山西省建设资格注册中心网站用织梦做网站有什么公司会要
  • 百度网站优化哪家好品牌运营推广方案
  • 嘉兴云推广网站欧美网站建设
  • 温州企业网站dedecms网站上传服务器不是空间
  • 群晖可以做几个网站如何申请网站
  • 渭南住建网温州网站建设seo
  • 自适应型网站建设哪家好优秀旅游网站设计
  • 一键免费搭建手机网站企业网站管理系统(多语言)
  • 重庆云阳网站建设公司推荐网站手机端的优势
  • 怎么设置网站默认首页什么是h5宣传
  • 网站建设与管理 期末制作单页网站
  • 金融保险网站模板做品牌形象网站
  • 建网站的公司德阳建网站的公司wordpress仿微博主题
  • 网站开发文档网站网站地图格式
  • 做学校网站用什么模版外贸资讯平台
  • 做网站时怎样图片上传怎么才能让图片不变形_有什么插件吗server酱 wordpress
  • 给客户做网站0511城市建设网站棚户区改造
  • 太平洋网站开发营销型网站开发营销
  • mvc网站建设设计报告搭建公众号平台需要多少钱