()
| 98 | } |
| 99 | |
| 100 | getSourceValue () { |
| 101 | const el = this.sourceEl |
| 102 | |
| 103 | if (!el) return |
| 104 | |
| 105 | const tag = el.tagName.toLowerCase() |
| 106 | const type = (el.getAttribute('type') || '').toLowerCase() |
| 107 | |
| 108 | if (tag === 'select') return el.value |
| 109 | if (tag === 'textarea') return el.value |
| 110 | if (tag === 'input' && type === 'checkbox') return el.checked ? (el.value || '1') : null |
| 111 | if (tag === 'input') return el.value |
| 112 | |
| 113 | return el.value ?? null |
| 114 | } |
| 115 | |
| 116 | isEmpty (obj) { |
| 117 | if (obj == null) return true |