[IMP] qweb: introduce t-model directive

supported modifiers: lazy, trim, number
This commit is contained in:
Bruno Boi
2021-11-02 11:29:23 +01:00
committed by Aaron Bohy
parent 348b505e5f
commit 219923d752
49 changed files with 1627 additions and 852 deletions
+3 -3
View File
@@ -144,10 +144,10 @@ export function isProp(tag: string, key: string): boolean {
case "option":
return key === "selected" || key === "disabled";
case "textarea":
return key === "readonly" || key === "disabled";
break;
case "button":
return key === "value" || key === "readonly" || key === "disabled";
case "select":
return key === "value" || key === "disabled";
case "button":
case "optgroup":
return key === "disabled";
}
+2 -1
View File
@@ -18,8 +18,9 @@ export function createEventHandler(rawEvent: string): EventHandlerCreator {
}
// Native listener
let nextNativeEventId = 1;
function createElementHandler(evName: string, capture: boolean = false): EventHandlerCreator {
let eventKey = `__event__${evName}`;
let eventKey = `__event__${evName}_${nextNativeEventId++}`;
if (capture) {
eventKey = `${eventKey}_capture`;
}