| 
					
				 | 
			
			
				@@ -5,6 +5,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd">新增</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-button preIcon="ant-design:container-outlined" type="primary" @click="handleSwitchPageType">更换版本</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-button preIcon="ant-design:question-circle-outlined" type="primary" @click="handleHelp">帮助</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-popconfirm title="确定从剪切板导入配置?" @confirm="handleImport"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button preIcon="ant-design:container-outlined" type="primary">导入</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-popconfirm> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <template #action="{ record }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a class="table-action-link" @click="handleConfig(record)">配置</a> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -210,6 +213,26 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.error(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  /** 从剪切板导入 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  async function handleImport() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const text = await window.navigator.clipboard.readText(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const arr = JSON.parse(text); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!Array.isArray(arr)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        throw '剪切板内容格式错误'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      await Promise.all( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        arr.map((r) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return saveOrUpdate(r, false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      reload(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } catch (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      message.error(`错误:${e}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.error(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <style scoped lang="less"> 
			 |