Merge remote-tracking branch 'origin/master'

main
liu.shiyi 2 years ago
commit 9087318352

@ -15,6 +15,7 @@
class="input" class="input"
:placeholder="config.customize.placeholderStyle.placeholder" :placeholder="config.customize.placeholderStyle.placeholder"
:style="{ backgroundColor: config.customize.backgroundStyle.backgroundColor }" :style="{ backgroundColor: config.customize.backgroundStyle.backgroundColor }"
@input="handleInput"
> >
<i <i
v-if="config.customize.icon.position === 'left' && config.customize.icon.name" v-if="config.customize.icon.position === 'left' && config.customize.icon.name"
@ -48,7 +49,9 @@ export default {
} }
}, },
data () { data () {
return { } return {
timer: null
}
}, },
watch: { watch: {
'config.customize': { 'config.customize': {
@ -61,6 +64,10 @@ export default {
mounted () { mounted () {
this.chartInit() this.chartInit()
}, },
beforeDestroy () {
//
clearTimeout(this.timer)
},
methods: { methods: {
changeStyle (config, isUpdateTheme) { changeStyle (config, isUpdateTheme) {
config = { ...this.config, ...config } config = { ...this.config, ...config }
@ -86,6 +93,18 @@ export default {
this.changeActiveItemConfig(config) this.changeActiveItemConfig(config)
} }
} }
},
handleInput (val) {
//
this.debounce(() => {
this.linkage({ [this.config.code]: val })
})
},
debounce (fn, delay = 500) {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
fn()
}, delay)
} }
} }
} }

@ -1,12 +1,13 @@
import { commonConfig } from 'data-room-ui/js/config' import { commonConfig, displayOption } from 'data-room-ui/js/config'
export const settingConfig = { export const settingConfig = {
title: '输入框',
displayOption: { displayOption: {
dataAllocation: { ...displayOption,
// 是否存在数据配置 dataAllocation: { enable: true },
enable: false dataSourceType: { enable: false },
} params: { enable: false }
} }
} }
const customConfig = { const customConfig = {

@ -45,23 +45,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作符" label="映射规则"
align="center" align="center"
> >
<template #default="scope"> <span>等于</span>
<el-select
v-model="configMapConfig.maps[scope.$index].queryRule"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="operator in operatorList"
:key="operator.value"
:label="operator.label"
:value="operator.value"
/>
</el-select>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="目标组件接收参数" label="目标组件接收参数"

@ -674,7 +674,7 @@ export default {
value: field.name || field.fieldName value: field.name || field.fieldName
})) || [] })) || []
if (this.config.type === 'timePicker') { if (['input', 'timePicker', 'dateTimePicker'].includes(this.config.type)) {
modifiedList.push({ label: '当前组件值', value: this.config.code }) modifiedList.push({ label: '当前组件值', value: this.config.code })
} }
return modifiedList return modifiedList

@ -26,7 +26,7 @@ const typeList = [
'screenScrollBoard', 'screenScrollBoard',
'video', 'video',
'input', 'input',
'button', // 'button',
'marquee', 'marquee',
'chartTab', 'chartTab',
'themeSwitcher', 'themeSwitcher',

@ -185,7 +185,9 @@ export default {
}).catch(err => { }).catch(err => {
console.info(err) console.info(err)
}).finally(() => { }).finally(() => {
config.loading = false if (config) {
config.loading = false
}
resolve(config) resolve(config)
}) })
}) })

@ -188,18 +188,18 @@ export default function getComponentConfig (type) {
y: 0, y: 0,
type type
} }
case 'button': // case 'button':
return { // return {
name: '按钮', // name: '按钮',
title: '按钮', // title: '按钮',
icon: Icon.getNameList()[14], // icon: Icon.getNameList()[14],
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenButtonChart', // className: 'com.gccloud.dataroom.core.module.chart.components.ScreenButtonChart',
w: 80, // w: 80,
h: 40, // h: 40,
x: 0, // x: 0,
y: 0, // y: 0,
type // type
} // }
case 'marquee': case 'marquee':
return { return {
name: '跑马灯', name: '跑马灯',

Loading…
Cancel
Save