diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
new file mode 100644
index 0000000..6666230
--- /dev/null
+++ b/.gitea/workflows/deploy.yaml
@@ -0,0 +1,77 @@
+name: 自动部署
+
+on:
+ push:
+ branches:
+ - master
+ paths-ignore:
+ - .gitignore
+ - README.md
+ - .vscode/**
+ tags:
+ - v*
+
+env:
+ docker_host: ${{ secrets.DOCKER_REGISTRY }}
+ docker_user: ${{ secrets.DOCKER_USERNAME }}
+ docker_pass: ${{ secrets.DOCKER_PASSWORD }}
+ docker_name: ${{ secrets.DOCKER_REGISTRY }}/${{ gitea.repository }}
+ deploy_host: ${{ secrets.DEPLOY_HOSTNAME }}
+ deploy_port: ${{ secrets.DEPLOY_PORT }}
+ deploy_user: ${{ secrets.DEPLOY_USERNAME }}
+ deploy_pass: ${{ secrets.DEPLOY_PASSWORD }}
+ deploy_name: demo_web
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: catthehacker/ubuntu:act-latest
+ steps:
+ - name: 检出代码
+ id: checkout
+ uses: https://gitea.com/actions/checkout@v3
+
+ - name: 设置环境
+ uses: https://gitea.com/actions/setup-node@v2
+
+ - name: 安装依赖
+ run: |
+ npm install --registry https://registry.npmmirror.com/
+
+ - name: 构建产物
+ run: npm run build
+
+ - name: 打印目录
+ run: ls ./dist
+
+ - name: 构建镜像
+ run: |
+ docker build -t ${{ env.docker_name }}:latest .
+
+ - name: 登陆镜像
+ run: |
+ docker login -u "${{ env.docker_user }}" -p "${{ env.docker_pass }}" ${{ env.docker_host }}
+
+ - name: 推送镜像
+ shell: bash
+ run: |
+ docker push ${{ env.docker_name }}:latest
+
+ - name: 标记镜像
+ if: gitea.ref_type == 'tag'
+ run: |
+ echo "当前推送版本:${{ gitea.ref_name }}"
+ docker tag ${{ env.docker_name }}:latest ${{ env.docker_name }}:${{ gitea.ref_name }}
+ docker push ${{ env.docker_name }}:${{ gitea.ref_name }}
+
+ - name: 更新服务
+ uses: http://git.dev.juetan.cn/mirror/ssh-action@v1.0.0
+ with:
+ host: ${{ env.deploy_host }}
+ port: ${{ env.deploy_port }}
+ username: ${{ env.deploy_user }}
+ password: ${{ env.deploy_pass }}
+ script: |
+ docker service ls | grep -q ${{ env.deploy_name }} || exit 0
+ docker service update --image ${{ env.docker_name }}:latest ${{ env.deploy_name }}
\ No newline at end of file
diff --git a/src/components/table/use-interface.ts b/src/components/table/use-interface.ts
index 31fab3c..414a9bf 100644
--- a/src/components/table/use-interface.ts
+++ b/src/components/table/use-interface.ts
@@ -19,6 +19,8 @@ interface UseColumnRenderOptions {
rowIndex: number;
}
+export type ColumnRender = (options: UseColumnRenderOptions) => any;
+
export interface TableColumnButton {
/**
* 按钮文本
diff --git a/src/pages/_layout/components/menu.vue b/src/pages/_layout/components/menu.vue
index c179c26..220f463 100644
--- a/src/pages/_layout/components/menu.vue
+++ b/src/pages/_layout/components/menu.vue
@@ -36,6 +36,7 @@ export default defineComponent({
) : (
this.goto(route)}>
{route.title}
+ { false && ({route.sort})}
);
diff --git a/src/pages/post/category/index.vue b/src/pages/post/category/index.vue
new file mode 100644
index 0000000..6637049
--- /dev/null
+++ b/src/pages/post/category/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+{
+ "meta": {
+ "sort": 10300,
+ "title": "分类管理",
+ "icon": "icon-park-outline-category-management"
+ }
+}
+
diff --git a/src/pages/post/comment/index.vue b/src/pages/post/comment/index.vue
new file mode 100644
index 0000000..efd6d91
--- /dev/null
+++ b/src/pages/post/comment/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+{
+ "meta": {
+ "sort": 10304,
+ "title": "评论管理",
+ "icon": "icon-park-outline-comments"
+ }
+}
+
diff --git a/src/pages/post/media/index.vue b/src/pages/post/media/index.vue
new file mode 100644
index 0000000..a7fea23
--- /dev/null
+++ b/src/pages/post/media/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+{
+ "meta": {
+ "sort": 10304,
+ "title": "素材管理",
+ "icon": "icon-park-outline-movie-board"
+ }
+}
+
diff --git a/src/pages/post/edit.vue b/src/pages/post/post/edit.vue
similarity index 96%
rename from src/pages/post/edit.vue
rename to src/pages/post/post/edit.vue
index f76b145..2201b82 100644
--- a/src/pages/post/edit.vue
+++ b/src/pages/post/post/edit.vue
@@ -63,8 +63,8 @@
{
"meta": {
"sort": 10300,
- "title": "新增文章",
- "icon": "icon-park-outline-edit"
+ "title": "文章管理",
+ "icon": "icon-park-outline-editor"
}
}
diff --git a/src/pages/system/index.vue b/src/pages/system/index.vue
index 3c35cb4..16c8c89 100644
--- a/src/pages/system/index.vue
+++ b/src/pages/system/index.vue
@@ -1,146 +1,5 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/src/pages/system/operation-log/index.vue b/src/pages/system/operation-log/index.vue
new file mode 100644
index 0000000..8a812ef
--- /dev/null
+++ b/src/pages/system/operation-log/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+{
+ "meta": {
+ "sort": 10304,
+ "title": "操作日志",
+ "icon": "icon-park-outline-doc-detail"
+ }
+}
+
diff --git a/src/pages/system/user/index.vue b/src/pages/system/user/index.vue
index ae2e5f7..566e399 100644
--- a/src/pages/system/user/index.vue
+++ b/src/pages/system/user/index.vue
@@ -44,7 +44,7 @@ const table = useTable({
{record.nickname}
- {record.username}
+ ID: {record.username}
@@ -68,12 +68,15 @@ const table = useTable({
{
title: "操作",
type: "button",
- width: 110,
+ width: 180,
buttons: [
{
type: "modify",
text: "修改",
},
+ {
+ text: '设置密码',
+ },
{
type: "delete",
text: "删除",