@farris/jit-engine 1.4.19 → 1.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
-var verticalClass = variable.verticable?" fm-apply-list-item-vertical":""
|
|
4
4
|
-var localTitle = /[\s\S]*?\{\{=([\s\S]+?)\}\}[\s\S]*?/g.test(stringTitle) ? variable.title : `{{= translate('${stringTitle}') || '${stringTitle}'}}`
|
|
5
5
|
-var dataText = `{{=${variable.bindingModelName}}}`
|
|
6
|
-
-var randomKey = Math.floor(Math.random() *
|
|
6
|
+
-var randomKey = Math.floor(Math.random() * 1000000)
|
|
7
7
|
-var bindingKey = (variable.binding && variable.binding.path ? variable.binding.path : variable.title) + randomKey
|
|
8
8
|
div(class=itemClass+verticalClass style != variable.hideFunc ? variable.hideFunc : undefined)
|
|
9
9
|
div(class="fm-apply-list-item-label")
|
|
@@ -14,9 +14,9 @@ div(class=itemClass+verticalClass style != variable.hideFunc ? variable.hideFun
|
|
|
14
14
|
else
|
|
15
15
|
if(variable.isCollapse)
|
|
16
16
|
div(class="fm-apply-list-item-text-collapse")
|
|
17
|
-
input(id=bindingKey class="fm-apply-list-item-collapse-status" type="checkbox")
|
|
17
|
+
input(id=`{{='${bindingKey}'+(itemIndex || '')}}` class="fm-apply-list-item-collapse-status" type="checkbox")
|
|
18
18
|
div(class="fm-apply-list-item-text fma-text-collapse fma-text-hidden")
|
|
19
|
-
label(class="fma-text-hidden-toggle" for=bindingKey)
|
|
19
|
+
label(class="fma-text-hidden-toggle" for=`{{='${bindingKey}'+(itemIndex || '')}}`)
|
|
20
20
|
span(class="fm-apply-list-item-text-inner") {{=!{variable.bindingModelName}}}
|
|
21
21
|
else
|
|
22
22
|
div(class="fm-apply-list-item-text")
|
|
@@ -325,7 +325,7 @@ window.registerCollapseHandler = function (id,modelData) {
|
|
|
325
325
|
var templateText = getTmplateByPanelID(tmplID);
|
|
326
326
|
if (templateText) {
|
|
327
327
|
var dataInfo = GetDataByGridIDandDataID(gridID, infoID,primaryKey);
|
|
328
|
-
doT.templateSettings.varname = 'itemData,model';
|
|
328
|
+
doT.templateSettings.varname = 'itemData,model,itemIndex';
|
|
329
329
|
var templFn = doT.template(templateText);
|
|
330
330
|
var resultText = templFn(dataInfo,modelData);
|
|
331
331
|
upadateCompleteInfo(resultText);
|