diff --git a/frontend/src/components/canvas/components/Editor/Shape.vue b/frontend/src/components/canvas/components/Editor/Shape.vue index 2fdc44c1b8..2191c2886e 100644 --- a/frontend/src/components/canvas/components/Editor/Shape.vue +++ b/frontend/src/components/canvas/components/Editor/Shape.vue @@ -36,15 +36,18 @@ export default { }, element: { require: true, - type: Object + type: Object, + default: null }, defaultStyle: { require: true, - type: Object + type: Object, + default: null }, index: { require: true, - type: [Number, String] + type: [Number, String], + default: null } }, data() { @@ -200,6 +203,7 @@ export default { pointList.forEach(point => { const angle = mod360(initialAngle[point] + rotate) const len = angleToCursor.length + // eslint-disable-next-line no-constant-condition while (true) { lastMatchIndex = (lastMatchIndex + 1) % len const angleLimit = angleToCursor[lastMatchIndex] diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index aef84fac77..77a6809e46 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -40,7 +40,8 @@ export default { components: { ChartComponent, TableNormal, LabelNormal }, props: { element: { - type: Object + type: Object, + default: null }, filter: { type: Object, @@ -59,38 +60,6 @@ export default { } } }, - watch: { - '$store.getters.conditions': function(newVal, oldVal) { - this.filter.filter = newVal - this.getData(this.element.propValue.viewId) - }, - filter(val) { - this.getData(this.element.propValue.viewId) - }, - // deep监听panel 如果改变 提交到 store - canvasStyleData: { - handler(newVal, oldVla) { - // this.chart.stylePriority == panel 优先使用仪表板样式 - this.mergeStyle() - }, - deep: true - }, - // 监听外部的样式变化 - outStyle: { - handler(newVal, oldVla) { - if (this.$refs[this.element.propValue.id]) { - this.$refs[this.element.propValue.id].chartResize() - } - }, - deep: true - } - }, - created() { - this.refId = uuid.v1 - }, - computed: mapState([ - 'canvasStyleData' - ]), data() { return { refId: null, @@ -120,8 +89,35 @@ export default { message: null } }, + computed: mapState([ + 'canvasStyleData' + ]), + watch: { + filter(val) { + this.getData(this.element.propValue.viewId) + }, + // deep监听panel 如果改变 提交到 store + canvasStyleData: { + handler(newVal, oldVla) { + // this.chart.stylePriority == panel 优先使用仪表板样式 + this.mergeStyle() + }, + deep: true + }, + // 监听外部的样式变化 + outStyle: { + handler(newVal, oldVla) { + if (this.$refs[this.element.propValue.id]) { + this.$refs[this.element.propValue.id].chartResize() + } + }, + deep: true + } + }, + created() { - this.filter.filter = this.$store.getters.conditions + this.refId = uuid.v1 + // this.filter.filter = this.$store.getters.conditions this.getData(this.element.propValue.viewId) }, mounted() { diff --git a/frontend/src/views/system/authority/components/LazyTree.vue b/frontend/src/views/system/authority/components/LazyTree.vue index 126e2f0b92..c341d1cb1c 100644 --- a/frontend/src/views/system/authority/components/LazyTree.vue +++ b/frontend/src/views/system/authority/components/LazyTree.vue @@ -57,7 +57,8 @@ export default { }, authCondition: { type: Object, - required: false + required: false, + default: null }, dataInfo: { type: Object, @@ -67,7 +68,10 @@ export default { type: String, required: true }, - attachActiveName: String, + attachActiveName: { + type: String, + default: null + }, defaultProps: { type: Object, required: false, diff --git a/frontend/src/views/system/datasource/index.vue b/frontend/src/views/system/datasource/index.vue index f3c0b77c96..f476f3c2b7 100644 --- a/frontend/src/views/system/datasource/index.vue +++ b/frontend/src/views/system/datasource/index.vue @@ -92,7 +92,7 @@ import LayoutContent from '@/components/business/LayoutContent' import ComplexTable from '@/components/business/complex-table' -import { checkPermission, hasDataPermission } from '@/utils/permission' +import { hasDataPermission } from '@/utils/permission' import { formatCondition } from '@/utils/index' import { dsGrid, addDs, editDs, delDs, validateDs } from '@/api/system/datasource'