|
@@ -18,12 +18,15 @@
|
|
|
check-strictly default-expand-all :props="{ children: 'child', label: 'name' }">
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<el-checkbox-group v-model="item.check">
|
|
|
- <el-checkbox :label="data.id" @change="(val)=>checkData(data.id,item,val)">
|
|
|
- <!-- {{ data.name }}({{ getCount(item, data.id) }}) -->
|
|
|
- <myTooltip :content="data.name + '('+ getCount(item, data.id) +')'" placement="top" effect="light">
|
|
|
- <span class="source-checkbox-label text noWrap">{{ data.name }}({{ getCount(item, data.id) }})</span>
|
|
|
- </myTooltip>
|
|
|
- </el-checkbox>
|
|
|
+ <div class="source-checkbox">
|
|
|
+ <el-checkbox :label="data.id" @change="(val)=>checkData(data.id,item,val,data.name)">
|
|
|
+ <!-- {{ data.name }}({{ getCount(item, data.id) }}) -->
|
|
|
+ <myTooltip :content="data.name + '('+ getCount(item, data.id) +')'" placement="top" effect="light">
|
|
|
+ <span class="source-checkbox-label text noWrap">{{ data.name }}({{ getCount(item, data.id) }})</span>
|
|
|
+ </myTooltip>
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-checkbox-group>
|
|
|
</span>
|
|
|
</el-tree>
|
|
@@ -96,4 +99,14 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .text {
|
|
|
+ /* 超出10个字隐藏,之所以设置11em是因为省略号占一个位置 */
|
|
|
+ max-width: 11em;
|
|
|
+ overflow: hidden;
|
|
|
+ /* 显示省略符号来代表被修剪的文本。 */
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ /* 文本不换行 */
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+</style>
|