쿠폰 번호 리스트 - 4자리 마다 하이픈 추가
This commit is contained in:
		| @@ -202,7 +202,7 @@ | |||||||
|               </template> |               </template> | ||||||
|  |  | ||||||
|               <template v-slot:item.couponNumber="{ item }"> |               <template v-slot:item.couponNumber="{ item }"> | ||||||
|                 {{ item.couponNumber }} |                 {{ formatWithHyphens(item.couponNumber) }} | ||||||
|               </template> |               </template> | ||||||
|  |  | ||||||
|               <template v-slot:item.isUsed="{ item }"> |               <template v-slot:item.isUsed="{ item }"> | ||||||
| @@ -431,6 +431,14 @@ export default { | |||||||
|       this.coupon_number_count = null |       this.coupon_number_count = null | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  |     formatWithHyphens(value) { | ||||||
|  |       const chunks = []; | ||||||
|  |       for (let i = 0; i < value.length; i += 4) { | ||||||
|  |         chunks.push(value.substr(i, 4)); | ||||||
|  |       } | ||||||
|  |       return chunks.join('-'); | ||||||
|  |     }, | ||||||
|  |  | ||||||
|     async getCouponList() { |     async getCouponList() { | ||||||
|       this.isLoading = true |       this.isLoading = true | ||||||
|       try { |       try { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung