Skip to content

Commit

Permalink
addDefaultValue
Browse files Browse the repository at this point in the history
  • Loading branch information
bbenggo authored Jan 18, 2024
1 parent 0e6b7e0 commit c8b8890
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ma-colorPicker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</a-input-group>
</template>
<script setup>
import { ref, watch, reactive } from 'vue'
import { ref, watch, reactive, onMounted } from 'vue'
import { ColorPicker } from 'vue-color-kit'
import 'vue-color-kit/dist/vue-color-kit.css'
import { generate, getRgbStr } from '@arco-design/color'
Expand All @@ -34,6 +34,10 @@ const props = defineProps({
placeholder: { type: String, default: '请选择颜色' },
})
onMounted(() => {
val.value = props.modelValue
})
const selectColor = (color) => {
val.value = color.hex
}
Expand Down

0 comments on commit c8b8890

Please sign in to comment.