Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04ed5d354d | ||
|
|
fa678e1089 | ||
|
|
8575d27504 | ||
|
|
fa6ef30cd8 | ||
|
|
14402e6674 | ||
|
|
0915e162fd | ||
|
|
fffe49cd0f | ||
|
|
94fc6138a0 | ||
|
|
4f248e57c8 | ||
|
|
e5bf08f709 | ||
|
|
d61769f9b8 | ||
|
|
0ec9fd8534 | ||
|
|
fcf8d9d99d | ||
|
|
6c91fca4e7 | ||
|
|
e01292376f | ||
|
|
1c5c867a19 | ||
|
|
dde5ae796e | ||
|
|
64992c59b7 | ||
|
|
c3aae6e5fa | ||
|
|
2a44fd3ca4 | ||
|
|
68512206f7 | ||
|
|
88073e97af | ||
|
|
e8642d0301 | ||
|
|
aafafdd0aa | ||
|
|
198b839dab | ||
|
|
597b8fb5af | ||
|
|
a4cb4cb0ad | ||
|
|
1bc51a51c2 | ||
|
|
8857059da8 | ||
|
|
7939d37fa3 | ||
|
|
df83385cb0 | ||
|
|
5d69fc4b24 | ||
|
|
4f1b550fa9 | ||
|
|
782c12d91d | ||
|
|
4b97d98b3a | ||
|
|
8e3e9b5f50 | ||
|
|
ceed66b7ea | ||
|
|
a8399be4a3 | ||
|
|
19f73d7066 | ||
|
|
36d46d0a45 | ||
|
|
323e5505f5 | ||
|
|
12a2ace498 | ||
|
|
c5eefec24d | ||
|
|
c4c4572885 | ||
|
|
8fcd2a9141 | ||
|
|
f0fad0dba7 | ||
|
|
71c7116493 | ||
|
|
e797879e0d | ||
|
|
2e460ea32a | ||
|
|
ef3b1dce7c | ||
|
|
22e01a80c1 | ||
|
|
770373c48c | ||
|
|
77ff376e75 | ||
|
|
d5fb56f571 | ||
|
|
b37ba41694 | ||
|
|
f7084ba3a3 | ||
|
|
f89a64f10e | ||
|
|
f6fe7816c9 | ||
|
|
ca8e08f3db | ||
|
|
1e188dd26b | ||
|
|
59fb22cd0c | ||
|
|
ede7bcce80 | ||
|
|
07e3f227be | ||
|
|
d0070319a9 | ||
|
|
60ec01eb32 | ||
|
|
47e04ba6e3 | ||
|
|
c7a2a01f12 |
38
README.md
@@ -1,14 +1,20 @@
|
||||
## 总览
|
||||

|
||||

