【问题标题】:Quasar2 Vue3 q-popup-edit @save event never calledQuasar2 Vue3 q-popup-edit @save 事件从未调用
【发布时间】:2023-01-07 04:45:34
【问题描述】:

我有以下模板:

<template>
  <q-item tag="label" v-ripple>
    <q-popup-edit
      v-model="editedModel"
      @before-show="onFieldClick"
      @save="setValue"
      :cover="false"
      fit
      buttons
    >
      <template v-slot:title>
        <div class="text-mono">{{ name }}</div>
      </template>
      <q-select
        dense
        autofocus
        emit-value
        v-model="editedModel"
        multiple
        :options="options"
        counter
      />
    </q-popup-edit>
    <q-item-section>
      <q-item-label class="text-mono">{{ name }}</q-item-label>
      <q-item-label caption>{{ description }}</q-item-label>
      <q-item-label caption>{{ model }}</q-item-label>
    </q-item-section>
  </q-item>
</template>

@save 方法永远不会被调用。我想念什么?谢谢。

【问题讨论】:

  • 你解决了吗?我遇到了同样的问题。

标签: events popup vuejs3 quasar-framework editbox


【解决方案1】:

对我来说,做了以下工作: 我补充道:v-slot="范围"到q-popup-edit

<q-popup-edit v-model="initialValue"v-slot="范围"按钮@save="save()">

然后我将 q-input 中的 v-model 替换为:

<q-输入v-model="scope.value">

【讨论】:

    猜你喜欢
    • 2021-12-14
    • 2020-02-10
    • 2014-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-20
    相关资源
    最近更新 更多