11 2024 档案
摘要:spanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex 0) { const prevRow = this.tableData[rowIndex - 1] if (prevRow && row.date prevRow
阅读全文
摘要:效果 代码: setGaugeChart() { this.agugeChart && this.agugeChart?.dispose && this.agugeChart?.dispose() this.agugeChart = echarts.init(this.$refs.agugeChar
阅读全文
摘要:data() { const validateName = (rule, value, callback) => { if (!value) { callback(new Error('请填写名称')) } else { callback() } } return { form: { name: '
阅读全文
摘要:vue快捷工具组件:小地图导航、全屏、刷新 效果 代码 <!-- * @description 快捷工具 !--> <template> <div class="quick-tools" :style="{ ...quickToolsStyle }"> <template v-for="val in
阅读全文
摘要:拖拽bar横向滚动页面组件 拖拽横向滚动页面,效果图如下 <!-- * @description 滑块滚动条 !--> <template> <div ref="scrollBarBoxRef" class="scroll-bar-box"> <div class="line"></div> <di
阅读全文
摘要:思路:使用多个移表盘叠加 效果图: 代码: setGaugeChart() { this.gaugeChart && this.gaugeChart?.dispose && this.gaugeChart?.dispose() this.gaugeChart = echarts.init(this.
阅读全文
摘要:vue组件中,如何在less/scss中使用变量,以二次封装el-tab样式组件为例 <!-- * @description 封装el-tab样式 !--> <template> <div class="tab-comp" :style="{ '--item-max-width': itemMaxW
阅读全文
摘要:tooltip配置 tooltip: { show: true, trigger: 'axis', formatter: params => { let result = `<div>${params[0].axisValue}</div>` params.forEach(item => { if
阅读全文
摘要:echarts饼图在中间显示百分比,使用graphic setEchartOption(val) { const seriesData = [ { value: 1048, name: '完成值' }, { value: 735, name: '目标值' } ] const option = { g
阅读全文
摘要:组织架构树形数据,且存在一个人员在多公司/或部门计数重复问题 // 统计组织架构内人员数量 const countNodesProperty = (treeItemData, propertyName, propertyValue) => { let count = 0 const userArr
阅读全文
摘要:.text-ellipsis-2-line { width: 100%; height: 44px; fonst-size: 14px; line-height: 22px; word-break: break-all; text-overflow: ellipsis; overflow: hidd
阅读全文
摘要:因为img标签是行内标签自带间距,导致图片和div之间有间隙 <div class="img-container"> <img src="xxxxxxxxx" /> </div> <style lang='less'> .img-container { width: 200px; font-size
阅读全文
摘要:this.$refs.rowRef.scrollIntoView({ block: 'start', behavior: 'smooth' })
阅读全文
摘要:<div class="img-container"> <img /> <div/> <style lang="less"> .img-container { width: 50px; height: 30px; overflow: hidden; img { width: 100%; transi
阅读全文