yuliang 3 年之前
父节点
当前提交
ed3c62c43c
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      src/controls/input/textfield.js

+ 11 - 5
src/controls/input/textfield.js

@@ -1,6 +1,6 @@
 import _ from 'lodash'
-import {baseConfig} from "../base";
-import {text} from "../../Defaults";
+import {baseConfig} from "../base"
+import {text} from "../../Defaults"
 import {
     PropertyDescriptionTable,
     YvBase,
@@ -12,8 +12,9 @@ import {
     metaId,
     width,
     height
-} from "../../PropertyDescriptionTable";
-import {PropertyDescription} from "../../PropertyDescription";
+} from "../../PropertyDescriptionTable"
+import $ from 'jquery'
+import {PropertyDescription} from "../../PropertyDescription"
 
 export default function () {
 
@@ -79,7 +80,12 @@ export default function () {
                     }
                 },
                 afterrender(sender) {
-                    sender.inputEl.dom.setAttribute('spellcheck', "false");
+                    if(sender.inputEl?.dom) {
+                        sender.inputEl.dom.setAttribute('spellcheck', "false");
+                        $(sender.inputEl.dom).on('click', (e)=>{
+                            sender.fireEvent('click', this, e)
+                        })
+                    }
                 }
             })