vue
带头大哥
为了生存而斗争!
展开
-
Vue3 使用ECharts
Vue3 使用ECharts原创 2022-08-29 22:29:27 · 828 阅读 · 0 评论 -
vue3 项目打包
命令npm run build直接打包可能会访问报错We’re sorry but qnjms doesn’t work properly without JavaScript enabled. Please enable it to continue.需要进行配置打开vue.config.js,加入publicPath配置const { defineConfig } = require('@vue/cli-service')module.exports = defineConfig({ t原创 2022-04-23 23:22:28 · 3258 阅读 · 0 评论 -
vue3 setup语法糖 父组件给子组件传参
在子组件中定义参数:const props = defineProps({ //获取传参的数据 msg: String})onMounted(() => { console.log(props.msg)});父组件调用子组件: <AddEdit ref="addEditRef" msg="aaa" ></AddEdit>原创 2022-04-11 00:22:36 · 1469 阅读 · 0 评论 -
vue3 setup语法糖,子组件调用父组件方法
场景:新增数据后刷新Table方法:子组件代码:在子组件中使用emit引用父组件的方法const emit = defineEmits({ 'refrashTable': null})调用该方法const refrashTable = () => { emit("refrashTable")}很方便,先引用再直接调用...原创 2022-04-10 23:55:44 · 2023 阅读 · 0 评论 -
vue history模式,刷新页面报404 解决方案
1.修改webpack.dev.conf.jspublicPath 设置成 /2.webpack.base.conf.jspublicPath 设置成 /3.package.jsonscripts -> dev 添加参数--history-api-fallback原创 2021-04-23 17:46:38 · 533 阅读 · 1 评论