@@ -27,6 +27,7 @@ const fetchLen = async () => {
2727}
2828fetchLen ()
2929
30+ // tab fields
3031const columns = reactive ([
3132 {
3233 title: ' #' ,
@@ -44,6 +45,7 @@ const columns = reactive([
4445 width: 200 ,
4546 render : (row : Record <string , any >) => {
4647
48+ // delete data
4749 const delFn = async (row : Record <string , any >) => {
4850 try {
4951 row .delLoaing = true
@@ -56,6 +58,7 @@ const columns = reactive([
5658 row .delLoaing = false
5759 }
5860 }
61+ // look detail
5962 const look = (row : Record <string , any >) => {
6063 dialog .create ({
6164 title: t (' actions[12]' ),
@@ -78,7 +81,10 @@ const columns = reactive([
7881 },
7982 },
8083])
84+ // records
8185const records = shallowRef <Record <string , any >[]>([])
86+
87+ // obtain records
8288const fetchRecords = async () => {
8389 await fetchLen ()
8490 const resp = await reqStore .reqWithHost <string >({
@@ -102,6 +108,7 @@ const fetchRecords = async () => {
102108fetchRecords ()
103109onPageChanged (fetchRecords )
104110const { height } = useResize ()
111+ // insert data to list
105112const addData = async () => {
106113 const formModel = reactive ({
107114 value: ' ' ,
@@ -154,6 +161,7 @@ const addData = async () => {
154161 </n-form >,
155162 })
156163}
164+ // edit data
157165const editFn = async (row : Record <string ,any >,index : number ) => {
158166 const formModel = reactive ({
159167 value: row .value ,
0 commit comments