修复组件缺少名字的问题

This commit is contained in:
aixianling
2023-03-29 14:43:34 +08:00
parent e29c00477b
commit d0ed795da2
2 changed files with 216 additions and 215 deletions

View File

@@ -7,9 +7,9 @@
<script>
import * as echarts from 'echarts'
import http from "dui/lib/js/request";
export default {
name: '',
export default {
name: 'AiDvMap',
data() {
return {
timer: null,
@@ -22,6 +22,7 @@
bind(el, binding) {
let width = ''
let height = ''
function isReize() {
const style = document.defaultView.getComputedStyle(el)
if (width !== style.width || height !== style.height) {
@@ -33,6 +34,7 @@
width = style.width
height = style.height
}
el.__vueSetInterval__ = setInterval(isReize, 300)
},

View File

@@ -18,7 +18,6 @@ const install = function (Vue) {
let contexts = require.context('.', true, /[\\\/]Ai([^\\\/]+)\.vue$/);
if (contexts) {
contexts.keys().map((e) => {
console.log(e)
components.push(contexts(e).default);
Vue.component(contexts(e).default.name, contexts(e).default);
});