feat: 时间选择器配置面板,时间格式化配置添加说明

main
wu.jian2 2 years ago
parent bc0079e155
commit d564f71fa1

@ -89,6 +89,7 @@
v-model="config.customize.formatType"
class="bs-el-select"
popper-class="bs-el-select"
clearable
@change="selectFormatType"
>
<el-option
@ -103,10 +104,22 @@
v-if="config.customize.formatType === 'custom'"
label="自定义时间格式"
>
<el-input
v-model="config.customize.valueFormat"
placeholder="例如HH:mm:ss"
/>
<div class="time-format-description">
<el-input
v-model="config.customize.valueFormat"
placeholder="例如HH:mm:ss"
clearable
/>
<el-tooltip
content="时间格式示例HH表示小时24小时制mm表示分钟ss表示秒"
placement="top"
>
<span
class="el-icon-question"
style="color:#9e9e9e"
/>
</el-tooltip>
</div>
</el-form-item>
</div>
</el-form>
@ -175,13 +188,15 @@ export default {
watch: {},
mounted () {},
methods: {
selectFormatType (val) {
if (val === 'default') {
selectFormatType (type) {
if (type === 'default') {
this.config.customize.value = ''
this.config.customize.valueFormat = ''
} else if (val === 'timestamp') {
} else if (type === 'timestamp') {
this.config.customize.value = 0
this.config.customize.valueFormat = 'timestamp'
} else if (type === 'custom') {
this.config.customize.valueFormat = 'HH:mm:ss'
}
}
}
@ -193,4 +208,11 @@ export default {
width: 97%;
padding: 16px;
}
.time-format-description{
display: flex;
align-items: center;
.el-tooltip{
margin-left: 5px;
}
}
</style>

@ -9,8 +9,6 @@
<style lang="scss" scoped>
.lc-field-head {
height: 30px;
// margin-bottom: 12px;
.lc-field-title {
width: 308px;
//
@ -21,7 +19,6 @@
padding-left: 12px;
line-height: 30px;
height: 30px;
&:after {
position: absolute;
left: 0;

Loading…
Cancel
Save