fix:修改打包后 组件不显示的问题
This commit is contained in:
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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'
|
||||||
|
}
|
||||||
@@ -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'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user