https://medium.com/@aar0nTw/%E5%BC%B7%E5%A4%A7%E7%9A%84-git-extension-gitlens-vs-code-extension-how-to-editor-%E7%B7%A8%E8%BC%AF%E8%80%85-5-e1800d9d87bc
文章加密
2020年9月24日 星期四
2020年9月23日 星期三
nuxt-i18n 的 numberFormat 寫在另一支檔案,在import或require進去都會報錯-- Cannot find module './locale-settings.js' (未解)
3|nuxt-stage | FATAL Cannot find module './locale-settings.js'
3|nuxt-stage | Require stack: 3|nuxt-stage | - /data/wwwroot/officalsite_nuxt/nuxt.config.js 3|nuxt-stage | - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/config/dist/config.js 3|nuxt-stage | - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/cli/dist/cli-index.js 3|nuxt-stage | - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/cli/dist/cli.js 3|nuxt-stage | - /data/wwwroot/officalsite_nuxt/node_modules/nuxt/bin/nuxt.js 3|nuxt-stage | Error: Cannot find module './locale-settings.js' 3|nuxt-stage | Require stack: 3|nuxt-stage | - nuxt.config.js 3|nuxt-stage | - node_modules/@nuxt/config/dist/config.js 3|nuxt-stage | - node_modules/@nuxt/cli/dist/cli-index.js 3|nuxt-stage | - node_modules/@nuxt/cli/dist/cli.js 3|nuxt-stage | - node_modules/nuxt/bin/nuxt.js 3|nuxt-stage | at Object.<anonymous> (nuxt.config.js:1) 3|nuxt-stage | at Generator.next (<anonymous>) 3|nuxt-stage | ╭───────────────────────────────────────────────────────────────────────────────╮ 3|nuxt-stage | │ │ 3|nuxt-stage | │ ✖ Nuxt Fatal Error │ 3|nuxt-stage | │ │ 3|nuxt-stage | │ Error: Cannot find module './locale-settings.js' │ 3|nuxt-stage | │ Require stack: │ 3|nuxt-stage | │ - /data/wwwroot/officalsite_nuxt/nuxt.config.js │ 3|nuxt-stage | │ - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/config/dist/config.js │ 3|nuxt-stage | │ - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/cli/dist/cli-index.js │ 3|nuxt-stage | │ - /data/wwwroot/officalsite_nuxt/node_modules/@nuxt/cli/dist/cli.js │ 3|nuxt-stage | │ - /data/wwwroot/officalsite_nuxt/node_modules/nuxt/bin/nuxt.js │ 3|nuxt-stage | │ │ 3|nuxt-stage | ╰───────────────────────────────────────────────────────────────────────────────╯ 3|nuxt-stage | npm ERR! code ELIFECYCLE 3|nuxt-stage | npm ERR! errno 1 3|nuxt-stage | npm 3|nuxt-stage | ERR! officalsite@1.0.0 stage: `PORT=3333 node ./node_modules/nuxt/bin/nuxt.js start` 3|nuxt-stage | npm ERR! Exit status 1 3|nuxt-stage | npm 3|nuxt-stage | ERR! 3|nuxt-stage | npm ERR! Failed at the officalsite@1.0.0 stage script. 3|nuxt-stage | npm ERR! 3|nuxt-stage | This is probably not a problem with npm. There is likely additional logging output above.
2020年9月22日 星期二
declare module
npm install vue-click-outside但要用在typescript裡會有紅線,如下:
確定它沒有@types/的檔案,須自己建一個.d.ts的檔案並且宣告,如下
https://www.npmjs.com/package/vue-click-outside
(maybe: 可以思考下 -- https://juejin.im/post/6844903882309500942 )
2020年9月18日 星期五
data URIs or data URL
https://css-tricks.com/data-uris/
裡的
Use this online conversion tool.
https://websemantics.uk/tools/image-to-data-uri-converter/
裡的
If you’re converting SVG to data-URI to embed into a style sheet or HTML please consider this method instead: Cross browser SVG URI background-images.
https://websemantics.uk/articles/embedding-svg-cross-browser/
看到 The current solution is svg4everybody
2020年9月16日 星期三
vue-country-flag, currency symbol
country-flag (from i18n):
https://www.npmjs.com/package/vue-country-flag
currency symbol:
https://kazupon.github.io/vue-i18n/guide/number.html
https://phrase.com/blog/posts/nuxt-js-tutorial-i18n/#Number_localization
https://stackoverflow.com/questions/55443835/nuxt-i18n-number-localization
https://i18n.nuxtjs.org/options-reference
http://kazupon.github.io/vue-i18n/guide/number.html#custom-formatting
2020年9月15日 星期二
google map (還有未看)
https://developers.google.com/maps/documentation/javascript/overview
https://console.cloud.google.com/billing/01FB5A-6622F4-46197A?project=practice01-289607 (不小心開在alice那個帳戶)
https://medium.com/front-end-augustus-study-notes/google-map-api-1-a4e794b0162f
https://developers.google.com/maps/documentation/javascript/using-typescript 官網使用的
進度
https://developers.google.com/maps/documentation/javascript/adding-a-google-map 看到Tips and troubleshooting,延伸下面連結
https://developers.google.com/maps/solutions/store-locator 未看
新知識點:
- Google Maps
- quirks mode
- script.defer:
http://n.sfs.tw/content/index/10323 - LatLng:
https://developers.google.com/maps/documentation/javascript/reference/coordinates - Mercator projection
- JSONP:
全称是 "JSON With Padding", 词面意思上理解就是 "填充式的JSON"。它不是一个新鲜的东西,隶属于 JSON 的一种使用方法,或者说是一种使用模式,可以解决一些常见的浏览器端网页跨域问题。
型式: url?callback=xxx xxx
簡單的說就是: 回调函数+数据,至于这个数据是怎么产生的,说粗鲁点无非就是字符串拼接了。
ex: <script src="http://server2.example.com/RetrieveUser?UserId=1823&callback=parseResponse"></script>
注意:JSONP只支持get的用法,並且对于两个不同域之间两个页面的互相调用也是无能为力。