반응형

{visibility:error?'visible','hidden'} 

반응형
반응형

소스수정해도 LG cloud망에서는 반영되었으나 외부망과 스마트폰앱에서는 반영안되는 현상있었으나 아래 수정함으로서 해결됨

webpack.common.js 여러번 수정함

module.exports = {
  entry: {
    // index: "./src/index.js", --> key 값이 index 일 경우 index.js 가 만들어지는데 운영서버에서 block 되는 경우가 발생하여 test 로 변경함
    // entry: "./src/index.js", --> key 값이 entry 인 경우도 운영서버에서 block
    // test: "./src/index.js", 얘도 삭제됨
    app: "./src/index.js",
  },

 

webpack.development.js, webpack.localhost.js, webpack.production.js

[name]  --> [name].[contenthash] 로 수정됨

module.exports = (env) =>
  merge(common, {
    // entry: {
    //   'index': './src/index.js',
    // },
    devtool: "source-map", // only for development
    output: {
      path: path.resolve(__dirname, `build`),
      publicPath: `/`,
      filename: `[name].[contenthash].min.js`, //contenthash추가
      chunkFilename: "[id].js", // 기본 설정인데 [id]는 청크 순서대로 0,1,2,3,...
      sourceMapFilename: "[name].[contenthash].js.map", //contenthash추가
      ...

 

반응형
반응형
반응형
반응형
반응형
반응형

dev-version이라는 branch를 생성하면서 그 branch 하나만 받아짐, branch가 많다면 그냥 git clone보다 속도 더 빠른듯

그런데 git config -l로 확인해보면 remote.origin.fetch=+refs/heads/[branch]:refs/remotes/origin/[branch]로 되어 있음, 그러면 다른 branch 못 받으므로 remote.origin.fetch+=refs/heads/*:refs/remotes/origin/*로 고쳐줘야 함

그리고 나서 git remote update해야지 다른 branch도 확인가능함, git remote update하기전에는 git branch -a 해봐도 branch하나만 보임

반응형
반응형

text baseline을 기준으로 세로 정렬

그래서 한줄일때만 쓰기 좋음 -> 고치려면? 일단은 display:flex로 고치는게 빠를듯

 

vertical-align을 text-top으로 고치니 uplodate template download버튼 2개는 맞춰졌음 그러나 모든 버튼을 일일이 다 고쳐줘하는 듯 하고 버튼이 아닌 것들은 어떻게 고쳐야 하는지...

https://blog.hivelab.co.kr/%EA%B3%B5%EC%9C%A0-vertical-align-%ED%8C%8C%ED%97%A4%EC%B9%98%EA%B8%B0-1%EB%B6%80/

vertical-align에 대해 자세히 나온 글, 아직 다 보진 못했음

 

[공유] Vertical-align 파헤치기! – 1부 | Hivelab Blog

[공유] Vertical-align 파헤치기! – 1부 들어가며 안녕하세요. 하이브랩 UI개발2팀 도재경, 우현주입니다. 각자 UI개발1팀과 SEP실에서 열심히 과제를 진행했지만 서로 같은 고충을 느꼈던 저희!!! 그

blog.hivelab.co.kr

 

반응형
반응형

-> 예전에 정리한 자료인데 다시 보니 잘 이해안됨;

display: block, height:100%이면 height는 부모나 자식을 자르지 않고 다보여주는 방향으로 결정되는 듯

그래서 height늘이려면 간단히 자식의 길이를 늘이거나 추가하면 됨

 

반응형
반응형

html 태그나 element 등은 기본적으로 순서대로 작성됨

그런데 position을 사용하면 코드 순서와 상관없이 원하는 곳에 그려낼수 있음

position따로 지정하지 않으면 defaut로 static인데, 이 static이 뭔지를 이해해야함 -> 코드 순서대로 그려지는 상태

position을 absolute나 fixed로 설정시 가로 크기가 100%가 되는 block 태그의 특징이 사라지게 된다고 함(https://ofcourse.kr/css-course/position-%EC%86%8D%EC%84%B1)

  • position: relative
    • relative자체는 설정만 하는 것으로 소용이 없고, top/bottom/left/right으로 조정해야 효과있음
    • top/bottom/left/right 설정안해주면  static이나 마찬가지로 기존 스타일대로 위치를 차지하고 top/bottom/left/right는 0이 됨 - 상대적으로 이 위치를 0으로 보고 조정하겠다는 것
    • 그래서 이름이 relative: static일때의 위치가 0이고 그걸 기준으로 조정하는 개념이므로 그냥 화면만보면 이게 top/bottom/left/right를 얼마 설정했는지 모를수 있음
    • top/bottom/left/right설정하기 위해서는 position:relative로 설정해야하고, 그냥 static으로 두면 소용없음
    • top/bottom, left/right는 각각 상대적으로 움직이므로, 한쪽에 10주면 나머지는 -10이 됨
    • 한쪽으로 밀리는 것 막으려면 양쪽 다 지정해주면 됨
    • static한 위치를 기준으로 상대적으로 움직임 -> 코드 순서대로니까 결국 내 위에 있는 애를 기준으로 한다는 의미
  • position: absolute
    • position이 선언된 부모로부터 절대적 (부모 position이 설정안되고 static이면 소용없음, static아닌 다른 position으로 설정해야함)
    • 만약 부모가 없으면 전체 화면 <body>에 상대적으로 움직임?
    •  보통은 부모 positon:relative로 설정함
    • top/bottom/left/right 설정안해주면  static이나 마찬가지로 기존 스타일대로 위치를 차지차고 top/bottom/left/right는 0이 아니라 그 위치에서의 pixel값이 자동 계산되어 할당됨,
    • position: relative, position: absolute 설정하고 top/bottom/left/right를 설정안했을때 겉보기에는 동일하게 위치하지만 top/bottom/left/right값은 다름, position:relative에서는 0, position: absolute에서는 차지하는 위치가 계산되어 할당됨
    • 그래서 이름이 absolute: 화면상 위치로 top/bottom/left/right를 얼마 설정했는지 알수 있음
    • top/bottom/left/right 모두 0으로 설정하면 전체 화면을 다 차지?
  • position: fixed
    • absolute와 달리 부모 필요없고음
    • 특정위치에 계속 고정됨
    • top/bottom/left/right 설정안해주면 static이나 마찬가지로 기존 스타일대로 위치를 차지하지만 스크롤을 올리거나 내려도 위치는 고정됨
    • top/bottom/left/right 모두 0으로 설정하면 전체 화면을 다 차지?
    • position: absolute와 top/bottom/left/right를 주고 움직이는 방식은 같지만 차이는 그 위치가 스크롤을 해도 고정된다는 것
반응형
반응형

#FFFFFF: white

#000000: black

R #FF0000: red

G #00FF00: lime (흔히 아는 그린색은 아니고 라임색, 형광연두같은 색)

B #0000FF: blue

반응형
반응형
반응형
반응형

전체화면 덮는 역할

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;   전체화면 다 차지하고 위치 고정되도록
  width: 100%;
  height: 100%;   
  background-color: #0002; 색깔 회색으로, #0002보고 당황하지 말자 #NNNNNN형식에서 줄인듯

 

.modal {
  position: fixed; 전체화면 다 차지하고 위치고정되도록
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); 아래를 흐리게 만드는 역할
  display: flex; 
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

여기에 z-index 가장 큰 값 주면 그 위에 뭐가 더 덮일일이 없음, 뭐가 더 덮이면 정상동작안하게 되므로

반응형
반응형
fast-forward 사전적 의미로는, (테이프를 틀지 않고) 앞으로 감다, 빨리감다, 되감다, 과거로 돌아가다... 
"fast forward"는 이야기에서 중요하지 않은 부분은 빠르게 생략하고 화자가 말하고 싶은 부분부터 계속 진행할 때 사용하는 표현이에요. 이 표현은 원래 테이프나 VCR 재생기에서 노래나 영화를 생략하기 위한 "fast forward (빨리 감기)" 버튼에서 유래되었어요.

git pull을 할때, pull한 결과가 Fast-forward라는 메세지가 뜰 때가 있음

Fast-forward라는 것은 한쪽에서는 수정이 되었지만 한쪽은 전혀 수정이 없기 때문에 merge할 때 새로운 병합된 커밋이 생성되는 것이 아니라 그냥 포인터의 위치만 더 최신으로 옮겨지는 개념

양쪽에서 수정을 했다면 새로운 커밋번호가 생성이 될 것임, but Fast-forward시에는 그렇지 않고 head가 이동만 하는 것이므로 새로운 커밋번호 자체가 생성되지 않음

  • fast-forward merge: 충돌날일 없음
  • 3-way merge: fast-forward가 아니면 3-way, 충돌가능성 있음
반응형
반응형
반응형
반응형

내 remote와 실제 원격의 remote의 일치점이 아예 없으면 

git fetch, git pull, git remote update 어떤 걸 시도해도 다음과 같이 에러가 남

 ! [rejected]        master     -> origin/master  (non-fast-forward)

 

  • 여기서 중요한건 fetch도 에러가 난다는 것 fetch도 일종의 merge? origin/remotes와 내 로컬의 remote를 merge하는 것???? 근데 정상이라면 항상 fast forward merge만 이루어짐. 내가 remote를 수정할 일이 없기 때문
  • fetch는 remote의 최신을 FETCH_HEAD라는 이름으로 가져오는 것인데, 기존 remote와 상관없이 별도로 가져오는 것은 아님- 만약 그렇다면 이렇게 non-fast-forward라는 이름으로 에러가 날 일이 없음
  • 즉 fetch는 fast-forward merge만 하는 merge라는 것! 근데 fast-forward가 안되니까 non-fast-forward error발생

 

만약 누군가가 push --forced option을 사용해서 push를 했다면 그걸 pull받는 입장에서는 위 에러가 날수 밖에 없음

--force push를 했다는 것 자체가 이전에 순차적으로 쌓인 history를 무시하고 다른 걸 넣은 것이므로

 

https://velog.io/@rain98/%EA%B9%83%ED%97%88%EB%B8%8C-non-fast-forward-%EC%97%90%EB%9F%AC-%ED%95%B4%EA%B2%B0%ED%95%98%EA%B8%B0

 

깃허브 non-fast-forward 에러 해결하기

깃허브 non-fast-forward 에러 해결하기

velog.io

 

반응형
반응형

author/committer로 남는 이름 등의 설정은 git config 명령어 통해서 확인/변경 가능

git pull/push 등 권한은 git Repository와 인증 정보(user, password 등 인증 방식에 따라 필요한 인증정보는 달라질 수 있음)가 있어야 함

설정확인

  • git 설정 전체 확인하기: git config -l 혹은 git config --list
  • git 설정 이름만 확인: git config --global user.name
  • git 설정 이멜만 확인: git config --global user.email

git config manual

git config한 것 삭제하기: --global을 빼고해도 되지만 그러면 완전히 삭제안될수 있음

  • git config --unset --global user.name
  • git config --unset --global user.email

git config 설정

  • name 수정: git config (--global) user.name '이름'
  • mail 수정: git config (--global) user.name '이멜'
  • 전체 수정: git config (--global) -e = git config (--global) --edit 

윈도우 환경에서 git 자격증명 변경

  1. 제어판 - 사용자 계정 - 자격 증명 관리자
  2. Windows 자격 증명
  3. 일반 자격 증명
  4. git 관련 자격 증명 편집

참고: https://yunseul-light.blogspot.com/2017/08/github-windows-git.html

반응형
반응형

git branch -a로 remote branch 안보이면 

1) git ls-remote origin 보이는지 확인후 보이면

2) git config --edit 후에 [remote "origin"] fetch=+refs/heads/*:refs/remotes/origin/* 로 변경

3) 수정확인: git config remote.origin.fetch

 

확인했더니 원래 아래처럼 되어있었고 수정후 정상동작함

[remote "origin"]
url = http://10.97.24.150:8099/csPortalGroup/csportalapi.git
fetch = refs/heads/master:refs/remotes/origin/master -> +refs/heads/*:refs/remotes/origin/

 

https://youngwonhan-family.tistory.com/entry/Git-Remote-%EB%B8%8C%EB%9E%9C%EC%B9%98-%EC%95%88%EB%B3%B4%EC%9D%BC-%EB%95%8C-%ED%95%B4%EA%B2%B0%EB%B0%A9%EB%B2%95

 

Git - Remote 브랜치 안보일 때 해결방법

remote 신규 브랜치 안보일 때 git branch -a 명령으로 remote에 생성한 신규 브런치가 안보일 때, git ls-remote origin 명령으로 확인한다. 신규 브랜치가 보이는지 확인한다. Config 수정 Config 수정은 아래 두

youngwonhan-family.tistory.com

 

반응형
반응형
  .table-wrap {
    th:nth-child(2n + 2),
    td:nth-child(2n + 2) {
      background-color: var(--Light-Gray-BG);
    }

    .mobile-table-split {
      & > td {
        height: 10px;
        padding: 0 !important;
      }
    }
  }
반응형
반응형

[...Array(N).keys()]

Array.from(Array(N).keys())

반응형
반응형
반응형
반응형
반응형
반응형
반응형
반응형

에러: Promise로 받은 state의 변화를 감지하려고 하여 useEffect사용했으나, Promise결과가 반환되기 전에 useEffect가 한번만 call되고 결과값이 나온후에 다시 call되지 않음

 
 const getDivisionList = async () => {
    try {return await request(getDivisions);}
    catch (error) {console.error(error);}
  };
 
 useEffect(() => {
    const init = async () => {
      const [divisions] = await Promise.all([getDivisionList()]);
     
      setDivisionOptionsValue(divisions.map(n=>({value:n.companyCode, label:n.companyCode, group:"sortType"})));
    };
    init();
  }, []);
 useEffect(() => {setDivisionOptions(setDivisionOptionsValue)}, [divisionOptionsValue]);
 ........
 divisionOptions[0].... -> 에러남

 

에러: promise결과값을 useMemo로 저장시 끝까지 promise상태고 남아 있어 에러남

  const divisionOptionsValue = React.useMemo(()=>{
    const init = async () => {
      const [divisions] = await Promise.all([getDivisionList()]);
      setDivisionOptions(divisions.map(n=>({value:n.companyCode, label:n.companyCode, group:"sortType"})));
      return (divisions.map(n=>({value:n.companyCode, label:n.companyCode, group:"sortType"})));
    };
    return init();
  },[])
 .......
 setDivisionOptions(setDivisionOptionsValue) -> setDivisionOptionsValue는 계속 Promise상태
 divisionOptions[0].... -> 에러남

 

정상

  useEffect(() => {
    const init = async () => {
      const [divisions] = await Promise.all([getDivisionList()]);
      setDivisionOptions(divisions.map(n=>({value:n.companyCode, label:n.companyCode, group:"sortType"})));
      setDivisionOptionsValue(divisions.map(n=>({value:n.companyCode, label:n.companyCode, group:"sortType"})));
    };
    init();
  }, []);
 
 .......
 setDivisionOptions(setDivisionOptionsValue)
divisionOptions[0].... -> 정상동작
반응형
반응형
반응형
반응형

git push origin HEAD:master

현재 branch의 HEAD Commit까지의 변경사항origin이라는 이름을 갖는 원격 저장소master branch에 전송하라

반응형
반응형

특히 git pull 한다고 해서 remote의 내용을 다 가져오는 것이 아니고 특정 branch만 가져오는 것

git pull remote명 branch명을 생략해서 쓰다보니 헷갈리는데 사실은 remote명 local branch명:remote branch명이 생략된 것

remote명은 보통 default인 origin을 쓰므로 origin이 생략된 것이고

branch명은 local에 --set-upstream으로 지정을 해두었으면 그 지정된 branch가 tracking branch로 사용됨, remote와 local의 쌍을 이름을 다르게 하면 매우 헷갈리므로 그렇게는 거의 안쓰므로 보통 local remote동일한 branch명으로 연결해둠

 

tracking branch 지정하기

  • git push --set-upstream origin master = git push -u origin master
  • 한번 tracking branch로 지정해두면 향후 git push/fetch/full 할 때 이후는 생략가능

 

그런 줄 알았는데 git pull 하니까 dev2nd, master둘다 pull함, 특정한 한 브랜치 아니고 tracking branch전부가 대상인듯 

 

반응형
반응형
반응형
반응형
/^\d{1,7}$/.test(refCost.current.value)

postgreSQL numeric(10,3)이면 숫자가 최대 7자, 소수점 3자리까지 가능

7자리 넘으면 에러 발생, 7자리 체크위해서 regex사용가능

제한없이 숫자만 입력받으려면 {1,7} -> +로 변경

/^\d+$/.test(refCost.current.value)

 

반응형
반응형

/^\d+$/.test('123') true

/^\d+$/.test(123) true

/^\d+$/.test(123.0) true -> 123.0을 string으로 변환한후에 체크하는 듯

/^\d+$/.test('123.0') false

/^\d+$/.test('123r') false

 

Number.isInteger(123) true

Number.isInteger(123.0) true

Number.isInteger(123.1) false

Number.isInteger('123') false

반응형
반응형

1) text-align: left/center/right;

block 요소안의 inline 요소를 정렬할 때 사용

다른 요소들이 없을때 가능-어떤것 오른쪽으로 어떤건 왼쪽으로 이렇게 하려면 flex를 이용해야 함

 

2) display: flex, justify-content: flex-start/center/flex-end;

 

1) 2) 샘플 참고: https://hianna.tistory.com/837

 

그런데 위의 1) 2)는 바로 위 부모 밑에 모든 애들이 다 한 방향으로 정렬되게 되어 있음

기본은 좌측정렬이고 마지막만 우측정렬하려면

3) display: flex, justify-content: flex-start/center/flex-end; 설정해두고 우측 정렬할 것만 margin-left: auto

참고: https://smthousand.tistory.com/28 

 

 

1) 2) 3) 모두 바로 위 부모 밑 자식에게 적용가능함

할아버지 할머니에 비교해서 왼쪽 정렬되게 하려면

4) position: absolute 이용

할아버지 할머지는 position: relative로 설정, 우측 정렬하고 싶은 손주는 position: absolute, right:0

 

 

5) display: flex, justify-content: space-between 해주면 2개자식이 있을 때 최대한 멀리 떨어뜨려줌, 자식이 3개일때는?

6) display: flex, 첫번째 자식을 display:flex, flex-grow:1 해주면 됨 왜그런지는?

반응형
반응형
  • CSS: url
  • HTML
    • link: href
    • link아닌 경우(이미지 비디오 등): src
반응형

+ Recent posts