From c67d8dd13413b1f57c37eb711044969d35954cc3 Mon Sep 17 00:00:00 2001
From: dayou <853094838@qq.com>
Date: Mon, 13 May 2024 14:01:46 +0800
Subject: [PATCH 1/8] =?UTF-8?q?fix:=E8=A7=A3=E5=86=B3ts=E6=8A=A5=E9=94=99?=
=?UTF-8?q?=20(#110)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../widgets/EditOptions/Options/OptionEditBar.vue | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/src/materials/questions/widgets/EditOptions/Options/OptionEditBar.vue b/web/src/materials/questions/widgets/EditOptions/Options/OptionEditBar.vue
index 552c98e2..1fcdc518 100644
--- a/web/src/materials/questions/widgets/EditOptions/Options/OptionEditBar.vue
+++ b/web/src/materials/questions/widgets/EditOptions/Options/OptionEditBar.vue
@@ -49,7 +49,7 @@
-
diff --git a/web/src/management/store/edit/mutations.js b/web/src/management/store/edit/mutations.js
index ea62db2f..3f2dc0a5 100644
--- a/web/src/management/store/edit/mutations.js
+++ b/web/src/management/store/edit/mutations.js
@@ -60,5 +60,8 @@ export default {
Object.keys(presets).forEach((key) => {
_set(state.schema, key, presets[key])
})
+ },
+ setQuestionDataList(state, data) {
+ state.schema.questionDataList = data
}
}
From 3984412646cfebc024256023efed89398014fa91 Mon Sep 17 00:00:00 2001
From: sudoooooo
Date: Thu, 16 May 2024 21:15:34 +0800
Subject: [PATCH 5/8] =?UTF-8?q?feat:=20=E8=87=AA=E5=8A=A8=E6=89=93?=
=?UTF-8?q?=E5=BC=80=E6=B5=8F=E8=A7=88=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/package.json | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/web/package.json b/web/package.json
index cada0c8c..b53d9fba 100644
--- a/web/package.json
+++ b/web/package.json
@@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
- "serve": "vite",
- "dev": "vite",
+ "serve": "npm run dev",
+ "dev": "vite --open",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
@@ -43,6 +43,7 @@
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
+ "husky": "^9.0.11",
"npm-run-all2": "^6.1.1",
"prettier": "^3.0.3",
"sass": "^1.72.0",
@@ -54,8 +55,19 @@
"vite-plugin-virtual-mpa": "^1.11.0",
"vue-tsc": "^1.8.27"
},
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "src/**/*.{.vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts}": [
+ "prettier --write",
+ "eslint --fix"
+ ]
+ },
"engines": {
- "node": ">=14.21.0",
- "npm": ">=6.14.17"
+ "node": ">=18.0.0",
+ "npm": ">=8.6.0"
}
}
From be5d48fa7181555d036eef8268aad0f61c12ee19 Mon Sep 17 00:00:00 2001
From: sudoooooo
Date: Fri, 17 May 2024 11:19:39 +0800
Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0lint=E6=A3=80?=
=?UTF-8?q?=E6=B5=8B=E5=92=8C=E8=A6=86=E7=9B=96=E7=8E=87=E6=8A=A5=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/codecov.yml | 39 +++++++++++++++++++++++++++++++
.github/workflows/server-lint.yml | 34 +++++++++++++++++++++++++++
.github/workflows/web-lint.yml | 34 +++++++++++++++++++++++++++
3 files changed, 107 insertions(+)
create mode 100644 .github/workflows/codecov.yml
create mode 100644 .github/workflows/server-lint.yml
create mode 100644 .github/workflows/web-lint.yml
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
new file mode 100644
index 00000000..5ea69f33
--- /dev/null
+++ b/.github/workflows/codecov.yml
@@ -0,0 +1,39 @@
+# Unit Test Coverage Report
+name: Test Coverage
+
+on:
+ pull_request:
+ branches:
+ - feature/workflow
+ - develop
+ - main
+ - releases/**
+ - feature/**
+ paths:
+ - server/**
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Coverage
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Install dependencies
+ run: cd server && npm install
+
+ - name: Run tests and collect coverage
+ run: cd server && npm run test:cov
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v4
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/server-lint.yml b/.github/workflows/server-lint.yml
new file mode 100644
index 00000000..dec0c544
--- /dev/null
+++ b/.github/workflows/server-lint.yml
@@ -0,0 +1,34 @@
+# Lint
+name: Server Lint
+
+on:
+ pull_request:
+ branches:
+ - feature/workflow
+ - develop
+ - main
+ - releases/**
+ - feature/**
+ paths:
+ - server/**
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Install dependencies
+ run: cd server && npm install
+
+ - name: Lint
+ run: cd server && npm run lint
diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml
new file mode 100644
index 00000000..f0963789
--- /dev/null
+++ b/.github/workflows/web-lint.yml
@@ -0,0 +1,34 @@
+# Lint
+name: Web Lint
+
+on:
+ pull_request:
+ branches:
+ - feature/workflow
+ - develop
+ - main
+ - releases/**
+ - feature/**
+ paths:
+ - web/**
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Install dependencies
+ run: cd web && npm install
+
+ - name: Lint
+ run: cd web && npm run lint
From 318020ead7724a3ad5acdd0151d4a56c76a955f7 Mon Sep 17 00:00:00 2001
From: alwayrun
Date: Fri, 17 May 2024 11:48:51 +0800
Subject: [PATCH 7/8] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20render/App?=
=?UTF-8?q?.vue,=20=E4=BD=BF=E7=94=A8=20Vue3=20=E7=BB=84=E5=90=88=E5=BC=8F?=
=?UTF-8?q?=20API=20=E5=86=99=E6=B3=95=20(#117)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/render/App.vue | 166 +++++++++++++++++++++--------------------
web/src/render/main.js | 1 -
2 files changed, 85 insertions(+), 82 deletions(-)
diff --git a/web/src/render/App.vue b/web/src/render/App.vue
index 563cecb1..185c00c8 100644
--- a/web/src/render/App.vue
+++ b/web/src/render/App.vue
@@ -1,11 +1,21 @@
-
-
+
+
+
+
-