2020-03-01から1ヶ月間の記事一覧

Vue 復習中

thisによる参照 thisが指すのはVueインスタンス自身 data: { items: [ { name: 'item1', price: 200, quantity: 3 }, { name: 'item2', price: 340, quantity: 2 }, ] }, computed: { totalPrice() { // this.itemsはこのVueインスタンスのdataのitems retur…

JavaScriptnのfilter

developer.mozilla.org const words = ['a', 'aa', 'spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; const result = words.filter(word => { var option = word.length > 6 ? true : word.length === 1 console.log(option) return opt…

qiita.com vue-thin-modalを使ってみたい

vim

vim dein deniteいれた ripgrepいれた :call dein#install() スペースでファイルの複数選択可能 , u j project内のファイル名ファジーマッチ , u f カレントディレクトリからのファイル指定 , u g 本文中の文字列検索 shift jかk バッファー切り替え ctrl + c…

今日のgoとvueの勉強

今日の詰まりポイント goのAPIを叩くと type Product struct { ID int `gorm:"primary_key;not null" json:"id"` Name string `gorm:"type:varchar(200);not null" json:"name"` Memo string `gorm:"type:varchar(400)" json:"memo"` State int `gorm:"type:…

CORS

夜も遅いので備忘録的にササッと書くだけ。詳しい解説は省略。 golangでginを使ってAPI作成。localhost:8080で立ち上げる。 vueを使ってクライアント側の画面を作成。localhost:8081で立ち上げる。 vueの画面から、APIにGETリクエストを投げると阻まれる。 C…