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

网站资源建设网站优化工作室

网站资源建设,网站优化工作室,做的好的网站欣赏,怎么建立图片的网站基于Element UI的el-select组件进行封装的。该组件实现了一个下拉选择框#xff0c;具有许多可配置的属性和事件 创建组件index.vue (src/common-ui/select/index.vue) templateel-selectrefselectv-modelhValue:allow-createallo… 基于Element UI的el-select组件进行封装的。该组件实现了一个下拉选择框具有许多可配置的属性和事件 创建组件index.vue (src/common-ui/select/index.vue) templateel-selectrefselectv-modelhValue:allow-createallowCreate:autocompleteautocomplete:automatic-dropdownautomaticDropdown:clearableclearable:collapse-tagscollapseTags:default-first-optiondefaultFirstOption:disableddisabled:filter-methodfilterMethod:filterablefilterable:loadingloading:loading-textloadingText:multiplemultiple:multiple-limitmultipleLimit:namename:no-match-textnoMatchText:no-data-textnoDataText:placeholderplaceholder:popper-classpopperClass:popper-append-to-bodypopperAppendToBody:remoteremote:remote-methodremoteMethod:reserve-keywordreserveKeyword:sizesize:keypoperKeyValue:value-keyvalueKeyblurhandleBlurchangehandleChangeclearhandleClearfocushandleFocusremove-taghandleRemoveTagvisible-changehandleVisibleChangeslot nameprefix slotprefix/slotslot nameoption-contenttemplate v-for(item, index) in dataSourceel-option-groupv-ifitem[hProps.options] item[hProps.options].length 0 !selectSpecial:keyindex:labelitem[hProps.label]:disableditem[hProps.disabled]el-optionv-for(option, subIndex) in item[hProps.options]:keysubIndex:labeloption[hProps.label]:valueoption[hProps.value]:disabledoption[hProps.disabled]/el-option/el-option-groupel-optionv-else-if!item[hProps.options] !selectSpecial:keyindex si:labelitem[hProps.label]:valueitem[hProps.value]:disableditem[hProps.disabled]/el-optionel-optionv-else-if!item[hProps.options] selectSpecial:keyindex sp:label${item[hProps.label]}(${item[selectSpecial]}):valueitem[hProps.value]:disableditem[hProps.disabled]/el-option/template/slot/el-select /templatescript export default {name: HSelect,props: {allowCreate: {type: Boolean,default: false},selectSpecial: {type: String,default: },autocomplete: String,automaticDropdown: {type: Boolean,default: false},clearable: {type: Boolean,default: true},collapseTags: {type: Boolean,default: false},dataSource: Array,defaultFirstOption: {type: Boolean,default: false},disabled: {type: Boolean,default: false},filterMethod: Function,filterable: {type: Boolean,default: true},loading: {type: Boolean,default: false},loadingText: String,multiple: {type: Boolean,default: false},multipleLimit: Number,name: String,noMatchText: String,noDataText: String,placeholder: String,popperClass: {type: String,default: select-default},popperAppendToBody: {type: Boolean,default: true},remote: {type: Boolean,default: false},remoteMethod: Function,reserveKeyword: {type: Boolean,default: false},size: {type: String,validator (value) {return [medium, small, mini].indexOf(value) ! -1}},value: {type: [String, Number, Array, Boolean],required: true},valueKey: String,props: {type: Object,default () {return {}}},keyValue: {type: String,default: select-single},align:{type: String,default: center}},data () {return {poperKeyValue: }},computed: {hValue: {get () {let value nullif (this.multiple) {value []if (this.value instanceof Array) {this.value.forEach(key {if (this.checkValueExisting(key)) {value.push(key)}})}} else {value if (this.checkValueExisting(this.value)) {value this.value}}return value},set (value) {this.$emit(input, value)}},hProps () {return {label: name,value: id,disabled: disabled,options: options,...this.props}}},watch: {keyValue (val) {this.poperKeyValue val}},methods: {checkValueExisting (value) {if (this.allowCreate) {return value} else {if (this.dataSource instanceof Array) {let index this.dataSource.findIndex(item item[this.hProps.value] value,this)return index -1}return false}},handleBlur (event) {this.$emit(blur, event)},handleChange (value) {this.$emit(change, value)},handleClear () {this.$emit(clear)},handleFocus (event) {this.$emit(focus, event)},handleRemoveTag (tag) {this.$emit(remove-tag, tag)},handleVisibleChange (visible) {this.$emit(visible-change, visible)},focus () {this.$refs.select.focus()},blur () {this.$refs.select.blur()}} } /scriptstyle langscss scoped/style 页面引入 在需要使用HSelect组件的地方通过import语句引入HSelect组件注册并使用 templatedivh-select :data-sourcedataSource v-modelselectedValue/h-select/div /template script import HSelect from /common-ui/select/indexexport default {components: {HSelect},data() {return {dataSource:[],selectedValue: }}// ...} /script确保你已经安装了Vue.js和Element UI并在项目中引入它们。
http://www.pierceye.com/news/828478/

相关文章:

  • 出售家教网站模板广告设计公司管理
  • 松原网站推广wordpress主题更新了
  • wordpress 手机端模板百度seo标题优化软件
  • 货架网站开发特卖网站设计
  • 网站首页设计图片简约简单的明星个人网站建设论文
  • 织梦程序来搭建网站vip视频解析网站建设
  • 网站的管理上海创新网站建设
  • 企业对比网站西安做网站公司怎么样
  • 网站开发好做还是平面好做商务网页设计与制作是什么
  • 个人业务网站带后台凡科网站建设分类模块怎么弄
  • 在百度做网站需要什么资料appstore正版下载
  • wordpress怎么做404页面合肥seo软件
  • 建设网站挂广告赚钱免费个人网站源码
  • 网站ico图标动漫设计学什么内容
  • fireworks做网站定制做网站费用
  • 建设门户网站所需优秀营销网站设计
  • 行业网站建设教程办一家建筑公司流程
  • 网站空间文件夹中企动力主要是做什么的
  • 亚马逊做qa的网站wordpress theme是什么
  • 网站开发的经费预算php网站超市源码下载
  • 深圳建设高端网站asp.net 获取网站的绝对路径
  • 做的网站没流量吗前端页面设计
  • 门户网站的优点在环评备案网站上做登记后会怎么样
  • 网站的内容规划怎么写网站做外链的具体步骤
  • 百度网站排名规则小程序网站建设y021
  • 中国建设银行国际互联网站国内排名前五的电商
  • 怎么查网站的空间商四川建设工程招标网
  • 网站建设比较好公司朝阳区互联网公司排名
  • 百度不收录网站吗网站开发php
  • 房产网站建设的功能wordpress php7拓展