test-step.vue 652 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <view>
  3. <uv-steps :current="stepIndex" dot>
  4. <uv-steps-item v-for="(item, index) in steps" :key="index" :title="getTitle(index)"></uv-steps-item>
  5. </uv-steps>
  6. </view>
  7. </template>
  8. <script lang="ts" setup>
  9. defineOptions({
  10. name: 'TestStep',
  11. options: {
  12. virtualHost: true,
  13. }
  14. });
  15. import { SYMBOL_TEST_DATA } from '../components/useTest';
  16. const testData = inject(SYMBOL_TEST_DATA);
  17. const { steps, stepIndex } = testData || {};
  18. const order = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'];
  19. const getTitle = (index: number) => {
  20. return order[index];
  21. }
  22. </script>
  23. <style lang="scss" scoped></style>