LCOV - code coverage report
Current view: top level - src/components/SSVGPropEdit - RelationEditValue.vue.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 2 9 22.2 %
Date: 2025-06-29 02:18:36 Functions: 1 5 20.0 %

          Line data    Source code
       1             : // @ts-check
       2             : 
       3             : import Vue from "vue";
       4             : import BadgeButton from "../BadgeButton.vue";
       5             : 
       6             : /**
       7             :  * @typedef {any} EndEvent
       8             :  */
       9             : 
      10           1 : const component = /** @type {V.Constructor<any, any>} */ (Vue).extend({
      11             :   name: "RelationEditValue",
      12             :   components: { BadgeButton },
      13             :   props: { value: { type: String, default: "" } },
      14             :   /** @return {{ current: any, showReset: boolean }} */
      15             :   data() {
      16           2 :     return { current: "", showReset: false };
      17             :   },
      18             :   watch: {
      19             :     value() {
      20           0 :       this.current = this.value;
      21             :     }
      22             :   },
      23             :   methods: {
      24             :     onEdit() {
      25           0 :       this.showReset = true;
      26           0 :       this.$emit("edit", this.current);
      27             :     },
      28             :     /**
      29             :      * @param {string} value
      30             :      */
      31             :     setValue(value) {
      32           0 :       this.current = value;
      33           0 :       this.onEdit();
      34             :     },
      35             :     doReset() {
      36           0 :       this.showReset = false;
      37           0 :       this.$emit("reset");
      38             :     }
      39             :   }
      40             : });
      41             : export default component;

Generated by: LCOV version 1.16