[英]dark mode in tailwindcss with adonisjs project not working
我在 adonisjs 項目中使用 TailwindCSS 2,vue 3。 我有一個簡單的 html 按鈕,單擊該按鈕時應切換到暗模式開/關。 如果我使用 tailwindcss cdn 版本,並在 html 的配置中設置暗模式,一切正常。 如果我使用我的 css,它不會。 我想我錯過了一些步驟。 ...
[英]dark mode in tailwindcss with adonisjs project not working
我在 adonisjs 項目中使用 TailwindCSS 2,vue 3。 我有一個簡單的 html 按鈕,單擊該按鈕時應切換到暗模式開/關。 如果我使用 tailwindcss cdn 版本,並在 html 的配置中設置暗模式,一切正常。 如果我使用我的 css,它不會。 我想我錯過了一些步驟。 ...
[英]How insert data array of object to db
我想插入如下數據: 使用 adonis is.ts 的數據庫,特別是在具有變量 id、car_name、car_color 的桌車中。 我這樣做: ...
[英]How to `build` an old Adonis project?
我繼承了一個服務器不再運行的舊 Adonis 項目。 我想找出原因。 我想知道如何重建它,知道下面的package.json : 使用npm run build的構建不起作用(缺少腳本)。 ...
[英]Uploading a file to AdonisJS via Input type="file"
我正在嘗試從輸入類型 =“文件”上傳文件。 這是我獲取輸入的方式: <input type="file" onChange={(e) => setFile(e.target.files)}/> 然后,當我記錄它時,我得到這個: 日志但是,當我嘗試將它發送到我的 Adonis 服務 ...
[英]AdonisJS hasManyThrough through a hasOne
我有以下型號: Usuario有很多角色 Usuario RolesUsuario Rol 我想在Usuario中設置一個hasManyThrough ,這樣我就可以通過更簡單的預加載訪問用戶的角色列表。 hasManyThrough的文檔沒有完全解釋如何 model 這種情況。export ...
[英]Transaction query already complete, run with DEBUG=knex:tx
當我使用 japa 測試運行器 adonisJs 5 時,我的測試失敗並出現此錯誤: 我不知道為什么我在某些我不知道的測試中會出現此錯誤日本測試亞軍 adonisJs 5 ...
[英]Insert Data into deep nested relationships
我目前是 Adonis Js 的新手,我很難將數據插入更深層次的關系中。 假設我有 3 個表,國家、城市、商店國家有很多城市,城市有很多商店。 因此,如果我插入大量數據,比如我有 1 個國家、5 個城市和 20 個商店,有什么簡單的方法可以解決這個問題嗎? 而不是循環它? 所以基本上我所做的是 這不 ...
[英]Heroku web.1 didn't updated env variable
在 heroku 更改我的數據庫連接(數據庫、用戶、主機、密碼)后,我已經在我的 heroku configs var 上設置了新設置但是當我運行該應用程序時它仍然嘗試使用舊憑據連接到數據庫,我已經與 heroku 檢查過cofig 與 heroku config -a app_name 並且這顯示 ...
[英]Get All Relationship Data in AdonisJS
有誰知道如何從 AdonisJS 中的關系中檢索所有數據? ,所以我想從用戶 Model 中檢索用戶數據,包括 Post Model 中的關系數據。 獲取所有用戶 ...
[英]Unable to make mongodb connection using adonis and mongodb
我正在嘗試連接到 mongodb。 我正在使用 adonisJS 和 Mongoose。 Mongodb 連接字符串是正確的,我已經創建了todo數據庫。 但我收到Authentication failed錯誤。 我的 Controller 如下, 有人做過這種類型的代碼嗎? 請建議我在上面的代碼 ...
[英]Error when make a controller on AdonisJS5
當我嘗試運行命令時node ace make:controller User 顯示以下錯誤找不到模塊 './commands/Make\Controller' 需要堆棧: /Users/abiliocoelho/Desktop/socket/node_modules/@adonisjs/as ...
[英]Error when trying to run adonis JS migration
嘗試運行遷移時顯示錯誤。 我正在使用 Adonis Auth 自己創建的遷移。 在其中創建令牌表。 嘗試創建此表時顯示錯誤,mariadb 立即關閉。 我正在使用 mysql2 錯誤 ...
[英]COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4'
我正在嘗試添加表情符號在我的應用程序中。 為了使它工作,我必須在數據庫連接中使用charset: 'utf8mb4' 。 但是后來我的其他搜索查詢不起作用並出現這樣的錯誤 我怎樣才能使兩者一起工作? 我正在使用 adonis.js 框架,它使用 knex 查詢/ ...
[英]Why return is not read in transactions?
我的代碼是這樣的: 我在findOrFail 、 save 、 updateOrCreateMany 、 delete中有trx 。 但是如果我運行查詢,它不會被讀取return { success: true } 在更新過程中添加trx有什么問題嗎? 如果我檢查控制台中的預覽選項卡,則返回空 o ...
[英]Access Denied after interactionFinished using node-oidc-provider
我在自定義框架中使用 node-oidc-provider,具體來說是 adonisjs。 此時,我可以訪問http://localhost:3333/auth?client_id=foo&redirect_uri=http://localhost:3333/launch&respo ...
[英]AdonisJS @manyToMany relationship not loading all columns
我目前正在使用 AdonisJS v5,並且在多對多關系方面遇到了一些問題。 我有當前的 2 個模型用戶export default class User extends BaseModel { @column({ isPrimary: true }) public id: Buff ...
[英]How to a result of a promise using loop?
我需要在循環內操作 promise 的結果,但返回為空。 當我刪除 AWAIT 時,返回的是 promise。 但這種行為不是我需要的。 我需要這個 function 將最終數據返回給我。 誰能告訴我如何解決這個問題? 我感謝關注我正在使用 lodash 循環和 AdonisJs 進行查詢 ...
[英]Cannot read properties of undefined (reading 'has') error /AdonisJs
當我在視圖 adonis js 中顯示 flash 消息時發生錯誤 無法讀取未定義的屬性(讀取“有”) ...
[英]How can I make query model relation has to many easy to read?
我的查詢有很多這樣的: 如果查詢運行,結果如下: 我想要 model 關系查詢的結果,如下所示: 所以調用這個 api/query 時很容易使用我嘗試了查詢生成器,它可以工作。 但我想使用 model 因為它更干凈我怎么解決這個問題? 請幫忙。 謝謝注意:文檔: https://docs.adon ...
[英]How do I define object data type in parameter?
我的代碼是這樣的: 像這樣返回參數: 我想在參數中定義 object 數據類型。 所以它不使用any 我嘗試這樣: 但存在消息: Property 'params' does not exist on type 'object' 我怎么解決這個問題? ...