File tree Expand file tree Collapse file tree 1 file changed +18
-19
lines changed
Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Original file line number Diff line number Diff line change 5454 placeholder =" 具体内容(非必填)"
5555 ></NInput >
5656 </NSpace >
57- <NText depth =" 3" >Ctrl + Shift + C 快速复制并关闭 </NText >
57+ <NText depth =" 3" >Ctrl /Command + Alt 快速复制并关闭 </NText >
5858 <!-- <ElFormItem label="最后">
5959 <NInput v-model="footer" type="textarea"></NInput>
6060 </ElFormItem> -->
6666import { useMessage } from " naive-ui" ;
6767const message = useMessage ();
6868
69- const keys = useMagicKeys ();
70- const shiftCtrlC = keys [" Ctrl+Shift+C" ];
69+ const { ctrl_alt } = useMagicKeys ();
7170
72- watch (shiftCtrlC , (v ) => {
73- if (v ) {
74- handleCopy ();
71+ whenever (ctrl_alt , () => {
72+ handleCopy ()
73+ } )
74+
75+ const handleCopy = async () => {
76+ if (! subject .value ) {
77+ message .error (" 必填项必填" );
78+ return ;
7579 }
76- });
80+ let content = handleGetContent ();
81+ await copy (content );
82+ message .success (" 复制成功" );
83+ nextTick (() => {
84+ utools && utools .hideMainWindow ();
85+ });
86+ };
7787// https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/index.js
7888// TODO 后期引入默认emoji
7989// TODO 后期引入国际化
@@ -182,18 +192,7 @@ onMounted(() => {
182192 utools = window [" utools" ];
183193 }
184194});
185- const handleCopy = async () => {
186- if (! subject .value ) {
187- message .error (" 必填项必填" );
188- return ;
189- }
190- let content = handleGetContent ();
191- await copy (content );
192- message .success (" 复制成功" );
193- nextTick (() => {
194- utools && utools .hideMainWindow ();
195- });
196- };
195+
197196 </script >
198197<style scoped>
199198.card-class {
You can’t perform that action at this time.
0 commit comments