10 2024 档案
摘要:父组件 1 <script lang="ts" setup> 2 import { ref } from 'vue' 3 const value = ref({ 4 page: 1, 5 size: 2, 6 selectId : "" 7 }) 8 </script> 9 10 <template
阅读全文
摘要:方法一 1 <el-upload 2 ref="RefUpload" 3 class="avatar-uploader" 4 :auto-upload="false" 5 :show-file-list="false" 6 :on-change="handleChange" 7 > 8 <img v
阅读全文
摘要:import { dayjs } from 'element-plus' export const formatTime = (time) => dayjs(time).format('YYYY年MM月DD日') <el-table-column prop="date" label="Date" w
阅读全文
摘要:一、vue2与Django路由打通配置 main.js 文件 1 const { defineConfig } = require('@vue/cli-service') 2 module.exports = defineConfig({ 3 transpileDependencies: true,
阅读全文
摘要:用dom 获取孙子的属性和方法,但是孙子的属性和方法必须暴露出来
阅读全文
摘要:一、vue3 父子相传 vue3双向绑定的父子相传 v-model="value.selectId" 就等于 v-model:modelValue="value.selectId" 二、vue2 父子相传 三、vue3非父子相传 爷爷 1 const name = ref(0) 2 // 给孙子、孙
阅读全文
摘要:一、vue3 watch 1 import { ref, watch } from 'vue' 2 3 const user = ref({ name: 'zd', age: 22 }) 4 watch( 5 user, // 监视多个参数:[xx1,xx1] 6 (newValue, oldVal
阅读全文