ic-picker-label.vue 434 B

1234567891011121314151617
  1. <script>
  2. export default {
  3. name: 'IcPickerLabel',
  4. functional: true,
  5. render: (h, ctx) => {
  6. const vnodes = ctx.props.vnodes
  7. if (
  8. Object.prototype.hasOwnProperty.call(vnodes, 'label') &&
  9. Object.prototype.hasOwnProperty.call(vnodes, 'value')
  10. ) {
  11. return <span title={ctx.props.vnodes.value}>{ctx.props.vnodes.label}</span>
  12. } else {
  13. return <span>{ctx.props.vnodes}</span>
  14. }
  15. },
  16. }
  17. </script>