Commit b4152fb1 by xinla

公用组件优化等

1 parent 2b0610ad
......@@ -17,6 +17,11 @@ export default {
request: {
type: Function,
},
// 是否在创建的时候自动调用request接口请求
isCreateRequest: {
type: Boolean,
default: true,
},
// 自定义的查询参数处理方法,可用于添加和修改查询参数
dealQueryFun: {
......@@ -68,7 +73,7 @@ export default {
computed: {},
watch: {},
created() {
this.getList()
this.isCreateRequest && this.getList()
},
mounted() {},
methods: {
......@@ -90,7 +95,7 @@ export default {
}
delete query.dateRange
this.request(query)
return this.request(query)
.then(({ rows, total, data }) => {
data = data || rows
// if (!data) return
......@@ -98,6 +103,7 @@ export default {
// 表格
this.data = data
this.total = +total
this.dealDataFun && this.dealDataFun(data, this.data)
} else {
// 自定义echarts图表数据处理
// this.data = data
......
......@@ -297,6 +297,7 @@
.el-form-item__content {
display: block;
line-height: 30px; // 解决某些情况下行内块顶部不对齐,上下缝隙问题
}
.el-form:not(.el-form--inline) {
// .el-form-item {
......@@ -443,7 +444,6 @@
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
border-radius: var(--border-radius-big);
padding: 20px 30px;
}
.el-dialog__title {
font-weight: 500;
......@@ -452,12 +452,18 @@
.el-dialog__footer,
.el-dialog__body {
padding: 0;
margin: 20px 30px;
}
.el-dialog__header {
margin-bottom: 0;
}
.el-dialog__footer {
margin-top: 0;
}
.el-dialog__body {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
margin: 20px 0;
}
.el-dialog__headerbtn {
// top: 18px;
......
......@@ -221,6 +221,11 @@ div:focus {
&tip-color {
color: var(--font-black-6);
}
&tip {
color: var(--font-black-6);
font-size: 12px;
margin-top: 10px;
}
// 粘性底部
&footer-sticky {
position: sticky;
......
......@@ -231,10 +231,7 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
margin: 30px 20px;
padding: 0;
color: var(--font-black-4);
font-size: 14px;
word-break: break-all;
}
.fixed-content {
......
......@@ -8,9 +8,9 @@
<img class="portrait-img" :src="$store.user.avatar" alt="" v-if="$store.user.avatar" />
<!-- <svg-icon icon="user" class="code-user" v-else></svg-icon> -->
</div>
<div class="wel toe">
<span>{{ greetings }},{{ $store.user.name }}</span>
</div>
<el-tooltip :content="$store.user.name" placement="top-end" effect="light">
<div class="wel toe">{{ greetings }},{{ $store.user.name }}</div>
</el-tooltip>
<div class="role toe g-bg-lg">{{ roleGroup || '管理员' }}</div>
</div>
......@@ -443,6 +443,7 @@ export default {
font-size: 22px;
font-weight: bold;
margin: 2px 0 16px;
width: 100%;
}
.role {
position: relative;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!