尚硅谷-谷粒學院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"}
]
},
......
......
......


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM