代码优化

This commit is contained in:
GaoHao
2025-03-26 13:34:19 +08:00
parent e928fdfa2a
commit 413222a5f0
42 changed files with 166 additions and 531 deletions

View File

@@ -33,7 +33,6 @@
</template>
<script setup>
import { ColorMain } from '@/commons/color.js'
const emits = defineEmits(['goodsClick', 'del'])
const props = defineProps({

View File

@@ -42,16 +42,10 @@
</template>
<script setup>
import {
computed,
ref,
watchEffect
} from 'vue';
import { computed, ref, watchEffect } from 'vue';
import mySwitch from '@/components/my-components/my-switch.vue'
import go from '@/commons/utils/go.js';
import {
ColorMain
} from '@/commons/color.js'
const emits = defineEmits(['changeClick','edit', 'editName','editSort', 'del', 'isShowChange'])

View File

@@ -31,21 +31,8 @@
</template>
<script setup>
import {
reactive,
ref,
watch,
onMounted,
computed
} from 'vue';
import {
returnSkuSnap,
returnTypeEnum,
returnCategory
} from '@/pageProduct/util.js'
import {
$tbShopUnit
} from '@/http/yskApi/goods.js'
import { reactive, ref, watch, computed } from 'vue';
const props = defineProps({
show: {
type: Boolean,
@@ -63,32 +50,21 @@
}
})
function changeShowRecoders(show) {
recoders.show = show
}
const data = ref(props.item)
const emits = defineEmits(['update:show', 'save'])
const form = reactive({
note: ''
})
let popShow = ref(props.show)
let sort=ref('')
watch(()=>props.item.sort,(newval)=>{
sort.value=newval
})
watch(() => props.show, (newval) => {
popShow.value = newval
if (newval) {
data.value = props.item
}
})
const isSku = computed(() => {
// return data.value.typeEnum == '多规格'
return false
})
watch(() => popShow.value, (newval) => {
emits('update:show', newval)
})