Stopped inactive properties from showing computed inline fields, since they are not recomputed while inactive
This commit is contained in:
@@ -22,10 +22,12 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
inactive: Boolean,
|
||||
},
|
||||
computed: {
|
||||
computedValue(){
|
||||
if (!this.string) return '';
|
||||
if (this.inactive) return this.string;
|
||||
let index = 0;
|
||||
return this.string.replace(/\{([^{}]*)\}/g, () => {
|
||||
let comp = this.calculations && this.calculations[index++];
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</v-card-title>
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<property-description
|
||||
:string="model.summary"
|
||||
:calculations="model.summaryCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
<v-divider
|
||||
v-if="children.length"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<computed
|
||||
:string="model.summary"
|
||||
:calculations="model.summaryCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</v-card-text>
|
||||
</toolbar-card>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
<property-description
|
||||
:string="model.summary"
|
||||
:calculations="model.summaryCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
<v-divider
|
||||
v-if="model.description"
|
||||
@@ -114,6 +115,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
|
||||
<effect-viewer
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
<property-description
|
||||
:string="model.summary"
|
||||
:calculations="model.summaryCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
<v-divider class="mt-3 mb-3" />
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
|
||||
<effect-viewer
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<property-description
|
||||
:string="model.description"
|
||||
:calculations="model.descriptionCalculations"
|
||||
:inactive="model.inactive"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
class="property-description"
|
||||
:string="string"
|
||||
:calculations="calculations"
|
||||
:inactive="inactive"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -25,6 +26,7 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
inactive: Boolean,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user