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

恶意镜像网站程序生物科技网站建设 中企动力北京

恶意镜像网站程序,生物科技网站建设 中企动力北京,做金融网站有哪些要求,网络营销课程多少钱又来分享一点点工作积累及解决方案 产品中需要用户输入一些文字后按下回车键生成标签来显示在页面上#xff0c;经过尝试与改造完成如下#xff1a; templatediv classtags-view clickbeginInputel-tag :keyindex …又来分享一点点工作积累及解决方案 产品中需要用户输入一些文字后按下回车键生成标签来显示在页面上经过尝试与改造完成如下 templatediv classtags-view clickbeginInputel-tag :keyindex v-for(tag, index) in dynamicTags closable :disable-transitionsfalseclosehandleClose(index){{ tag }}/el-tagel-input v-ifinputVisible classinput-new-tag stylewidth: 100%; v-modelinputValue refsaveTagInputsizesmall keyup.enter.nativehandleInputConfirm blurhandleInputConfirm/el-input!-- el-button v-else classbutton-new-tag sizesmall clickshowInput/el-button --/div /templatescript 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)}} } /scriptstyle langscss 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 classw-100 :tagstagsValue changedtagsChanged/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://www.hkea.cn/news/14412529/

相关文章:

  • 做网站复杂吗wordpress 可视化 编辑
  • 简阳电力建设立项网站无锡大型设计网站报价
  • 网站没有百度权重网站负责人幕布照片
  • 盐山做网站广德县建设协会网站
  • 广州市财贸建设开发监理网站深圳市住房和建设局网官网
  • 北京建设监理网站网页设计和网站建设实战大全
  • c 网站开发案例源码网站推广有什么方法有哪些
  • 丹东新区建设发展集团网站游戏网站建设视频教程
  • 杭州做网点卖服装在那个网站网络营销人员招聘
  • 网站建设综合软件属于网站开发吗
  • 做一家网站的成本做外贸需要关注的网站有什么问题
  • 北京品牌建设网站公司排名下载中国移动app免费下载安装
  • 广州市建设集团网站首页wap网站部署
  • 网站建设可以在家做吗好的高端企业网站建设公司
  • dw设计做网站完整案例网络服务提供者应当将该声明转送发出通知的权利人
  • python搭建个人网站搜索引擎营销优化策略有哪些
  • 网站建设51cto手机上可视化编程app
  • 科技类网站安徽新网讯科技发展有限公司
  • 网站平台建设镜像站wordpress
  • 建站公司费用wordpress戏
  • 手机网站模板开发wordpress 大图主题
  • 专业的会议网站建设龙华区民治街道
  • 网站外链建设策略app开发与网站开发有何不同
  • 整站优化推广品牌服务器网站路径问题
  • 口碑好网站建设价格武进网站建设怎么样
  • 做网络网站需要三证么网站建设平台ui确认书
  • wordpress去掉链接中的mseo关键词排名软件流量词
  • 创建网站怎么赚钱的黄石网站建设推荐
  • 蒲公英路由做网站我想自己建立一个网站
  • 网站开发成本主要有哪些给人做网站网站犯法嘛