vue props (but you want to make ui extension)

首要: props 係 per component 既

edited: 原來係中左 fallthrough attributes : https://vuejs.org/guide/components/attrs.html

所以個 q-inline-edit-table columns:columns rows:rows 會隊晒入 q-table 到, 改都改唔到 (change object ref), 唯有直改 類面 d value

再所以有第二個做法係熄左個 fallthrough attribute 自己用 $attr 去處理… 但上面個方法都得

再再 前者原來 vue 都有叫你(盡量)唔好咁做 : https://vuejs.org/guide/components/props.html#mutating-object-array-props, 但作為 extension 無理由係個 q-table children 到 emit 個 event, 叫 user d code 去突登加個 eventListener 去接再加翻個 action column 既…

btw 佢都頭盔左呢個 design As a best practice, you should avoid such mutations unless the parent and child are tightly coupled by design.

其實 vue 太多 magic shorthand 遇到唔同 tag, case 同一個 syntax 都有唔同結局, 尤其 v-bind

遇到 html tag 但 class 同其他 attr 又會唔同, 遇到 component, 就直頭 pass props.睇唔明諗唔明就睇下 doc 先…

仔唔好亂改個 props 啊 之 哦原來你整既 ui extension 咁又唔同講法

每個 component (加 children) 都有自己既 props, 由阿媽一到傳到落底都係用同一個 props (suppose 你既設計最好係咁)

props 其實係一條同 d html 若即若離既 variables/status tree

又可以向下傳

你 define 左會用咩 props, 就拎得到 !

d props 如果指住左某個 object

columns: [{xxx}, {yyy}]

你d仔係唔可以隨意 assign 個 new array 隊翻入去

會出一個 columns=xxx 既 error

點解呢

  1. 因為個 array 係 proxy array
  2. 你隊個新既係無用
  3. 個 props 係好多隻野望住 (reactive嘛) 你求其隊個新一隻野落去會搞亂晒望住佢既人

咁點算 點改

咪唔好郁個 object ref, 你可以 push, shift 等等 一做就 reflect

其實雙阿媽到整左既 props, 一路傳落去用咪幾好 (EDITED: 今日先發現原來d props 係 auto 向下落, 個 template tag set 好左個 props, 下面d child tag 自然會用到)

(EDITED: template v-slot:body=”props” , using v-slot, props will 自然向下, 反而唔好叫 props 叫 slotProps 好d, v-slot:body=”slotProps”, 呢個係 argument (not parameter) 黎 , props 其實係自動入(同你入咩名無關, 咁不如叫 slotProps 以之識別), 跟住入到去 slot 就會改過花名叫 slotProps)

suppose 好好地用 9成時間 唔洗轉呢面d values

點知你個 task 係整 ui extension , 當你整緊個 q-table wrapper, 阿媽d props 係 user 自己砌, 跟住 pass 入去 q-table son 之前就攝下野

同一時間 你又唔想人用你個 library 個陣要加太多 props, eventlistener 等等

咁你而家想攝野又無可厚非

(e.g. 攝多個 action column 係 columns 前面)

所以即係你要改props la, 但千祈唔好叫佢指個新 ref, 你用住 original 個 value 攝黎攝去, 只要 obj ref 唔變係 ok ga

process.env.xxx in quasar

  1. you need put the env in front of the command rather than using export, it seems quaser build need in the command session (when case you cannot use .env)
  2. it is a replacement of text rather than run in js, so you may check the generated code to see is the actual value you want
  3. use args in docker-compose to pass the variable instead of ENV, it may make you life easier. Seems the process.env is not traditional env. But it similar like a argument passing

Page loaded over HTTPS but requested an insecure XMLHttpRequest endpoint

https://stackoverflow.com/a/61903230

哈哈你以為呢個就係答案?

其實係你個 route set 左個尾有 “/” 或者無 “/”

api url 其實好 strict 個尾有”/” 同無 , 你 call 錯都會出 error… 不過最奇係出上面個 error…

你想唔出 error, 可以去 fastapi 個 docs 到對下有無 call 錯 “/” 既 api … 你想 set “o岩” 可以去 routes 到 set “/” or “” …

但有趣地方係 localhost 又無事

deploy 上 server 先出事 唔知係 traefik 問題定係 browser 對出街既網 strict d 了

traefik some note

php real ip issue:

Use $_SERVER[‘HTTP_X_FORWARDED_FOR’] instead of $_SERVER[‘REMOTE_ADDR’] for php if using traefik as loadbalancer, or 172.X.X.X internal IP is return rather than real ip


http redirect

if need http→https

https://stackoverflow.com/questions/60510232/how-can-i-redirect-http-to-https-using-traefik

put this label under traefik service in docker compose and remember set traefik.enable=true


dashboard:

if you want the dashboard, see this:

https://gist.github.com/Maescool/7ec9836c48e53de79cc51fb70fbe1388