opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.66k stars 264 forks source link

🐛 [Bug]: ColorPicker v-model 没有双向绑定 #1684

Closed ichynul closed 3 months ago

ichynul commented 4 months ago

Version

3.16

Vue Version

3.x

Link to minimal reproduction

<template>
  <div>
    已选:{{color}}
    <tiny-color-picker v-model="color" />
  </div>
</template>

<script>
import { ColorPicker } from '@opentiny/vue'
export default {
  components: {
    TinyColorPicker: ColorPicker
  },
  data() {
    return {
      color: '#000000'
    }
  }
}
</script>

Step to reproduce

选择颜色后,没有改变color

What is expected

No response

What is actually happening

No response

What is your project name

builder

Any additional comments (optional)

No response

https://www.opentiny.design/vue-playground?mode=pc&theme=default#3.16|eyJzcmMvQXBwLnZ1ZSI6IjxzY3JpcHQgbGFuZz1cInRzeFwiPlxyXG4vLyDlvJXlhaUgQG9wZW50aW55L3Z1ZSDnu4Tku7ZcclxuaW1wb3J0IHsgQnV0dG9uLCBMaW5rIH0gZnJvbSAnQG9wZW50aW55L3Z1ZSdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICBjb21wb25lbnRzOiB7XHJcbiAgICBUaW55QnV0dG9uOiBCdXR0b24sXHJcbiAgICBUaW55TGluazogTGlua1xyXG4gIH0sXHJcbiAgZGF0YSgpIHtcclxuICAgIHJldHVybiB7XHJcbiAgICAgIG1zZzogJ2hlbGxvIHdvcmxkISdcclxuICAgIH1cclxuICB9XHJcbn1cclxuPC9zY3JpcHQ+XHJcblxyXG48dGVtcGxhdGU+XHJcbiAgPFRpbnlCdXR0b24+56Gu5a6aPC9UaW55QnV0dG9uPlxyXG4gIDxoMT57eyBtc2cgfX08L2gxPlxyXG4gIDxkaXYgY2xhc3M9XCJ0aW55dnVlXCI+XHJcbiAgICA8ZGl2IGNsYXNzPVwidGlueXZ1ZS1wYWdlXCI+XHJcbiAgICAgIHRpbnl2dWVcclxuICAg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ZVJlc29sdXRpb25cIjogXCJCdW5kbGVyXCIsXHJcbiAgICBcImFsbG93SW1wb3J0aW5nVHNFeHRlbnNpb25zXCI6IHRydWVcclxuICB9LFxyXG4gIFwidnVlQ29tcGlsZXJPcHRpb25zXCI6IHtcclxuICAgIFwidGFyZ2V0XCI6IDMuM1xyXG4gIH1cclxufVxyXG4iLCJiYXNlLnZ1ZSI6Ijx0ZW1wbGF0ZT5cbiAgPGRpdj5cbiAgICDlt7LpgInvvJp7e2NvbG9yfX1cbiAgICA8dGlueS1jb2xvci1waWNrZXIgdi1tb2RlbD1cImNvbG9yXCIgLz5cbiAgPC9kaXY+XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0PlxuaW1wb3J0IHsgQ29sb3JQaWNrZXIgfSBmcm9tICdAb3BlbnRpbnkvdnVlJ1xuZXhwb3J0IGRlZmF1bHQge1xuICBjb21wb25lbnRzOiB7XG4gICAgVGlueUNvbG9yUGlja2VyOiBDb2xvclBpY2tlclxuICB9LFxuICBkYXRhKCkge1xuICAgIHJldHVybiB7XG4gICAgICBjb2xvcjogJyMwMDAwMDAnXG4gICAgfVxuICB9XG59XG48L3NjcmlwdD5cbiIsIl9vIjp7fX0=
Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: ColorPicker v-model does not have two-way binding