原创 vuex 加密保存在localstorage中,自定義名稱

需求:vuex中的信息存在localStorage中,但是安全性不夠 1,安裝secure-ls npm i secure-ls 2,使用 在store.js中寫入一下代碼 import SecureLS from "secu

原创 css平滑滾動

代碼只有一句: html, body { scroll-behavior:smooth; } js版本: target.scrollIntoView({ behavior: "smooth" });  

原创 antd vue upload 驗證失效問題

在表單中驗證upload,當文件被刪除後,form並沒有驗證到 解決: //vue <a-upload name="peoplefile" :fileList="excelList"

原创 ant design 上傳自定義方法 axios

1,ant design的上傳方法自己的action常常不好用,因此自定義自己方法來上傳 html <a-upload-dragger :customRequest="customRequest"

原创 vue router 同一頁面不刷新的問題

1,使用key  在router-view設置動態的key就會每次都刷新了 <router-view :key="$route.params.Id" /> 2,使用beforeRouteUpdate beforeRouteUpdate

原创 idea 開發項目推薦安裝的插件

1,GsonFormat 用來格式化json 有一個快捷鍵,可以快速把json內容轉化爲對象 Alt+S    2,lombok  Lombok 是一種 Java™ 實用工具,可用來幫助開發人員消除 Java 的冗長,尤其是對於簡單

原创 Android room操作數據庫

1,在gradle中添加依賴: def room_version = "2.2.0-rc01" implementation "androidx.room:room-runtime:$room_version" anno

原创 安卓顯示隱藏鍵盤

1,顯示鍵盤 InputMethodManager imm = (InputMethodManager) Objects.requireNonNull(getActivity()).getSystemService(Context.IN

原创 安卓發送廣播和接收廣播

1,發送廣播 Log.i("MyTag", "onClick: 發送廣播"); Intent intent = new Intent(); intent.setAction

原创 使用windows terminal,添加到右鍵並美化

1,windows Terminal是微軟推出的新的命令行工具 2,添加到右鍵菜單 新建文本文件,輸入以下代碼,保存爲reg文件,然後運行 Windows Registry Editor Version 5.00 [HKEY_CLA

原创 spring boot 使用swagger ui

1,引入依賴 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId

原创 egg validate驗證插件的使用,以及定製

1,使用 安裝egg-validate yarn add egg-validate 2,配置 先啓用:  config/plugin.ts const plugin: EggPlugin = { // ... vali

原创 ant design vue date-picker 日期快速選擇

 1,代碼 <a-range-picker :ranges="{ 今天: [moment().startOf('day'), moment()], 昨天:

原创 安卓使用vlc播放rtsp視頻

1,把vlc的aar文件放入libs中 2,在build.gradle中添加如下代碼 android { //... repositories { flatDir { dirs

原创 sprint boot 增刪改查

@Slf4j @RestController @RequestMapping("/rest") public class ArticleRestController { @PostMapping("/article")