From 1b3740bbc666f8005f1899605666e7abe6f4d5a1 Mon Sep 17 00:00:00 2001
From: Hooray <304327508@qq.com>
Date: Mon, 25 Apr 2022 20:21:08 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=9B=BE=E6=A0=87=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E6=96=B9=E5=BC=8F=EF=BC=9B=E5=B0=86element=20plus=20?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8C=89=E9=9C=80=E5=AF=BC=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
auto-import-eslint-config.js | 7 +-
jsconfig.json | 3 +-
package.json | 7 +-
pnpm-lock.yaml | 106 ++++++++++-----
public/icons/icons.json | 1 +
scripts/prepare.js | 15 +++
src/App.vue | 4 +-
src/components/FileUpload/index.vue | 12 +-
src/components/ImagePreview/index.vue | 4 +-
src/components/ImageUpload/index.vue | 18 ++-
src/components/ImagesUpload/index.vue | 26 ++--
src/components/PageMain/index.vue | 4 +-
src/components/SearchBar/index.vue | 9 +-
src/components/SvgIcon/index.vue | 18 +--
src/components/Trend/index.vue | 4 +-
src/iconify-ep/index.js | 6 +
src/layout/components/AppSetting/index.vue | 59 ++++++--
src/layout/components/BuyIt/index.vue | 22 +--
src/layout/components/Header/index.vue | 6 +-
src/layout/components/MainSidebar/index.vue | 6 +-
src/layout/components/Search/index.vue | 57 ++++----
src/layout/components/SidebarItem/index.vue | 24 ++--
src/layout/components/Tools/index.vue | 28 +++-
src/layout/components/Topbar/index.vue | 12 +-
src/main.js | 19 +--
src/settings.js | 2 +
src/views/[...all].vue | 4 +-
src/views/component_basic_example/button.vue | 126 +++++++++++++++---
src/views/component_basic_example/icon.vue | 31 +++--
src/views/component_basic_example/input.vue | 8 +-
src/views/component_basic_example/link.vue | 12 +-
.../pageheader.demo.vue | 9 +-
.../searchbar.demo.vue | 18 ++-
.../component_extend_example/svg.demo.vue | 24 +++-
src/views/index.vue | 27 +++-
src/views/jsx_example/index.jsx | 6 +-
src/views/login.vue | 30 +++--
src/views/mock_example/index.vue | 13 +-
src/views/permission_example/index.vue | 10 +-
src/views/personal/edit.password.vue | 2 +-
src/views/personal/setting.vue | 3 +-
vite/plugins/auto-import.js | 4 +
vite/plugins/components.js | 4 +
43 files changed, 576 insertions(+), 234 deletions(-)
create mode 100644 public/icons/icons.json
create mode 100644 scripts/prepare.js
create mode 100644 src/iconify-ep/index.js
diff --git a/auto-import-eslint-config.js b/auto-import-eslint-config.js
index b571eb00..51dea856 100644
--- a/auto-import-eslint-config.js
+++ b/auto-import-eslint-config.js
@@ -46,6 +46,11 @@ module.exports = {
withDefaults: 'readonly',
// vue-router
useRoute: 'readonly',
- useRouter: 'readonly'
+ useRouter: 'readonly',
+ // element plus
+ ElMessage: 'readonly',
+ ElNotification: 'readonly',
+ ElMessageBox: 'readonly',
+ ElLoading: 'readonly'
}
}
diff --git a/jsconfig.json b/jsconfig.json
index 8405955c..bfb2bc61 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -5,7 +5,8 @@
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
- }
+ },
+ "jsx": "preserve"
},
"exclude": ["node_modules", "dist", "dist-test"]
}
diff --git a/package.json b/package.json
index 7ffcce70..c89783f2 100644
--- a/package.json
+++ b/package.json
@@ -14,10 +14,10 @@
"lint:eslint": "eslint src/**/*.{js,vue} --fix",
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --fix",
"prepare": "husky install",
+ "postinstall": "esno scripts/prepare.js",
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
- "@element-plus/icons-vue": "^1.1.4",
"@tinymce/tinymce-vue": "^4.0.7",
"@vueuse/core": "^8.3.1",
"@vueuse/integrations": "^8.3.1",
@@ -29,7 +29,6 @@
"mavon-editor": "^3.0.0-beta",
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
- "naming-style": "^1.0.1",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.0",
@@ -40,11 +39,15 @@
"vue-router": "^4.0.14"
},
"devDependencies": {
+ "@iconify-json/ep": "^1.1.3",
+ "@iconify/vue": "^3.2.1",
"@vitejs/plugin-vue": "^2.3.1",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/compiler-sfc": "^3.2.33",
"eslint": "^8.14.0",
"eslint-plugin-vue": "^8.7.1",
+ "esno": "^0.14.1",
+ "fs-extra": "^10.1.0",
"http-server": "^14.1.0",
"husky": "^7.0.4",
"lint-staged": "^12.4.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7c91296e..a3682e14 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,7 +1,8 @@
lockfileVersion: 5.3
specifiers:
- '@element-plus/icons-vue': ^1.1.4
+ '@iconify-json/ep': ^1.1.3
+ '@iconify/vue': ^3.2.1
'@tinymce/tinymce-vue': ^4.0.7
'@vitejs/plugin-vue': ^2.3.1
'@vitejs/plugin-vue-jsx': ^1.3.10
@@ -13,6 +14,8 @@ specifiers:
element-plus: ^2.1.10
eslint: ^8.14.0
eslint-plugin-vue: ^8.7.1
+ esno: ^0.14.1
+ fs-extra: ^10.1.0
hotkeys-js: ^3.9.0
http-server: ^14.1.0
husky: ^7.0.4
@@ -21,7 +24,6 @@ specifiers:
mavon-editor: ^3.0.0-beta
mitt: ^3.0.0
mockjs: ^1.1.0
- naming-style: ^1.0.1
nprogress: ^0.2.0
path-browserify: ^1.0.1
path-to-regexp: ^6.2.0
@@ -56,7 +58,6 @@ specifiers:
vue-router: ^4.0.14
dependencies:
- '@element-plus/icons-vue': 1.1.4_vue@3.2.33
'@tinymce/tinymce-vue': 4.0.7_vue@3.2.33
'@vueuse/core': 8.3.1_vue@3.2.33
'@vueuse/integrations': 8.3.1_deda4b00ac8a40f4d1264f96789e0783
@@ -68,7 +69,6 @@ dependencies:
mavon-editor: 3.0.0-beta
mitt: 3.0.0
mockjs: 1.1.0
- naming-style: 1.0.1
nprogress: 0.2.0
path-browserify: 1.0.1
path-to-regexp: 6.2.0
@@ -79,11 +79,15 @@ dependencies:
vue-router: 4.0.14_vue@3.2.33
devDependencies:
+ '@iconify-json/ep': 1.1.3
+ '@iconify/vue': 3.2.1_vue@3.2.33
'@vitejs/plugin-vue': 2.3.1_vite@2.9.5+vue@3.2.33
'@vitejs/plugin-vue-jsx': 1.3.10
'@vue/compiler-sfc': 3.2.33
eslint: 8.14.0
eslint-plugin-vue: 8.7.1_eslint@8.14.0
+ esno: 0.14.1
+ fs-extra: 10.1.0
http-server: 14.1.0
husky: 7.0.4
lint-staged: 12.4.0
@@ -541,6 +545,24 @@ packages:
resolution: {integrity: sha1-tSBSnsIdjllFoYUd/Rwy6U45/0U=, tarball: '@humanwhocodes/object-schema/download/@humanwhocodes/object-schema-1.2.1.tgz'}
dev: true
+ /@iconify-json/ep/1.1.3:
+ resolution: {integrity: sha512-i69QdJo01daSZZ9yIkaCCxpKcxnqZNwLZU+0joNqbD+MzNpQHFVTmBaIvT44oyCpjfy5eSHF1WJ7pV0vT/O+WQ==}
+ dependencies:
+ '@iconify/types': 1.1.0
+ dev: true
+
+ /@iconify/types/1.1.0:
+ resolution: {integrity: sha512-Jh0llaK2LRXQoYsorIH8maClebsnzTcve+7U3rQUSnC11X4jtPnFuyatqFLvMxZ8MLG8dB4zfHsbPfuvxluONw==}
+ dev: true
+
+ /@iconify/vue/3.2.1_vue@3.2.33:
+ resolution: {integrity: sha512-c4R6ZgFo1JrJ8aPMMgOPgfU7lBswihMGR+yWe/P4ZukC3kTkeT4+lkt9Pc/itVFMkwva/S/7u9YofmYv57fnNQ==}
+ peerDependencies:
+ vue: 3.x
+ dependencies:
+ vue: 3.2.33
+ dev: true
+
/@jridgewell/resolve-uri/3.0.5:
resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==}
engines: {node: '>=6.0.0'}
@@ -1258,6 +1280,12 @@ packages:
engines: {node: '>=6'}
dev: true
+ /builtins/4.1.0:
+ resolution: {integrity: sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==}
+ dependencies:
+ semver: 7.3.5
+ dev: true
+
/cache-base/1.0.1:
resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==}
engines: {node: '>=0.10.0'}
@@ -1645,7 +1673,7 @@ packages:
dev: true
/cross-spawn/7.0.3:
- resolution: {integrity: sha1-9zqFudXUHQRVUcF34ogtSshXKKY=, tarball: cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1632883303690&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz}
+ resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
dependencies:
path-key: 3.1.1
@@ -2258,6 +2286,12 @@ packages:
dev: true
optional: true
+ /esbuild-node-loader/0.6.5:
+ resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==}
+ dependencies:
+ esbuild: 0.14.30
+ dev: true
+
/esbuild-openbsd-64/0.14.30:
resolution: {integrity: sha512-UyK1MTMcy4j5fH260fsE1o6MVgWNhb62eCK2yCKCRazZv8Nqdc2WiP9ygjWidmEdCDS+A6MuVp9ozk9uoQtQpA==}
engines: {node: '>=12'}
@@ -2267,6 +2301,14 @@ packages:
dev: true
optional: true
+ /esbuild-register/3.3.2_esbuild@0.14.30:
+ resolution: {integrity: sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ==}
+ peerDependencies:
+ esbuild: '>=0.12 <1'
+ dependencies:
+ esbuild: 0.14.30
+ dev: true
+
/esbuild-sunos-64/0.14.30:
resolution: {integrity: sha512-aQRtRTNKHB4YuG+xXATe5AoRTNY48IJg5vjE8ElxfmjO9+KdX7MHFkTLhlKevCD6rNANtB3qOlSIeAiXTwHNqw==}
engines: {node: '>=12'}
@@ -2457,6 +2499,17 @@ packages:
- supports-color
dev: true
+ /esno/0.14.1:
+ resolution: {integrity: sha512-yDFYw6dGUjCT1qKsdG7WOc/RzIh/qwxUEVZ+ohCltaxBxEFMNqeqbQL9xjRl6Yvdwrfc5OCjUA9JbFmuu/8BKg==}
+ hasBin: true
+ dependencies:
+ cross-spawn: 7.0.3
+ esbuild: 0.14.30
+ esbuild-node-loader: 0.6.5
+ esbuild-register: 3.3.2_esbuild@0.14.30
+ import-meta-resolve: 1.1.1
+ dev: true
+
/espree/9.0.0:
resolution: {integrity: sha1-6QopZWmCKFAudxx6WEibGp0QcJA=, tarball: espree/download/espree-9.0.0.tgz}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2790,17 +2843,8 @@ packages:
map-cache: 0.2.2
dev: true
- /fs-extra/10.0.0:
- resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==}
- engines: {node: '>=12'}
- dependencies:
- graceful-fs: 4.2.9
- jsonfile: 6.1.0
- universalify: 2.0.0
- dev: true
-
- /fs-extra/10.0.1:
- resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==}
+ /fs-extra/10.1.0:
+ resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
engines: {node: '>=12'}
dependencies:
graceful-fs: 4.2.9
@@ -3326,6 +3370,12 @@ packages:
engines: {node: '>=8'}
dev: true
+ /import-meta-resolve/1.1.1:
+ resolution: {integrity: sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==}
+ dependencies:
+ builtins: 4.1.0
+ dev: true
+
/imurmurhash/0.1.4:
resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=, tarball: imurmurhash/download/imurmurhash-0.1.4.tgz?cache=0&sync_timestamp=1632883651457&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fimurmurhash%2Fdownload%2Fimurmurhash-0.1.4.tgz}
engines: {node: '>=0.8.19'}
@@ -3726,7 +3776,7 @@ packages:
dev: true
/isexe/2.0.0:
- resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=, tarball: isexe/download/isexe-2.0.0.tgz}
+ resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
dev: true
/isobject/2.1.0:
@@ -4279,10 +4329,6 @@ packages:
resolution: {integrity: sha1-FjDEKyJR/4HiooPelqVJfqkuXg0=, tarball: mute-stream/download/mute-stream-0.0.8.tgz}
dev: true
- /naming-style/1.0.1:
- resolution: {integrity: sha1-LIHzeKnk0nhhjCyKpVBrCyozA00=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/naming-style/download/naming-style-1.0.1.tgz}
- dev: false
-
/nanoid/3.1.30:
resolution: {integrity: sha1-Y/k8xUjSoRPcXfvGO/oJ4rm2Q2I=, tarball: nanoid/download/nanoid-3.1.30.tgz}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -4696,7 +4742,7 @@ packages:
dev: true
/path-key/3.1.1:
- resolution: {integrity: sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=, tarball: path-key/download/path-key-3.1.1.tgz}
+ resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
dev: true
@@ -5339,14 +5385,14 @@ packages:
dev: true
/shebang-command/2.0.0:
- resolution: {integrity: sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=, tarball: shebang-command/download/shebang-command-2.0.0.tgz}
+ resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
dependencies:
shebang-regex: 3.0.0
dev: true
/shebang-regex/3.0.0:
- resolution: {integrity: sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=, tarball: shebang-regex/download/shebang-regex-3.0.0.tgz}
+ resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
dev: true
@@ -6302,7 +6348,7 @@ packages:
dependencies:
chalk: 4.1.2
debug: 4.3.3
- fs-extra: 10.0.0
+ fs-extra: 10.1.0
vite: 2.9.5_sass@1.50.1
transitivePeerDependencies:
- supports-color
@@ -6321,7 +6367,7 @@ packages:
dotenv-expand: 8.0.2
ejs: 3.1.6
fast-glob: 3.2.11
- fs-extra: 10.0.1
+ fs-extra: 10.1.0
html-minifier-terser: 6.1.0
node-html-parser: 5.3.3
pathe: 0.2.0
@@ -6388,7 +6434,7 @@ packages:
/vite-plugin-spritesmith/0.1.1:
resolution: {integrity: sha1-sb1P3NVi10sbVRBYrG48ONdXkgw=, tarball: vite-plugin-spritesmith/download/vite-plugin-spritesmith-0.1.1.tgz}
dependencies:
- fs-extra: 10.0.0
+ fs-extra: 10.1.0
gaze: 1.1.3
lodash: 4.17.21
mkdirp: 1.0.4
@@ -6405,7 +6451,7 @@ packages:
cors: 2.8.5
debug: 4.3.3
etag: 1.8.1
- fs-extra: 10.0.0
+ fs-extra: 10.1.0
pathe: 0.2.0
svg-baker: 1.7.0
svgo: 2.8.0
@@ -6580,14 +6626,14 @@ packages:
dev: true
/which/1.3.1:
- resolution: {integrity: sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=, tarball: which/download/which-1.3.1.tgz}
+ resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
hasBin: true
dependencies:
isexe: 2.0.0
dev: true
/which/2.0.2:
- resolution: {integrity: sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=, tarball: which/download/which-2.0.2.tgz}
+ resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
hasBin: true
dependencies:
diff --git a/public/icons/icons.json b/public/icons/icons.json
new file mode 100644
index 00000000..a7193d59
--- /dev/null
+++ b/public/icons/icons.json
@@ -0,0 +1 @@
+{"prefix":"ep","icons":{"add-location":{"body":" 提供两块插槽: 一块是 content 区域插槽,一块是右侧区域
也支持彩色 SVG Icon
-翻转: