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

赣州网站建设公司淘宝运营

赣州网站建设公司,淘宝运营,人力招聘网站建设的简要任务执行书,淘宝客合伙人网站建设需求&#xff1a;一个输入框字段需要支持多次输入&#xff0c;最后传输给后台的字段值以逗号分割 解决方案&#xff1a;结合了el-tag组件的动态编辑标签 那块的代码 //子组件 <template><div class"input-multiple-box" idinputMultipleBox><div>…

需求:一个输入框字段需要支持多次输入,最后传输给后台的字段值以逗号分割
解决方案:结合了el-tag组件的动态编辑标签 那块的代码

//子组件
<template><div class="input-multiple-box" id='inputMultipleBox'><div><el-tag v-for="(tag, index) in inputTagList" :key="index" type="info" closable @close="handleClose(index)">{{ tag }}</el-tag></div><el-inputv-model="inputValue"@keyup.enter="handleInputConfim"@blur="handleInputConfim"style="flex: 1; min-width: 100px"placeholder="按下enter键或者失去焦点进行添加"></el-input></div>
</template><script lang="ts" setup>
import { onMounted, ref, watch } from 'vue'const props = defineProps(["inputTags", "separator"]);
const emit = defineEmits(['update:inputTags'])const inputTagList = ref([])
const inputValue = ref('')
const handleClose = (index: number) => {inputTagList.value.splice(index, 1)emit('update:inputTags', inputTagList.value.join(props.separator || ','))
}
const handleInputConfim = () => {if (inputValue.value) {inputTagList.value.push(inputValue.value)inputValue.value = ''emit('update:inputTags', inputTagList.value.join(props.separator || ','))}
}watch(()=>props.inputTags, (val, pre) => {inputTagList.value = props.inputTags.split(props.separator || ',')
});onMounted(() => {if (props.inputTags) {inputTagList.value = props.inputTags.split(props.separator || ',')}
})
</script><style lang="scss" scoped>
.input-multiple-box {width: 100%;border-radius: 4px;border: 1px solid #dcdfe6;// padding: 0 5px;display: flex;flex-wrap: wrap;
}
</style>
<style lang="scss">
#inputMultipleBox {.el-input__inner {border: none;}
}
</style>//父组件
import multipleInput from '@/components/multipleInput/index.vue'
<multipleInputv-model:inputTags="form.modbus"placeholder="请输入"clearable></multipleInput>

实现效果图
在这里插入图片描述

http://www.tj-hxxt.cn/news/105180.html

相关文章:

  • 灌南网站建设深圳纯手工seo
  • 郑州网站优化渠道河南网站建设优化技术
  • 厦门做返利网站的公司怎么注册自己的网站
  • 卖东西怎么做网站如何优化标题关键词
  • 网站标签怎么做百度网盘优化
  • 做网站视频用哪个视频编辑软件在百度上怎么注册网站
  • 免费网站建设浩森宇特网站需要怎么优化比较好
  • 江西省工程建设信息官方网站上海关键词自动排名
  • 太原网页设计招聘搜索引擎排名优化是什么意思
  • php 网站开发教程seo搜索引擎优化推广
  • 哪里可以做公司网站网络营销外包
  • WordPress朗读seo推广怎么做视频教程
  • 潍坊网站建设策划方案海南seo代理加盟供应商
  • 网络营销服务管理合肥seo推广外包
  • 织梦做的网站怎么传到网上网络营销专员的就业前景
  • wordpress树洞外链主题南昌seo排名收费
  • 水磨沟网页设计免费网站seo诊断
  • 阿里云可以做网站吗电商网站开发平台有哪些
  • 做网站基本要求朝阳区seo
  • wordpress添加支付网站seo的内容是什么
  • 在网站上做送餐外卖需要哪些资质设计案例网
  • 学做网站论坛vip视频qq群推广引流免费网站
  • 网页设计兼职平台seo原创工具
  • 网站开发php支付接口推广软文是什么
  • 怎样在外贸网站做业务大数据统计网站
  • 深圳中高端网站建设怎么样上海百度分公司电话
  • 怎么做网站服务公关负面处理公司
  • 网站怎么做免费推广网站seo优化徐州百度网络
  • ims2009 asp企业网站建设什么是网络营销战略
  • 东莞网站建设哪家站长工具中文精品