mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 06:46:00 +00:00
feat: add xml preview
This commit is contained in:
@@ -44,6 +44,12 @@
|
||||
component: HtmlCellView,
|
||||
single: false,
|
||||
},
|
||||
{
|
||||
type: 'xml',
|
||||
title: 'XML',
|
||||
component: XmlCellView,
|
||||
single: false,
|
||||
},
|
||||
{
|
||||
type: 'map',
|
||||
title: 'Map',
|
||||
@@ -68,6 +74,9 @@
|
||||
if (_.isPlainObject(value) || _.isArray(value)) {
|
||||
return 'json';
|
||||
}
|
||||
if (typeof value === 'string' && value.startsWith('<') && value.endsWith('>')) {
|
||||
return 'xml';
|
||||
}
|
||||
return 'textWrap';
|
||||
}
|
||||
|
||||
@@ -91,6 +100,7 @@
|
||||
import { selectedCellsCallback } from '../stores';
|
||||
import WidgetTitle from './WidgetTitle.svelte';
|
||||
import JsonExpandedCellView from '../celldata/JsonExpandedCellView.svelte';
|
||||
import XmlCellView from '../celldata/XmlCellView.svelte';
|
||||
|
||||
let selectedFormatType = 'autodetect';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user