|
||||
|
||||
GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图表或页面元素封装为基础组件,无需编写代码即可制作数据大屏,减少心智负担。当然低代码也不是 “银弹”,希望所有人员都能理智看待此技术。
|
||||
|
||||
项目-Demo 地址:[https://www.mtruning.club](https://www.mtruning.club)
|
||||
项目纯前端-Demo 地址:[https://www.mtruning.club](https://www.mtruning.club)
|
||||
|
||||
项目带后端-Demo 地址(开发中~):[后端 Demo 地址](http://1.117.240.165:8080/goview/#/login)
|
||||
|
||||
文档-在线地址:[http://www.mtruning.club:81/](http://www.mtruning.club:81/)
|
||||
|
||||
文档-源码地址:[https://gitee.com/MTrun/go-view-doc](https://gitee.com/MTrun/go-view-doc)
|
||||
|
||||
纯前端分支:`master`
|
||||
|
||||
携带后端请求分支: `master-fetch`
|
||||
|
||||
技术点:
|
||||
|
||||
- 框架:基于 `Vue3` 框架编写,使用 `hooks` 写法抽离部分逻辑,使代码结构更加清晰;
|
||||
@@ -23,7 +29,7 @@ GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图
|
||||
|
||||
|
||||
项目截图:
|
||||

|
||||

|
||||
|
||||
主要技术栈为:
|
||||
|
||||
@@ -32,43 +38,36 @@ GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图
|
||||
| Vue | 3.2.x | TypeScript4 | 4.6.x |
|
||||
| Vite | 2.9.x | NaiveUI | 2.27.x |
|
||||
| ECharts | 5.3.x | Pinia | 2.0.x |
|
||||
| 详见 `package.json` | 😁 | 🥰 | 🤗 |
|
||||
| 详见 `package.json` | 😁 | 🥰 | 🤗 |
|
||||
|
||||
开发环境:
|
||||
|
||||
| 名称 | 版本 | 名称 | 版本 |
|
||||
| ---- | ------- | ------- | ----- |
|
||||
| node | 16.14.x | npm | 8.5.x |
|
||||
| pnpm | 6.32.x | windows | 11 |
|
||||
| pnpm | 7.1.x | windows | 11 |
|
||||
|
||||
已完成图表:
|
||||
|
||||
| 分类 | 名称 | 名称 | 名称 |
|
||||
| ------ | ---------------- | ---------- | -------- |
|
||||
| ------ | ---------------- | ---------- | ------ |
|
||||
| 图表 | 柱状图 | 横向柱状图 | 折线图 |
|
||||
| \* | 单/多 折线面积图 | 饼图 | 水球图 |
|
||||
| 信息 | 文字 | 图片 | 😶 |
|
||||
| 列表 | 滚动排名列表 | 🤠 | 🤓 |
|
||||
| 信息 | 文字 | 图片 | 😶 |
|
||||
| 列表 | 滚动排名列表 | 🤠 | 🤓 |
|
||||
| 小组件 | 边框-01~13 | 装饰-01~05 | 数字翻牌 |
|
||||
|
||||
## 浏览器支持
|
||||
|
||||
开发和测试平台均在 Google 和最新版 EDGE 上完成,暂未测试 IE11 等其它浏览器,如有需求请自行测试与兼容。
|
||||
开发和测试平台均在 `Google` 和最新版 `EDGE` 上完成,暂未测试 `IE11` 等其它浏览器,如有需求请自行测试与兼容。
|
||||
|
||||
## 安装
|
||||
|
||||
本项目采用 pnpm 进行包管理,若要使用其它管理方式,请删除 `pnpm-lock.yaml` 并安装依赖
|
||||
本项目采用` pnpm` 进行包管理,经反馈若采用 `npm/yarn` 等方式安装依赖会导致错误,请使用 `pnpm` 安装依赖包。
|
||||
|
||||
```shell
|
||||
#pnpm(建议使用nrm切换到淘宝源)
|
||||
pnpm install
|
||||
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
```
|
||||
|
||||
## 启动
|
||||
@@ -106,8 +105,9 @@ make dist
|
||||
|
||||
## 交流
|
||||
|
||||
|
||||
QQ 群:1030129384
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"lint": "eslint \"{src}/**/*.{vue,ts,tsx}\" --fix --ext",
|
||||
"new": "plop --plopfile ./plop/plopfile.js"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -19,7 +18,7 @@
|
||||
"highlight.js": "^11.5.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"keymaster": "^1.6.2",
|
||||
"naive-ui": "^2.27.0",
|
||||
"naive-ui": "^2.29.0",
|
||||
"pinia": "^2.0.13",
|
||||
"screenfull": "^6.0.1",
|
||||
"vue": "^3.2.31",
|
||||
@@ -57,11 +56,7 @@
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-importer": "^0.2.5",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-style-import": "^1.4.1",
|
||||
"vue-echarts": "^6.0.2",
|
||||
"vue-tsc": "^0.28.10"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{vue,js,ts,tsx}": "eslint --fix"
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import { StorageEnum } from '@/enums/storageEnum'
|
||||
|
||||
export const use{{upperDataName}}Store = defineStore({
|
||||
id: 'use{{upperDataName}}Store',
|
||||
state: (): {{name}}StoreType => ({}),
|
||||
state: (): {{upperDataName}}StoreType => ({}),
|
||||
getters: {},
|
||||
actions: {}
|
||||
})
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
const actions = [
|
||||
{
|
||||
type: 'add',
|
||||
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store}.ts`, // 这里的name就是上面定义的键
|
||||
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store.ts`, // 这里的name就是上面定义的键
|
||||
templateFile: './store-template/index.hbs',
|
||||
data: {
|
||||
name: data.name,
|
||||
@@ -32,7 +32,11 @@ module.exports = {
|
||||
{
|
||||
type: 'add',
|
||||
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store.d.ts`, // 这里的name就是上面定义的键
|
||||
templateFile: './store-template/index.d.hbs'
|
||||
templateFile: './store-template/index.d.hbs',
|
||||
data: {
|
||||
name: data.name,
|
||||
upperDataName,
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
187
pnpm-lock.yaml
generated
@@ -1,4 +1,4 @@
|
||||
lockfileVersion: 5.3
|
||||
lockfileVersion: 5.4
|
||||
|
||||
specifiers:
|
||||
'@types/color': ^3.0.3
|
||||
@@ -30,7 +30,7 @@ specifiers:
|
||||
keymaster: ^1.6.2
|
||||
lodash: ~4.17.21
|
||||
mockjs: ^1.1.0
|
||||
naive-ui: ^2.27.0
|
||||
naive-ui: ^2.29.0
|
||||
pinia: ^2.0.13
|
||||
plop: ^3.0.5
|
||||
prettier: ^2.6.2
|
||||
@@ -42,7 +42,6 @@ specifiers:
|
||||
vite-plugin-compression: ^0.5.1
|
||||
vite-plugin-importer: ^0.2.5
|
||||
vite-plugin-mock: ^2.9.6
|
||||
vite-plugin-style-import: ^1.4.1
|
||||
vue: ^3.2.31
|
||||
vue-echarts: ^6.0.2
|
||||
vue-i18n: 9.1.9
|
||||
@@ -64,20 +63,20 @@ dependencies:
|
||||
highlight.js: 11.5.0
|
||||
html2canvas: 1.4.1
|
||||
keymaster: 1.6.2
|
||||
naive-ui: 2.27.0_vue@3.2.31
|
||||
pinia: 2.0.13_typescript@4.6.3+vue@3.2.31
|
||||
naive-ui: 2.29.0_vue@3.2.31
|
||||
pinia: 2.0.13_hhks2xcoho7x4jrwn5stbz36vy
|
||||
screenfull: 6.0.1
|
||||
vue: 3.2.31
|
||||
vue-i18n: 9.1.9_vue@3.2.31
|
||||
vue-router: 4.0.12_vue@3.2.31
|
||||
vue3-lazyload: 0.2.5-beta_4f726de02e89ff745196f225ebb1bbcf
|
||||
vue3-lazyload: 0.2.5-beta_j5zg3yborh7xiumw6is6xmn3z4
|
||||
vue3-sketch-ruler: 1.3.3_vue@3.2.31
|
||||
vuedraggable: 4.1.0_vue@3.2.31
|
||||
|
||||
devDependencies:
|
||||
'@types/node': 16.11.26
|
||||
'@typescript-eslint/eslint-plugin': 5.18.0_a07dca3bdfc4bfa60f4dda0c1f9e3287
|
||||
'@typescript-eslint/parser': 5.18.0_eslint@8.12.0+typescript@4.6.3
|
||||
'@typescript-eslint/eslint-plugin': 5.18.0_ub64uo67ys72md2n3igb7hrsq4
|
||||
'@typescript-eslint/parser': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
'@vicons/carbon': 0.12.0
|
||||
'@vicons/ionicons5': 0.11.0
|
||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.5
|
||||
@@ -88,8 +87,8 @@ devDependencies:
|
||||
echarts: 5.3.2
|
||||
eslint: 8.12.0
|
||||
eslint-config-prettier: 8.5.0_eslint@8.12.0
|
||||
eslint-plugin-import: 2.26.0_eslint@8.12.0
|
||||
eslint-plugin-prettier: 4.0.0_f2c91d0f54113167d2bd9214a5ab5a36
|
||||
eslint-plugin-import: 2.26.0_mzojdsoryzqztjvqj5t7e5xqmq
|
||||
eslint-plugin-prettier: 4.0.0_6ler2d2uceywpuv5sikklk22gy
|
||||
eslint-plugin-vue: 8.5.0_eslint@8.12.0
|
||||
lodash: 4.17.21
|
||||
mockjs: 1.1.0
|
||||
@@ -102,7 +101,6 @@ devDependencies:
|
||||
vite-plugin-compression: 0.5.1_vite@2.9.5
|
||||
vite-plugin-importer: 0.2.5
|
||||
vite-plugin-mock: 2.9.6_mockjs@1.1.0+vite@2.9.5
|
||||
vite-plugin-style-import: 1.4.1_vite@2.9.5
|
||||
vue-echarts: 6.0.2_echarts@5.3.2+vue@3.2.31
|
||||
vue-tsc: 0.28.10_typescript@4.6.3
|
||||
|
||||
@@ -299,7 +297,6 @@ packages:
|
||||
/@babel/helper-validator-identifier/7.16.7:
|
||||
resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: true
|
||||
|
||||
/@babel/helper-validator-option/7.16.7:
|
||||
resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==}
|
||||
@@ -330,6 +327,8 @@ packages:
|
||||
resolution: {integrity: sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.17.0
|
||||
|
||||
/@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.8:
|
||||
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
|
||||
@@ -414,18 +413,17 @@ packages:
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.16.7
|
||||
to-fast-properties: 2.0.0
|
||||
dev: true
|
||||
|
||||
/@css-render/plugin-bem/0.15.9_css-render@0.15.9:
|
||||
resolution: {integrity: sha512-xASEmYIX91Pow7YPzpAZ0eyrRNINVX7j9ITNbLt88gJHRLap3P1dv3hTSLtUZTxYXVHTklZ/SfJQ9FIO3jRahg==}
|
||||
/@css-render/plugin-bem/0.15.10_css-render@0.15.10:
|
||||
resolution: {integrity: sha512-V7b08sM2PWJlXI7BJiVIa0Sg30H3u/jHay4AclNXfF2yRFwwb4ZJjggsMfzwj3WSihAdNf2WTqvOU5qsOD80Dg==}
|
||||
peerDependencies:
|
||||
css-render: ~0.15.9
|
||||
css-render: ~0.15.10
|
||||
dependencies:
|
||||
css-render: 0.15.9
|
||||
css-render: 0.15.10
|
||||
dev: false
|
||||
|
||||
/@css-render/vue3-ssr/0.15.9_vue@3.2.31:
|
||||
resolution: {integrity: sha512-b3wvEIZYjToOEAV/oUqVtcg+MPF/iSZB9VmVF7fMAAAfvVTc2kB4TZDhGZCMkGjGZxOUm1jia7q/Z9FJnJGLKw==}
|
||||
/@css-render/vue3-ssr/0.15.10_vue@3.2.31:
|
||||
resolution: {integrity: sha512-keGKnkB2nyVGoA8GezMKNsmvTGXEzgLOGGlgshwOTSEzd1dsROyZ2m/khJ9jV5zbzDM4rWeAWbWF0zwHemsJcw==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
dependencies:
|
||||
@@ -556,6 +554,10 @@ packages:
|
||||
'@jridgewell/sourcemap-codec': 1.4.11
|
||||
dev: true
|
||||
|
||||
/@juggle/resize-observer/3.3.1:
|
||||
resolution: {integrity: sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==}
|
||||
dev: false
|
||||
|
||||
/@nodelib/fs.scandir/2.1.5:
|
||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||
engines: {node: '>= 8'}
|
||||
@@ -704,7 +706,7 @@ packages:
|
||||
'@types/node': 17.0.23
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.18.0_a07dca3bdfc4bfa60f4dda0c1f9e3287:
|
||||
/@typescript-eslint/eslint-plugin/5.18.0_ub64uo67ys72md2n3igb7hrsq4:
|
||||
resolution: {integrity: sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -715,10 +717,10 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.18.0_eslint@8.12.0+typescript@4.6.3
|
||||
'@typescript-eslint/parser': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
'@typescript-eslint/scope-manager': 5.18.0
|
||||
'@typescript-eslint/type-utils': 5.18.0_eslint@8.12.0+typescript@4.6.3
|
||||
'@typescript-eslint/utils': 5.18.0_eslint@8.12.0+typescript@4.6.3
|
||||
'@typescript-eslint/type-utils': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
'@typescript-eslint/utils': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
debug: 4.3.4
|
||||
eslint: 8.12.0
|
||||
functional-red-black-tree: 1.0.1
|
||||
@@ -731,7 +733,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser/5.18.0_eslint@8.12.0+typescript@4.6.3:
|
||||
/@typescript-eslint/parser/5.18.0_thk3xo4exzjr5rl6cnexo7v6re:
|
||||
resolution: {integrity: sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -759,7 +761,7 @@ packages:
|
||||
'@typescript-eslint/visitor-keys': 5.18.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils/5.18.0_eslint@8.12.0+typescript@4.6.3:
|
||||
/@typescript-eslint/type-utils/5.18.0_thk3xo4exzjr5rl6cnexo7v6re:
|
||||
resolution: {integrity: sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -769,7 +771,7 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 5.18.0_eslint@8.12.0+typescript@4.6.3
|
||||
'@typescript-eslint/utils': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
debug: 4.3.4
|
||||
eslint: 8.12.0
|
||||
tsutils: 3.21.0_typescript@4.6.3
|
||||
@@ -804,7 +806,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils/5.18.0_eslint@8.12.0+typescript@4.6.3:
|
||||
/@typescript-eslint/utils/5.18.0_thk3xo4exzjr5rl6cnexo7v6re:
|
||||
resolution: {integrity: sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -1465,6 +1467,8 @@ packages:
|
||||
finalhandler: 1.1.2
|
||||
parseurl: 1.3.3
|
||||
utils-merge: 1.0.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/constant-case/3.0.4:
|
||||
@@ -1507,8 +1511,8 @@ packages:
|
||||
utrie: 1.0.2
|
||||
dev: false
|
||||
|
||||
/css-render/0.15.9:
|
||||
resolution: {integrity: sha512-FMVcWsVipKEBR/mVf1+pIjCRQdztILVKxbp8TN5/Vf0Q/fdTq0OIb8JRW/pk7PP1eeWnB/ejQ0MNBe7ELjLblg==}
|
||||
/css-render/0.15.10:
|
||||
resolution: {integrity: sha512-6j5acvm81sXTHJiF47FNNICtDpF74YoWk1xEK3qQvdqgW6vc+OXrPqflL6m8f5GE6XuFYrbACNEd17kraCSBAQ==}
|
||||
dependencies:
|
||||
'@emotion/hash': 0.8.0
|
||||
'@types/node': 17.0.23
|
||||
@@ -1538,12 +1542,22 @@ packages:
|
||||
|
||||
/debug/2.6.9:
|
||||
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.0.0
|
||||
dev: true
|
||||
|
||||
/debug/3.2.7:
|
||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
@@ -1743,10 +1757,6 @@ packages:
|
||||
unbox-primitive: 1.0.1
|
||||
dev: true
|
||||
|
||||
/es-module-lexer/0.9.3:
|
||||
resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==}
|
||||
dev: true
|
||||
|
||||
/es-to-primitive/1.2.1:
|
||||
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -2003,29 +2013,54 @@ packages:
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
resolve: 1.22.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-module-utils/2.7.3:
|
||||
/eslint-module-utils/2.7.3_gshgus2jxs3picixh7dqkggb4y:
|
||||
resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint-import-resolver-node: '*'
|
||||
eslint-import-resolver-typescript: '*'
|
||||
eslint-import-resolver-webpack: '*'
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
eslint-import-resolver-node:
|
||||
optional: true
|
||||
eslint-import-resolver-typescript:
|
||||
optional: true
|
||||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
debug: 3.2.7
|
||||
eslint-import-resolver-node: 0.3.6
|
||||
find-up: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-import/2.26.0_eslint@8.12.0:
|
||||
/eslint-plugin-import/2.26.0_mzojdsoryzqztjvqj5t7e5xqmq:
|
||||
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.18.0_thk3xo4exzjr5rl6cnexo7v6re
|
||||
array-includes: 3.1.4
|
||||
array.prototype.flat: 1.2.5
|
||||
debug: 2.6.9
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.12.0
|
||||
eslint-import-resolver-node: 0.3.6
|
||||
eslint-module-utils: 2.7.3
|
||||
eslint-module-utils: 2.7.3_gshgus2jxs3picixh7dqkggb4y
|
||||
has: 1.0.3
|
||||
is-core-module: 2.8.1
|
||||
is-glob: 4.0.3
|
||||
@@ -2033,9 +2068,13 @@ packages:
|
||||
object.values: 1.1.5
|
||||
resolve: 1.22.0
|
||||
tsconfig-paths: 3.14.1
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-typescript
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-prettier/4.0.0_f2c91d0f54113167d2bd9214a5ab5a36:
|
||||
/eslint-plugin-prettier/4.0.0_6ler2d2uceywpuv5sikklk22gy:
|
||||
resolution: {integrity: sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
peerDependencies:
|
||||
@@ -2281,6 +2320,8 @@ packages:
|
||||
parseurl: 1.3.3
|
||||
statuses: 1.5.0
|
||||
unpipe: 1.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/find-up/2.1.0:
|
||||
@@ -2496,7 +2537,7 @@ packages:
|
||||
source-map: 0.6.1
|
||||
wordwrap: 1.0.0
|
||||
optionalDependencies:
|
||||
uglify-js: 3.15.4
|
||||
uglify-js: 3.15.5
|
||||
dev: true
|
||||
|
||||
/has-bigints/1.0.1:
|
||||
@@ -3117,17 +3158,17 @@ packages:
|
||||
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
|
||||
dev: true
|
||||
|
||||
/naive-ui/2.27.0_vue@3.2.31:
|
||||
resolution: {integrity: sha512-g9A2uulbQKMuJpUjAyiAqBHQ4xrcbwRPdv+OS2FeNC5u/SrRWFiO64X10YDyMwQNudrwc3VVqKUrw3ZArxtFCg==}
|
||||
/naive-ui/2.29.0_vue@3.2.31:
|
||||
resolution: {integrity: sha512-zZ4ka0Y5QakNyqJIPiAoZ5YJG4mCiSw+HzYtreEmOvBmbP14/iUXarRhI9a3XET8g6ix682TcitamlCyqZ/y2Q==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
'@css-render/plugin-bem': 0.15.9_css-render@0.15.9
|
||||
'@css-render/vue3-ssr': 0.15.9_vue@3.2.31
|
||||
'@css-render/plugin-bem': 0.15.10_css-render@0.15.10
|
||||
'@css-render/vue3-ssr': 0.15.10_vue@3.2.31
|
||||
'@types/lodash': 4.14.181
|
||||
'@types/lodash-es': 4.17.6
|
||||
async-validator: 4.0.7
|
||||
css-render: 0.15.9
|
||||
css-render: 0.15.10
|
||||
date-fns: 2.28.0
|
||||
date-fns-tz: 1.3.3_date-fns@2.28.0
|
||||
evtd: 0.2.3
|
||||
@@ -3135,12 +3176,11 @@ packages:
|
||||
lodash: 4.17.21
|
||||
lodash-es: 4.17.21
|
||||
seemly: 0.3.3
|
||||
treemate: 0.3.10
|
||||
vdirs: 0.1.7_vue@3.2.31
|
||||
vfonts: 0.0.3
|
||||
treemate: 0.3.11
|
||||
vdirs: 0.1.8_vue@3.2.31
|
||||
vooks: 0.2.12_vue@3.2.31
|
||||
vue: 3.2.31
|
||||
vueuc: 0.4.28_vue@3.2.31
|
||||
vueuc: 0.4.37_vue@3.2.31
|
||||
dev: false
|
||||
|
||||
/nanoid/3.3.2:
|
||||
@@ -3437,7 +3477,7 @@ packages:
|
||||
engines: {node: '>=8.6'}
|
||||
dev: true
|
||||
|
||||
/pinia/2.0.13_typescript@4.6.3+vue@3.2.31:
|
||||
/pinia/2.0.13_hhks2xcoho7x4jrwn5stbz36vy:
|
||||
resolution: {integrity: sha512-B7rSqm1xNpwcPMnqns8/gVBfbbi7lWTByzS6aPZ4JOXSJD4Y531rZHDCoYWBwLyHY/8hWnXljgiXp6rRyrofcw==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.4.0
|
||||
@@ -3655,10 +3695,6 @@ packages:
|
||||
resolution: {integrity: sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ==}
|
||||
dev: true
|
||||
|
||||
/resize-observer-polyfill/1.5.1:
|
||||
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
|
||||
dev: false
|
||||
|
||||
/resolve-dir/1.0.1:
|
||||
resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -3989,7 +4025,6 @@ packages:
|
||||
/to-fast-properties/2.0.0:
|
||||
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/to-regex-range/5.0.1:
|
||||
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
|
||||
@@ -4002,8 +4037,8 @@ packages:
|
||||
resolution: {integrity: sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==}
|
||||
dev: true
|
||||
|
||||
/treemate/0.3.10:
|
||||
resolution: {integrity: sha512-uxN98H84/zXAkn02rEeip9SNnOR889QIBXfpZnwjaanp8JRElxjdmDaKmVULclrn54J8RcJVCqfeQZsdeMjwow==}
|
||||
/treemate/0.3.11:
|
||||
resolution: {integrity: sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==}
|
||||
dev: false
|
||||
|
||||
/tsconfig-paths/3.14.1:
|
||||
@@ -4060,8 +4095,8 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/uglify-js/3.15.4:
|
||||
resolution: {integrity: sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==}
|
||||
/uglify-js/3.15.5:
|
||||
resolution: {integrity: sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ==}
|
||||
engines: {node: '>=0.8.0'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
@@ -4139,8 +4174,8 @@ packages:
|
||||
engines: {node: '>= 10.13.0'}
|
||||
dev: true
|
||||
|
||||
/vdirs/0.1.7_vue@3.2.31:
|
||||
resolution: {integrity: sha512-MEUaLhV1jJyUqA2Ar4DfvlQx8jWs+PpCZ2dbM0ILelpMWGOybzt8ddL456VxeIbY/tkuDGT/Wzb8GG4LCuLuHw==}
|
||||
/vdirs/0.1.8_vue@3.2.31:
|
||||
resolution: {integrity: sha512-H9V1zGRLQZg9b+GdMk8MXDN2Lva0zx72MPahDKc30v+DtwKjfyOSXWRIX4t2mhDubM1H09gPhWeth/BJWPHGUw==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
dependencies:
|
||||
@@ -4148,10 +4183,6 @@ packages:
|
||||
vue: 3.2.31
|
||||
dev: false
|
||||
|
||||
/vfonts/0.0.3:
|
||||
resolution: {integrity: sha512-nguyw8L6Un8eelg1vQ31vIU2ESxqid7EYmy8V+MDeMaHBqaRSkg3dTBToC1PR00D89UzS/SLkfYPnx0Wf23IQQ==}
|
||||
dev: false
|
||||
|
||||
/vite-plugin-compression/0.5.1_vite@2.9.5:
|
||||
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
|
||||
peerDependencies:
|
||||
@@ -4198,22 +4229,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-style-import/1.4.1_vite@2.9.5:
|
||||
resolution: {integrity: sha512-lJCRvm7+So0hHdnSJiJPg9gD5mxtL6YY0jmhEph+k7ArpsyvqOh6han2kG5htbWWDZxHkUN9d1BuTFL//yCLLQ==}
|
||||
peerDependencies:
|
||||
vite: '>=2.0.0'
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 4.2.0
|
||||
change-case: 4.1.2
|
||||
debug: 4.3.4
|
||||
es-module-lexer: 0.9.3
|
||||
fs-extra: 10.0.1
|
||||
magic-string: 0.25.9
|
||||
vite: 2.9.5_sass@1.49.11
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite/2.9.5_sass@1.49.11:
|
||||
resolution: {integrity: sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg==}
|
||||
engines: {node: '>=12.2.0'}
|
||||
@@ -4464,7 +4479,7 @@ packages:
|
||||
'@vue/shared': 3.2.31
|
||||
dev: false
|
||||
|
||||
/vue3-lazyload/0.2.5-beta_4f726de02e89ff745196f225ebb1bbcf:
|
||||
/vue3-lazyload/0.2.5-beta_j5zg3yborh7xiumw6is6xmn3z4:
|
||||
resolution: {integrity: sha512-GVhJfL9Hcu+AvWsYmUwODivvt+gzpT0ztgAzZaUduoiTaGCv/qzhr0VwAQXfjGF3XFYFyOJsHlAi3/WE0P8XTQ==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': '>=3.0.0'
|
||||
@@ -4499,17 +4514,17 @@ packages:
|
||||
vue: 3.2.31
|
||||
dev: false
|
||||
|
||||
/vueuc/0.4.28_vue@3.2.31:
|
||||
resolution: {integrity: sha512-Udr1ROwJocHIThA5G+H5qN1QEFI4pskDvl+w/2Ul2XIjaAeIuQ6ygEOKHOXRJqKX5PxcTi1QQUpb7yQWsDw7ww==}
|
||||
/vueuc/0.4.37_vue@3.2.31:
|
||||
resolution: {integrity: sha512-NJVeUet0O2ta95aVYs7lNphG0AQFfNEuXxlIL50ZxQ//HTITkua17Rlh0RdyXG3C37HR/TqKAG5be7QJjJT3Fg==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
dependencies:
|
||||
'@css-render/vue3-ssr': 0.15.9_vue@3.2.31
|
||||
css-render: 0.15.9
|
||||
'@css-render/vue3-ssr': 0.15.10_vue@3.2.31
|
||||
'@juggle/resize-observer': 3.3.1
|
||||
css-render: 0.15.10
|
||||
evtd: 0.2.3
|
||||
resize-observer-polyfill: 1.5.1
|
||||
seemly: 0.3.3
|
||||
vdirs: 0.1.7_vue@3.2.31
|
||||
vdirs: 0.1.8_vue@3.2.31
|
||||
vooks: 0.2.12_vue@3.2.31
|
||||
vue: 3.2.31
|
||||
dev: false
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 398 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -28,8 +28,6 @@ axiosInstance.interceptors.response.use(
|
||||
return Promise.resolve(res.data)
|
||||
},
|
||||
(err: AxiosResponse) => {
|
||||
const { code } = err.data as { code: number }
|
||||
if (ErrorPageNameMap.get(code)) redirectErrorPage(code)
|
||||
window['$message'].error('接口异常,请检查!')
|
||||
Promise.reject(err)
|
||||
}
|
||||
|
||||
@@ -19,6 +19,17 @@ export const post = (url: string, params: object, headersType?: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const put = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PUT,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const del = (url: string, params: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
@@ -29,11 +40,20 @@ export const del = (url: string, params: object) => {
|
||||
|
||||
// 获取请求函数,默认get
|
||||
export const http = (type?: RequestHttpEnum) => {
|
||||
return type === RequestHttpEnum.GET
|
||||
? get
|
||||
: type === RequestHttpEnum.POST
|
||||
? post
|
||||
: type === RequestHttpEnum.DELETE
|
||||
? del
|
||||
: get
|
||||
switch (type) {
|
||||
case RequestHttpEnum.GET:
|
||||
return get
|
||||
|
||||
case RequestHttpEnum.POST:
|
||||
return post
|
||||
|
||||
case RequestHttpEnum.PUT:
|
||||
return put
|
||||
|
||||
case RequestHttpEnum.DELETE:
|
||||
return del
|
||||
|
||||
default:
|
||||
return get
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export default {
|
||||
// 图表
|
||||
fetchMockData: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
@@ -41,6 +42,7 @@ export default {
|
||||
},
|
||||
// 排名列表
|
||||
fetchRankList: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: [
|
||||
@@ -61,6 +63,7 @@ export default {
|
||||
},
|
||||
// 获取数字
|
||||
fetchNumber: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: '@float(0, 0.99)',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
</n-button>
|
||||
</n-space>
|
||||
<setting-item-box name="边距">
|
||||
<setting-item-box name="位置">
|
||||
<n-input-number
|
||||
v-model:value="chartAttr.y"
|
||||
:min="0"
|
||||
|
||||
@@ -17,7 +17,7 @@ const global = {
|
||||
// right key
|
||||
r_edit: 'Edit',
|
||||
r_preview: 'Preview',
|
||||
r_copy: 'Copy',
|
||||
r_copy: 'Clone',
|
||||
r_rename: 'Rename',
|
||||
r_publish: 'Publish',
|
||||
r_unpublish: 'Unpublish',
|
||||
|
||||
@@ -17,7 +17,7 @@ const global = {
|
||||
// 功能键
|
||||
r_edit: '编辑',
|
||||
r_preview: '预览',
|
||||
r_copy: '复制',
|
||||
r_copy: '克隆',
|
||||
r_rename: '重命名',
|
||||
r_publish: '发布',
|
||||
r_unpublish: '取消发布',
|
||||
|
||||
@@ -29,6 +29,7 @@ import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$min-width: 400px;
|
||||
@include go(header) {
|
||||
&-box {
|
||||
display: grid;
|
||||
@@ -36,6 +37,7 @@ import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||
.header-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: $min-width;
|
||||
&.left {
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ watch(() => chartEditStore.getEditCanvasConfig.chartThemeColor, (newColor: keyof
|
||||
v.color = themeColor[i]
|
||||
})
|
||||
})
|
||||
option.value = mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
props.chartConfig.option = option.value
|
||||
}
|
||||
option.value = mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
props.chartConfig.option = option.value
|
||||
}, {
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
placeholder="水球数值"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
<SettingItem name="颜色">
|
||||
<SettingItem name="颜色1">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.color[0].colorStops[0].color"
|
||||
></n-color-picker>
|
||||
</SettingItem>
|
||||
<SettingItem name="颜色">
|
||||
<SettingItem name="颜色2">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { publicConfig } from '@/packages/public'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { ImageConfig } from './index'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import logo from '@/../public/logo.png'
|
||||
import logo from '@/assets/logo.png'
|
||||
|
||||
export const option = {
|
||||
// 图片路径
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import Configuration from './config.vue'
|
||||
import image from '@/assets/images/chart/informations/words_cloud.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import image from '@/assets/images/chart/Tables/tables_categary.png'
|
||||
import image from '@/assets/images/chart/tables/tables_categary.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import image from '@/assets/images/chart/Tables/tables.png'
|
||||
import image from '@/assets/images/chart/tables/tables.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import image from '@/assets/images/chart/Tables/tables_list.png'
|
||||
import image from '@/assets/images/chart/tables/tables_list.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ export const systemSetting = {
|
||||
// 图表拖拽时的吸附距离(px)
|
||||
[SettingStoreEnums.CHART_ALIGN_RANGE]: 10,
|
||||
// 图表工具栏状态(侧边工具状态)
|
||||
[SettingStoreEnums.CHART_TOOLS_STATUS]: ToolsStatusEnum.DOCK
|
||||
[SettingStoreEnums.CHART_TOOLS_STATUS]: ToolsStatusEnum.ASIDE
|
||||
}
|
||||
@@ -19,8 +19,8 @@ export const useChartLayoutStore = defineStore({
|
||||
layers: true,
|
||||
// 图表组件
|
||||
charts: true,
|
||||
// 详情设置
|
||||
details: true
|
||||
// 详情设置(收缩为true)
|
||||
details: false
|
||||
},
|
||||
getters: {
|
||||
getLayers(): boolean {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
// 渐变
|
||||
.fade-enter,
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
.list-complete-item {
|
||||
transition: all 1s;
|
||||
}
|
||||
.list-complete-enter,
|
||||
.list-complete-enter-from,
|
||||
.list-complete-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
|
||||
@@ -80,54 +80,41 @@
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
// todo 使用 scss 循环写一套完整的
|
||||
// margin
|
||||
.go-mt-0 {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
// class:m-1 => margin:1em
|
||||
// class:mt-1 => margin-top:1em
|
||||
// m-0|mt-0|mx-0|my-0|p-0|pt-0|...
|
||||
|
||||
.go-mb-0 {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.go-ml-0 {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
@each $typekey, $type in $spacing-types {
|
||||
//.m-1
|
||||
@each $sizekey, $size in $spacing-sizes {
|
||||
.go-#{$typekey}-#{$sizekey} {
|
||||
#{$type}: $size * $spacing-base-size;
|
||||
}
|
||||
}
|
||||
|
||||
.go-mr-0 {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
//.mx-1
|
||||
@each $sizekey, $size in $spacing-sizes {
|
||||
.go-#{$typekey}x-#{$sizekey} {
|
||||
#{$type}-left: $size * $spacing-base-size;
|
||||
#{$type}-right: $size * $spacing-base-size;
|
||||
}
|
||||
|
||||
.go-my-0 {
|
||||
@extend .go-mt-0;
|
||||
@extend .go-mb-0;
|
||||
}
|
||||
.go-#{$typekey}y-#{$sizekey} {
|
||||
#{$type}-top: $size * $spacing-base-size;
|
||||
#{$type}-bottom: $size * $spacing-base-size;
|
||||
}
|
||||
}
|
||||
|
||||
.go-mx-0 {
|
||||
@extend .go-ml-0;
|
||||
@extend .go-mr-0;
|
||||
}
|
||||
//.mt-1
|
||||
@each $directionkey, $direction in $spacing-directions {
|
||||
@each $sizekey, $size in $spacing-sizes {
|
||||
.go-#{$typekey}#{$directionkey}-#{$sizekey} {
|
||||
#{$type}-#{$direction}: $size * $spacing-base-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.go-pt-0 {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.go-pb-0 {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
.go-pl-0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.go-pr-0 {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.go-py-0 {
|
||||
@extend .go-pt-0;
|
||||
@extend .go-pb-0;
|
||||
}
|
||||
|
||||
.go-px-0 {
|
||||
@extend .go-pl-0;
|
||||
@extend .go-pr-0;
|
||||
.go-#{$typekey} {
|
||||
#{$type}: 0 !important;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,31 @@ $--color-text-2: #86909c;
|
||||
$--color-text-3: #c9cdd4;
|
||||
$--color-text-4: #f2f3f5;
|
||||
|
||||
//.mt-1 => margin top
|
||||
//spacing
|
||||
$spacing-base-size: 1em;
|
||||
|
||||
$spacing-types: (
|
||||
m: margin,
|
||||
p: padding,
|
||||
);
|
||||
|
||||
$spacing-directions: (
|
||||
t: top,
|
||||
r: right,
|
||||
b: bottom,
|
||||
l: left,
|
||||
);
|
||||
|
||||
$spacing-sizes: (
|
||||
0: 0,
|
||||
1: 0.25,
|
||||
2: 0.5,
|
||||
3: 1,
|
||||
4: 1.5,
|
||||
5: 2.5,
|
||||
);
|
||||
|
||||
// 变亮值
|
||||
$--light-shalow: 2%;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ContentBox } from '../contentBox/index'
|
||||
import { ContentBox } from '../ContentBox/index'
|
||||
import { ChartsOptionContent } from './components/ChartsOptionContent'
|
||||
import { ChartsSearch } from './components/ChartsSearch'
|
||||
import {
|
||||
|
||||
@@ -73,8 +73,8 @@ const addAnimation = (item: { label: string; value: string }) => {
|
||||
width: 100%;
|
||||
}
|
||||
.animation-item {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -20,16 +20,10 @@
|
||||
<help-outline-icon></help-outline-icon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<ul>
|
||||
<ul class="go-pl-0">
|
||||
开发环境使用 mock 数据,请输入
|
||||
<li>
|
||||
<n-text type="info"> 【图表】{{ chartDataUrl }} </n-text>
|
||||
</li>
|
||||
<li>
|
||||
<n-text type="info"> 【表格】{{ rankListUrl }} </n-text>
|
||||
</li>
|
||||
<li>
|
||||
<n-text type="info"> 【0~1数字】{{ numberUrl }} </n-text>
|
||||
<li v-for="item in apiList" :key="item.value">
|
||||
<n-text type="info"> {{item.value}} </n-text>
|
||||
</li>
|
||||
</ul>
|
||||
</n-tooltip>
|
||||
@@ -83,6 +77,18 @@ const { requestOriginUrl } = toRefs(chartEditStore.getRequestGlobalConfig)
|
||||
const loading = ref(false)
|
||||
const showMatching = ref(false)
|
||||
|
||||
const apiList = [
|
||||
{
|
||||
value: `【图表】${ chartDataUrl }`
|
||||
},
|
||||
{
|
||||
value: `【表格】${ rankListUrl }`
|
||||
},
|
||||
{
|
||||
value: `【0~1数字】${ numberUrl }`
|
||||
}
|
||||
]
|
||||
|
||||
// 选项
|
||||
const selectOptions: SelectHttpType[] = [
|
||||
{
|
||||
|
||||
@@ -46,14 +46,24 @@
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-upload>
|
||||
<n-button class="sourceBtn-item" @click="download">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<document-download-icon />
|
||||
</n-icon>
|
||||
</template>
|
||||
下载
|
||||
</n-button>
|
||||
<div>
|
||||
<n-button class="sourceBtn-item" @click="download">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<document-download-icon />
|
||||
</n-icon>
|
||||
</template>
|
||||
下载
|
||||
</n-button>
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-icon class="go-ml-1" size="21" :depth="3">
|
||||
<help-outline-icon></help-outline-icon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<n-text depth="3">点击【下载】查看完整数据</n-text>
|
||||
</n-tooltip>
|
||||
</div>
|
||||
</n-space>
|
||||
<n-card>
|
||||
<n-code :code="getSource" language="json"></n-code>
|
||||
@@ -83,7 +93,9 @@ const props = defineProps({
|
||||
// 表格标题
|
||||
const tableTitle = ['字段', '映射', '状态']
|
||||
|
||||
const { HelpOutlineIcon } = icon.ionicons5
|
||||
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
||||
|
||||
const source = ref()
|
||||
const dimensions = ref()
|
||||
const dimensionsAndSource = ref()
|
||||
@@ -140,7 +152,7 @@ watch(() => targetData.value?.option?.dataset, (newData: {
|
||||
source: any,
|
||||
dimensions: any
|
||||
} | null) => {
|
||||
if (isObject(newData)) {
|
||||
if (newData && isObject(newData)) {
|
||||
// 只有 Echarts 数据才有对应的格式
|
||||
source.value = isCharts.value ? newData.source : newData
|
||||
if (isCharts.value) {
|
||||
|
||||
@@ -95,7 +95,7 @@ const {
|
||||
LeafIcon
|
||||
} = icon.ionicons5
|
||||
|
||||
const ContentEdit = loadAsyncComponent(() => import('../contentEdit/index.vue'))
|
||||
const ContentEdit = loadAsyncComponent(() => import('../ContentEdit/index.vue'))
|
||||
const CanvasPage = loadAsyncComponent(() =>
|
||||
import('./components/CanvasPage/index.vue')
|
||||
)
|
||||
|
||||
@@ -94,7 +94,7 @@ const canvasPositionList = computed(() => {
|
||||
// * 监听鼠标移动
|
||||
watch(
|
||||
() => chartEditStore.getMousePosition,
|
||||
throttle(e => {
|
||||
throttle(() => {
|
||||
if (!isComputedLine.value) return
|
||||
// 获取目标组件数据
|
||||
|
||||
|
||||
@@ -134,8 +134,10 @@ watchEffect(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$min-width: 500px;
|
||||
@include go('edit-bottom') {
|
||||
width: 100%;
|
||||
min-width: $min-width;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -41,6 +41,11 @@ const lines = {
|
||||
/* 使用 SCSS 会报错,直接使用最基础的 CSS 进行修改,
|
||||
此库有计划 Vue3 版本,但是开发的时候还没发布 */
|
||||
|
||||
#mb-ruler {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* 横线 */
|
||||
#mb-ruler .v-container .lines .line {
|
||||
/* 最大缩放 200% */
|
||||
@@ -71,6 +76,7 @@ const lines = {
|
||||
font-size: 26px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
#mb-ruler .corner{
|
||||
border-width: 0!important;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<slot></slot>
|
||||
<!-- 锚点 -->
|
||||
<div
|
||||
class="shape-point"
|
||||
:class="`shape-point ${point}`"
|
||||
v-for="(point, index) in (select? pointList : [])"
|
||||
:key="index"
|
||||
:style="usePointStyle(point, index, item.attr, cursorResize)"
|
||||
@@ -71,6 +71,20 @@ const select = computed(() => {
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
transform: translate(-40%, -30%);
|
||||
&.t,
|
||||
&.b {
|
||||
width: 30px;
|
||||
}
|
||||
&.l,
|
||||
&.r {
|
||||
height: 30px;
|
||||
}
|
||||
&.r,
|
||||
&.rt,
|
||||
&.rb
|
||||
{
|
||||
transform: translate(-30%, -30%);
|
||||
}
|
||||
}
|
||||
/* 选中 */
|
||||
.shape-modal {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { FileTypeEnum } from '@/enums/fileTypeEnum'
|
||||
import { fetchChartComponent } from '@/packages/index'
|
||||
import { fetchChartComponent, fetchConfigComponent } from '@/packages/index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { ChartEditStoreEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||
import { readFile, goDialog } from '@/utils'
|
||||
import { getUUID, readFile, goDialog } from '@/utils'
|
||||
import { createComponent } from '@/packages'
|
||||
|
||||
// 更新函数
|
||||
@@ -27,6 +27,10 @@ const updateComponent = async (fileData: any, isSplace = false) => {
|
||||
e.chartConfig.chartKey,
|
||||
fetchChartComponent(e.chartConfig)
|
||||
)
|
||||
window['$vue'].component(
|
||||
e.chartConfig.conKey,
|
||||
fetchConfigComponent(e.chartConfig)
|
||||
)
|
||||
}
|
||||
})
|
||||
// 数据赋值
|
||||
@@ -40,14 +44,14 @@ const updateComponent = async (fileData: any, isSplace = false) => {
|
||||
)
|
||||
// 不保存到记录
|
||||
chartEditStore.addComponentList(
|
||||
Object.assign(newComponent, comItem),
|
||||
Object.assign(newComponent, { ...comItem, id: getUUID() }),
|
||||
false,
|
||||
true
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// 非组件(顺便排除脏数据)
|
||||
if(key !== 'editCanvasConfig' && key !== 'requestGlobalConfig') return
|
||||
if (key !== 'editCanvasConfig' && key !== 'requestGlobalConfig') return
|
||||
Object.assign((chartEditStore as any)[key], fileData[key])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ import { watermarkText } from '@/settings/designSetting'
|
||||
<style lang="scss" scoped>
|
||||
#go-edit-watermark {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ import { useAddKeyboard } from '../hooks/useKeyboard.hook'
|
||||
import { dragHandle, dragoverHandle, useMouseHandle } from './hooks/useDrag.hook'
|
||||
import { useComponentStyle, useSizeStyle } from './hooks/useStyle.hook'
|
||||
|
||||
import { ContentBox } from '../contentBox/index'
|
||||
import { ContentBox } from '../ContentBox/index'
|
||||
import { EditRange } from './components/EditRange'
|
||||
import { EditBottom } from './components/EditBottom'
|
||||
import { EditShapeBox } from './components/EditShapeBox'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</template>
|
||||
</n-button>
|
||||
<n-space>
|
||||
<!-- 模块展示按钮 -->
|
||||
<n-tooltip v-for="item in btnList" :key="item.key" placement="bottom" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button size="small" ghost :type="styleHandle(item)" @click="clickHandle(item)">
|
||||
@@ -19,6 +20,7 @@
|
||||
|
||||
<n-divider vertical />
|
||||
|
||||
<!-- 历史记录按钮 -->
|
||||
<n-tooltip v-for="item in historyList" :key="item.key" placement="bottom" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button size="small" ghost type="primary" :disabled="!item.select" @click="clickHistoryHandle(item)">
|
||||
@@ -41,7 +41,7 @@ import { computed, toRaw } from 'vue'
|
||||
import Draggable from 'vuedraggable'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
|
||||
import { ContentBox } from '../contentBox/index'
|
||||
import { ContentBox } from '../ContentBox/index'
|
||||
import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
|
||||
import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
|
||||
@@ -50,9 +50,9 @@ chartHistoryStoreStore.canvasInit(chartEditStore.getEditCanvas)
|
||||
const HeaderLeftBtn = loadAsyncComponent(() => import('./ContentHeader/headerLeftBtn/index.vue'))
|
||||
const HeaderRightBtn = loadAsyncComponent(() => import('./ContentHeader/headerRightBtn/index.vue'))
|
||||
const HeaderTitle = loadAsyncComponent(() => import('./ContentHeader/headerTitle/index.vue'))
|
||||
const ContentLayers = loadAsyncComponent(() => import('./contentLayers/index.vue'))
|
||||
const ContentCharts = loadAsyncComponent(() => import('./contentCharts/index.vue'))
|
||||
const ContentConfigurations = loadAsyncComponent(() => import('./contentConfigurations/index.vue'))
|
||||
const ContentLayers = loadAsyncComponent(() => import('./ContentLayers/index.vue'))
|
||||
const ContentCharts = loadAsyncComponent(() => import('./ContentCharts/index.vue'))
|
||||
const ContentConfigurations = loadAsyncComponent(() => import('./ContentConfigurations/index.vue'))
|
||||
|
||||
// 右键
|
||||
const {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<h1 class="text-base text-gray-500">抱歉,你无权访问该页面</h1>
|
||||
<n-button type="info" @click="goHome">回到首页</n-button>
|
||||
</div>
|
||||
<n-button type="primary" @click="goHome">回到首页</n-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,11 +20,15 @@ function goHome() {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@include go(error) {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
padding: 100px 0;
|
||||
@include background-image('background-image');
|
||||
.text-center {
|
||||
h1 {
|
||||
color: #666;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="text-center">
|
||||
<h1 class="text-base text-gray-500">抱歉,你访问的页面不存在</h1>
|
||||
</div>
|
||||
<n-button type="info" @click="goHome">回到首页</n-button>
|
||||
<n-button type="primary" @click="goHome">回到首页</n-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,11 +20,15 @@ function goHome() {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@include go(error) {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
padding: 100px 0;
|
||||
@include background-image('background-image');
|
||||
.text-center {
|
||||
h1 {
|
||||
color: #666;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<h1 class="text-base text-gray-500">抱歉,服务器出错了</h1>
|
||||
<n-button type="info" @click="goHome">回到首页</n-button>
|
||||
</div>
|
||||
<n-button type="primary" secondary @click="goHome">回到首页</n-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,11 +21,15 @@ function goHome() {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@include go(error) {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
padding: 100px 0;
|
||||
@include background-image('background-image');
|
||||
.text-center {
|
||||
h1 {
|
||||
color: #666;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ref, nextTick, onMounted, onUnmounted} from 'vue'
|
||||
import { ref, onMounted, onUnmounted} from 'vue'
|
||||
import { usePreviewFitScale, usePreviewScrollYScale, usePreviewScrollXScale, usePreviewFullScale } from '@/hooks/index'
|
||||
import type { ChartEditStorageType } from '../index.d'
|
||||
import { PreviewScaleEnum } from '@/enums/styleEnum'
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="list-content-img" @click="resizeHandle">
|
||||
<n-image
|
||||
object-fit="contain"
|
||||
height="200"
|
||||
height="180"
|
||||
preview-disabled
|
||||
:src="
|
||||
requireUrl('project/moke-20211219181327.png')
|
||||
@@ -26,56 +26,58 @@
|
||||
</div>
|
||||
</div>
|
||||
<template #action>
|
||||
<n-space class="list-footer" justify="space-between">
|
||||
<n-text>
|
||||
<div class="go-flex-items-center list-footer" justify="space-between">
|
||||
<n-text class="go-ellipsis-1">
|
||||
{{ cardData.title || '' }}
|
||||
</n-text>
|
||||
<!-- 工具 -->
|
||||
<n-space>
|
||||
<n-text>
|
||||
<n-badge
|
||||
class="animation-twinkle"
|
||||
dot
|
||||
:color="cardData.release ? '#34c749' : '#fcbc40'"
|
||||
></n-badge>
|
||||
{{
|
||||
cardData.release
|
||||
? $t('project.release')
|
||||
: $t('project.unreleased')
|
||||
}}
|
||||
</n-text>
|
||||
<div class="go-flex-items-center list-footer-ri">
|
||||
<n-space>
|
||||
<n-text>
|
||||
<n-badge
|
||||
class="animation-twinkle"
|
||||
dot
|
||||
:color="cardData.release ? '#34c749' : '#fcbc40'"
|
||||
></n-badge>
|
||||
{{
|
||||
cardData.release
|
||||
? $t('project.release')
|
||||
: $t('project.unreleased')
|
||||
}}
|
||||
</n-text>
|
||||
|
||||
<template v-for="item in fnBtnList" :key="item.key">
|
||||
<template v-if="item.key === 'select'">
|
||||
<n-dropdown
|
||||
trigger="hover"
|
||||
placement="bottom"
|
||||
:options="selectOptions"
|
||||
:show-arrow="true"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<n-button size="small">
|
||||
<template #icon>
|
||||
<component :is="item.icon"></component>
|
||||
</template>
|
||||
</n-button>
|
||||
</n-dropdown>
|
||||
</template>
|
||||
|
||||
<n-tooltip v-else placement="bottom" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button size="small" @click="handleSelect(item.key)">
|
||||
<template #icon>
|
||||
<component :is="item.icon"></component>
|
||||
</template>
|
||||
</n-button>
|
||||
<template v-for="item in fnBtnList" :key="item.key">
|
||||
<template v-if="item.key === 'select'">
|
||||
<n-dropdown
|
||||
trigger="hover"
|
||||
placement="bottom"
|
||||
:options="selectOptions"
|
||||
:show-arrow="true"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<n-button size="small">
|
||||
<template #icon>
|
||||
<component :is="item.icon"></component>
|
||||
</template>
|
||||
</n-button>
|
||||
</n-dropdown>
|
||||
</template>
|
||||
<component :is="item.label"></component>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
</n-space>
|
||||
|
||||
<n-tooltip v-else placement="bottom" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button size="small" @click="handleSelect(item.key)">
|
||||
<template #icon>
|
||||
<component :is="item.icon"></component>
|
||||
</template>
|
||||
</n-button>
|
||||
</template>
|
||||
<component :is="item.label"></component>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
</n-space>
|
||||
</div>
|
||||
<!-- end -->
|
||||
</n-space>
|
||||
</div>
|
||||
</template>
|
||||
</n-card>
|
||||
</div>
|
||||
@@ -92,8 +94,8 @@ const {
|
||||
CopyIcon,
|
||||
TrashIcon,
|
||||
PencilIcon,
|
||||
DownloadIcon,
|
||||
BrowsersOutlineIcon,
|
||||
DownloadOutlineIcon,
|
||||
HammerIcon,
|
||||
SendIcon
|
||||
} = icon.ionicons5
|
||||
@@ -152,7 +154,7 @@ const selectOptions = ref([
|
||||
{
|
||||
label: renderLang('global.r_download'),
|
||||
key: 'download',
|
||||
icon: renderIcon(DownloadOutlineIcon)
|
||||
icon: renderIcon(DownloadIcon)
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
@@ -193,7 +195,7 @@ const resizeHandle = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$contentHeight: 200px;
|
||||
$contentHeight: 180px;
|
||||
@include go('items-list-card') {
|
||||
position: relative;
|
||||
border-radius: $--border-radius-base;
|
||||
@@ -227,7 +229,13 @@ $contentHeight: 200px;
|
||||
}
|
||||
}
|
||||
.list-footer {
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
line-height: 30px;
|
||||
&-ri {
|
||||
justify-content: flex-end;
|
||||
min-width: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,31 +7,31 @@ export const useDataListInit = () => {
|
||||
const list = ref<ChartList>([
|
||||
{
|
||||
id: 1,
|
||||
title: '物料1',
|
||||
title: '物料1-假数据不可用',
|
||||
release: true,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '物料2',
|
||||
title: '物料2-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '物料3',
|
||||
title: '物料3-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '物料4',
|
||||
title: '物料4-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: '物料5',
|
||||
title: '物料5-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
}
|
||||
|
||||
@@ -12,9 +12,16 @@
|
||||
@resize="resizeHandle"
|
||||
@delete="deleteHandle($event, index)"
|
||||
@edit="editHandle"
|
||||
></project-items-card>
|
||||
></project-items-card>
|
||||
</n-grid-item>
|
||||
</n-grid>
|
||||
<div class="list-pagination">
|
||||
<n-pagination
|
||||
:item-count="10"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
show-size-picker
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<project-items-modal-card
|
||||
v-if="modalData"
|
||||
@@ -22,7 +29,7 @@
|
||||
:cardData="modalData"
|
||||
@close="closeModal"
|
||||
@edit="editHandle"
|
||||
></project-items-modal-card>
|
||||
></project-items-modal-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -34,21 +41,25 @@ import { useDataListInit } from './hooks/useData.hook'
|
||||
|
||||
const { CopyIcon, EllipsisHorizontalCircleSharpIcon } = icon.ionicons5
|
||||
const { list, deleteHandle } = useDataListInit()
|
||||
const {
|
||||
modalData,
|
||||
modalShow,
|
||||
closeModal,
|
||||
resizeHandle,
|
||||
editHandle
|
||||
} = useModalDataInit()
|
||||
const { modalData, modalShow, closeModal, resizeHandle, editHandle } =
|
||||
useModalDataInit()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$contentHeight: 250px;
|
||||
@include go('items-list') {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: calc(100vh - #{$--header-height} * 2 - 2px);
|
||||
.list-content {
|
||||
position: relative;
|
||||
height: $contentHeight;
|
||||
}
|
||||
.list-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -129,7 +129,7 @@ $contentWidth: calc(82vw);
|
||||
@include go('modal-box') {
|
||||
width: $contentWidth;
|
||||
.list-content {
|
||||
margin-top: 20px;
|
||||
margin-top: 28px;
|
||||
border-radius: $--border-radius-base;
|
||||
overflow: hidden;
|
||||
@include background-image('background-point');
|
||||
|
||||
2
types/shims-vue.d.ts
vendored
@@ -4,4 +4,4 @@ declare module '*.vue' {
|
||||
export default component
|
||||
}
|
||||
|
||||
declare module 'lodash'
|
||||
declare module 'lodash/*'
|
||||