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

wordpress 评论添加表情网店seo

wordpress 评论添加表情,网店seo,网页设计图片大小怎么改,天津房价在做后台的时候需要用到地区级联选择器 然后就自己封装了一个 其中 组件页面中 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/296748/

相关文章:

  • rails 开发的网站开发环保网站建设情况报告
  • 成都网站推广公司建设网站是不是必须要服务器
  • 床上做受网站做网站 合肥
  • 会议专题网站建设报价单deppt模板网
  • 苏州公司网站建设服务网站建设课程设计论文
  • 网站主办者是谁用户体验设计的重要性
  • 电子商务网站开发教案用数据库做学校网站
  • 做问卷用哪个网站天津网站建设定做
  • 微网站设计企业中山网站设计
  • 诸暨网站制作wordpress文章类型查询
  • 网站建设 千助给别人做网站是外包公司
  • 外贸网站建设如何做网站开启速度慢
  • 商务网站建设综合实训报告宁波大型网站建设
  • 网站开发建设的步骤茂名公司网站制作
  • 一个人做网站时间房产机构网站建设目标定位
  • pc端网站设计规范wordpress英文模板
  • 网站开发好公司宁波seo关键词优化案例
  • 北京市规划网站用dw怎么做用户登录页面的网站
  • 做网站需要填什么企业类网站模板免费下载
  • 杭州的设计网站wordpress 站群系统
  • 网站项目的推广中信建设有限责任公司湖南省人防设计院
  • 网站建设辶首选金手指十五wordpress关闭手机访问
  • 辽宁东方建设工程有限公司网站自适应网站用什么软件设计
  • 像饿了码的网站建站有吗建湖做网站
  • 牛商网做网站要多少钱wordpress赞踩插件
  • 网站转换模块怎么做现代网站建设公司
  • 苏州做网站专业的公司品牌策划是做什么
  • 网站建设包括哪些东西哪些网站是响应式
  • 网站建设期中考试题网站建设要知道的
  • 微信网站如何做移动网站开发公司