mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 00:37:33 +00:00
update config
This commit is contained in:
parent
09646c0d69
commit
ebb627f198
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LegendOptions } from "@/types/dashboard";
|
||||
import { isUnDef } from "@/utils/is";
|
||||
import { isDef } from "@/utils/is";
|
||||
|
||||
export default function useLegendProcess(legend?: LegendOptions) {
|
||||
let isRight = false;
|
||||
@ -23,7 +23,7 @@ export default function useLegendProcess(legend?: LegendOptions) {
|
||||
isRight = true;
|
||||
}
|
||||
function showEchartsLegend(keys: string[]) {
|
||||
if (legend && isUnDef(legend.show)) {
|
||||
if (legend && isDef(legend.show)) {
|
||||
if (legend.asTable && legend.show) {
|
||||
return false;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export function is(val: unknown, type: string): boolean {
|
||||
}
|
||||
|
||||
export function isDef<T = unknown>(val?: T): val is T {
|
||||
return typeof val === "undefined";
|
||||
return typeof val !== "undefined";
|
||||
}
|
||||
|
||||
export function isUnDef<T = unknown>(val?: T): val is T {
|
||||
|
@ -23,15 +23,17 @@ limitations under the License. -->
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{ t("legendOptions") }}</span>
|
||||
<span class="title mr-5">{{ t("asTable") }}</span>
|
||||
<span class="label">{{ t("asTable") }}</span>
|
||||
<el-switch
|
||||
v-model="legend.asTable"
|
||||
active-text="Yes"
|
||||
inactive-text="No"
|
||||
@change="updateLegendConfig({ asTable: legend.asTable })"
|
||||
/>
|
||||
<span class="title ml-20 mr-5">{{ t("toTheRight") }}</span>
|
||||
</div>
|
||||
<div v-show="legend.asTable">
|
||||
<span class="label">{{ t("legendOptions") }}</span>
|
||||
<span class="title mr-5">{{ t("toTheRight") }}</span>
|
||||
<el-switch
|
||||
v-model="legend.toTheRight"
|
||||
active-text="Yes"
|
||||
@ -47,7 +49,7 @@ limitations under the License. -->
|
||||
@change="updateLegendConfig({ width: legend.width })"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div v-show="legend.asTable">
|
||||
<span class="label">{{ t("legendValues") }}</span>
|
||||
<span class="title mr-5">{{ t("min") }}</span>
|
||||
<el-switch
|
||||
|
Loading…
Reference in New Issue
Block a user