| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-27 11:12:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-08 11:46:35 |
| | | */ |
| | | import { LightningElement, api } from 'lwc'; |
| | | |
| | | export default class LexInputTableCell extends LightningElement { |
| | |
| | | @api field; |
| | | @api fieldType; |
| | | @api type; |
| | | @api required; |
| | | value; |
| | | label; |
| | | connectedCallback() { |
| | | this.value = this.record[this.field]; |
| | | this.label = this.field; |
| | | this.type='text'; |
| | | } |
| | | get isRequired(){ |
| | | return this.required; |
| | | } |
| | | |
| | | handleInputChange(event) { |
| | |
| | | get isText() { |
| | | if(this.fieldType) |
| | | { |
| | | this.type = 'text'; |
| | | return this.fieldType.toLowerCase()=='text'; |
| | | } |
| | | return false; |
| | | } |
| | | get isNumber(){ |
| | | if(this.fieldType) |
| | | { |
| | | this.type = 'number'; |
| | | return this.fieldType.toLowerCase()=='number'; |
| | | } |
| | | return false; |
| | | } |
| | | } |