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

怎么建网站平台网络兼职平台

怎么建网站平台,网络兼职平台,做网站分为哪些功能的网站,专业服务网页制作1、form 下面只有一个 input 时回车键刷新页面 原因是触发了表单默认的提交行为&#xff0c;给el-form 加上submit.native.prevent就行了。 <el-form inline submit.native.prevent><el-form-item label"订单号"><el-inputv-model"query.order…

1、form 下面只有一个 input 时回车键刷新页面

原因是触发了表单默认的提交行为,给el-form 加上@submit.native.prevent就行了。

<el-form inline @submit.native.prevent><el-form-item label="订单号"><el-inputv-model="query.orderNo":placeholder="输入订单号查询"clearable@keyup.enter.native="enterInput"/></el-form-item>
</el-form>

2、表格固定列最后一行显示不全

这种情况有时在宽度刚好处于临界值状态时会出现。因为固定列是独立于表格body动态计算高度的,出现了固定列高度小于表格高度所以造成最后一行被遮挡

// 设置全局
.el-table__fixed-right {height: 100% !important;
}

3、气泡确认框文档里的confirm事件不生效

版本:element-ui: "2.13.2", vue: "2.6.10"

// 将confirm改为onConfirm
@onConfirm="onDeleteOrder(row.id)"

4、输入框用正则限制但绑定值未更新

看到项目里有下面这么一段代码:

<el-input v-model="form.retailMinOrder" placeholder="请输入" onkeyup="value=value.replace(/[^\d.]/g,'')" 
/>

这样做虽然输入框的显示是正确的,但绑定的值是没有更新的,将 onkeyup 改为 oninput 即可。

PS:输入中文后 v-model 会失效,下面的方式更好一点:

<el-input v-model="form.retailMinOrder" placeholder="请输入" @keyup.native="form.retailMinOrder=form.retailMinOrder.replace(/[^\d.]/g,'')"
/>

5、去除type="number"输入框聚焦时的上下箭头


/* 设置全局 */
.clear-number-input.el-input::-webkit-outer-spin-button,
.clear-number-input.el-input::-webkit-inner-spin-button {margin: 0;-webkit-appearance: none !important;
} 
.clear-number-input.el-input input[type="number"]::-webkit-outer-spin-button,
.clear-number-input.el-input input[type="number"]::-webkit-inner-spin-button {margin: 0;-webkit-appearance: none !important;
}
.clear-number-input.el-input {-moz-appearance: textfield;
} 
.clear-number-input.el-input input[type="number"] {-moz-appearance: textfield;
}
<el-input type="number" class="clear-number-input" />

6、只校验表单其中一个字段

在一些用户注册场景中,提交整个表单前有时候会做一些单独字段的校验,例如发送手机验证码,发送时只需要校验手机号码这个字段,可以这样做:

