style: 格式化代码
This commit is contained in:
parent
b0a43a70e6
commit
31ea31dde8
|
@ -30,8 +30,8 @@ const iconSize = computed(() => {
|
||||||
return unref(size) === 'small'
|
return unref(size) === 'small'
|
||||||
? 'var(--el-component-size-small)'
|
? 'var(--el-component-size-small)'
|
||||||
: unref(size) === 'large'
|
: unref(size) === 'large'
|
||||||
? 'var(--el-component-size-large)'
|
? 'var(--el-component-size-large)'
|
||||||
: 'var(--el-component-size)'
|
: 'var(--el-component-size)'
|
||||||
})
|
})
|
||||||
|
|
||||||
const iconWrapStyle = computed((): CSSProperties => {
|
const iconWrapStyle = computed((): CSSProperties => {
|
||||||
|
|
|
@ -330,12 +330,12 @@ export default defineComponent({
|
||||||
return children && children.length
|
return children && children.length
|
||||||
? renderTreeTableColumn(children)
|
? renderTreeTableColumn(children)
|
||||||
: props?.slots?.default
|
: props?.slots?.default
|
||||||
? props.slots.default(...args)
|
? props.slots.default(...args)
|
||||||
: v?.formatter
|
: v?.formatter
|
||||||
? v?.formatter?.(data.row, data.column, get(data.row, v.field), data.$index)
|
? v?.formatter?.(data.row, data.column, get(data.row, v.field), data.$index)
|
||||||
: isImageUrl
|
: isImageUrl
|
||||||
? renderPreview(get(data.row, v.field))
|
? renderPreview(get(data.row, v.field))
|
||||||
: get(data.row, v.field)
|
: get(data.row, v.field)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (props?.slots?.header) {
|
if (props?.slots?.header) {
|
||||||
|
@ -428,12 +428,12 @@ export default defineComponent({
|
||||||
return children && children.length
|
return children && children.length
|
||||||
? renderTreeTableColumn(children)
|
? renderTreeTableColumn(children)
|
||||||
: props?.slots?.default
|
: props?.slots?.default
|
||||||
? props.slots.default(...args)
|
? props.slots.default(...args)
|
||||||
: v?.formatter
|
: v?.formatter
|
||||||
? v?.formatter?.(data.row, data.column, get(data.row, v.field), data.$index)
|
? v?.formatter?.(data.row, data.column, get(data.row, v.field), data.$index)
|
||||||
: isImageUrl
|
: isImageUrl
|
||||||
? renderPreview(get(data.row, v.field))
|
? renderPreview(get(data.row, v.field))
|
||||||
: get(data.row, v.field)
|
: get(data.row, v.field)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (props?.slots?.header) {
|
if (props?.slots?.header) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ const columns: TableColumn[] = [
|
||||||
cellValue === 1
|
cellValue === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: cellValue === 2
|
: cellValue === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')
|
: t('tableDemo.commonly')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -40,8 +40,8 @@ const columns: TableColumn[] = [
|
||||||
{cellValue === 1
|
{cellValue === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: cellValue === 2
|
: cellValue === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ const columns = reactive<TableColumn[]>([
|
||||||
{cellValue === 1
|
{cellValue === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: cellValue === 2
|
: cellValue === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,8 +82,8 @@ const columns = reactive<TableColumn[]>([
|
||||||
{cellValue === 1
|
{cellValue === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: cellValue === 2
|
: cellValue === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,8 +151,8 @@ const crudSchemas = reactive<CrudSchema[]>([
|
||||||
{data.importance === 1
|
{data.importance === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: data.importance === 2
|
: data.importance === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,8 +168,8 @@ const crudSchemas = reactive<CrudSchema[]>([
|
||||||
{data.importance === 1
|
{data.importance === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: data.importance === 2
|
: data.importance === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,8 @@ const schema = reactive<DescriptionsSchema[]>([
|
||||||
{data.importance === 1
|
{data.importance === 1
|
||||||
? t('tableDemo.important')
|
? t('tableDemo.important')
|
||||||
: data.importance === 2
|
: data.importance === 2
|
||||||
? t('tableDemo.good')
|
? t('tableDemo.good')
|
||||||
: t('tableDemo.commonly')}
|
: t('tableDemo.commonly')}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue