尚硅谷-谷粒学院BUG记录

1.下拉列表框的数据回显,二级分类是遍历出来的,回显后没有数据

修改侧边栏的默认显示还是隐藏

/找到store/modules/app.js文件
const app = {
  state: {
    sidebar: {
      // opened: !+Cookies.get('sidebarStatus'),        //原值
      opened:true,                                      //默认展开(false是隐藏)
      withoutAnimation: false
    },
    device: 'desktop',
    language: Cookies.get('language') || 'en',
    size: Cookies.get('size') || 'medium'
  },
  mutations: {
    TOGGLE_SIDEBAR: state => {            //点击收缩功能触发
      // if (state.sidebar.opened) {
      //   Cookies.set('sidebarStatus', 1)
      // } else {
      //   Cookies.set('sidebarStatus', 0)
      // }
      // state.sidebar.opened = !state.sidebar.opened
      state.sidebar.opened = true
      state.sidebar.withoutAnimation = false
    },
    CLOSE_SIDEBAR: (state, withoutAnimation) => {        //自适应触发
      Cookies.set('sidebarStatus',1)
      state.sidebar.opened = true
      state.sidebar.withoutAnimation = withoutAnimation
    }
}

2.'MP_OPTLOCK_VERSION_ORIGINAL' not found

报错

Caused by: org.apache.ibatis.binding.BindingException: Parameter 'MP_OPTLOCK_VERSION_ORIGINAL' not found. Available parameters are [param1, et]

解决:乐观锁OptimisticLockerInterceptor 已经被废弃,可以在 MybatisPlusInterceptor 拦截器对象中加入新版的 OptimisticLockerInnerInterceptor 乐观锁对象,interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());3.3.0之后的 mybatis-plus 要这样使用

//乐观锁插件
    @Bean
    public MybatisPlusInterceptor optimisticLockerInnerInterceptor(){
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
        return interceptor;
        //return new OptimisticLockerInnerInterceptor();
    }

3.jar包依赖冲突

找到引起冲突的父类包,在其里面添加exclusions标签,这个方法排除了swagger jar包导致不能用

 <!--swagger-->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${swagger.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

4.前端报错:无法加载文件 D:\NodeJS\node_global\babel.ps1,因为在此系统上禁止运行脚本

解决:

(1)以管理员身份运行vs code

(2)在终端执行:get-ExecutionPolicy,显示Restricted(表示状态是禁止的)

(3)在终端执行:set-ExecutionPolicy RemoteSigned

(4)在终端执行:get-ExecutionPolicy,显示RemoteSigned

5.解决前端代码语法校验,在vue.config.js里

lintOnSave: false,

6.[Vue warn]: Error in v-on handler: "TypeError: api_teacher_js__WEBPACK_IMPORTED_MODULE_0_.default.addTacher is not a function"

.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to
 fsevents 2.
npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com
/sideway/joi/issues/2411)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies
.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number o
f issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:

在vue-element-admin模板中去掉tui-editor
1、修改package.json
删除包括tui-editor的1行

2、删除tui-editor相关文件

rm src/components/MarkdownEditor/index.vue
rm src/views/components-demo/markdown.vue

vi src/router/modules/components.js 删除@views/components-demo/markdown相关内容,如下所示:

    {
      path: 'markdown',
      component: () => import('@[/views/components-demo/markdown'),](javascript:;)
      name: 'MarkdownDemo',
      meta: { title: 'Markdown' }
    },

然后就好了

7.Invalid prop: type check failed for prop "image". Expected String with value "undefined", got Undefined

image类型错误转换成string就好了

8.前端页面接收不到上传文件后的返回值

[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'url' of undefined"

found in

把调用方法后面的括号去掉就好

9.阿里云的上传Sdk没有开源所以仓库没有,只能手动添加

https://blog.csdn.net/small_yogurt/article/details/108244679

10.springboot内置tomcat会限制上传文件大小

https://blog.csdn.net/awmw74520/article/details/70230591

11.Vue整合swiper报错Could not compile template .....swiper\dist\css\swiper.css解决办法

https://www.cnblogs.com/Courage129/archive/2004/01/13/14022269.html

12.nuxt项目打包后阿里云播放器错误:ReferenceError: Aliplayer is not defined

这是因为导入js文件的问题,打包后没有完全导入js文件

解决:

通过配置引入,在 【nuxt.config.js】文件中引入

module.exports = {
/*
** Headers of the page
*/
head: {
title: ' ',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'keywords', name: 'keywords', content: ' ' },
{ hid: 'description', name: 'description', content: ' ' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
//就是这个位置!!!!!
script:[
{src: "https://g.alicdn.com/de/prismplayer/2.8.1/aliplayer-min.js", type:"text/javascript"}
]
},
......
......
......

上一篇:python streamlit 速成web页面,深度学习模型展示.


下一篇:自动创建vuepress侧边栏