修复组件缺少名字的问题
This commit is contained in:
@@ -7,9 +7,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import http from "dui/lib/js/request";
|
import http from "dui/lib/js/request";
|
||||||
export default {
|
|
||||||
name: '',
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AiDvMap',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timer: null,
|
timer: null,
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
bind(el, binding) {
|
bind(el, binding) {
|
||||||
let width = ''
|
let width = ''
|
||||||
let height = ''
|
let height = ''
|
||||||
|
|
||||||
function isReize() {
|
function isReize() {
|
||||||
const style = document.defaultView.getComputedStyle(el)
|
const style = document.defaultView.getComputedStyle(el)
|
||||||
if (width !== style.width || height !== style.height) {
|
if (width !== style.width || height !== style.height) {
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
width = style.width
|
width = style.width
|
||||||
height = style.height
|
height = style.height
|
||||||
}
|
}
|
||||||
|
|
||||||
el.__vueSetInterval__ = setInterval(isReize, 300)
|
el.__vueSetInterval__ = setInterval(isReize, 300)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ const install = function (Vue) {
|
|||||||
let contexts = require.context('.', true, /[\\\/]Ai([^\\\/]+)\.vue$/);
|
let contexts = require.context('.', true, /[\\\/]Ai([^\\\/]+)\.vue$/);
|
||||||
if (contexts) {
|
if (contexts) {
|
||||||
contexts.keys().map((e) => {
|
contexts.keys().map((e) => {
|
||||||
console.log(e)
|
|
||||||
components.push(contexts(e).default);
|
components.push(contexts(e).default);
|
||||||
Vue.component(contexts(e).default.name, contexts(e).default);
|
Vue.component(contexts(e).default.name, contexts(e).default);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user