Skip to content

Instantly share code, notes, and snippets.

View amorfati0310's full-sized avatar
:octocat:
make whatever you like

Chany (dali) amorfati0310

:octocat:
make whatever you like
View GitHub Profile
(async function(store){
const res = await teamsApi.getTeams()
store.setState({teams: res})
console.log(store.state)
// TODO 여기 왜 안 되는지 물어보기
// window.document.addEventListener('DOMContentLoaded', () => {
// console.log(store.state)
// const teamBoards = new TeamBoards({ elements: '#team-boards', teams: store.state.teams })
// })
// 상품 데이터
const data = [
{ name: '초콜렛', price: 2000 },
{ name: '아이스크림', price: 1000 },
{ name: '컵라면', price: 1600 },
{ name: '볼펜', price: 2500 },
{ name: '아메리카노', price: 4000 },
{ name: '과자', price: 3000 },
{ name: '탄산수', price: 1200 },
{ name: '떡볶이', price: 3500 },
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
parser: 'babel-eslint'
},
@amorfati0310
amorfati0310 / temp1206.js
Last active December 6, 2019 13:10
temp1206.js
async function clickHandler() {
if (content === 'empty' || content === 'addDone') modalOff();
else if (nickname === '') switchContent('empty');
else if (content === 'add') {
switchContent('addDone');
await sendFriendRequestFunc({
variables: { id: testId, nickname },
});
} else if (content === 'delete') {
switchContent('deleteDone');
@amorfati0310
amorfati0310 / MyBookMarks.vue
Created November 6, 2019 12:29
MyBookMarks :)
<template>
<div class="MyBookMarks">
<MainWrapper>
<div class="container">
<div class="row margin-top-40">
<SideBarHeading
:title="title"
/>
</div>
<div class="row margin-top-35">
@amorfati0310
amorfati0310 / MyBookMarks.vue
Last active November 5, 2019 14:16
Refactoring191105.vue
<template>
<div class="MyBookMarks">
<MainWrapper>
<div class="container">
<div class="row margin-top-40">
<SideBarHeading
:title="title"
/>
</div>
<div class="row margin-top-35">
@amorfati0310
amorfati0310 / BookMarkList.vue
Created October 31, 2019 09:45
vue Router 설계 관련 궁금
<template>
<div class="BookMarkList">
<GigListByChunk
:gigs="chunkList(bookmarks)"
:chunk-count="chunkCount"
/>
</div>
</template>
<script>
@amorfati0310
amorfati0310 / textarea.html
Created October 30, 2019 07:46
textarea.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
textarea::-webkit-input-placeholder {
color: #0bf;
@amorfati0310
amorfati0310 / optionClass.js
Created October 23, 2019 13:41
optionClass.js
var Person = class {
constructor(options) {
this.name = options.name;
[...Object.keys(options.methods)].forEach(key => {
this[key] = options.methods[key]
})
}
}
@amorfati0310
amorfati0310 / calendar.js
Last active October 15, 2019 06:20
calendar.js
export default {
namespaced: true,
state: {
dateSet: [], // 캘린더 날짜 비교를 위한 배열
updatedDateId: null,
},
mutations: {
updateDateSet(state, data) {
state.updatedDateId = data.id;
switch (state.dateSet.length) {