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