update:首页模板修改

This commit is contained in:
du.meimei
2025-03-17 21:04:31 +08:00
parent f8f88ddb44
commit 0c4163a7c9
3 changed files with 20 additions and 9 deletions

3
components.d.ts vendored
View File

@@ -32,6 +32,7 @@ declare module 'vue' {
VanGrid: typeof import('vant/es')['Grid']
VanGridItem: typeof import('vant/es')['GridItem']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
VanNavBar: typeof import('vant/es')['NavBar']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
@@ -40,6 +41,8 @@ declare module 'vue' {
VanRow: typeof import('vant/es')['Row']
VanStepper: typeof import('vant/es')['Stepper']
VanSwitch: typeof import('vant/es')['Switch']
VanTab: typeof import('vant/es')['Tab']
VanTabs: typeof import('vant/es')['Tabs']
YLCascader: typeof import('./src/components/YLCascader.vue')['default']
YLInput: typeof import('./src/components/YLInput.vue')['default']
YLPicker: typeof import('./src/components/YLPicker.vue')['default']

View File

@@ -8,12 +8,12 @@ const question = defineModel<question>('element', { default: () => ({}), require
// eslint-disable-next-line
const activeComponent = computed<Component>(() => {
switch (question.value.question_type) {
case 8:
return MatrixText;
case 9:
return MatrixRadio;
case 10:
return MatrixCheckbox;
case 8:
return MatrixText;
case 9:
return MatrixRadio;
case 10:
return MatrixCheckbox;
}
});

View File

@@ -2,7 +2,7 @@
<div class="">
<div class="mark_container">
<!-- <van-row gutter="20">-->
<div v-for="(item, index) in info" :key="index" class="market-item">
<div v-for="(item, index) in info" @click="toDetail(item)" :key="index" class="market-item">
<div class="content">
<div class="title fw-bold fs-14">
<div class="flex align-center">
@@ -46,8 +46,8 @@
import { ref, defineProps, onMounted } from 'vue';
import { deleteTemplate } from '@/api/home/index.js';
import { showDialog, showSuccessToast, showFailToast } from 'vant';
// import contentSvg from './svgs/contentSvg.svg';
// import MarketItemSvg from './svgs/MarketItemSvg.svg';
import { useRouter } from 'vue-router';
const router = useRouter();
const { info } = defineProps({
info: {
type: Object,
@@ -56,6 +56,14 @@ const { info } = defineProps({
}
});
const userInfo = ref({ userName: '' });
const toDetail = (item) => {
router.push({
path: '/create',
query: {
sn: item.sn
}
});
};
const deleteItem = (item) => {
showDialog({
title: '是否确认删除此模板?',