this.$refs['form'].validateField('mobile', valid => {if (valid) {// 发送验证码}
})

如果需要多个参数,将参数改为数组形式即可。

7、弹窗重新打开时表单上次的校验信息未清除

有人会在open时在$nextTick里重置表单,也可以在关闭时进行重置。

<el-dialog @close="onClose"><el-form ref="form"></el-form>
</el-dialog>// 弹窗关闭时重置表单
onClose() {this.$refs['form'].resetFields()
}

8、表头与内容错位

用下面这个办法:

// 全局设置
.el-table--scrollable-y .el-table__body-wrapper {overflow-y: overlay !important;
}

9、表单多级数据结构校验问题

<el-form :model="form"><el-form-item label="部门" prop="dept"></el-form-item><el-form-item label="姓名" prop="user.name"></el-form-item>
</el-form>
rules: {'user.name': [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
}

10、表格跨分页多选

看到项目里有小伙伴手动添加代码去处理这个问题,其实根据文档,只需加上row-key和reserve-selection即可。

<el-table row-key="id"><el-table-column type="selection" reserve-selection></el-table-column>
</el-table>

11、根据条件高亮行并去除默认hover颜色

<el-table :row-class-name="tableRowClassName">
</el-table>tableRowClassName({ row }) {return row.status === 2 ? 'highlight' : ''
}// 设置全局
.el-table .highlight {background-color: #b6e8fe;&:hover > td {background-color: initial !important;}td {background-color: initial !important;}
}

12、表单不想显示label但又想显示必填星号怎么办

// label给个空格即可
<el-form><el-table><el-table-column label="名称"><template><el-form-item label=" "><el-input placeholder="名称不能为空" /></el-form-item></template></el-table-column></el-table>
</el-form>

13、table 内嵌 input 调用 focus 方法无效

<el-table><el-table-column label="名称"><template><el-input ref="inputRef" /></template></el-table-column>
</el-table>// 无效
this.$refs['inputRef'].focus()
this.$refs['inputRef'][0].focus()
this.$refs['inputRef'].$el.children[0].focus()// 有效
<el-input id="inputRef" />
document.getElementById('inputRef').focus()

14、表格内容超出省略

看到有小伙伴在代码里自己手动去添加CSS来实现,害,又是一个不看文档的反面例子,其实只要加个show-overflow-tooltip就可以了,还自带tooltip效果,不香吗?

<el-table-column label="客户名称" prop="customerName" show-overflow-tooltip>
</el-table-column>

15、el-tree 展开/收起所有节点

<el-tree ref="tree"></el-tree>expandTree(expand = true) {const nodes = this.$refs['tree'].store._getAllNodes()nodes.forEach(node => {node.expanded = expand})
}

16、el-popover 位置偏移问题

事情起因:el-popover 里的内容是动态获取的,所以刚打开时位置正确,此时内容为空,等到获取数据渲染后 el-popover 内容盒子大小发生变化从而造成位置偏移。

解决办法:通过源码知道 el-popover 里有个 updatePopper 方法用于更新位置(文档里没有),所以只需在获取数据后重新 updatePopper 就可以了。

<el-popover ref="popover" placement="left" trigger="click">
</el-popover>// 获取数据后
this.$nextTick(() => {this.$refs['popover'].updatePopper()
})

17、el-dialogdestroy-on-close 属性设置无效

destroy-on-close 设置为 true 后发现弹窗关闭后 DOM 元素仍在,没有被销毁。

解决办法:在 el-dialog 上添加 v-if

<el-dialog :visible.sync="visible" v-if="visible" destroy-on-close>
</el-dialog>

18、el-cascader 选择后需要点击空白处才能关闭

级联选择器在设置为可选任意一级时,选定某个选项时需要手动点击空白处才能关闭。

解决办法:可在 change 事件触发时将其关闭。

<el-cascaderref="cascader"@change="onChange"
/>onChange() {this.$refs['cascader'].dropDownVisible = false
}

19、使用图片查看器

el-image 组件是自带图片预览功能的,传入 preview-src-list 即可。但有时候不用 image 组件但又想预览大图怎么办?例如点击一个按钮时弹出一个图片查看器?

答案是使用 el-image-viewer,文档里并没有这个组件,但通过查看源码知道,该组件正是 el-image 里预览图片所用的。

<template><div><el-button @click="open">打开图片预览</el-button><el-image-viewerv-if="show":on-close="onClose":url-list="urls":initial-index="initialIndex"/></div>
</template><script>
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'export default {components: {ElImageViewer},data() {return {show: false,urls: ['https://img0.baidu.com/it/u=391928341,1475664833&fm=26&fmt=auto&gp=0.jpg'],initialIndex: 0}},methods: {open() {this.show = true},onClose() {this.show = false}}
}
</script>


文章转载自:
http://dinncoambiguity.ydfr.cn
http://dinncounreconciled.ydfr.cn
http://dinncorattled.ydfr.cn
http://dinncohalogen.ydfr.cn
http://dinncopurline.ydfr.cn
http://dinnconavalism.ydfr.cn
http://dinncoquodlibet.ydfr.cn
http://dinncosignality.ydfr.cn
http://dinncohydrofluoric.ydfr.cn
http://dinncogossipmonger.ydfr.cn
http://dinncolicensee.ydfr.cn
http://dinncoameerate.ydfr.cn
http://dinncoelusory.ydfr.cn
http://dinncodecagonal.ydfr.cn
http://dinncofalconry.ydfr.cn
http://dinncooutridden.ydfr.cn
http://dinncodeus.ydfr.cn
http://dinncobunchy.ydfr.cn
http://dinncolydian.ydfr.cn
http://dinncodevoice.ydfr.cn
http://dinncocockayne.ydfr.cn
http://dinncophysiognomical.ydfr.cn
http://dinncocamorrism.ydfr.cn
http://dinnconucleosidase.ydfr.cn
http://dinncola.ydfr.cn
http://dinncolabia.ydfr.cn
http://dinncothivel.ydfr.cn
http://dinncotriode.ydfr.cn
http://dinncoxylogen.ydfr.cn
http://dinncostreetlamp.ydfr.cn
http://dinncoblandishment.ydfr.cn
http://dinncoantitrades.ydfr.cn
http://dinncoincunable.ydfr.cn
http://dinncohousephone.ydfr.cn
http://dinncobrittle.ydfr.cn
http://dinncobluegill.ydfr.cn
http://dinncospinode.ydfr.cn
http://dinncotribromide.ydfr.cn
http://dinncosycamore.ydfr.cn
http://dinncocatatonic.ydfr.cn
http://dinncoinhabitiveness.ydfr.cn
http://dinncohorme.ydfr.cn
http://dinncopec.ydfr.cn
http://dinncoturbocharge.ydfr.cn
http://dinncorecapture.ydfr.cn
http://dinncojellied.ydfr.cn
http://dinncosialoglycoprotein.ydfr.cn
http://dinncogiocoso.ydfr.cn
http://dinncolimousine.ydfr.cn
http://dinncoconvive.ydfr.cn
http://dinncopsychoactive.ydfr.cn
http://dinncoviscerogenic.ydfr.cn
http://dinncoindusium.ydfr.cn
http://dinncotriennial.ydfr.cn
http://dinncographite.ydfr.cn
http://dinncoovermany.ydfr.cn
http://dinncomarkan.ydfr.cn
http://dinncodaubry.ydfr.cn
http://dinncoaugmented.ydfr.cn
http://dinncotween.ydfr.cn
http://dinncosumptuosity.ydfr.cn
http://dinncofricando.ydfr.cn
http://dinncotailorbird.ydfr.cn
http://dinncovindicability.ydfr.cn
http://dinncomaterial.ydfr.cn
http://dinncoimpromptu.ydfr.cn
http://dinncocrummy.ydfr.cn
http://dinncoinfranics.ydfr.cn
http://dinncocomplier.ydfr.cn
http://dinncofelonry.ydfr.cn
http://dinncowalleye.ydfr.cn
http://dinncomorphemics.ydfr.cn
http://dinncoyacket.ydfr.cn
http://dinncoextinguishable.ydfr.cn
http://dinncofrumpy.ydfr.cn
http://dinncooscillatory.ydfr.cn
http://dinncocoloury.ydfr.cn
http://dinncokwangchow.ydfr.cn
http://dinncoconfiture.ydfr.cn
http://dinncoegotize.ydfr.cn
http://dinncorootstock.ydfr.cn
http://dinncoinconsequent.ydfr.cn
http://dinncolorn.ydfr.cn
http://dinncohaematite.ydfr.cn
http://dinncodick.ydfr.cn
http://dinncosaturant.ydfr.cn
http://dinncovarmint.ydfr.cn
http://dinnconegaton.ydfr.cn
http://dinncothyrotoxicosis.ydfr.cn
http://dinncolathyrism.ydfr.cn
http://dinncounminded.ydfr.cn
http://dinncotruant.ydfr.cn
http://dinnconimiety.ydfr.cn
http://dinnconibmar.ydfr.cn
http://dinncoer.ydfr.cn
http://dinncoreg.ydfr.cn
http://dinncoxylomancy.ydfr.cn
http://dinncoclapperclaw.ydfr.cn
http://dinncolacertilian.ydfr.cn
http://dinncodisagreeables.ydfr.cn
http://www.dinnco.com/news/151672.html

相关文章:

  • 网站建设需求书长沙百度推广排名优化
  • 企业网站建设咨询百度推广方案
  • 2022中文无字幕入口网站公司网站设计哪家好
  • 北京个人制作网站百度推广官网入口
  • 有做机械工装的网站吗中山口碑seo推广
  • 百度网站查反链百度搜索怎么优化
  • 苏州网站建设中心口碑营销理论
  • 阿里云手机做网站网络运营课程培训班
  • 阿里巴巴官网下载安装广州seo公司推荐
  • 目录更新 wordpress福州整站优化
  • 做电子外贸网站网站页面设计模板
  • 宁波网站建设公司哪有百度seo教程视频
  • 龙口做网站价格网络营销推广公司名称
  • 沧州企业网站制作独立网站和平台网站
  • 开源it运维管理软件网站优化排名提升
  • 成都广告制作公司杭州百度首页优化
  • 做的网站需要买什么服务器百度seo搜索引擎优化方案
  • 怎样利用网站做推广成都关键词优化报价
  • 网站建设是半年的持久战php免费开源crm系统
  • 什么软件做高级网站宁波seo网络推广渠道介绍
  • 建设企业网站成本多少钱推广普通话的宣传语
  • 手机网站制作价格郑州网站推广技术
  • 公司网站开发社群营销怎么做
  • 网站是什么字体色盲测试图片
  • office做网站的软件wordpress企业网站模板
  • 做批发比较好的网站有哪些seo网络培训学校
  • 莆田网站制作软件深圳seo
  • 重庆企业网站推广公司深圳百度关键字优化
  • 优秀的电商设计网站google优化排名
  • 电子商务网页制作试题及答案阜新网站seo