Browse Source

更新超出隐藏

fix_bug_pro20231227
zhangsiyu 2 years ago
parent
commit
2943096065
  1. 19
      src/components/tablecmt/tablecmt.vue
  2. 3
      vite.config.js

19
src/components/tablecmt/tablecmt.vue

@ -77,12 +77,16 @@
</template>
<template #default="scope">
<el-text class="mx-2" v-if="Number(column.type)<6&&Number(column.type)>0">{{ scope.row[column.prop] }}</el-text>
<el-text class="mx-2" v-if="(Number(column.type)<6&&Number(column.type)>0)&&column.isextrahide">{{ scope.row[column.prop] }}</el-text>
<!-- <div v-if="Number(column.type)==8">
<div></div>
</div> -->
<slot v-if="column.type == 6" :scope="scope"></slot>
<el-image preview-teleported v-if="column.type==7" style="width: 60px; height: 60px;margin-left: 10px;" :initial-index="index" :z-index="100" v-for="(item,index) in scope.row[column.prop].split(',')" :src="item" :preview-src-list="scope.row[column.prop].split(',')"/>
<el-tooltip placement="top" v-if="(Number(column.type)<6&&Number(column.type)>0)&&!column.isextrahide">
<template #content>{{ scope.row[column.prop] }}</template>
<div class="on">{{ scope.row[column.prop] }}</div>
</el-tooltip>
<!-- <slot v-if="column.type == 7" name="test" :testdata="scope"></slot> -->
<!-- <el-button
v-if="column.type == 6"
@ -169,7 +173,13 @@ interface TableColumnType {
/**
* true false 或者直接不写该参数
*/
head?:boolean
head?:boolean;
/**
* 默认超出隐藏
* true是不隐藏
* false 隐藏
*/
isextrahide?:boolean
}
interface TableDataType {
[key: string]: any;
@ -423,4 +433,9 @@ watchEffect(()=>{
.el-table .success-row {
--el-table-tr-bg-color: var(--el-color-success-light-9);
}
.on{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

3
vite.config.js

@ -12,7 +12,8 @@ export default ({ mode, command }) => {
port: 2888,
proxy: {
'/api': {
target: 'http://192.168.10.126:8889',
// target: 'http://192.168.10.126:8889',
target: 'http://192.168.10.123:8889',
//target: 'http://test3.javablade.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),

Loading…
Cancel
Save