Home > Blockchain >  What is a Vuetify v-menu component 'save' method?
What is a Vuetify v-menu component 'save' method?

Time:09-17

There is an example in Vutetify documentation (https://vuetifyjs.com/en/components/date-pickers/#dialog-and-menu). That example has next template code snippet:

...
      <v-menu
        ref="menu"
        v-model="menu"
        :close-on-content-click="false"
        :return-value.sync="date"
        transition="scale-transition"
        offset-y
        min-width="auto"
      >
        ...
        <v-date-picker
          v-model="date"
          no-title
          scrollable
        >
          ...
          <v-btn
            text
            color="primary"
            @click="$refs.menu.save(date)"
          >
            OK
          </v-btn>
        </v-date-picker>
      </v-menu>

It looks like that when a button click ( @click="$refs.menu.save(date)" ) occurs, some 'save' method of the v-menu component is called. But where is it possible to see information about Vuetify component methods and particularly about that menu save method?

CodePudding user response:

The save() method is provided by the Returnable mixin, which allows control over the value returned by the return-value property.

You can see its source code here.

  • Related