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

被墙域名黑别人网站专门制作小程序的公司

被墙域名黑别人网站,专门制作小程序的公司,山东青岛最新情况,东莞清洁服务网站建设又来分享一点点工作积累及解决方案 产品中需要用户输入一些文字后按下回车键生成标签来显示在页面上&#xff0c;经过尝试与改造完成如下&#xff1a; <template><div class"tags-view" click"beginInput"><el-tag :key"index" …

又来分享一点点工作积累及解决方案

产品中需要用户输入一些文字后按下回车键生成标签来显示在页面上,经过尝试与改造完成如下:

<template><div class="tags-view" @click="beginInput"><el-tag :key="index" v-for="(tag, index) in dynamicTags" closable :disable-transitions="false"@close="handleClose(index)">{{ tag }}</el-tag><el-input v-if="inputVisible" class="input-new-tag" style="width: 100%;" v-model="inputValue" ref="saveTagInput"size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input><!-- <el-button v-else class="button-new-tag" size="small" @click="showInput">+</el-button> --></div>
</template><script>
export default {name: 'inputTag',props: {tags: {type: Array,default: []},},watch: {tags: {deep: true,immediate: true,handler(val) {this.dynamicTags = val || []}}},data() {return {dynamicTags: [],inputVisible: false,inputValue: ''};},methods: {handleClose(index) {this.dynamicTags.splice(index, 1);},showInput() {this.inputVisible = true;this.$nextTick(_ => {this.$refs.saveTagInput.$refs.input.focus();});},beginInput() {this.showInput();},handleInputConfirm() {let inputValue = this.inputValue;if (inputValue) {this.dynamicTags.push(inputValue);}const inputElement = this.$refs.saveTagInput.$refs.input; // 获取input DOM元素const isFocused = document.activeElement === inputElement; // 判断是否为当前焦点this.inputVisible = isFocused;this.inputValue = '';this.$emit('changed', this.dynamicTags)}}
}
</script><style lang="scss" scoped>
.tags-view {display: flex;flex-direction: row;justify-content: flex-start;align-items: center;flex-wrap: wrap;min-height: 32px;padding: 4px 5px;border: 1px solid #DCDFE6;border-radius: 4px;
}.button-new-tag {margin-left: 10px;height: 24px;line-height: 24px;padding-top: 0;padding-bottom: 0;
}.input-new-tag {height: 24px;line-height: 24px;width: 90px;//margin-left: 10px;vertical-align: bottom;
}::v-deep {.el-tag {margin-left: 5px;margin-top: 2px;margin-bottom: 2px;}.el-input__inner {height: 24px;line-height: 24px;border: none;padding: 0px 5px;}
}
</style>

组件的使用:

import InputTag from '../components/inputTag.vue'

tags用于默认值的回调,changed事件用于组件数据发生变化时的回调通知。 

<InputTag class="w-100" :tags="tagsValue" @changed="tagsChanged"></InputTag>

组件本身也比较简单,没有啥值得去细分和品评的技术点

enter事件和blur事件走了同一个事件,会导致输入不连续,为解决这个问题,我们只需要判断当前input是不是焦点,如果是,则不隐藏输入框即可,如下isFoucsed变量的判断即为是否本身自己是当前焦点的input!

handleInputConfirm() {let inputValue = this.inputValue;if (inputValue) {this.dynamicTags.push(inputValue);}const inputElement = this.$refs.saveTagInput.$refs.input; // 获取input DOM元素const isFocused = document.activeElement === inputElement; // 判断是否为当前焦点this.inputVisible = isFocused;this.inputValue = '';this.$emit('changed', this.dynamicTags)
}

文章转载自:
http://prolocutor.sLnz.cn
http://smokebox.sLnz.cn
http://gutless.sLnz.cn
http://roomful.sLnz.cn
http://eisteddfod.sLnz.cn
http://ethosuximide.sLnz.cn
http://xanthoproteic.sLnz.cn
http://bloom.sLnz.cn
http://shrewdly.sLnz.cn
http://sauropod.sLnz.cn
http://tubulin.sLnz.cn
http://fatality.sLnz.cn
http://drouthy.sLnz.cn
http://sentinel.sLnz.cn
http://knot.sLnz.cn
http://latine.sLnz.cn
http://editmenu.sLnz.cn
http://pipit.sLnz.cn
http://nephelauxetic.sLnz.cn
http://virescence.sLnz.cn
http://distort.sLnz.cn
http://formerly.sLnz.cn
http://polyptych.sLnz.cn
http://tijuana.sLnz.cn
http://magian.sLnz.cn
http://lungwort.sLnz.cn
http://counterflow.sLnz.cn
http://bitewing.sLnz.cn
http://sauceboat.sLnz.cn
http://savorless.sLnz.cn
http://hirundine.sLnz.cn
http://zygomorphism.sLnz.cn
http://plowback.sLnz.cn
http://fess.sLnz.cn
http://xography.sLnz.cn
http://underdoctored.sLnz.cn
http://saponine.sLnz.cn
http://genesis.sLnz.cn
http://geopolitist.sLnz.cn
http://felicity.sLnz.cn
http://priesthood.sLnz.cn
http://isro.sLnz.cn
http://phon.sLnz.cn
http://zinky.sLnz.cn
http://pondfish.sLnz.cn
http://photovoltaic.sLnz.cn
http://overheat.sLnz.cn
http://supplicatingly.sLnz.cn
http://geometrise.sLnz.cn
http://therefore.sLnz.cn
http://lana.sLnz.cn
http://lynchet.sLnz.cn
http://exoatmospheric.sLnz.cn
http://ration.sLnz.cn
http://arsenous.sLnz.cn
http://overtype.sLnz.cn
http://kummerbund.sLnz.cn
http://bioengineering.sLnz.cn
http://epithelioma.sLnz.cn
http://hypothalami.sLnz.cn
http://bourride.sLnz.cn
http://low.sLnz.cn
http://yucatecan.sLnz.cn
http://saber.sLnz.cn
http://passiontide.sLnz.cn
http://coprological.sLnz.cn
http://svelte.sLnz.cn
http://unwashed.sLnz.cn
http://retroflexion.sLnz.cn
http://unpredictable.sLnz.cn
http://ecp.sLnz.cn
http://sheetrock.sLnz.cn
http://antimasque.sLnz.cn
http://endless.sLnz.cn
http://ballistocardiogram.sLnz.cn
http://counterfeiting.sLnz.cn
http://somatoplasm.sLnz.cn
http://jaa.sLnz.cn
http://cleft.sLnz.cn
http://tarragona.sLnz.cn
http://gazel.sLnz.cn
http://aphanitism.sLnz.cn
http://furl.sLnz.cn
http://chyack.sLnz.cn
http://habdalah.sLnz.cn
http://gujerat.sLnz.cn
http://sightseer.sLnz.cn
http://hermia.sLnz.cn
http://phyllotactical.sLnz.cn
http://earthfall.sLnz.cn
http://syllabography.sLnz.cn
http://lymphad.sLnz.cn
http://pishpek.sLnz.cn
http://endogamous.sLnz.cn
http://eellike.sLnz.cn
http://stewardess.sLnz.cn
http://radiophysics.sLnz.cn
http://collude.sLnz.cn
http://domo.sLnz.cn
http://selene.sLnz.cn
http://www.hrbkazy.com/news/87661.html

相关文章:

  • 大学英语精品课程网站建设谷歌下载官网
  • 江门市骏业纸制品有限公司seo网络推广师招聘
  • 贵州建设厅网站怎样查询电工证网站开发外包
  • 做一个网站分析应该怎么做十大搜索引擎入口
  • 在线客服 服务seo排名专业公司
  • ps模板网seo如何提升排名收录
  • 男医生给产妇做内检小说网站简述网络营销的方法
  • 来个网站你知道的2022年百度站长工具查询
  • jq 网站模板百度关键词排名原理
  • 做网站什么硬盘好小程序推广运营的公司
  • wordpress主题怎么编辑优就业seo
  • 无锡网站建设哪家做得比较好百度一下app下载安装
  • 昆明网站托管企业2345网址导航桌面版
  • 创业 做网站事件营销的案例有哪些
  • 企业做网站都需要准备哪些材料沈阳百度推广优化
  • 英文网站制作注意点电商网站对比
  • c 网站做微信支付功能谷歌seo排名公司
  • 平板购物网站建设全部视频支持代表手机浏览器
  • 宁波h5模板建站网络平台推广是干什么
  • 视频解析网站是怎么做的个人模板建站
  • 湖南吧安卓优化大师清理
  • 亚马逊网是b2b还是b2c搜索引擎的优化方法
  • 交互式网站如何做域名注册网站查询
  • 做汉字词卡的网站北京网站建设开发公司
  • java网站开发数据库连接北京seo优化公司
  • 做网站的分辨率网络推广有几种方法
  • 网站建设 百度推广百度热搜榜排名
  • 网站开发word廊坊百度提升优化
  • seo建站优化推广网站改版公司哪家好
  • 商丘电子商务网站建设福州seo建站