All files / src/components/u-steps.vue step.vue

100% Statements 12/12
42.85% Branches 3/7
100% Functions 1/1
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31      7x   7x     7x                                            
<template>
<div v-show="selected" vusion-slot-name="default">
    <slot></slot>
    <s-empty v-if="!$slots.default && $env.VUE_APP_DESIGNER && !!$attrs['vusion-node-path']"></s-empty>
</div>
</template>
 
<script>
import { UTab } from '../u-tabs.vue';
import SEmpty from '../s-empty.vue';
 
export default {
    name: 'u-step',
    parentName: 'u-steps',
    components: { SEmpty },
    extends: UTab,
    props: {
        value: { type: Number, default: 0 },
        desc: { type: String, default: null },
        icon: { type: String, default: null },
        readonly: { type: Boolean, default: false },
        status: String,
    },
    computed: {
        index() {
            return this.parentVM && this.parentVM.itemVMs.indexOf(this);
        },
    },
};
</script>