Giter VIP home page Giter VIP logo

Comments (3)

jahnli avatar jahnli commented on July 23, 2024

如果提供插槽,此刻、确认、清除的事件也要自己写

  <n-date-picker v-model:value="timestamp" type="date">
    <template #clear>
      自定义
    </template>
  </n-date-picker>

from naive-ui.

the-didi avatar the-didi commented on July 23, 2024

如果提供插槽,此刻、确认、清除的事件也要自己写

  <n-date-picker v-model:value="timestamp" type="date">
    <template #clear>
      自定义
    </template>
  </n-date-picker>

提问:是否可以像自定义图标一样自定义此刻按钮,因为我只需要改变此刻确认清除 按钮的样式和文字内容,类似以下这样:

<n-date-picker type="date">
      <template #date-icon>
        <n-icon :size="16" :component="RocketOutline" />
      </template>
      <template #prev-year>
        <n-icon :size="16" :component="ChevronBackCircle" />
      </template>
      <template #prev-month>
        <n-icon :size="16" :component="ChevronBackCircleOutline" />
      </template>
      <template #next-month>
        <n-icon :size="16" :component="ChevronForwardCircleOutline" />
      </template>
      <template #next-year>
        <n-icon :size="16" :component="ChevronForwardCircle" />
      </template>
      <template #clear>
         自定义的此刻按钮
      </template>
    </n-date-picker>

对我而言,如果说需要我自己写此刻确认清除 按钮的事件我也能够接受。

from naive-ui.

jahnli avatar jahnli commented on July 23, 2024

这个应该是可以,我空了跟作者讨论下如何加比较友好,大概率下周之前 PR

from naive-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.