| | |
| | | width="400px" |
| | | @cancel="close(false)" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"> |
| | | <el-button |
| | | @click="alphaChange(1)" |
| | | icon="el-icon-minus" |
| | | size="small" |
| | | ></el-button> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-slider |
| | | v-model="modelForm.alpha" |
| | | :min="0" |
| | | :step="0.1" |
| | | :max="1" |
| | | @change="update()" |
| | | > |
| | | </el-slider> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button |
| | | @click="alphaChange(2)" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | ></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-input |
| | | size="small" |
| | | v-model="modelForm.alpha1" |
| | | @input="update2" |
| | | ></el-input> --> |
| | | <el-slider |
| | | v-model="modelForm.alpha" |
| | | <!-- <el-slider |
| | | @input="update1" |
| | | :min="0" |
| | | :step="0.01" |
| | | :max="1" |
| | | |
| | | show-input |
| | | > |
| | | </el-slider> |
| | | </el-slider> --> |
| | | |
| | | </Popup> |
| | | </template> |
| | |
| | | title: "透明度", |
| | | modelForm: { |
| | | alpha: 1, |
| | | alpha1: 1, |
| | | |
| | | }, |
| | | titleset: null, |
| | | index: null, |
| | |
| | | this.modelForm.alpha1 = this.modelForm.alpha; |
| | | this.update(); |
| | | }, |
| | | alphaChange(res) { |
| | | switch (res) { |
| | | case 1: |
| | | if (this.modelForm.alpha <= 0) { |
| | | this.modelForm.alpha = 0 |
| | | } else { |
| | | this.modelForm.alpha = this.modelForm.alpha - 0.1 |
| | | } |
| | | |
| | | this.update() |
| | | break; |
| | | case 2: |
| | | if (this.modelForm.alpha >= 1) { |
| | | this.modelForm.alpha = 1 |
| | | } else { |
| | | this.modelForm.alpha = this.modelForm.alpha + 0.1 |
| | | } |
| | | this.modelForm.alpha = this.modelForm.alpha.toFixed(1) |
| | | this.update() |
| | | break; |
| | | } |
| | | }, |
| | | |
| | | |
| | | update() { |
| | | |
| | | |
| | | |
| | | this.titleset.style = new Cesium.Cesium3DTileStyle({ |
| | | color: "color('rgba(255,255,255," + this.modelForm.alpha + ")')", |
| | | }); |