fix:修改打包后 组件不显示的问题

This commit is contained in:
zhangyu
2022-02-23 09:12:50 +08:00
parent 8ac0e8ed2c
commit 86b390ad19
4 changed files with 12 additions and 78 deletions

View File

@@ -1,76 +0,0 @@
import _ from 'lodash'
export const connection = 'connection'
export const condition = 'condition'
export const columnType = {
fullText: 'fullText',
string: 'string',
long: 'long',
number: 'number',
array: 'array'
}
export default class Meta {
// meta元数据有两种一是condition表示字段、操作符、值的组合二是connection是condition之间的连接符AND | OR
constructor (type) {
switch (type) {
case connection: {
this.newConnection()
break
}
default: {
this.newCondition()
break
}
}
}
newConnection () {
this.meta = connection
this.value = 'AND'
this.isEditing = false
}
newCondition () {
this.meta = condition
this.name = ''
this.nameIsEditing = false
this.oper = ''
this.operIsEditing = false
this.value = ''
this.valueIsEditing = false
}
isEmpty () {
if (this.meta === condition) {
return _.isEmpty(this.name)
} else {
return true
}
}
// 取消editing状态
cancelEditing () {
if (this.meta === condition) {
this.nameIsEditing = false
this.operIsEditing = false
this.valueIsEditing = false
}
if (this.meta === connection) {
this.isEditing = false
}
}
// 是否是完整的condition
isCompleteCondition () {
return this.name && this.oper && this.value
}
resetOperator () {
this.oper = ''
this.operIsEditing = false
}
resetValue () {
this.value = ''
this.valueIsEditing = false
}
}

View File

@@ -68,7 +68,7 @@
</template> </template>
<script> <script>
import { connection, condition } from './filterSearch.js' import { connection, condition } from './filterSearchData.js'
export default { export default {
name: 'filterSearch', name: 'filterSearch',
props: { props: {

View File

@@ -0,0 +1,10 @@
import _ from 'lodash'
export const connection = 'connection'
export const condition = 'condition'
export const columnType = {
fullText: 'fullText',
string: 'string',
long: 'long',
number: 'number',
array: 'array'
}

View File

@@ -590,7 +590,7 @@
import publicConfig from '@/components/common/rightBox/chart/publicConfig' import publicConfig from '@/components/common/rightBox/chart/publicConfig'
import chartTypeShow from '@/components/common/rightBox/chart/chartTypeShow' import chartTypeShow from '@/components/common/rightBox/chart/chartTypeShow'
import nezhaColor from '@/components/common/nezhaColor' import nezhaColor from '@/components/common/nezhaColor'
import filterSearch, { condition } from '@/components/common/filterSearch/filterSearch' import filterSearch from '@/components/common/filterSearch/filterSearch.vue'
import VueTagsInput from '@johmun/vue-tags-input' import VueTagsInput from '@johmun/vue-tags-input'
import { isGauge } from '@/components/chart/chart/tools' import { isGauge } from '@/components/chart/chart/tools'