Merge branch 'dev-3.3' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.4

This commit is contained in:
zhangyu
2022-07-14 18:09:34 +08:00
3 changed files with 10 additions and 4 deletions

View File

@@ -21,6 +21,11 @@
font-size: 12px; font-size: 12px;
position: fixed; position: fixed;
} }
.temp-dom--16 {
visibility: hidden;
font-size: 16px;
position: fixed;
}
.home.tv,.home.se{ .home.tv,.home.se{
.left-menu{ .left-menu{

View File

@@ -274,7 +274,7 @@ export default {
item.inputWidth = this.widthConstant.dropdownCheckBox.inputOriginalWidth item.inputWidth = this.widthConstant.dropdownCheckBox.inputOriginalWidth
} else { } else {
const showTag = item.children.find(c => c.id == value[0]) // 展示的tag const showTag = item.children.find(c => c.id == value[0]) // 展示的tag
const { tagWidth, inputWidth, width } = this.computeCascWidth(this.computeDistance(showTag.name, 14), item.labelWidth) const { tagWidth, inputWidth, width } = this.computeCascWidth(this.computeDistance(showTag.name, 16), item.labelWidth)
item.width = width item.width = width
item.inputWidth = inputWidth item.inputWidth = inputWidth
} }
@@ -293,7 +293,7 @@ export default {
item.inputWidth = this.widthConstant.dropdownCheckBox.inputOriginalWidth item.inputWidth = this.widthConstant.dropdownCheckBox.inputOriginalWidth
} else { } else {
const showTag = item.children.find(c => c.id == value[0]) // 展示的tag const showTag = item.children.find(c => c.id == value[0]) // 展示的tag
const { tagWidth, inputWidth, width } = this.computeCascWidth(this.computeDistance(showTag.name, 14), item.labelWidth) const { tagWidth, inputWidth, width } = this.computeCascWidth(this.computeDistance(showTag.name, 16), item.labelWidth)
item.width = width item.width = width
item.inputWidth = inputWidth item.inputWidth = inputWidth
} }
@@ -301,14 +301,14 @@ export default {
Object.keys(this.titleSearchListCopy).forEach(type => { Object.keys(this.titleSearchListCopy).forEach(type => {
this.titleSearchListCopy[type].children.forEach(c => { this.titleSearchListCopy[type].children.forEach(c => {
if (this.titleSearchListCopy[type].type === 'dropdownCheckBox') { if (this.titleSearchListCopy[type].type === 'dropdownCheckBox') {
const labelWidth = this.computeDistance(c.name + ':', 14) + this.widthConstant.dropdownCheckBox.labelPadding // cascader-label总宽度 const labelWidth = this.computeDistance(c.name + ':', 16) + this.widthConstant.dropdownCheckBox.labelPadding // cascader-label总宽度
const width = labelWidth + this.widthConstant.dropdownCheckBox.inputOriginalWidth + this.widthConstant.dropdownCheckBox.boxMargin const width = labelWidth + this.widthConstant.dropdownCheckBox.inputOriginalWidth + this.widthConstant.dropdownCheckBox.boxMargin
this.$set(c, 'width', width) // 总宽 this.$set(c, 'width', width) // 总宽
this.$set(c, 'originalWidth', width) // 初始总宽 this.$set(c, 'originalWidth', width) // 初始总宽
this.$set(c, 'labelWidth', labelWidth) // label区域宽 this.$set(c, 'labelWidth', labelWidth) // label区域宽
this.$set(c, 'inputWidth', this.widthConstant.dropdownCheckBox.inputOriginalWidth) // 内容区域宽 this.$set(c, 'inputWidth', this.widthConstant.dropdownCheckBox.inputOriginalWidth) // 内容区域宽
} else if (this.titleSearchListCopy[type].type === 'checkBox') { } else if (this.titleSearchListCopy[type].type === 'checkBox') {
const width = this.computeDistance(c.name + ' (' + c.num + ')', 14) + this.widthConstant.checkBox.tagBlankTotal + this.widthConstant.checkBox.boxMargin const width = this.computeDistance(c.name + ' (' + c.num + ')', 16) + this.widthConstant.checkBox.tagBlankTotal + this.widthConstant.checkBox.boxMargin
this.$set(c, 'width', width) // 总宽 this.$set(c, 'width', width) // 总宽
} }
}) })

View File

@@ -14,6 +14,7 @@
<!-- 临时文本dom用来计算文本长度 --> <!-- 临时文本dom用来计算文本长度 -->
<span class="temp-dom"></span> <span class="temp-dom"></span>
<span class="temp-dom--12"></span> <span class="temp-dom--12"></span>
<span class="temp-dom--16"></span>
</div> </div>
</template> </template>