|
@@ -8,17 +8,17 @@
|
|
|
<!-- <template #icon>
|
|
|
<a href="">设置比例</a>
|
|
|
</template> -->
|
|
|
- <ui-input type="range" v-model="custom.currentModel.scale" v-bind="scaleOption" width="100%">
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.scale" v-bind="modelRange.scaleRange" :ctrl="false" width="100%">
|
|
|
<template #icon>%</template>
|
|
|
</ui-input>
|
|
|
</ui-group-option>
|
|
|
<ui-group-option label="离地高度">
|
|
|
- <ui-input type="range" v-model="custom.currentModel.bottom" v-bind="bottomOption" width="100%">
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.bottom" v-bind="modelRange.bottomRange" :ctrl="false" width="100%">
|
|
|
<template #icon>m</template>
|
|
|
</ui-input>
|
|
|
</ui-group-option>
|
|
|
<ui-group-option label="模型不透明度">
|
|
|
- <ui-input type="range" v-model="custom.currentModel.opacity" v-bind="opacityOption" width="100%">
|
|
|
+ <ui-input type="range" v-model="custom.currentModel.opacity" v-bind="modelRange.opacityRange" :ctrl="false" width="100%">
|
|
|
<template #icon>%</template>
|
|
|
</ui-input>
|
|
|
</ui-group-option>
|
|
@@ -37,7 +37,7 @@ import { RightPano } from '@/layout'
|
|
|
import { autoSaveModels, ModelAttrs } from '@/store'
|
|
|
import { togetherCallback } from '@/utils'
|
|
|
import Actions from '@/components/actions/index.vue'
|
|
|
-import { getSceneModel } from '@/sdk'
|
|
|
+import { getSceneModel, modelRange } from '@/sdk'
|
|
|
import { useViewStack } from '@/hook'
|
|
|
import { showLeftCtrlPanoStack, showLeftPanoStack, custom, modelsChangeStoreStack } from '@/env'
|
|
|
import { ref, nextTick } from 'vue'
|
|
@@ -52,15 +52,13 @@ useViewStack(() => {
|
|
|
})
|
|
|
const defaultAttrs: ModelAttrs = {
|
|
|
show: true,
|
|
|
- scale: 1,
|
|
|
- opacity: 1,
|
|
|
+ scale: 100,
|
|
|
+ opacity: 100,
|
|
|
bottom: 0,
|
|
|
position: {x: 0, y: 0, z: 0},
|
|
|
rotation: {x: 0, y: 0, z: 0}
|
|
|
}
|
|
|
-const opacityOption = { min: 0, max: 100, step: 0.01, ctrl: false }
|
|
|
-const bottomOption = { min: -30, max: 70, step: 0.1, ctrl: false }
|
|
|
-const scaleOption = { min: 0, max: 200, step: 0.01, ctrl: false }
|
|
|
+
|
|
|
const actionItems: ActionsProps['items'] = [
|
|
|
{
|
|
|
icon: 'move',
|