diff --git a/src/App.vue b/src/App.vue index ce25fe8fa0f696eadefeafaccdde7ae1fae0a0fd..669bbbf1fc61298555b2a6fa2b9efbe76f99a0fd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,12 +4,14 @@ import EditTable from './components/TableForm/EditTable.vue'; import ElTableColumnFormatter from './components/TableForm/ElTableColumnFormatter.vue'; import RemoteSearch from './components/Select/RemoteSearch.vue'; import SelectValueObj from './components/Select/SelectValueObj.vue'; +import HowToUseConfirmPopup from './components/HowToUseConfirmPopup/index.vue' const tabs = { EditTable, ElTableColumnFormatter, RemoteSearch, - SelectValueObj + SelectValueObj, + HowToUseConfirmPopup } const current = ref(EditTable) @@ -26,7 +28,10 @@ function handleClick(val) { :key="index" @click="handleClick(val)" >{{ key }} - + +
+ +
@@ -34,6 +39,10 @@ function handleClick(val) { .active { background: red; } +.content{ + border: 1px solid #000; + padding: 12px; +} diff --git a/src/components/HowToUseConfirmPopup/index.vue b/src/components/HowToUseConfirmPopup/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..177cb77eba30070fa5ae510517f08a8534dab330 --- /dev/null +++ b/src/components/HowToUseConfirmPopup/index.vue @@ -0,0 +1,40 @@ + + + + \ No newline at end of file diff --git a/src/hooks/useConfirmPopup.js b/src/hooks/useConfirmPopup.js index 13f730e991286ec76fb7dcdd5e3fb701f3476870..c68b7c90f9cb4fa1a78d7ce3fadca68669e74c8b 100644 --- a/src/hooks/useConfirmPopup.js +++ b/src/hooks/useConfirmPopup.js @@ -23,6 +23,7 @@ function useConfirmPopup(title, confirmCallBack, cancelCallback) { }) try { + debugger await confirmCallBack() done() } catch (err) { @@ -33,6 +34,7 @@ function useConfirmPopup(title, confirmCallBack, cancelCallback) { } } else if (action === 'cancel') { + debugger // 取消按钮触发事件 if(confirmDisabled){ ElMessage({