본문 바로가기

개발중

(617)
js 배열에서 특정 위치 index 찾기 Array.prototype.findIndex() 한 리스트가 있는데 list: [ { name: "포장", id: 0 }, { name: "이벤트", id: 1 }, { name: "영양정보", id: 2 }, { name: "online 유통", id: 3 }, { name: "offline 유통", id: 4 }, { name: "맛", id: 5 }, { name: "크기", id: 6 }, { name: "안정성", id: 7 }, { name: "가격", id: 8 }, ] 나한테는 id 값만 주어진다. 특정 객체를 삭제 하려면 index 를 알고 splice 를 이용해서 삭제 해야 하는데 특정 id 값의 위치를 알기 위해서 for 문을 여러번 돌리고 있었다. 그러다 좋은 기능을 발견해서 기록..
vue 에서 div 에 마우스 hover 순간 - 버튼 만들기 forEach 문으로 돌린 div 가 있는데 div 에서 마우스가 특정 div 에 올라갔을 때 거기에만 버튼을 보이게 하는 효과. Vue.js {{ element.name }} CSS .board-column-content { height: auto; overflow: hidden; border: 10px solid transparent; min-height: 60px; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; width: 100%; .board-item { cursor: pointer; width: 100%; height: 40px; margin: 5px 0; background-col..
카테고리 완성 기록 /** * 경우 1 ) 전체 코드 반환 */ public List getParentCodeList( int sysCode ) { return sysCode > 0 ? separateSyscode( this.commonParentCodeList , sysCode ) : this.commonParentCodeList; } /** * 경우 2 ) 전체 코드 + depth 반환 */ public List getParentCodeListFilterDepth( int sysCode, int depth ) { List codeList = generateCodeList(); codeList = mappingParentAndChild( codeList ); codeList = separateParent( codeList..
카테고리 반환 코드 기록 카테고리 반환 코드를 만들었는데 나로썬 최선이었으나(;´д`)ゞ jw 선배 코드는 ,,, 대박 (>人<;) package com.rsn.POMS.api.code.service; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import co..
Field 활용 java.lang.reflect.Field 더보기 docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html public List getParentCodeList( int sysCode, String filedName, String value) { List codeList = getParentCodeList(sysCode); try { Field field = CodeVo.class.getDeclaredField(filedName); field.setAccessible(true); Object paramValue; if(field.getType() == int.class) { paramValue = Integer.parseInt(value); } el..
vue 파일 이름 바꿨을 때 "Already included file name~~~" 에러 🖤 글이 도움이 되었다면 유튜브 클릭 해주세요 🖤 https://www.youtube.com/channel/UCgkxlLdjrlsFyp2GGxzY59A vue 파일 이름만 바꿨을 뿐인데 에러가 난다 아래 옵션을 추가해주니 사라졌다. 해결책 1 더보기 stackoverflow.com/questions/51197940/file-name-differs-from-already-included-file-name-only-in-casing-on-relative-p# "forceConsistentCasingInFileNames": false, 해결책 2 VS CODE OFF 했다가 ON
Map 람다식 public List getCommonCodeList( int sys_code, int max_depth ) { codeList = new ArrayList(); menuSeqMap = (Map) menuSeqMap.values() .stream() .filter( x -> x.getSys_code() == sys_code ) .collect( Collectors.toMap(menuVo::getCode_seq, Function.identity())); codeList = menuSeqMap.values() .stream() .filter(x -> x.getCode_p_seq() == 0) .filter(x -> x.getCode_depth() == 0) .filter(x -> x.getUi_type()...
elementscss 라이브러리 vue 적용 아래 사이트가 아이콘이 잘 되어 있길래 사용하려 했는데 www.elementscss.com/ npm install elementscss 명령을 해도 아이콘이 나타나지 않았다. npm install 을 하면 package.json 에서 설치 된 것을 확인을 할 수는 있지만 main.js 파일에 적용을 따로 해줘야 한다. 처음에는 이런식으로 해줬지만 여전히 적용이 되지 않았다. import elementscss from 'elementscss' Vue.use(elementscss) 아래 처럼 css 파일까지 import 를 해야 한다. import Element from 'element-ui' import './styles/element-variables.scss' Vue.use(elementscss) 기존..