Skip to content

Commit

Permalink
refactor(baInput):优化 FormItem 的 props.tip
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed Jun 26, 2024
1 parent a85d7b7 commit 7db6514
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/formItem/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default defineComponent({
type: String,
default: '',
},
tip: [String, Object],
...formItemProps,
},
emits: ['update:modelValue'],
Expand Down Expand Up @@ -91,7 +92,7 @@ export default defineComponent({
if (attrs.tip) {
const createTipNode = () => {
const tipProps = typeof attrs.tip === 'string' ? { content: attrs.tip } : attrs.tip
const tipProps = typeof attrs.tip === 'string' ? { content: attrs.tip, placement: 'top' } : attrs.tip
return createVNode(resolveComponent('el-tooltip'), tipProps, {
default: () => [
createVNode('i', {
Expand Down

0 comments on commit 7db6514

Please sign in to comment.