forked from github/dataease
feat: 大改前存档
This commit is contained in:
parent
396285ad69
commit
acdfd5015f
@ -13,7 +13,6 @@ export default {
|
||||
const item = context.props.item
|
||||
return createElement(item.component, {
|
||||
props: {
|
||||
options: item.options,
|
||||
element: item
|
||||
},
|
||||
on: {
|
||||
|
@ -15,16 +15,19 @@
|
||||
export default {
|
||||
|
||||
props: {
|
||||
options: {
|
||||
element: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
options: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.options = this.element.options
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
:visible.sync="filterVisible"
|
||||
custom-class="de-filter-dialog"
|
||||
>
|
||||
<filter-dialog v-if="filterVisible" :widget-id="currentWidgetId" @re-fresh-component="reFreshComponent">
|
||||
<filter-dialog v-if="filterVisible" :component-info="currentComponent" :widget-id="currentWidgetId" @re-fresh-component="reFreshComponent">
|
||||
<de-drawing-widget
|
||||
v-if="filterVisible && currentComponent"
|
||||
:id="'component' + currentComponent.id"
|
||||
@ -272,7 +272,7 @@ export default {
|
||||
this.currentComponent.style.top = e.offsetY
|
||||
this.currentComponent.style.left = e.offsetX
|
||||
this.currentComponent.id = newComponentId
|
||||
this.openFilterDiolog(componentInfo.id)
|
||||
this.openFilterDiolog()
|
||||
return
|
||||
}
|
||||
component = deepCopy(this.currentWidget)
|
||||
@ -308,8 +308,8 @@ export default {
|
||||
this.$store.commit('hideContextMenu')
|
||||
}
|
||||
},
|
||||
openFilterDiolog(widgetId) {
|
||||
this.currentWidgetId = widgetId
|
||||
openFilterDiolog() {
|
||||
this.currentWidgetId = this.currentComponent.name
|
||||
this.filterVisible = true
|
||||
},
|
||||
cancelFilter() {
|
||||
|
@ -159,6 +159,10 @@ export default {
|
||||
widgetId: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
componentInfo: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -185,12 +189,12 @@ export default {
|
||||
if (values && values.length > 0) {
|
||||
const value = values[0]
|
||||
const fieldId = value.id
|
||||
this.widget && this.widget.setOptionDatas && fieldValues(fieldId).then(res => {
|
||||
this.componentInfo && this.componentInfo.setOptionDatas && fieldValues(fieldId).then(res => {
|
||||
const datas = res.data.map(item => {
|
||||
return { id: item, text: item }
|
||||
})
|
||||
this.widget.setOptionDatas(datas)
|
||||
this.$emit('re-fresh-component', this.widget)
|
||||
this.componentInfo.setOptionDatas(datas)
|
||||
this.$emit('re-fresh-component', this.componentInfo)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user