| 
									
										
										
										
											2023-02-09 19:18:06 +00:00
										 |  |  | {{define "component/settingListItem"}} | 
					
						
							|  |  |  | <a-list-item style="padding: 20px"> | 
					
						
							|  |  |  |     <a-row> | 
					
						
							|  |  |  |         <a-col :lg="24" :xl="12"> | 
					
						
							|  |  |  |             <a-list-item-meta :title="title" :description="desc"/> | 
					
						
							|  |  |  |         </a-col> | 
					
						
							|  |  |  |         <a-col :lg="24" :xl="12"> | 
					
						
							|  |  |  |             <template v-if="type === 'text'"> | 
					
						
							|  |  |  |                 <a-input :value="value" @input="$emit('input', $event.target.value)"></a-input> | 
					
						
							|  |  |  |             </template> | 
					
						
							|  |  |  |             <template v-else-if="type === 'number'"> | 
					
						
							| 
									
										
										
										
											2023-05-04 16:57:42 +00:00
										 |  |  |                 <a-input-number :value="value" @change="value => $emit('input', value)" :min="min" style="width: 100%;"></a-input-number> | 
					
						
							| 
									
										
										
										
											2023-02-09 19:18:06 +00:00
										 |  |  |             </template> | 
					
						
							|  |  |  |             <template v-else-if="type === 'textarea'"> | 
					
						
							|  |  |  |                 <a-textarea :value="value" @input="$emit('input', $event.target.value)" :auto-size="{ minRows: 10, maxRows: 10 }"></a-textarea> | 
					
						
							|  |  |  |             </template> | 
					
						
							|  |  |  |             <template v-else-if="type === 'switch'"> | 
					
						
							|  |  |  |                 <a-switch :checked="value" @change="value => $emit('input', value)"></a-switch> | 
					
						
							|  |  |  |             </template> | 
					
						
							|  |  |  |         </a-col> | 
					
						
							|  |  |  |     </a-row> | 
					
						
							|  |  |  | </a-list-item> | 
					
						
							|  |  |  | {{end}} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {{define "component/setting"}} | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  |     Vue.component('setting-list-item', { | 
					
						
							| 
									
										
										
										
											2023-04-25 11:30:21 +00:00
										 |  |  |         props: ["type", "title", "desc", "value", "min"], | 
					
						
							| 
									
										
										
										
											2023-02-09 19:18:06 +00:00
										 |  |  |         template: `{{template "component/settingListItem"}}`, | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | {{end}} |