From 01082e049172c72e021a918b8b5b6194d23fe607 Mon Sep 17 00:00:00 2001 From: Dong Xia Date: Wed, 1 Mar 2023 06:09:19 +0000 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=BD=AF=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97actions=E7=9A=84=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dong Xia --- src/store/modules/node-package.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/store/modules/node-package.js b/src/store/modules/node-package.js index 7c67af2..9665a11 100644 --- a/src/store/modules/node-package.js +++ b/src/store/modules/node-package.js @@ -13,6 +13,19 @@ const nodePackage = { state.selectPackage = data } }, + actions: { + getPackages({ commit }, params) { + return new Promise((reslove, reject) => { + getInstallablePackage(params).then(res => { + if (res.code === 200) { + commit('SET_PACKAGE_LIST', res.data || []) + reslove() + } + reject() + }) + }) + } + }, } export default nodePackage \ No newline at end of file -- Gitee