修复编辑模式传入的材质名失效的问题
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "material-editor",
 | 
					  "name": "material-editor",
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "version": "1.0.17",
 | 
					  "version": "1.0.18",
 | 
				
			||||||
  "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "dev": "vite",
 | 
					    "dev": "vite",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -108,7 +108,7 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script setup lang='ts'>
 | 
					<script setup lang='ts'>
 | 
				
			||||||
import { ref, reactive, watch } from "vue"
 | 
					import { ref, reactive, watch, computed } from "vue"
 | 
				
			||||||
import { useScene, type TextureAdjustment } from "../stores/sceneStore";
 | 
					import { useScene, type TextureAdjustment } from "../stores/sceneStore";
 | 
				
			||||||
import CfFlex from "./CfFlex.vue";
 | 
					import CfFlex from "./CfFlex.vue";
 | 
				
			||||||
import { DirectoryId } from "../api/Request";
 | 
					import { DirectoryId } from "../api/Request";
 | 
				
			||||||
@@ -169,6 +169,10 @@ watch(() => props.textureSrcList, async (val) => {
 | 
				
			|||||||
    await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
 | 
					    await scene.ChangeTextureFromUrlAsync(_textureSrc.value[0]);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					watch(() => props.name, () => {
 | 
				
			||||||
 | 
					    materialInfo.materialName = props.name || '材质';
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
watch(textureAdjustment, async (val) => {
 | 
					watch(textureAdjustment, async (val) => {
 | 
				
			||||||
    UpdateTexture();
 | 
					    UpdateTexture();
 | 
				
			||||||
}, { deep: true });
 | 
					}, { deep: true });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user