|
@@ -1,38 +1,60 @@
|
|
<template>
|
|
<template>
|
|
- <div class="field is-horizontal layer">
|
|
|
|
- <div class="field-label is-normal">
|
|
|
|
- <label class="label lnorm">
|
|
|
|
- <div v-if="particle==='bulk'"> bulk </div>
|
|
|
|
- <div v-else-if="particle==='core-shell'">
|
|
|
|
- <div v-if="index == 0"> core </div>
|
|
|
|
- <div v-else> shell </div>
|
|
|
|
- </div>
|
|
|
|
- <div v-else>
|
|
|
|
- layer {{index+1}}
|
|
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="field is-horizontal layer">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label lnorm">
|
|
|
|
+ <div v-if="particle==='bulk'"> bulk </div>
|
|
|
|
+ <div v-else-if="particle==='core-shell'">
|
|
|
|
+ <div v-if="index == 0"> core </div>
|
|
|
|
+ <div v-else> shell </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ layer {{index+1}}
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field is-grouped is-grouped-multiline">
|
|
|
|
+ <div v-if="index == 0" class="rh-input">
|
|
|
|
+ <input-with-units title="R" v-bind:units="units"
|
|
|
|
+ v-bind:value="layer.R"
|
|
|
|
+ @newdata="layer.R=$event"/>
|
|
|
|
+ <span class="tooltiptext">Core radius</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else class="rh-input">
|
|
|
|
+ <input-with-units title="h" v-bind:units="units"
|
|
|
|
+ v-bind:value="layer.R"
|
|
|
|
+ @newdata="layer.R=$event"/>
|
|
|
|
+ <span class="tooltiptext">Layer thickness</span>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ <b-select v-model="layer.material">
|
|
|
|
+ <option value="nk">nk-constant</option>
|
|
|
|
+ <option value="popular">popular</option>
|
|
|
|
+ <option value="web">refractiveindex.info</option>
|
|
|
|
+ </b-select>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
- </label>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="field-body">
|
|
|
|
- <div class="field is-grouped is-grouped-multiline">
|
|
|
|
- <div v-if="index == 0" class="rh-input">
|
|
|
|
- <input-with-units title="R" v-bind:units="units"
|
|
|
|
- v-bind:value="layer.R"
|
|
|
|
- @newdata="layer.R=$event"/>
|
|
|
|
- <span class="tooltiptext">Core radius</span>
|
|
|
|
- </div>
|
|
|
|
- <div v-else class="rh-input">
|
|
|
|
- <input-with-units title="h" v-bind:units="units"
|
|
|
|
- v-bind:value="layer.R"
|
|
|
|
- @newdata="layer.R=$event"/>
|
|
|
|
- <span class="tooltiptext">Layer thickness</span>
|
|
|
|
|
|
+ <div class="field is-horizontal layer">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label lnorm">
|
|
|
|
+
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body nk-input">
|
|
|
|
+ <div class="field is-grouped is-grouped-multiline">
|
|
|
|
+ <input-with-units title="Re(n)" units=""
|
|
|
|
+ v-bind:value="layer.reN"
|
|
|
|
+ @newdata="layer.reN=$event"
|
|
|
|
+ v-bind:isDisabled="isDisabled"
|
|
|
|
+ />
|
|
|
|
+ <input-with-units title="Im(n)" units=""
|
|
|
|
+ v-bind:value="layer.imN"
|
|
|
|
+ @newdata="layer.imN=$event"/>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
- <input-with-units title="Re(n)" units=""
|
|
|
|
- v-bind:value="layer.reN"
|
|
|
|
- @newdata="layer.reN=$event"/>
|
|
|
|
- <input-with-units title="Im(n)" units=""
|
|
|
|
- v-bind:value="layer.imN"
|
|
|
|
- @newdata="layer.imN=$event"/>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -46,6 +68,23 @@
|
|
components: {
|
|
components: {
|
|
InputWithUnits
|
|
InputWithUnits
|
|
},
|
|
},
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ isDisabled: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ 'layer.material': {
|
|
|
|
+ handler: function () {
|
|
|
|
+ console.log('update');
|
|
|
|
+ if (this.layer.material == 'nk') {
|
|
|
|
+ this.isDisabled = false;
|
|
|
|
+ } else {
|
|
|
|
+ this.isDisabled = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
props: ['layer', 'particle', 'index', 'units']
|
|
props: ['layer', 'particle', 'index', 'units']
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -64,7 +103,7 @@
|
|
font-weight: normal;
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
.rh-input {
|
|
.rh-input {
|
|
- margin-right: 12px;
|
|
|
|
|
|
+ margin-right: 0px;
|
|
position: relative;
|
|
position: relative;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
@@ -90,4 +129,7 @@
|
|
.rh-input:hover .tooltiptext {
|
|
.rh-input:hover .tooltiptext {
|
|
visibility: visible;
|
|
visibility: visible;
|
|
}
|
|
}
|
|
|
|
+ .nk-input {
|
|
|
|
+ margin-bottom: 12px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|