daief / daisyui-vue

(WIP) Vue3 UI components based on daisyui.
https://daief.tech/daisyui-vue/components/button
Apache License 2.0
163 stars 9 forks source link

Tabs don't record value #3

Closed adavie1 closed 1 year ago

adavie1 commented 1 year ago

Environment:

This is my code:

    <Tabs v-model="currentTab" type="boxed" size="xs">

      <Tab name="rta" title="Acquire">
      Acquire
      </Tab>
      <Tab name="rts" title="Share">
       RTS
      </Tab>

      <Tab name="rtu" title="Upgrade" />
      <Tab name="rtb" title="Backhaul" />
    </Tabs>
...
export default {
  data () {
    return {
      currentTab: 'rts'
    }
  }
}

The currentTab doesn't change. When follow the sample code: In script setup: const currentTab = ref('rts');

<Tabs v-model={[currentTab.value, 'value']}> I get an error: image

The value of currentTab doesn't change: image

Select Upgrade: image

daief commented 1 year ago

Thank you for your feedback.

Tabs does has some problem. But I am a little busy recently, I will fix it when I have time.

But it is ok in normal case, demo: https://codesandbox.io/s/daisyui-vue-3-lp7i8d

Secondly, <Tabs v-model={[currentTab.value, 'value']}> is a jsx syntax that can not be written in template.

adavie1 commented 1 year ago

No problem. Ah JSX syntax, no wonder I didn't recognise it! Thought TS thing or Vue 3 thing.

daief commented 1 year ago

The problem is fixed(0.0.1-alpha.12).

But there are two breaking changes(I am sorry this library is in early development):