提交 e520101a authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: 格式化前端报错代码

上级 f297fd7a
...@@ -36,15 +36,18 @@ export default { ...@@ -36,15 +36,18 @@ export default {
}, },
element: { element: {
require: true, require: true,
type: Object type: Object,
default: null
}, },
defaultStyle: { defaultStyle: {
require: true, require: true,
type: Object type: Object,
default: null
}, },
index: { index: {
require: true, require: true,
type: [Number, String] type: [Number, String],
default: null
} }
}, },
data() { data() {
...@@ -200,6 +203,7 @@ export default { ...@@ -200,6 +203,7 @@ export default {
pointList.forEach(point => { pointList.forEach(point => {
const angle = mod360(initialAngle[point] + rotate) const angle = mod360(initialAngle[point] + rotate)
const len = angleToCursor.length const len = angleToCursor.length
// eslint-disable-next-line no-constant-condition
while (true) { while (true) {
lastMatchIndex = (lastMatchIndex + 1) % len lastMatchIndex = (lastMatchIndex + 1) % len
const angleLimit = angleToCursor[lastMatchIndex] const angleLimit = angleToCursor[lastMatchIndex]
......
...@@ -40,7 +40,8 @@ export default { ...@@ -40,7 +40,8 @@ export default {
components: { ChartComponent, TableNormal, LabelNormal }, components: { ChartComponent, TableNormal, LabelNormal },
props: { props: {
element: { element: {
type: Object type: Object,
default: null
}, },
filter: { filter: {
type: Object, type: Object,
...@@ -59,38 +60,6 @@ export default { ...@@ -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() { data() {
return { return {
refId: null, refId: null,
...@@ -120,8 +89,35 @@ export default { ...@@ -120,8 +89,35 @@ export default {
message: null 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() { 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) this.getData(this.element.propValue.viewId)
}, },
mounted() { mounted() {
......
...@@ -57,7 +57,8 @@ export default { ...@@ -57,7 +57,8 @@ export default {
}, },
authCondition: { authCondition: {
type: Object, type: Object,
required: false required: false,
default: null
}, },
dataInfo: { dataInfo: {
type: Object, type: Object,
...@@ -67,7 +68,10 @@ export default { ...@@ -67,7 +68,10 @@ export default {
type: String, type: String,
required: true required: true
}, },
attachActiveName: String, attachActiveName: {
type: String,
default: null
},
defaultProps: { defaultProps: {
type: Object, type: Object,
required: false, required: false,
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
import LayoutContent from '@/components/business/LayoutContent' import LayoutContent from '@/components/business/LayoutContent'
import ComplexTable from '@/components/business/complex-table' import ComplexTable from '@/components/business/complex-table'
import { checkPermission, hasDataPermission } from '@/utils/permission' import { hasDataPermission } from '@/utils/permission'
import { formatCondition } from '@/utils/index' import { formatCondition } from '@/utils/index'
import { dsGrid, addDs, editDs, delDs, validateDs } from '@/api/system/datasource' import { dsGrid, addDs, editDs, delDs, validateDs } from '@/api/system/datasource'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论