中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

網(wǎng)站建設(shè)學(xué)校seo建設(shè)

網(wǎng)站建設(shè)學(xué)校,seo建設(shè),合肥網(wǎng)絡(luò)科技有限公司做網(wǎng)站,中國(guó)互聯(lián)網(wǎng)企業(yè)100強(qiáng)基于Element UI的el-select組件進(jìn)行封裝的。該組件實(shí)現(xiàn)了一個(gè)下拉選擇框&#xff0c;具有許多可配置的屬性和事件 創(chuàng)建組件index.vue (src/common-ui/select/index.vue) <template><el-selectref"select"v-model"hValue":allow-create"allo…

基于Element UI的el-select組件進(jìn)行封裝的。該組件實(shí)現(xiàn)了一個(gè)下拉選擇框,具有許多可配置的屬性和事件

創(chuàng)建組件index.vue (src/common-ui/select/index.vue)
<template><el-selectref="select"v-model="hValue":allow-create="allowCreate":autocomplete="autocomplete":automatic-dropdown="automaticDropdown":clearable="clearable":collapse-tags="collapseTags":default-first-option="defaultFirstOption":disabled="disabled":filter-method="filterMethod":filterable="filterable":loading="loading":loading-text="loadingText":multiple="multiple":multiple-limit="multipleLimit":name="name":no-match-text="noMatchText":no-data-text="noDataText":placeholder="placeholder":popper-class="popperClass":popper-append-to-body="popperAppendToBody":remote="remote":remote-method="remoteMethod":reserve-keyword="reserveKeyword":size="size":key="poperKeyValue":value-key="valueKey"@blur="handleBlur"@change="handleChange"@clear="handleClear"@focus="handleFocus"@remove-tag="handleRemoveTag"@visible-change="handleVisibleChange"><slot name="prefix" slot="prefix"></slot><slot name="option-content"><template v-for="(item, index) in dataSource"><el-option-groupv-if="item[hProps.options] &&item[hProps.options].length > 0 &&!selectSpecial":key="index":label="item[hProps.label]":disabled="item[hProps.disabled]"><el-optionv-for="(option, subIndex) in item[hProps.options]":key="subIndex":label="option[hProps.label]":value="option[hProps.value]":disabled="option[hProps.disabled]"></el-option></el-option-group><el-optionv-else-if="!item[hProps.options] && !selectSpecial":key="index + 'si'":label="item[hProps.label]":value="item[hProps.value]":disabled="item[hProps.disabled]"></el-option><el-optionv-else-if="!item[hProps.options] && selectSpecial":key="index + 'sp'":label="`${item[hProps.label]}(${item[selectSpecial]})`":value="item[hProps.value]":disabled="item[hProps.disabled]"></el-option></template></slot></el-select>
</template><script>
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()}}
}
</script><style lang="scss" scoped></style>
頁(yè)面引入
  • 在需要使用HSelect組件的地方,通過(guò)import語(yǔ)句引入HSelect組件注冊(cè)并使用
<template><div><h-select :data-source="dataSource" v-model="selectedValue"></h-select></div>
</template>
<script >import HSelect from '@/common-ui/select/index'export default {components: {HSelect},data() {return {dataSource:[],selectedValue: ''}}// ...}
</script>

確保你已經(jīng)安裝了Vue.js和Element UI,并在項(xiàng)目中引入它們。

http://www.risenshineclean.com/news/29905.html

相關(guān)文章:

  • 做歐洲電商看哪個(gè)網(wǎng)站商丘seo教程
  • 重慶網(wǎng)站建設(shè)公司有哪些內(nèi)容搜索引擎推廣渠道
  • 陽(yáng)江市問(wèn)政平臺(tái)留言整站優(yōu)化系統(tǒng)廠家
  • 網(wǎng)站建設(shè)公司生存谷歌seo工具
  • 公司網(wǎng)站建設(shè)技術(shù)自媒體平臺(tái)注冊(cè)
  • 綿陽(yáng)市網(wǎng)站建設(shè)公司seo關(guān)鍵詞排名優(yōu)化系統(tǒng)
  • 用php做網(wǎng)站要用構(gòu)架嗎專業(yè)代寫文案的公司
  • 專業(yè)的移動(dòng)網(wǎng)站建設(shè)公司seo網(wǎng)站推廣多少錢
  • 云南昆明網(wǎng)站建設(shè)鄭州seo關(guān)鍵詞優(yōu)化公司
  • 做營(yíng)銷策劃的上哪個(gè)網(wǎng)站好重慶百度推廣的代理商
  • 網(wǎng)站域名自己做seocms
  • 代做網(wǎng)站關(guān)鍵詞杭州百度代理公司
  • 集團(tuán)培訓(xùn)網(wǎng)站建設(shè)網(wǎng)絡(luò)營(yíng)銷服務(wù)平臺(tái)
  • 行業(yè)網(wǎng)站客服怎么做最好的網(wǎng)站推廣軟件
  • 做視頻網(wǎng)站需要什么服務(wù)器網(wǎng)絡(luò)的推廣方式有哪些
  • 上海楊浦網(wǎng)站建設(shè)神馬關(guān)鍵詞快速排名軟件
  • 齊魯人才網(wǎng)泰安最新招聘網(wǎng)百度seo學(xué)院
  • 如何做白日夢(mèng)的網(wǎng)站關(guān)鍵詞分為哪幾類
  • 無(wú)錫找做網(wǎng)站百度商務(wù)合作電話
  • 建設(shè)一個(gè)網(wǎng)站大概費(fèi)用大連seo網(wǎng)站推廣
  • 高端企業(yè)網(wǎng)站建設(shè)注意問(wèn)題谷歌瀏覽器搜索入口
  • 福建省建設(shè)執(zhí)業(yè)繼續(xù)教育網(wǎng)站吉林seo排名公司
  • 浙江融興建設(shè)有限公司網(wǎng)站網(wǎng)站建設(shè)公司推薦
  • 大學(xué)生網(wǎng)站建設(shè)方案世界球隊(duì)最新排名
  • 網(wǎng)站建設(shè)有增值稅發(fā)票嗎seo個(gè)人優(yōu)化方案案例
  • 夏天做啥網(wǎng)站能致富sem優(yōu)化師
  • 網(wǎng)站制作網(wǎng)站建設(shè)需要多少錢網(wǎng)站銷售怎么推廣
  • 教做家庭菜的網(wǎng)站怎么做推廣比較成功
  • 樂(lè)清做網(wǎng)站價(jià)格推廣的軟件
  • 彈幕網(wǎng)站是怎么做的發(fā)布軟文平臺(tái)