【Vue3+Ts project】Vue3 router获取当前URL路径、项目难点 泛型类型位置 |
您所在的位置:网站首页 › elementplus必须用ts吗 › 【Vue3+Ts project】Vue3 router获取当前URL路径、项目难点 泛型类型位置 |
Vue3/ Vue3概述认识Vue3 (Vue3基本信息 性能提升)、Vue3的新增特性( Vue3 setup)
春暖花开.,: row.vue文件下搜content这个属性删了他 Vue3/ Vue3概述认识Vue3 (Vue3基本信息 性能提升)、Vue3的新增特性( Vue3 setup)yizhide5: 你好vue3启动报这个错,能帮忙看看吗? Syntax Error: TypeError: Cannot read property 'content' of null @ ./src/sun/components/layout/src/row.vue?vue&type=script&lang=js 1:0-385 1:0-385 1:386-760 1:386-760 @ ./src/sun/components/layout/src/row.vue @ ./src/sun/components/layout/index.js @ ./src/sun/components sync index.js @ ./src/sun/static/js/common.js @ ./src/main.js @ multi ./node_modules/[email protected]@webpack-dev-server/client?http://192.168.199.101:18080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js row.vue export default { name: 'row', props: { fixed:{ type:Boolean, //固定数值 default:false }, className:String }, render(){ let{ panes, className, fixed }=this; let iClass = "sun-row" if(className) iClass+=' '+className; if(fixed) iClass+=' sun-row-fixed'; return ( >{panes} ); }, created:function(){ this.calcPaneInstances(); }, data: function () { return { panes:[] } }, methods:{ calcPaneInstances(){ var vm = this; if (vm.$slots.default && vm.$slots.default()){ vm.panes = vm.$slots.default(); vm.panes.forEach((item,idx)=>{ try { if(!item.props) item.props = {}; item.props.fixed = vm.$props.fixed; } catch (error) { debugger; } }) //debugger; } }, back(){ } } } .sun-row{position: relative; box-sizing: border-box;display: flex;} .sun-row-fixed{display: table;table-layout: fixed;width:100%;} iframe a标签跳转到iframe 内 方法
:
黑马的? jasmin456: 那如果不想让非响应的数据改变,那就把方法分开写,一个方法改变响应式的,一个方法改变非响应式的, Vue3/ Vue3内 Vue-router Vue3路由 完整配置流程不带分号的程序员: 第九点的 vivw打错了 应该是view |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |