Merge pull request #11743 from dataease/pr@dev-v2@style_tab

style: 轮播设置样式调整
This commit is contained in:
王嘉豪 2024-08-26 13:40:50 +08:00 committed by GitHub
commit 109bf550f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,8 +23,24 @@ const carouselInfo = computed(() => {
})
const onSettingChange = () => {
// 11
if (!carouselInfo.value.time || carouselInfo.value.time < 1) {
carouselInfo.value.time = 1
}
snapshotStore.recordSnapshotCache('renderChart')
}
const handleInput = value => {
// 使
const integerValue = String(value).replace(/[^0-9]/g, '')
carouselInfo.value.time = integerValue ? parseInt(integerValue, 10) : null
// 11
if (carouselInfo.value.time < 1) {
carouselInfo.value.time = 1
}
}
</script>
<template>
@ -41,7 +57,7 @@ const onSettingChange = () => {
:class="'form-item-' + themes"
style="width: 50%; margin-bottom: 8px"
>
<span style="font-size: 12px">轮播时间</span>
<span style="font-size: 12px">轮播时间</span>
<el-tooltip class="item" :effect="themes" placement="top">
<template #content>
<div>Tab轮播退出编辑模式才开生效</div>
@ -51,17 +67,18 @@ const onSettingChange = () => {
</el-icon>
</el-tooltip>
<el-input
<el-input-number
v-model="carouselInfo.time"
:effect="themes"
type="number"
:min="1"
:max="3600"
:step="1"
:disabled="!carouselInfo.enable"
controls-position="right"
@input="handleInput"
@change="onSettingChange"
>
<template #append> </template>
</el-input>
</el-input-number>
</el-form-item>
</el-form>
</el-row>