From 25b23094ef1702fb4401c7e76cb0ed2d53cd9897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Fri, 2 Sep 2022 16:49:00 +0800 Subject: [PATCH 01/26] =?UTF-8?q?feat:=20tsx=20=E5=AE=9E=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.json | 32 +- build/base.config.ts | 8 +- package.json | 3 +- .../datav-vue3/components/BorderBox1/index.ts | 25 +- .../components/BorderBox1/src/BorderBox1.tsx | 109 +++ .../components/BorderBox1/src/css/index.css | 28 + .../components/BorderBox1/src/index.less | 33 + .../components/BorderBox1/src/index.vue | 1 - .../components/Decoration11/src/index.vue | 2 +- .../components/Decoration9/src/index.vue | 320 +++---- packages/datav-vue3/utils/autoResize.ts | 3 +- packages/docs/docs/.vitepress/config.ts | 14 +- packages/docs/docs/Border/BorderBox1/demo.vue | 17 +- pnpm-lock.yaml | 861 +++++++++++------- 14 files changed, 942 insertions(+), 514 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx create mode 100644 packages/datav-vue3/components/BorderBox1/src/css/index.css create mode 100644 packages/datav-vue3/components/BorderBox1/src/index.less diff --git a/.eslintrc.json b/.eslintrc.json index 5c45f9f..984513e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,16 +1,16 @@ -{ - "extends": "@antfu", - "rules": { - "array-bracket-spacing": 0, - "no-console": 0, - "vue/component-tags-order": [ - "error", - { - "order": [["template", "script"], "style"] - } - ] - }, - "parserOptions": { - "ecmaVersion": 6 - } -} +{ + "extends": "@antfu/eslint-config-vue", + "rules": { + "array-bracket-spacing": 0, + "no-console": 0, + "vue/component-tags-order": [ + "error", + { + "order": [["template", "script"], "style"] + } + ] + }, + "parserOptions": { + "ecmaVersion": 6 + } +} diff --git a/build/base.config.ts b/build/base.config.ts index 924bef6..e8e726a 100644 --- a/build/base.config.ts +++ b/build/base.config.ts @@ -3,6 +3,7 @@ import path from 'path' import { defineConfig } from 'vite' import Vue from '@vitejs/plugin-vue' +import VueJsx from '@vitejs/plugin-vue-jsx' import AutoImport from 'unplugin-auto-import/vite' export default defineConfig({ @@ -17,7 +18,7 @@ export default defineConfig({ reactivityTransform: true, include: [/\.vue$/, /\.md$/], }), - + VueJsx(), AutoImport({ imports: [ 'vue', @@ -26,4 +27,9 @@ export default defineConfig({ dts: true, }), ], + esbuild: { + jsxFactory: 'h', + jsxFragment: 'Fragment', + jsxInject: 'import { h } from "vue"', + }, }) diff --git a/package.json b/package.json index 02b8dc9..93de13b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "vue": "^3.2.37" }, "devDependencies": { - "@antfu/eslint-config": "^0.20.7", + "@antfu/eslint-config-vue": "^0.26.2", + "@vitejs/plugin-vue-jsx": "^2.0.0", "@types/node": "^17.0.45", "@vitejs/plugin-vue": "^2.3.3", "eslint": "^8.18.0", diff --git a/packages/datav-vue3/components/BorderBox1/index.ts b/packages/datav-vue3/components/BorderBox1/index.ts index c888ed2..d247eb3 100644 --- a/packages/datav-vue3/components/BorderBox1/index.ts +++ b/packages/datav-vue3/components/BorderBox1/index.ts @@ -1,12 +1,13 @@ -import type { App, Plugin } from 'vue' -import BorderBox1 from './src/index.vue' - -export const BorderBox1Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox1', BorderBox1) - }, -} - -export { - BorderBox1, -} +import type { App, Plugin } from 'vue' +// import BorderBox1 from './src/index.vue' +import BorderBox1 from './src/BorderBox1' + +export const BorderBox1Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox1', BorderBox1) + }, +} + +export { + BorderBox1, +} diff --git a/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx new file mode 100644 index 0000000..920ac51 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx @@ -0,0 +1,109 @@ +import { defineComponent, renderSlot } from 'vue' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +const BorderBox1Props = { + color: { + type: Array, + default: () => ([]), + }, + backgroundColor: { + type: String, + default: 'transparent', + }, +} + +const BorderBox1 = defineComponent({ + props: BorderBox1Props, + setup(props) { + const borderBox1 = ref(null) + + const state = reactive({ + border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'], + defaultColor: ['#4fd2dd', '#235fa7'], + mergedColor: [], + }) + + const mergeColor = () => { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + const { width, height, initWH } = autoResize(borderBox1) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + return { + width, + height, + initWH, + state, + borderBox1, + } + }, + render() { + const { backgroundColor, width, height, state, $slots } = this + return ( +
+ + + + + { + state.border.map((item) => { + return ( + + + + + + + + + + + + ) + }) + } + +
+ { renderSlot($slots, 'default') } +
+
+ ) + }, +}) + +export default BorderBox1 diff --git a/packages/datav-vue3/components/BorderBox1/src/css/index.css b/packages/datav-vue3/components/BorderBox1/src/css/index.css new file mode 100644 index 0000000..d4227d2 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox1/src/css/index.css @@ -0,0 +1,28 @@ +.dv-border-box-1 { + position: relative; + width: 100%; + height: 100%; +} +.dv-border-box-1 .dv-border { + position: absolute; + display: block; +} +.dv-border-box-1 .right-top { + right: 0px; + transform: rotateY(180deg); +} +.dv-border-box-1 .left-bottom { + bottom: 0px; + transform: rotateX(180deg); +} +.dv-border-box-1 .right-bottom { + right: 0px; + bottom: 0px; + transform: rotateX(180deg) rotateY(180deg); +} +.dv-border-box-1 .border-box-content { + position: relative; + width: 100%; + height: 100%; + text-align: center; +} diff --git a/packages/datav-vue3/components/BorderBox1/src/index.less b/packages/datav-vue3/components/BorderBox1/src/index.less new file mode 100644 index 0000000..aceb624 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox1/src/index.less @@ -0,0 +1,33 @@ +.dv-border-box-1 { + position: relative; + width: 100%; + height: 100%; + + .dv-border { + position: absolute; + display: block; + } + + .right-top { + right: 0px; + transform: rotateY(180deg); + } + + .left-bottom { + bottom: 0px; + transform: rotateX(180deg); + } + + .right-bottom { + right: 0px; + bottom: 0px; + transform: rotateX(180deg) rotateY(180deg); + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + text-align: center; + } +} \ No newline at end of file diff --git a/packages/datav-vue3/components/BorderBox1/src/index.vue b/packages/datav-vue3/components/BorderBox1/src/index.vue index 1a68e9c..6e0e670 100644 --- a/packages/datav-vue3/components/BorderBox1/src/index.vue +++ b/packages/datav-vue3/components/BorderBox1/src/index.vue @@ -86,7 +86,6 @@ watch(() => props.color, () => { onMounted(() => { mergeColor() }) - + + + + + diff --git a/packages/datav-vue3/utils/autoResize.ts b/packages/datav-vue3/utils/autoResize.ts index 9f3450e..6908570 100644 --- a/packages/datav-vue3/utils/autoResize.ts +++ b/packages/datav-vue3/utils/autoResize.ts @@ -13,6 +13,7 @@ const autoResize = (dom: Ref, onResize?: () => void, afterAu const initWH = (resize = true) => { return new Promise((resolve) => { nextTick(() => { + console.log(dom) domHtml = dom.value width.value = dom.value ? dom.value.clientWidth : 0 height.value = dom.value ? dom.value.clientHeight : 0 @@ -46,7 +47,7 @@ const autoResize = (dom: Ref, onResize?: () => void, afterAu domObserver = null } - const autoResizeMixinInit = async() => { + const autoResizeMixinInit = async () => { await initWH(false) getDebounceInitWHFun() diff --git a/packages/docs/docs/.vitepress/config.ts b/packages/docs/docs/.vitepress/config.ts index 9682685..0d55331 100644 --- a/packages/docs/docs/.vitepress/config.ts +++ b/packages/docs/docs/.vitepress/config.ts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitepress' +import VueJsx from '@vitejs/plugin-vue-jsx' import Unocss from 'unocss/vite' import AutoImport from 'unplugin-auto-import/vite' import list from '../../../datav-vue3/list.json' @@ -106,13 +107,24 @@ export default defineConfig({ }, plugins: [ Unocss(), + VueJsx(), AutoImport({ imports: [ 'vue', ], dts: true, }), - ] + ], + server:{ + fs:{ + allow: ['..'], + } + }, + esbuild: { + jsxFactory: 'h', + jsxFragment: 'Fragment', + jsxInject: 'import { h } from "vue"', + } }, vue: { reactivityTransform: true, diff --git a/packages/docs/docs/Border/BorderBox1/demo.vue b/packages/docs/docs/Border/BorderBox1/demo.vue index eb329ce..5261cf9 100644 --- a/packages/docs/docs/Border/BorderBox1/demo.vue +++ b/packages/docs/docs/Border/BorderBox1/demo.vue @@ -1,9 +1,20 @@ + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 523bd85..616f18b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,9 +4,10 @@ importers: .: specifiers: - '@antfu/eslint-config': ^0.20.7 + '@antfu/eslint-config-vue': ^0.26.2 '@types/node': ^17.0.45 '@vitejs/plugin-vue': ^2.3.3 + '@vitejs/plugin-vue-jsx': ^2.0.0 eslint: ^8.18.0 fs-extra: ^10.1.0 handlebars: ^4.7.7 @@ -22,9 +23,10 @@ importers: dependencies: vue: 3.2.37 devDependencies: - '@antfu/eslint-config': 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e + '@antfu/eslint-config-vue': 0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e '@types/node': 17.0.45 '@vitejs/plugin-vue': 2.3.3_vite@3.0.8+vue@3.2.37 + '@vitejs/plugin-vue-jsx': 2.0.0_vite@3.0.8+vue@3.2.37 eslint: 8.18.0 fs-extra: 10.1.0 handlebars: 4.7.7 @@ -189,24 +191,24 @@ packages: '@jridgewell/trace-mapping': 0.3.15 dev: true - /@antfu/eslint-config-basic/0.20.7_5mtqsiui4sk53pmkx7i7ue45wm: - resolution: {integrity: sha512-Lhty32km7/dtCtoGBWB9OQnC9aG1mYdFiF4JrbhPPr4nj7fd/KY+p91zIyOtEnlSNp4uKRGXD4DnYjp0cJdGBA==} + /@antfu/eslint-config-basic/0.26.2_4hy23acn2jedqpx23gzjiof2ta: + resolution: {integrity: sha512-wPaKvRhymhaWhaJq4b/CiYnsZ/jONr7wVHy801p6kwUzUvekyY8ZAhU60YoDpb2J8Mh06268b0nHUlULgvMJAw==} peerDependencies: eslint: '>=7.4.0' dependencies: eslint: 8.18.0 - eslint-plugin-antfu: 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e + eslint-plugin-antfu: 0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e eslint-plugin-eslint-comments: 3.2.0_eslint@8.18.0 - eslint-plugin-html: 6.2.0 - eslint-plugin-import: 2.26.0_wno36sjfnklvt2ocf7qbhb2izy - eslint-plugin-jsonc: 2.2.1_eslint@8.18.0 - eslint-plugin-markdown: 2.2.1_eslint@8.18.0 - eslint-plugin-n: 15.1.0_eslint@8.18.0 - eslint-plugin-promise: 6.0.0_eslint@8.18.0 - eslint-plugin-unicorn: 42.0.0_eslint@8.18.0 - eslint-plugin-yml: 0.14.0_eslint@8.18.0 + eslint-plugin-html: 7.1.0 + eslint-plugin-import: 2.26.0_eqbaxt3uvmuzuzhad7lp74szvm + eslint-plugin-jsonc: 2.4.0_eslint@8.18.0 + eslint-plugin-markdown: 3.0.0_eslint@8.18.0 + eslint-plugin-n: 15.2.5_eslint@8.18.0 + eslint-plugin-promise: 6.0.1_eslint@8.18.0 + eslint-plugin-unicorn: 43.0.2_eslint@8.18.0 + eslint-plugin-yml: 1.1.0_eslint@8.18.0 jsonc-eslint-parser: 2.1.0 - yaml-eslint-parser: 0.5.0 + yaml-eslint-parser: 1.1.0 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript @@ -215,105 +217,246 @@ packages: - typescript dev: true - /@antfu/eslint-config-react/0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-CfqtjfrhnDffDImfwWbGWCHjaY/7Un7kkEOVqIh46oU9B6XW6wCFWh3VWJn7SsIYKVJbYlOypneqziYRUB0H3Q==} + /@antfu/eslint-config-ts/0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-larpzAjXo565HGxUL8jg3ZDUwQ7kWnt5rdottCuW3grnkVL5PAE3wVvBktnYaPYyLxW/GdrTS6yGSrocCan7Iw==} peerDependencies: eslint: '>=7.4.0' + typescript: '>=3.9' dependencies: - '@antfu/eslint-config-ts': 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e + '@antfu/eslint-config-basic': 0.26.2_4hy23acn2jedqpx23gzjiof2ta + '@typescript-eslint/eslint-plugin': 5.36.1_4hy23acn2jedqpx23gzjiof2ta + '@typescript-eslint/parser': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e eslint: 8.18.0 - eslint-plugin-react: 7.29.4_eslint@8.18.0 + typescript: 4.7.4 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - - typescript dev: true - /@antfu/eslint-config-ts/0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-wPLhwQ8Jt7rrJj4MQUY2F7pbiV4ITx8RbuOTpkVmuUQeGe3mHCGvJostTcz5JYgWyd3JOx2dqFBY10t3YXEMYw==} + /@antfu/eslint-config-vue/0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-LcSo+V86f+BSc9eB4YNeAvw3GPQjcWE3wrK6VaOmKSlt4tOewj2usJa5jfhHpSsmdrBOw2ORMKd4+3iyx7bMtQ==} peerDependencies: eslint: '>=7.4.0' - typescript: '>=3.9' dependencies: - '@antfu/eslint-config-basic': 0.20.7_5mtqsiui4sk53pmkx7i7ue45wm - '@typescript-eslint/eslint-plugin': 5.30.0_5mtqsiui4sk53pmkx7i7ue45wm - '@typescript-eslint/parser': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@antfu/eslint-config-ts': 0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e eslint: 8.18.0 - typescript: 4.7.4 + eslint-plugin-vue: 9.4.0_eslint@8.18.0 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color + - typescript dev: true - /@antfu/eslint-config-vue/0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-jpWi0FaeDLbAoTawJYExHnZ8EC6+1wiL8OD2Iu1A400b0PGyP85vpfcFAAKGij2KgJVc0ZoHeFJQX1TTMeiI/g==} - peerDependencies: - eslint: '>=7.4.0' + /@antfu/install-pkg/0.1.0: + resolution: {integrity: sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw==} dependencies: - '@antfu/eslint-config-ts': 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e - eslint: 8.18.0 - eslint-plugin-vue: 8.7.1_eslint@8.18.0 + execa: 5.1.1 + find-up: 5.0.0 + dev: true + + /@antfu/utils/0.5.2: + resolution: {integrity: sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==} + dev: true + + /@babel/code-frame/7.18.6: + resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.18.6 + dev: true + + /@babel/compat-data/7.18.13: + resolution: {integrity: sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/core/7.18.13: + resolution: {integrity: sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.0 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.13 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.13 + '@babel/helper-module-transforms': 7.18.9 + '@babel/helpers': 7.18.9 + '@babel/parser': 7.18.13 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + convert-source-map: 1.8.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.1 + semver: 6.3.0 transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color - - typescript dev: true - /@antfu/eslint-config/0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-HXWvjUGsQKA6xro0FnP7hfLcRVU3Ly8zMrxOSkBCJkagSm9osbWeXtPXVessa2i1IzjiU2FBWCf602rFNtpLGA==} + /@babel/generator/7.18.13: + resolution: {integrity: sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + '@jridgewell/gen-mapping': 0.3.2 + jsesc: 2.5.2 + dev: true + + /@babel/helper-annotate-as-pure/7.18.6: + resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + dev: true + + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.13: + resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} + engines: {node: '>=6.9.0'} peerDependencies: - eslint: '>=7.4.0' + '@babel/core': ^7.0.0 dependencies: - '@antfu/eslint-config-react': 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e - '@antfu/eslint-config-vue': 0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e - '@typescript-eslint/eslint-plugin': 5.30.0_5mtqsiui4sk53pmkx7i7ue45wm - '@typescript-eslint/parser': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e - eslint: 8.18.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.18.0 - eslint-plugin-html: 6.2.0 - eslint-plugin-import: 2.26.0_wno36sjfnklvt2ocf7qbhb2izy - eslint-plugin-jsonc: 2.2.1_eslint@8.18.0 - eslint-plugin-n: 15.1.0_eslint@8.18.0 - eslint-plugin-promise: 6.0.0_eslint@8.18.0 - eslint-plugin-unicorn: 42.0.0_eslint@8.18.0 - eslint-plugin-vue: 8.7.1_eslint@8.18.0 - eslint-plugin-yml: 0.14.0_eslint@8.18.0 - jsonc-eslint-parser: 2.1.0 - yaml-eslint-parser: 0.5.0 + '@babel/compat-data': 7.18.13 + '@babel/core': 7.18.13 + '@babel/helper-validator-option': 7.18.6 + browserslist: 4.21.3 + semver: 6.3.0 + dev: true + + /@babel/helper-create-class-features-plugin/7.18.13_@babel+core@7.18.13: + resolution: {integrity: sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.18.13 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-member-expression-to-functions': 7.18.9 + '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-replace-supers': 7.18.9 + '@babel/helper-split-export-declaration': 7.18.6 transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color - - typescript dev: true - /@antfu/install-pkg/0.1.0: - resolution: {integrity: sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw==} + /@babel/helper-environment-visitor/7.18.9: + resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-function-name/7.18.9: + resolution: {integrity: sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==} + engines: {node: '>=6.9.0'} dependencies: - execa: 5.1.1 - find-up: 5.0.0 + '@babel/template': 7.18.10 + '@babel/types': 7.18.13 dev: true - /@antfu/utils/0.5.2: - resolution: {integrity: sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==} + /@babel/helper-hoist-variables/7.18.6: + resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + dev: true + + /@babel/helper-member-expression-to-functions/7.18.9: + resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + dev: true + + /@babel/helper-module-imports/7.18.6: + resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.7 + dev: true + + /@babel/helper-module-transforms/7.18.9: + resolution: {integrity: sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-module-imports': 7.18.6 + '@babel/helper-simple-access': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-validator-identifier': 7.18.6 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + transitivePeerDependencies: + - supports-color dev: true - /@babel/code-frame/7.14.5: - resolution: {integrity: sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==} + /@babel/helper-optimise-call-expression/7.18.6: + resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.14.5 + '@babel/types': 7.18.13 dev: true + /@babel/helper-plugin-utils/7.18.9: + resolution: {integrity: sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-replace-supers/7.18.9: + resolution: {integrity: sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-member-expression-to-functions': 7.18.9 + '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/helper-simple-access/7.18.6: + resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + dev: true + + /@babel/helper-split-export-declaration/7.18.6: + resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.18.13 + dev: true + + /@babel/helper-string-parser/7.18.10: + resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} + engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier/7.18.6: resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} engines: {node: '>=6.9.0'} - /@babel/highlight/7.14.5: - resolution: {integrity: sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==} + /@babel/helper-validator-option/7.18.6: + resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers/7.18.9: + resolution: {integrity: sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/highlight/7.18.6: + resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.18.6 @@ -321,12 +464,55 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser/7.16.6: - resolution: {integrity: sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==} + /@babel/parser/7.18.13: + resolution: {integrity: sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.7 + '@babel/types': 7.18.13 + + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.13: + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.13 + '@babel/helper-plugin-utils': 7.18.9 + dev: true + + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.13: + resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.13 + '@babel/helper-plugin-utils': 7.18.9 + dev: true + + /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.13: + resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.13 + '@babel/helper-plugin-utils': 7.18.9 + dev: true + + /@babel/plugin-transform-typescript/7.18.12_@babel+core@7.18.13: + resolution: {integrity: sha512-2vjjam0cum0miPkenUbQswKowuxs/NjMwIKEq0zwegRxXk12C9YOF9STXnaUptITOtOJHKHpzvvWYOjbm6tc0w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.13 + '@babel/helper-create-class-features-plugin': 7.18.13_@babel+core@7.18.13 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.13 + transitivePeerDependencies: + - supports-color + dev: true /@babel/runtime/7.17.9: resolution: {integrity: sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/@babel/runtime/-/runtime-7.17.9.tgz} @@ -335,12 +521,48 @@ packages: regenerator-runtime: 0.13.9 dev: false + /@babel/template/7.18.10: + resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 + dev: true + + /@babel/traverse/7.18.13: + resolution: {integrity: sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.13 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/types/7.18.13: + resolution: {integrity: sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.18.10 + '@babel/helper-validator-identifier': 7.18.6 + to-fast-properties: 2.0.0 + /@babel/types/7.18.7: resolution: {integrity: sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 + dev: true /@docsearch/css/3.2.1: resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} @@ -484,6 +706,15 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /@jridgewell/gen-mapping/0.3.2: + resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/trace-mapping': 0.3.15 + dev: true + /@jridgewell/resolve-uri/3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} @@ -668,8 +899,8 @@ packages: /@types/web-bluetooth/0.0.15: resolution: {integrity: sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==} - /@typescript-eslint/eslint-plugin/5.30.0_5mtqsiui4sk53pmkx7i7ue45wm: - resolution: {integrity: sha512-lvhRJ2pGe2V9MEU46ELTdiHgiAFZPKtLhiU5wlnaYpMc2+c1R8fh8i80ZAa665drvjHKUJyRRGg3gEm1If54ow==} + /@typescript-eslint/eslint-plugin/5.36.1_4hy23acn2jedqpx23gzjiof2ta: + resolution: {integrity: sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -679,10 +910,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e - '@typescript-eslint/scope-manager': 5.30.0 - '@typescript-eslint/type-utils': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e - '@typescript-eslint/utils': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/parser': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/type-utils': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/utils': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e debug: 4.3.4 eslint: 8.18.0 functional-red-black-tree: 1.0.1 @@ -695,8 +926,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA==} + /@typescript-eslint/parser/5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -705,9 +936,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.30.0 - '@typescript-eslint/types': 5.30.0 - '@typescript-eslint/typescript-estree': 5.30.0_typescript@4.7.4 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.7.4 debug: 4.3.4 eslint: 8.18.0 typescript: 4.7.4 @@ -715,16 +946,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.30.0: - resolution: {integrity: sha512-3TZxvlQcK5fhTBw5solQucWSJvonXf5yua5nx8OqK94hxdrT7/6W3/CS42MLd/f1BmlmmbGEgQcTHHCktUX5bQ==} + /@typescript-eslint/scope-manager/5.36.1: + resolution: {integrity: sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.30.0 - '@typescript-eslint/visitor-keys': 5.30.0 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 dev: true - /@typescript-eslint/type-utils/5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-GF8JZbZqSS+azehzlv/lmQQ3EU3VfWYzCczdZjJRxSEeXDQkqFhCBgFhallLDbPwQOEQ4MHpiPfkjKk7zlmeNg==} + /@typescript-eslint/type-utils/5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -733,7 +964,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.7.4 + '@typescript-eslint/utils': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e debug: 4.3.4 eslint: 8.18.0 tsutils: 3.21.0_typescript@4.7.4 @@ -742,13 +974,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.30.0: - resolution: {integrity: sha512-vfqcBrsRNWw/LBXyncMF/KrUTYYzzygCSsVqlZ1qGu1QtGs6vMkt3US0VNSQ05grXi5Yadp3qv5XZdYLjpp8ag==} + /@typescript-eslint/types/5.36.1: + resolution: {integrity: sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.30.0_typescript@4.7.4: - resolution: {integrity: sha512-hDEawogreZB4n1zoqcrrtg/wPyyiCxmhPLpZ6kmWfKF5M5G0clRLaEexpuWr31fZ42F96SlD/5xCt1bT5Qm4Nw==} + /@typescript-eslint/typescript-estree/5.36.1_typescript@4.7.4: + resolution: {integrity: sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -756,8 +988,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.30.0 - '@typescript-eslint/visitor-keys': 5.30.0 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -768,16 +1000,16 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-0bIgOgZflLKIcZsWvfklsaQTM3ZUbmtH0rJ1hKyV3raoUYyeZwcjQ8ZUJTzS7KnhNcsVT1Rxs7zeeMHEhGlltw==} + /@typescript-eslint/utils/5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 5.30.0 - '@typescript-eslint/types': 5.30.0 - '@typescript-eslint/typescript-estree': 5.30.0_typescript@4.7.4 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.7.4 eslint: 8.18.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.18.0 @@ -786,11 +1018,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.30.0: - resolution: {integrity: sha512-6WcIeRk2DQ3pHKxU1Ni0qMXJkjO/zLjBymlYBy/53qxe7yjEFSvzKLDToJjURUhSl2Fzhkl4SMXQoETauF74cw==} + /@typescript-eslint/visitor-keys/5.36.1: + resolution: {integrity: sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.30.0 + '@typescript-eslint/types': 5.36.1 eslint-visitor-keys: 3.3.0 dev: true @@ -934,6 +1166,23 @@ packages: magic-string: 0.26.2 dev: true + /@vitejs/plugin-vue-jsx/2.0.0_vite@3.0.8+vue@3.2.37: + resolution: {integrity: sha512-WF9ApZ/ivyyW3volQfu0Td0KNPhcccYEaRNzNY1NxRLVJQLSX0nFqquv3e2g7MF74p1XZK4bGtDL2y5i5O5+1A==} + engines: {node: '>=14.18.0'} + peerDependencies: + vite: ^3.0.0 + vue: ^3.0.0 + dependencies: + '@babel/core': 7.18.13 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.13 + '@babel/plugin-transform-typescript': 7.18.12_@babel+core@7.18.13 + '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.18.13 + vite: 3.0.8 + vue: 3.2.37 + transitivePeerDependencies: + - supports-color + dev: true + /@vitejs/plugin-vue/2.3.3_vite@3.0.8+vue@3.2.37: resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} engines: {node: '>=12.0.0'} @@ -986,10 +1235,31 @@ packages: '@vue/reactivity': 3.2.37 dev: true + /@vue/babel-helper-vue-transform-on/1.0.2: + resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==} + dev: true + + /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.18.13: + resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==} + dependencies: + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.13 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.7 + '@vue/babel-helper-vue-transform-on': 1.0.2 + camelcase: 6.3.0 + html-tags: 3.2.0 + svg-tags: 1.0.0 + transitivePeerDependencies: + - '@babel/core' + - supports-color + dev: true + /@vue/compiler-core/3.2.37: resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==} dependencies: - '@babel/parser': 7.16.6 + '@babel/parser': 7.18.13 '@vue/shared': 3.2.37 estree-walker: 2.0.2 source-map: 0.6.1 @@ -1003,7 +1273,7 @@ packages: /@vue/compiler-sfc/3.2.37: resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} dependencies: - '@babel/parser': 7.16.6 + '@babel/parser': 7.18.13 '@vue/compiler-core': 3.2.37 '@vue/compiler-dom': 3.2.37 '@vue/compiler-ssr': 3.2.37 @@ -1027,7 +1297,7 @@ packages: /@vue/reactivity-transform/3.2.37: resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} dependencies: - '@babel/parser': 7.16.6 + '@babel/parser': 7.18.13 '@vue/compiler-core': 3.2.37 '@vue/shared': 3.2.37 estree-walker: 2.0.2 @@ -1262,15 +1532,6 @@ packages: es-abstract: 1.19.1 dev: true - /array.prototype.flatmap/1.2.5: - resolution: {integrity: sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - es-abstract: 1.19.1 - dev: true - /assertion-error/1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true @@ -1332,6 +1593,17 @@ packages: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz} dev: true + /browserslist/4.21.3: + resolution: {integrity: sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001387 + electron-to-chromium: 1.4.240 + node-releases: 2.0.6 + update-browserslist-db: 1.0.6_browserslist@4.21.3 + dev: true + /buffer/5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -1344,10 +1616,10 @@ packages: engines: {node: '>=6'} dev: true - /builtins/4.0.0: - resolution: {integrity: sha512-qC0E2Dxgou1IHhvJSLwGDSTvokbRovU5zZFuDY6oY8Y2lF3nGt5Ad8YZK7GMtqzY84Wu7pXTPeHQeHcXSXsRhw==} + /builtins/5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.3.5 + semver: 7.3.7 dev: true /cac/6.7.12: @@ -1367,6 +1639,15 @@ packages: engines: {node: '>=6'} dev: true + /camelcase/6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + dev: true + + /caniuse-lite/1.0.30001387: + resolution: {integrity: sha512-fKDH0F1KOJvR+mWSOvhj8lVRr/Q/mc5u5nabU2vi1/sgvlSqEsE8dOq0Hy/BqVbDkCYQPRRHB1WRjW6PGB/7PA==} + dev: true + /chai/4.3.6: resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} engines: {node: '>=4'} @@ -1432,8 +1713,8 @@ packages: fsevents: 2.3.2 dev: true - /ci-info/3.3.0: - resolution: {integrity: sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==} + /ci-info/3.3.2: + resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} dev: true /clean-regexp/1.0.0: @@ -1522,6 +1803,12 @@ packages: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: true + /convert-source-map/1.8.0: + resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} + dependencies: + safe-buffer: 5.1.2 + dev: true + /copy-anything/2.0.6: resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} dependencies: @@ -1674,16 +1961,16 @@ packages: esutils: 2.0.3 dev: true - /dom-serializer/1.3.2: - resolution: {integrity: sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==} + /dom-serializer/2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} dependencies: - domelementtype: 2.2.0 - domhandler: 4.3.0 - entities: 2.2.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.4.0 dev: true - /domelementtype/2.2.0: - resolution: {integrity: sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==} + /domelementtype/2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true /domexception/4.0.0: @@ -1693,35 +1980,35 @@ packages: webidl-conversions: 7.0.0 dev: true - /domhandler/4.3.0: - resolution: {integrity: sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==} + /domhandler/5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} dependencies: - domelementtype: 2.2.0 + domelementtype: 2.3.0 dev: true - /domutils/2.8.0: - resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} + /domutils/3.0.1: + resolution: {integrity: sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==} dependencies: - dom-serializer: 1.3.2 - domelementtype: 2.2.0 - domhandler: 4.3.0 + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 dev: true /duplexer/0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + /electron-to-chromium/1.4.240: + resolution: {integrity: sha512-r20dUOtZ4vUPTqAajDGonIM1uas5tf85Up+wPdtNBNvBSqGCfkpvMVvQ1T8YJzPV9/Y9g3FbUDcXb94Rafycow==} dev: true - /entities/2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} + /emoji-regex/8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /entities/3.0.1: - resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} + /entities/4.4.0: + resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} engines: {node: '>=0.12'} dev: true @@ -1984,6 +2271,11 @@ packages: esbuild-windows-arm64: 0.14.54 dev: true + /escalade/3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + /escape-string-regexp/1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -2021,7 +2313,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_s24jsywy72ks6h3c4f2dacxdsa: + /eslint-module-utils/2.7.3_632zrvmnhpkgiajg2zqauquf6u: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -2039,7 +2331,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/parser': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -2047,10 +2339,10 @@ packages: - supports-color dev: true - /eslint-plugin-antfu/0.20.7_b5e7v2qnwxfo6hmiq56u52mz3e: - resolution: {integrity: sha512-9kwFMn0RyXJx4jg9Y22J6gETSYqssnLIqDYqS0Od0oQsAENZv2rGW7SBGbtkSApmf+1n9/d4q+zdwBG9UImXcw==} + /eslint-plugin-antfu/0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e: + resolution: {integrity: sha512-WlrMC8DVTehsb6ha3xnALLtWVVSJvIpzdAgS0ZEUS9wQzsU+VoR71aShzbUZPgSK3iiB+mP8aKHDtwcYnV6wsA==} dependencies: - '@typescript-eslint/utils': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/utils': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e transitivePeerDependencies: - eslint - supports-color @@ -2079,13 +2371,13 @@ packages: ignore: 5.2.0 dev: true - /eslint-plugin-html/6.2.0: - resolution: {integrity: sha512-vi3NW0E8AJombTvt8beMwkL1R/fdRWl4QSNRNMhVQKWm36/X0KF0unGNAY4mqUF06mnwVWZcIcerrCnfn9025g==} + /eslint-plugin-html/7.1.0: + resolution: {integrity: sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==} dependencies: - htmlparser2: 7.2.0 + htmlparser2: 8.0.1 dev: true - /eslint-plugin-import/2.26.0_wno36sjfnklvt2ocf7qbhb2izy: + /eslint-plugin-import/2.26.0_eqbaxt3uvmuzuzhad7lp74szvm: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -2095,14 +2387,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.30.0_b5e7v2qnwxfo6hmiq56u52mz3e + '@typescript-eslint/parser': 5.36.1_b5e7v2qnwxfo6hmiq56u52mz3e array-includes: 3.1.4 array.prototype.flat: 1.2.5 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.18.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_s24jsywy72ks6h3c4f2dacxdsa + eslint-module-utils: 2.7.3_632zrvmnhpkgiajg2zqauquf6u has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -2116,8 +2408,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsonc/2.2.1_eslint@8.18.0: - resolution: {integrity: sha512-ozGjWXhxF3ZfITHmRLuUL6zORh5Dzo0ymwVdxhfFaa4LEtU2S88JIwDYCWAifQLG92x7chqcnZlGUggaPSlfIQ==} + /eslint-plugin-jsonc/2.4.0_eslint@8.18.0: + resolution: {integrity: sha512-YXy5PjyUL9gFYal6pYijd8P6EmpeWskv7PVhB9Py/AwKPn+hwnQHcIzQILiLfxztfhtWiRIUSzoLe/JThZgSUw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -2128,11 +2420,11 @@ packages: natural-compare: 1.4.0 dev: true - /eslint-plugin-markdown/2.2.1_eslint@8.18.0: - resolution: {integrity: sha512-FgWp4iyYvTFxPwfbxofTvXxgzPsDuSKHQy2S+a8Ve6savbujey+lgrFFbXQA0HPygISpRYWYBjooPzhYSF81iA==} - engines: {node: ^8.10.0 || ^10.12.0 || >= 12.0.0} + /eslint-plugin-markdown/3.0.0_eslint@8.18.0: + resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '>=6.0.0' + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: eslint: 8.18.0 mdast-util-from-markdown: 0.8.5 @@ -2140,13 +2432,13 @@ packages: - supports-color dev: true - /eslint-plugin-n/15.1.0_eslint@8.18.0: - resolution: {integrity: sha512-Tgx4Z58QXv2Ha7Qzp0u4wavnZNZ3AOievZMxrAxi7nvDbzD5B/JqOD80LHYcGHFZc2HD9jDmM/+KWMPov46a4A==} + /eslint-plugin-n/15.2.5_eslint@8.18.0: + resolution: {integrity: sha512-8+BYsqiyZfpu6NXmdLOXVUfk8IocpCjpd8nMRRH0A9ulrcemhb2VI9RSJMEy5udx++A/YcVPD11zT8hpFq368g==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - builtins: 4.0.0 + builtins: 5.0.1 eslint: 8.18.0 eslint-plugin-es: 4.1.0_eslint@8.18.0 eslint-utils: 3.0.0_eslint@8.18.0 @@ -2154,11 +2446,11 @@ packages: is-core-module: 2.10.0 minimatch: 3.1.2 resolve: 1.22.1 - semver: 6.3.0 + semver: 7.3.7 dev: true - /eslint-plugin-promise/6.0.0_eslint@8.18.0: - resolution: {integrity: sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==} + /eslint-plugin-promise/6.0.1_eslint@8.18.0: + resolution: {integrity: sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2166,37 +2458,14 @@ packages: eslint: 8.18.0 dev: true - /eslint-plugin-react/7.29.4_eslint@8.18.0: - resolution: {integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==} - engines: {node: '>=4'} + /eslint-plugin-unicorn/43.0.2_eslint@8.18.0: + resolution: {integrity: sha512-DtqZ5mf/GMlfWoz1abIjq5jZfaFuHzGBZYIeuJfEoKKGWRHr2JiJR+ea+BF7Wx2N1PPRoT/2fwgiK1NnmNE3Hg==} + engines: {node: '>=14.18'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.4 - array.prototype.flatmap: 1.2.5 - doctrine: 2.1.0 - eslint: 8.18.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.2.0 - minimatch: 3.1.2 - object.entries: 1.1.5 - object.fromentries: 2.0.5 - object.hasown: 1.1.0 - object.values: 1.1.5 - prop-types: 15.8.1 - resolve: 2.0.0-next.3 - semver: 6.3.0 - string.prototype.matchall: 4.0.6 - dev: true - - /eslint-plugin-unicorn/42.0.0_eslint@8.18.0: - resolution: {integrity: sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=8.8.0' + eslint: '>=8.18.0' dependencies: '@babel/helper-validator-identifier': 7.18.6 - ci-info: 3.3.0 + ci-info: 3.3.2 clean-regexp: 1.0.0 eslint: 8.18.0 eslint-utils: 3.0.0_eslint@8.18.0 @@ -2208,13 +2477,13 @@ packages: read-pkg-up: 7.0.1 regexp-tree: 0.1.24 safe-regex: 2.1.1 - semver: 7.3.5 + semver: 7.3.7 strip-indent: 3.0.0 dev: true - /eslint-plugin-vue/8.7.1_eslint@8.18.0: - resolution: {integrity: sha512-28sbtm4l4cOzoO1LtzQPxfxhQABararUb1JtqusQqObJpWX2e/gmVyeYVfepizPFne0Q5cILkYGiBoV36L12Wg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-plugin-vue/9.4.0_eslint@8.18.0: + resolution: {integrity: sha512-Nzz2QIJ8FG+rtJaqT/7/ru5ie2XgT9KCudkbN0y3uFYhQ41nuHEaboLAiqwMcK006hZPQv/rVMRhUIwEGhIvfQ==} + engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: @@ -2223,15 +2492,16 @@ packages: natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.10 - semver: 7.3.5 - vue-eslint-parser: 8.0.1_eslint@8.18.0 + semver: 7.3.7 + vue-eslint-parser: 9.0.3_eslint@8.18.0 + xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-yml/0.14.0_eslint@8.18.0: - resolution: {integrity: sha512-+0+bBV/07txENbxfrHF9olGoLCHez64vmnOmjWOoLwmXOwfdaSRleBSPIi4nWQs7WwX8lm/fSLadOjbVEcsXQQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-plugin-yml/1.1.0_eslint@8.18.0: + resolution: {integrity: sha512-64g3vWwolk9d+FykuqxXGLn3oGEK2ZecIAyfIEsyuSHBQkR8utp5h8e75R6tGph1IRggoGl27QQ2oi2M1IF1Vw==} + engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: @@ -2239,7 +2509,7 @@ packages: eslint: 8.18.0 lodash: 4.17.21 natural-compare: 1.4.0 - yaml-eslint-parser: 0.5.0 + yaml-eslint-parser: 1.1.0 transitivePeerDependencies: - supports-color dev: true @@ -2252,14 +2522,6 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope/6.0.0: - resolution: {integrity: sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - /eslint-scope/7.1.1: resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2556,6 +2818,11 @@ packages: resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} dev: true + /gensync/1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + dev: true + /get-func-name/2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true @@ -2606,6 +2873,11 @@ packages: path-is-absolute: 1.0.1 dev: true + /globals/11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + dev: true + /globals/13.15.0: resolution: {integrity: sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==} engines: {node: '>=8'} @@ -2693,13 +2965,18 @@ packages: whatwg-encoding: 2.0.0 dev: true - /htmlparser2/7.2.0: - resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} + /html-tags/3.2.0: + resolution: {integrity: sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==} + engines: {node: '>=8'} + dev: true + + /htmlparser2/8.0.1: + resolution: {integrity: sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==} dependencies: - domelementtype: 2.2.0 - domhandler: 4.3.0 - domutils: 2.8.0 - entities: 3.0.1 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.0.1 + entities: 4.4.0 dev: true /http-proxy-agent/5.0.0: @@ -3053,6 +3330,12 @@ packages: - utf-8-validate dev: true + /jsesc/2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + dev: true + /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true @@ -3072,6 +3355,12 @@ packages: minimist: 1.2.6 dev: true + /json5/2.2.1: + resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} + engines: {node: '>=6'} + hasBin: true + dev: true + /jsonc-eslint-parser/2.1.0: resolution: {integrity: sha512-qCRJWlbP2v6HbmKW7R3lFbeiVWHo+oMJ0j+MizwvauqnCV/EvtAeEeuCgoc/ErtsuoKgYB8U4Ih8AxJbXoE6/g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3079,7 +3368,7 @@ packages: acorn: 8.7.1 eslint-visitor-keys: 3.3.0 espree: 9.3.2 - semver: 7.3.5 + semver: 7.3.7 dev: true /jsonc-parser/3.1.0: @@ -3100,14 +3389,6 @@ packages: graceful-fs: 4.2.10 dev: true - /jsx-ast-utils/3.2.0: - resolution: {integrity: sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==} - engines: {node: '>=4.0'} - dependencies: - array-includes: 3.1.4 - object.assign: 4.1.2 - dev: true - /kolorist/1.5.1: resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==} dev: true @@ -3208,13 +3489,6 @@ packages: is-unicode-supported: 0.1.0 dev: true - /loose-envify/1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - dependencies: - js-tokens: 4.0.0 - dev: true - /loupe/2.3.1: resolution: {integrity: sha512-EN1D3jyVmaX4tnajVlfbREU4axL647hLec1h/PXAb8CPDMJiYitcWF2UeLVNttRqaIqQs4x+mRvXf+d+TlDrCA==} dependencies: @@ -3414,6 +3688,10 @@ packages: resolution: {integrity: sha512-10EKpOCQPXwZVFh3U1ptOMWBgKTbsN7Vvo6WVKt5pw4hp8zbv6ZVBZPlXw+5M6Tyi1oc1iD4/sNPd71KYA16tQ==} dev: true + /node-releases/2.0.6: + resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} + dev: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -3445,11 +3723,6 @@ packages: resolution: {integrity: sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/nwsapi/-/nwsapi-2.2.0.tgz} dev: true - /object-assign/4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: true - /object-inspect/1.11.0: resolution: {integrity: sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==} dev: true @@ -3469,31 +3742,6 @@ packages: object-keys: 1.1.1 dev: true - /object.entries/1.1.5: - resolution: {integrity: sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - es-abstract: 1.19.1 - dev: true - - /object.fromentries/2.0.5: - resolution: {integrity: sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - es-abstract: 1.19.1 - dev: true - - /object.hasown/1.1.0: - resolution: {integrity: sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==} - dependencies: - define-properties: 1.1.3 - es-abstract: 1.19.1 - dev: true - /object.values/1.1.5: resolution: {integrity: sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==} engines: {node: '>= 0.4'} @@ -3643,7 +3891,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.14.5 + '@babel/code-frame': 7.18.6 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.1.6 @@ -3766,14 +4014,6 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prop-types/15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - dev: true - /prr/1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} dev: true @@ -3792,10 +4032,6 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /react-is/16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: true - /read-pkg-up/7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} @@ -3840,14 +4076,6 @@ packages: hasBin: true dev: true - /regexp.prototype.flags/1.3.1: - resolution: {integrity: sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - dev: true - /regexpp/3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} @@ -3889,13 +4117,6 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /resolve/2.0.0-next.3: - resolution: {integrity: sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==} - dependencies: - is-core-module: 2.10.0 - path-parse: 1.0.7 - dev: true - /restore-cursor/3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -3941,6 +4162,10 @@ packages: tslib: 2.3.1 dev: true + /safe-buffer/5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: true + /safe-buffer/5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true @@ -4095,19 +4320,6 @@ packages: strip-ansi: 6.0.1 dev: true - /string.prototype.matchall/4.0.6: - resolution: {integrity: sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - es-abstract: 1.19.1 - get-intrinsic: 1.1.1 - has-symbols: 1.0.2 - internal-slot: 1.0.3 - regexp.prototype.flags: 1.3.1 - side-channel: 1.0.4 - dev: true - /string.prototype.trimend/1.0.4: resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==} dependencies: @@ -4182,6 +4394,10 @@ packages: engines: {node: '>= 0.4'} dev: true + /svg-tags/1.0.0: + resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} + dev: true + /symbol-tree/3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/symbol-tree/-/symbol-tree-3.2.4.tgz} dev: true @@ -4522,6 +4738,17 @@ packages: webpack-virtual-modules: 0.4.4 dev: true + /update-browserslist-db/1.0.6_browserslist@4.21.3: + resolution: {integrity: sha512-We7BqM9XFlcW94Op93uW8+2LXvGezs7QA0WY+f1H7RR1q46B06W6hZF6LbmOlpCS1HU22q/6NOGTGW5sCm7NJQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.3 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -4716,20 +4943,20 @@ packages: vue: 3.2.37 dev: true - /vue-eslint-parser/8.0.1_eslint@8.18.0: - resolution: {integrity: sha512-lhWjDXJhe3UZw2uu3ztX51SJAPGPey1Tff2RK3TyZURwbuI4vximQLzz4nQfCv8CZq4xx7uIiogHMMoSJPr33A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /vue-eslint-parser/9.0.3_eslint@8.18.0: + resolution: {integrity: sha512-yL+ZDb+9T0ELG4VIFo/2anAOz8SvBdlqEnQnvJ3M7Scq56DvtjY0VY88bByRZB0D4J0u8olBcfrXTVONXsh4og==} + engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 eslint: 8.18.0 - eslint-scope: 6.0.0 + eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.3.2 esquery: 1.4.0 lodash: 4.17.21 - semver: 7.3.5 + semver: 7.3.7 transitivePeerDependencies: - supports-color dev: true @@ -4864,7 +5091,7 @@ packages: dev: true /xml-name-validator/4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz} + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} dev: true @@ -4876,18 +5103,18 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yaml-eslint-parser/0.5.0: - resolution: {integrity: sha512-nJeyLA3YHAzhBTZbRAbu3W6xrSCucyxExmA+ZDtEdUFpGllxAZpto2Zxo2IG0r0eiuEiBM4e+wiAdxTziTq94g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /yaml-eslint-parser/1.1.0: + resolution: {integrity: sha512-b464Q1fYiX1oYx2kE8k4mEp6S9Prk+tfDsY/IPxQ0FCjEuj3AKko5Skf3/yQJeYTTDyjDE+aWIJemnv29HvEWQ==} + engines: {node: ^14.17.0 || >=16.0.0} dependencies: eslint-visitor-keys: 3.3.0 lodash: 4.17.21 - yaml: 1.10.2 + yaml: 2.1.1 dev: true - /yaml/1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} + /yaml/2.1.1: + resolution: {integrity: sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==} + engines: {node: '>= 14'} dev: true /yocto-queue/0.1.0: -- Gitee From 500f3b751f5945ce2e58b28cbb7ae0f75059dae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:26:26 +0800 Subject: [PATCH 02/26] =?UTF-8?q?chore:=20=E5=BA=93=E4=B8=AD=E7=9A=84react?= =?UTF-8?q?ivityTransform=E5=85=B3=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/base.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/build/base.config.ts b/build/base.config.ts index e8e726a..74c23af 100644 --- a/build/base.config.ts +++ b/build/base.config.ts @@ -15,7 +15,6 @@ export default defineConfig({ }, plugins: [ Vue({ - reactivityTransform: true, include: [/\.vue$/, /\.md$/], }), VueJsx(), -- Gitee From 057aa5a0f861ce29bf98a38d46a41edf8baaf299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:28:10 +0800 Subject: [PATCH 03/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=861=20tsx?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox1/index.ts | 1 - .../components/BorderBox1/src/BorderBox1.tsx | 21 +-- .../components/BorderBox1/src/css/index.css | 28 ---- .../components/BorderBox1/src/index.vue | 125 ------------------ packages/docs/docs/Border/BorderBox1/demo.vue | 11 +- 5 files changed, 10 insertions(+), 176 deletions(-) delete mode 100644 packages/datav-vue3/components/BorderBox1/src/css/index.css delete mode 100644 packages/datav-vue3/components/BorderBox1/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox1/index.ts b/packages/datav-vue3/components/BorderBox1/index.ts index d247eb3..84ffc1e 100644 --- a/packages/datav-vue3/components/BorderBox1/index.ts +++ b/packages/datav-vue3/components/BorderBox1/index.ts @@ -1,5 +1,4 @@ import type { App, Plugin } from 'vue' -// import BorderBox1 from './src/index.vue' import BorderBox1 from './src/BorderBox1' export const BorderBox1Plugin: Plugin = { diff --git a/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx index 920ac51..0ee0c11 100644 --- a/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx +++ b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx @@ -1,22 +1,13 @@ import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' import { deepClone, deepMerge } from 'packages/datav-vue3/utils' import './index.less' -const BorderBox1Props = { - color: { - type: Array, - default: () => ([]), - }, - backgroundColor: { - type: String, - default: 'transparent', - }, -} - -const BorderBox1 = defineComponent({ - props: BorderBox1Props, - setup(props) { +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { const borderBox1 = ref(null) const state = reactive({ @@ -105,5 +96,3 @@ const BorderBox1 = defineComponent({ ) }, }) - -export default BorderBox1 diff --git a/packages/datav-vue3/components/BorderBox1/src/css/index.css b/packages/datav-vue3/components/BorderBox1/src/css/index.css deleted file mode 100644 index d4227d2..0000000 --- a/packages/datav-vue3/components/BorderBox1/src/css/index.css +++ /dev/null @@ -1,28 +0,0 @@ -.dv-border-box-1 { - position: relative; - width: 100%; - height: 100%; -} -.dv-border-box-1 .dv-border { - position: absolute; - display: block; -} -.dv-border-box-1 .right-top { - right: 0px; - transform: rotateY(180deg); -} -.dv-border-box-1 .left-bottom { - bottom: 0px; - transform: rotateX(180deg); -} -.dv-border-box-1 .right-bottom { - right: 0px; - bottom: 0px; - transform: rotateX(180deg) rotateY(180deg); -} -.dv-border-box-1 .border-box-content { - position: relative; - width: 100%; - height: 100%; - text-align: center; -} diff --git a/packages/datav-vue3/components/BorderBox1/src/index.vue b/packages/datav-vue3/components/BorderBox1/src/index.vue deleted file mode 100644 index 6e0e670..0000000 --- a/packages/datav-vue3/components/BorderBox1/src/index.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox1/demo.vue b/packages/docs/docs/Border/BorderBox1/demo.vue index 5261cf9..9b466b4 100644 --- a/packages/docs/docs/Border/BorderBox1/demo.vue +++ b/packages/docs/docs/Border/BorderBox1/demo.vue @@ -1,6 +1,6 @@ -- Gitee From ff1ca283ccc19c267b2a77cb86146cb2263e3b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:28:50 +0800 Subject: [PATCH 04/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=862=20tsx?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox2/index.ts | 2 +- .../components/BorderBox2/src/BorderBox2.tsx | 71 ++++++++++++++ .../components/BorderBox2/src/index.less | 24 +++++ .../components/BorderBox2/src/index.vue | 96 ------------------- packages/docs/docs/Border/BorderBox2/demo.vue | 4 + 5 files changed, 100 insertions(+), 97 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx create mode 100644 packages/datav-vue3/components/BorderBox2/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox2/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox2/index.ts b/packages/datav-vue3/components/BorderBox2/index.ts index e25569e..44b13fe 100644 --- a/packages/datav-vue3/components/BorderBox2/index.ts +++ b/packages/datav-vue3/components/BorderBox2/index.ts @@ -1,5 +1,5 @@ import type { App, Plugin } from 'vue' -import BorderBox2 from './src/index.vue' +import BorderBox2 from './src/BorderBox2' export const BorderBox2Plugin: Plugin = { install(app: App) { diff --git a/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx b/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx new file mode 100644 index 0000000..3fdb578 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx @@ -0,0 +1,71 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox2 = ref(null) + + const state = reactive({ + defaultColor: ['#fff', 'rgba(255, 255, 255, 0.6)'], + mergedColor: [], + }) + + const mergeColor = () => { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + watch(() => props.color, () => { + mergeColor() + }) + + const { width, height, initWH } = autoResize(borderBox2) + + onMounted(() => { + mergeColor() + }) + + return { + width, + height, + initWH, + state, + borderBox2, + } + }, + render() { + const { $slots, backgroundColor, width, height, state } = this + return ( +
+ + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox2/src/index.less b/packages/datav-vue3/components/BorderBox2/src/index.less new file mode 100644 index 0000000..c22df71 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox2/src/index.less @@ -0,0 +1,24 @@ +.dv-border-box-2 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + + &>polyline { + fill: none; + stroke-width: 1; + } + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} \ No newline at end of file diff --git a/packages/datav-vue3/components/BorderBox2/src/index.vue b/packages/datav-vue3/components/BorderBox2/src/index.vue deleted file mode 100644 index df7b0c0..0000000 --- a/packages/datav-vue3/components/BorderBox2/src/index.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox2/demo.vue b/packages/docs/docs/Border/BorderBox2/demo.vue index 3138f28..c5a7475 100644 --- a/packages/docs/docs/Border/BorderBox2/demo.vue +++ b/packages/docs/docs/Border/BorderBox2/demo.vue @@ -7,3 +7,7 @@ + + -- Gitee From 7bf98f4b87202db3fbec20c3e5de89b92181fb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:29:07 +0800 Subject: [PATCH 05/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=864=20tsx?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox4/index.ts | 2 +- .../components/BorderBox4/src/BorderBox4.tsx | 92 ++++++++++ .../components/BorderBox4/src/index.less | 78 +++++++++ .../components/BorderBox4/src/index.vue | 163 ------------------ packages/docs/docs/Border/BorderBox4/demo.vue | 12 +- 5 files changed, 179 insertions(+), 168 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx create mode 100644 packages/datav-vue3/components/BorderBox4/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox4/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox4/index.ts b/packages/datav-vue3/components/BorderBox4/index.ts index 9ed8633..e86ab1e 100644 --- a/packages/datav-vue3/components/BorderBox4/index.ts +++ b/packages/datav-vue3/components/BorderBox4/index.ts @@ -1,5 +1,5 @@ import type { App, Plugin } from 'vue' -import BorderBox4 from './src/index.vue' +import BorderBox4 from './src/BorderBox4' export const BorderBox4Plugin: Plugin = { install(app: App) { diff --git a/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx b/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx new file mode 100644 index 0000000..e8fdb56 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx @@ -0,0 +1,92 @@ +import type { ExtractPropTypes } from 'vue' +import { defineComponent, renderSlot } from 'vue' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +const borderBox4Props = { + ...borderBoxProps, + reverse: { + type: Boolean, + default: false, + }, +} + +export type BorderBox4Props = ExtractPropTypes + +export default defineComponent({ + props: borderBox4Props, + setup(props: BorderBox4Props) { + const borderBox4 = ref(null) + + const state = reactive({ + defaultColor: ['red', 'rgba(0,0,255,0.8)'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox4) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox4, + } + }, + render() { + const { $slots, backgroundColor, reverse, width, height, state } = this + return ( +
+ + + + + + + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) + diff --git a/packages/datav-vue3/components/BorderBox4/src/index.less b/packages/datav-vue3/components/BorderBox4/src/index.less new file mode 100644 index 0000000..3550c59 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox4/src/index.less @@ -0,0 +1,78 @@ +.dv-border-box-4 { + position: relative; + width: 100%; + height: 100%; + + .dv-reverse { + transform: rotate(180deg); + } + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + + & > polyline { + fill: none; + } + } + + .sw1 { + stroke-width: 1; + } + + .sw3 { + stroke-width: 3px; + stroke-linecap: round; + } + + .dv-bb4-line-1 { + .sw1; + } + + .dv-bb4-line-2 { + .sw1; + } + + .dv-bb4-line-3 { + .sw3; + } + + .dv-bb4-line-4 { + .sw3; + } + + .dv-bb4-line-5 { + .sw1; + } + + .dv-bb4-line-6 { + .sw1; + } + + .dv-bb4-line-7 { + .sw1; + } + + .dv-bb4-line-8 { + .sw3; + } + + .dv-bb4-line-9 { + .sw3; + stroke-dasharray: 100 250; + } + + .dv-bb4-line-10 { + .sw1; + stroke-dasharray: 80 270; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox4/src/index.vue b/packages/datav-vue3/components/BorderBox4/src/index.vue deleted file mode 100644 index 92d5a19..0000000 --- a/packages/datav-vue3/components/BorderBox4/src/index.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox4/demo.vue b/packages/docs/docs/Border/BorderBox4/demo.vue index 672d583..fcea700 100644 --- a/packages/docs/docs/Border/BorderBox4/demo.vue +++ b/packages/docs/docs/Border/BorderBox4/demo.vue @@ -1,19 +1,23 @@ + + -- Gitee From 61ebb63aec2ca0d16130227f5a20cfbf85d36558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:29:32 +0800 Subject: [PATCH 06/26] =?UTF-8?q?refactor:=20=E6=8A=BD=E7=A6=BB=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E7=9A=84=E7=BB=84=E4=BB=B6props?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/datav-vue3/types/BorderProps.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/datav-vue3/types/BorderProps.ts diff --git a/packages/datav-vue3/types/BorderProps.ts b/packages/datav-vue3/types/BorderProps.ts new file mode 100644 index 0000000..7d0fe32 --- /dev/null +++ b/packages/datav-vue3/types/BorderProps.ts @@ -0,0 +1,14 @@ +import type { ExtractPropTypes, PropType } from 'vue' + +export const borderBoxProps = { + color: { + type: Array as PropType>, + default: () => ([]), + }, + backgroundColor: { + type: String, + default: 'transparent', + }, +} + +export type BorderBoxProps = ExtractPropTypes -- Gitee From f7180b7e809669c2160a177ffaffad15a164cf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 22:32:25 +0800 Subject: [PATCH 07/26] =?UTF-8?q?fix:=20=E6=94=B9=E9=80=A0=E6=88=90tsx?= =?UTF-8?q?=E5=90=8E=EF=BC=8Cvitepress=E4=B8=AD$ref=E8=AF=AD=E6=B3=95=20?= =?UTF-8?q?=E6=8A=A5=20$=20can=20only=20be...=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/docs/docs/.vitepress/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/docs/.vitepress/config.ts b/packages/docs/docs/.vitepress/config.ts index 0d55331..798ab65 100644 --- a/packages/docs/docs/.vitepress/config.ts +++ b/packages/docs/docs/.vitepress/config.ts @@ -127,6 +127,6 @@ export default defineConfig({ } }, vue: { - reactivityTransform: true, + reactivityTransform: path.resolve(__dirname, 'src'), } }) -- Gitee From 143c5802b657b6d2471bd1698915c7d1467e6469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 23:56:20 +0800 Subject: [PATCH 08/26] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/example/.vscode/extensions.json | 3 + packages/example/auto-imports.d.ts | 59 +++++++++++++++++ packages/example/index.html | 13 ++++ packages/example/package.json | 14 ++++ packages/example/public/vite.svg | 1 + packages/example/src/App.vue | 38 +++++++++++ packages/example/src/assets/vue.svg | 1 + packages/example/src/main.ts | 5 ++ packages/example/src/style.css | 82 ++++++++++++++++++++++++ packages/example/src/vite-env.d.ts | 7 ++ packages/example/vite.config.ts | 13 ++++ pnpm-lock.yaml | 6 ++ 12 files changed, 242 insertions(+) create mode 100644 packages/example/.vscode/extensions.json create mode 100644 packages/example/auto-imports.d.ts create mode 100644 packages/example/index.html create mode 100644 packages/example/package.json create mode 100644 packages/example/public/vite.svg create mode 100644 packages/example/src/App.vue create mode 100644 packages/example/src/assets/vue.svg create mode 100644 packages/example/src/main.ts create mode 100644 packages/example/src/style.css create mode 100644 packages/example/src/vite-env.d.ts create mode 100644 packages/example/vite.config.ts diff --git a/packages/example/.vscode/extensions.json b/packages/example/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/packages/example/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/packages/example/auto-imports.d.ts b/packages/example/auto-imports.d.ts new file mode 100644 index 0000000..3dc0c3b --- /dev/null +++ b/packages/example/auto-imports.d.ts @@ -0,0 +1,59 @@ +// Generated by 'unplugin-auto-import' +// We suggest you to commit this file into source control +declare global { + const $: typeof import('vue/macros')['$'] + const $$: typeof import('vue/macros')['$$'] + const $computed: typeof import('vue/macros')['$computed'] + const $customRef: typeof import('vue/macros')['$customRef'] + const $ref: typeof import('vue/macros')['$ref'] + const $shallowRef: typeof import('vue/macros')['$shallowRef'] + const $toRef: typeof import('vue/macros')['$toRef'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const effectScope: typeof import('vue')['effectScope'] + const EffectScope: typeof import('vue')['EffectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useSlots: typeof import('vue')['useSlots'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] +} +export {} diff --git a/packages/example/index.html b/packages/example/index.html new file mode 100644 index 0000000..143557b --- /dev/null +++ b/packages/example/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Vue + TS + + +
+ + + diff --git a/packages/example/package.json b/packages/example/package.json new file mode 100644 index 0000000..6561bbf --- /dev/null +++ b/packages/example/package.json @@ -0,0 +1,14 @@ +{ + "name": "@kjgl77/example", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc --noEmit && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@kjgl77/datav-vue3": "workspace:*" + } +} \ No newline at end of file diff --git a/packages/example/public/vite.svg b/packages/example/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/packages/example/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/example/src/App.vue b/packages/example/src/App.vue new file mode 100644 index 0000000..d5a4ba7 --- /dev/null +++ b/packages/example/src/App.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/packages/example/src/assets/vue.svg b/packages/example/src/assets/vue.svg new file mode 100644 index 0000000..770e9d3 --- /dev/null +++ b/packages/example/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/example/src/main.ts b/packages/example/src/main.ts new file mode 100644 index 0000000..2425c0f --- /dev/null +++ b/packages/example/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import './style.css' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/packages/example/src/style.css b/packages/example/src/style.css new file mode 100644 index 0000000..7b6a10a --- /dev/null +++ b/packages/example/src/style.css @@ -0,0 +1,82 @@ +:root { + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 24px; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; + background: #121212 +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/packages/example/src/vite-env.d.ts b/packages/example/src/vite-env.d.ts new file mode 100644 index 0000000..323c78a --- /dev/null +++ b/packages/example/src/vite-env.d.ts @@ -0,0 +1,7 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/packages/example/vite.config.ts b/packages/example/vite.config.ts new file mode 100644 index 0000000..5d85b28 --- /dev/null +++ b/packages/example/vite.config.ts @@ -0,0 +1,13 @@ +import path from 'path' +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue({ + // reactivityTransform: path.resolve(__dirname, 'src'), + reactivityTransform: true, + }), + ], +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 616f18b..364890e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,12 @@ importers: unplugin-auto-import: 0.11.2 vitepress: 1.0.0-alpha.8 + packages/example: + specifiers: + '@kjgl77/datav-vue3': workspace:* + dependencies: + '@kjgl77/datav-vue3': link:../datav-vue3 + packages: /@algolia/autocomplete-core/1.7.1: -- Gitee From 6133ba4967dece01136c35c7dff8365d13d535c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 23:56:58 +0800 Subject: [PATCH 09/26] =?UTF-8?q?chore:=20atuoimport=E5=8E=BB=E6=8E=89$?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E7=B3=96=E7=9B=B8=E5=85=B3=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/datav-vue3/auto-imports.d.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/datav-vue3/auto-imports.d.ts b/packages/datav-vue3/auto-imports.d.ts index 3dc0c3b..753c275 100644 --- a/packages/datav-vue3/auto-imports.d.ts +++ b/packages/datav-vue3/auto-imports.d.ts @@ -1,13 +1,6 @@ // Generated by 'unplugin-auto-import' // We suggest you to commit this file into source control declare global { - const $: typeof import('vue/macros')['$'] - const $$: typeof import('vue/macros')['$$'] - const $computed: typeof import('vue/macros')['$computed'] - const $customRef: typeof import('vue/macros')['$customRef'] - const $ref: typeof import('vue/macros')['$ref'] - const $shallowRef: typeof import('vue/macros')['$shallowRef'] - const $toRef: typeof import('vue/macros')['$toRef'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] -- Gitee From 603ab42c49282882d0b26ea2b1a7831f23e1b052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 3 Sep 2022 23:57:36 +0800 Subject: [PATCH 10/26] =?UTF-8?q?chore:=20autoimport=20=E5=8E=BB=E6=8E=89$?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E7=B3=96=E7=9B=B8=E5=85=B3=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/base.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/build/base.config.ts b/build/base.config.ts index 74c23af..201c37d 100644 --- a/build/base.config.ts +++ b/build/base.config.ts @@ -21,7 +21,6 @@ export default defineConfig({ AutoImport({ imports: [ 'vue', - 'vue/macros', ], dts: true, }), -- Gitee From 0c4032191338594cd865473782d0e69b8465e065 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 11:13:08 +0800 Subject: [PATCH 11/26] =?UTF-8?q?fix:=20(docs)=20=E8=BE=B9=E6=A1=861?= =?UTF-8?q?=E6=96=87=E6=A1=A3demo1=20=E5=B0=91=E4=B8=AA=E5=B0=96=E6=8B=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/docs/docs/Border/BorderBox1/demo.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docs/docs/Border/BorderBox1/demo.vue b/packages/docs/docs/Border/BorderBox1/demo.vue index 9b466b4..43d895e 100644 --- a/packages/docs/docs/Border/BorderBox1/demo.vue +++ b/packages/docs/docs/Border/BorderBox1/demo.vue @@ -16,4 +16,5 @@ let width = $ref(40) const handelClick = ()=>{ width += 2 borderRef.value?.initWH() +} -- Gitee From b82c711a05b3fd7c08a69414e351f7077c53f315 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 11:26:16 +0800 Subject: [PATCH 12/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=863=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox3/index.ts | 24 ++-- .../components/BorderBox3/src/BorderBox3.tsx | 79 +++++++++++++ .../components/BorderBox3/src/index.less | 31 +++++ .../components/BorderBox3/src/index.vue | 111 ------------------ packages/docs/docs/Border/BorderBox3/demo.vue | 8 +- 5 files changed, 128 insertions(+), 125 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx create mode 100644 packages/datav-vue3/components/BorderBox3/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox3/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox3/index.ts b/packages/datav-vue3/components/BorderBox3/index.ts index 3242c7b..1fbbb77 100644 --- a/packages/datav-vue3/components/BorderBox3/index.ts +++ b/packages/datav-vue3/components/BorderBox3/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox3 from './src/index.vue' - -export const BorderBox3Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox3', BorderBox3) - }, -} - -export { - BorderBox3, -} +import type { App, Plugin } from 'vue' +import BorderBox3 from './src/BorderBox3' + +export const BorderBox3Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox3', BorderBox3) + }, +} + +export { + BorderBox3, +} diff --git a/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx b/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx new file mode 100644 index 0000000..274b082 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx @@ -0,0 +1,79 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox3 = ref(null) + + const state = reactive({ + defaultColor: ['#2862b7', '#2862b7'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox3) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + return { + width, + height, + state, + initWH, + borderBox3, + } + }, + render() { + const { $slots, width, height, backgroundColor, state } = this + return ( +
+ + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox3/src/index.less b/packages/datav-vue3/components/BorderBox3/src/index.less new file mode 100644 index 0000000..b75b4a4 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox3/src/index.less @@ -0,0 +1,31 @@ +.dv-border-box-3 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + + & > polyline { + fill: none; + } + } + + .dv-bb3-line1 { + stroke-width: 3; + } + + .dv-bb3-line2 { + stroke-width: 1; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} \ No newline at end of file diff --git a/packages/datav-vue3/components/BorderBox3/src/index.vue b/packages/datav-vue3/components/BorderBox3/src/index.vue deleted file mode 100644 index e8ac34d..0000000 --- a/packages/datav-vue3/components/BorderBox3/src/index.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox3/demo.vue b/packages/docs/docs/Border/BorderBox3/demo.vue index 3bb8fd3..c28e54e 100644 --- a/packages/docs/docs/Border/BorderBox3/demo.vue +++ b/packages/docs/docs/Border/BorderBox3/demo.vue @@ -1,9 +1,13 @@ + + -- Gitee From 18439686bae84eb2e3b8c62800ec94fefb598c57 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 11:36:44 +0800 Subject: [PATCH 13/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=865=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox5/index.ts | 24 ++-- .../components/BorderBox5/src/BorderBox5.tsx | 86 +++++++++++++ .../components/BorderBox5/src/index.less | 39 ++++++ .../components/BorderBox5/src/index.vue | 119 ------------------ packages/docs/docs/Border/BorderBox5/demo.vue | 12 +- 5 files changed, 145 insertions(+), 135 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx create mode 100644 packages/datav-vue3/components/BorderBox5/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox5/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox5/index.ts b/packages/datav-vue3/components/BorderBox5/index.ts index dff1c58..aa47ef7 100644 --- a/packages/datav-vue3/components/BorderBox5/index.ts +++ b/packages/datav-vue3/components/BorderBox5/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox5 from './src/index.vue' - -export const BorderBox5Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox5', BorderBox5) - }, -} - -export { - BorderBox5, -} +import type { App, Plugin } from 'vue' +import BorderBox5 from './src/BorderBox5' + +export const BorderBox5Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox5', BorderBox5) + }, +} + +export { + BorderBox5, +} diff --git a/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx b/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx new file mode 100644 index 0000000..b1423ba --- /dev/null +++ b/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx @@ -0,0 +1,86 @@ +import type { ExtractPropTypes } from 'vue' +import { defineComponent, renderSlot } from 'vue' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +const borderBox5Props = { + ...borderBoxProps, + reverse: { + type: Boolean, + default: false, + }, +} + +export type BorderBox5Props = ExtractPropTypes + +export default defineComponent({ + props: borderBox5Props, + setup(props: BorderBox5Props) { + const borderBox5 = ref(null) + + const state = reactive({ + defaultColor: ['rgba(255, 255, 255, 0.35)', 'rgba(255, 255, 255, 0.20)'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox5) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox5, + } + }, + render() { + const { $slots, width, height, state, backgroundColor, reverse } = this + return ( +
+ + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox5/src/index.less b/packages/datav-vue3/components/BorderBox5/src/index.less new file mode 100644 index 0000000..b0f3d3c --- /dev/null +++ b/packages/datav-vue3/components/BorderBox5/src/index.less @@ -0,0 +1,39 @@ +.dv-border-box-5 { + position: relative; + width: 100%; + height: 100%; + + .dv-reverse { + transform: rotate(180deg); + } + + .dv-border-svg-container { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + + & > polyline { + fill: none; + } + } + + .dv-bb5-line-1, .dv-bb5-line-2 { + stroke-width: 1; + } + + .dv-bb5-line-3, .dv-bb5-line-6 { + stroke-width: 5; + } + + .dv-bb5-line-4, .dv-bb5-line-5 { + stroke-width: 2; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox5/src/index.vue b/packages/datav-vue3/components/BorderBox5/src/index.vue deleted file mode 100644 index 895ba8f..0000000 --- a/packages/datav-vue3/components/BorderBox5/src/index.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox5/demo.vue b/packages/docs/docs/Border/BorderBox5/demo.vue index 1b23856..ee24425 100644 --- a/packages/docs/docs/Border/BorderBox5/demo.vue +++ b/packages/docs/docs/Border/BorderBox5/demo.vue @@ -1,19 +1,23 @@ + + -- Gitee From 6c2a18e4f293c5c7212ebbcdfb53771044572ba8 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 12:31:30 +0800 Subject: [PATCH 14/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=866=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox6/index.ts | 24 ++--- .../components/BorderBox6/src/BorderBox6.tsx | 76 +++++++++++++ .../components/BorderBox6/src/index.less | 24 +++++ .../components/BorderBox6/src/index.vue | 100 ------------------ packages/docs/docs/Border/BorderBox6/demo.vue | 8 +- 5 files changed, 118 insertions(+), 114 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx create mode 100644 packages/datav-vue3/components/BorderBox6/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox6/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox6/index.ts b/packages/datav-vue3/components/BorderBox6/index.ts index 5e74e9b..4cf1b98 100644 --- a/packages/datav-vue3/components/BorderBox6/index.ts +++ b/packages/datav-vue3/components/BorderBox6/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox6 from './src/index.vue' - -export const BorderBox6Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox6', BorderBox6) - }, -} - -export { - BorderBox6, -} +import type { App, Plugin } from 'vue' +import BorderBox6 from './src/BorderBox6' + +export const BorderBox6Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox6', BorderBox6) + }, +} + +export { + BorderBox6, +} diff --git a/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx b/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx new file mode 100644 index 0000000..a744449 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx @@ -0,0 +1,76 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox6 = ref(null) + + const state = reactive({ + defaultColor: ['rgba(255, 255, 255, 0.35)', 'gray'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox6) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox6, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + + + + + + + + + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox6/src/index.less b/packages/datav-vue3/components/BorderBox6/src/index.less new file mode 100644 index 0000000..657bea4 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox6/src/index.less @@ -0,0 +1,24 @@ +.dv-border-box-6 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + + & > polyline { + fill: none; + stroke-width: 1; + } + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox6/src/index.vue b/packages/datav-vue3/components/BorderBox6/src/index.vue deleted file mode 100644 index d08f8e6..0000000 --- a/packages/datav-vue3/components/BorderBox6/src/index.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox6/demo.vue b/packages/docs/docs/Border/BorderBox6/demo.vue index 6421261..0d5bd29 100644 --- a/packages/docs/docs/Border/BorderBox6/demo.vue +++ b/packages/docs/docs/Border/BorderBox6/demo.vue @@ -1,9 +1,13 @@ + + -- Gitee From 0a85711cb03e1e75d1efea77670c95eb3478ad72 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 13:56:14 +0800 Subject: [PATCH 15/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=867=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox7/index.ts | 24 ++--- .../components/BorderBox7/src/BorderBox7.tsx | 67 ++++++++++++ .../components/BorderBox7/src/index.less | 32 ++++++ .../components/BorderBox7/src/index.vue | 100 ------------------ packages/docs/docs/Border/BorderBox7/demo.vue | 8 +- 5 files changed, 117 insertions(+), 114 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx create mode 100644 packages/datav-vue3/components/BorderBox7/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox7/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox7/index.ts b/packages/datav-vue3/components/BorderBox7/index.ts index 6e3b2c0..8c07f52 100644 --- a/packages/datav-vue3/components/BorderBox7/index.ts +++ b/packages/datav-vue3/components/BorderBox7/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox7 from './src/index.vue' - -export const BorderBox7Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox7', BorderBox7) - }, -} - -export { - BorderBox7, -} +import type { App, Plugin } from 'vue' +import BorderBox7 from './src/BorderBox7' + +export const BorderBox7Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox7', BorderBox7) + }, +} + +export { + BorderBox7, +} diff --git a/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx b/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx new file mode 100644 index 0000000..ba49862 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx @@ -0,0 +1,67 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox7 = ref(null) + + const state = reactive({ + defaultColor: ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox7) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox7, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox7/src/index.less b/packages/datav-vue3/components/BorderBox7/src/index.less new file mode 100644 index 0000000..020e1e5 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox7/src/index.less @@ -0,0 +1,32 @@ +.dv-border-box-7 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + + & > polyline { + fill: none; + stroke-linecap: round; + } + } + + .dv-bb7-line-width-2 { + stroke-width: 2; + } + + .dv-bb7-line-width-5 { + stroke-width: 5; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox7/src/index.vue b/packages/datav-vue3/components/BorderBox7/src/index.vue deleted file mode 100644 index ae50479..0000000 --- a/packages/datav-vue3/components/BorderBox7/src/index.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox7/demo.vue b/packages/docs/docs/Border/BorderBox7/demo.vue index f9e8afd..ae35afb 100644 --- a/packages/docs/docs/Border/BorderBox7/demo.vue +++ b/packages/docs/docs/Border/BorderBox7/demo.vue @@ -1,9 +1,13 @@ + + -- Gitee From 71b213110c8057ada15737cf531e1607a59928cb Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 14:26:49 +0800 Subject: [PATCH 16/26] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0vue=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 108 ++++++++++++++++++++-------------------- pnpm-lock.yaml | 131 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 162 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index 93de13b..8d1efd0 100644 --- a/package.json +++ b/package.json @@ -1,54 +1,54 @@ -{ - "name": "datav-vue3-monorepo", - "version": "0.1.7", - "description": "Datav for vue3+vite", - "packageManager": "pnpm@6.32.3", - "license": "MIT", - "private": "true", - "homepage": "https://github.com/vaemusic/datav-vue3", - "scripts": { - "dev": "pnpm run --filter @kjgl77/docs docs:dev", - "dev:docs": "pnpm run --filter @kjgl77/docs dev", - "build:docs": "pnpm run build:lib && pnpm run build", - "build": "pnpm run --filter @kjgl77/docs build", - "build:lib": "pnpm run --filter @kjgl77/datav-vue3 build:lib", - "gen": "node ./script/genNewComp/index.js", - "lint": "eslint .", - "typecheck": "vue-tsc --noEmit", - "test": "vitest" - }, - "dependencies": { - "vue": "^3.2.37" - }, - "devDependencies": { - "@antfu/eslint-config-vue": "^0.26.2", - "@vitejs/plugin-vue-jsx": "^2.0.0", - "@types/node": "^17.0.45", - "@vitejs/plugin-vue": "^2.3.3", - "eslint": "^8.18.0", - "fs-extra": "^10.1.0", - "handlebars": "^4.7.7", - "inquirer": "^8.2.4", - "jsdom": "^19.0.0", - "pnpm": "^6.32.24", - "typescript": "^4.7.4", - "unplugin-auto-import": "^0.7.2", - "vite": "^3.0.8", - "vitest": "^0.9.4", - "vue-tsc": "^0.34.17" - }, - "eslintConfig": { - "extends": "@antfu" - }, - "directories": { - "doc": "docs", - "test": "test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vaemusic/datav-vue3.git" - }, - "bugs": { - "url": "https://github.com/vaemusic/datav-vue3/issues" - } -} +{ + "name": "datav-vue3-monorepo", + "version": "0.1.7", + "description": "Datav for vue3+vite", + "packageManager": "pnpm@6.32.3", + "license": "MIT", + "private": "true", + "homepage": "https://github.com/vaemusic/datav-vue3", + "scripts": { + "dev": "pnpm run --filter @kjgl77/docs docs:dev", + "dev:docs": "pnpm run --filter @kjgl77/docs dev", + "build:docs": "pnpm run build:lib && pnpm run build", + "build": "pnpm run --filter @kjgl77/docs build", + "build:lib": "pnpm run --filter @kjgl77/datav-vue3 build:lib", + "gen": "node ./script/genNewComp/index.js", + "lint": "eslint .", + "typecheck": "vue-tsc --noEmit", + "test": "vitest" + }, + "dependencies": { + "vue": "^3.2.39" + }, + "devDependencies": { + "@antfu/eslint-config-vue": "^0.26.2", + "@vitejs/plugin-vue-jsx": "^2.0.0", + "@types/node": "^17.0.45", + "@vitejs/plugin-vue": "^2.3.3", + "eslint": "^8.18.0", + "fs-extra": "^10.1.0", + "handlebars": "^4.7.7", + "inquirer": "^8.2.4", + "jsdom": "^19.0.0", + "pnpm": "^6.32.24", + "typescript": "^4.7.4", + "unplugin-auto-import": "^0.7.2", + "vite": "^3.0.8", + "vitest": "^0.9.4", + "vue-tsc": "^0.34.17" + }, + "eslintConfig": { + "extends": "@antfu" + }, + "directories": { + "doc": "docs", + "test": "test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vaemusic/datav-vue3.git" + }, + "bugs": { + "url": "https://github.com/vaemusic/datav-vue3/issues" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 364890e..2095a0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,15 +18,15 @@ importers: unplugin-auto-import: ^0.7.2 vite: ^3.0.8 vitest: ^0.9.4 - vue: ^3.2.37 + vue: ^3.2.39 vue-tsc: ^0.34.17 dependencies: - vue: 3.2.37 + vue: 3.2.39 devDependencies: '@antfu/eslint-config-vue': 0.26.2_b5e7v2qnwxfo6hmiq56u52mz3e '@types/node': 17.0.45 - '@vitejs/plugin-vue': 2.3.3_vite@3.0.8+vue@3.2.37 - '@vitejs/plugin-vue-jsx': 2.0.0_vite@3.0.8+vue@3.2.37 + '@vitejs/plugin-vue': 2.3.3_vite@3.0.8+vue@3.2.39 + '@vitejs/plugin-vue-jsx': 2.0.0_vite@3.0.8+vue@3.2.39 eslint: 8.18.0 fs-extra: 10.1.0 handlebars: 4.7.7 @@ -379,7 +379,7 @@ packages: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.7 + '@babel/types': 7.18.13 dev: true /@babel/helper-module-transforms/7.18.9: @@ -562,14 +562,6 @@ packages: '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 - /@babel/types/7.18.7: - resolution: {integrity: sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.18.6 - to-fast-properties: 2.0.0 - dev: true - /@docsearch/css/3.2.1: resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} dev: true @@ -1172,7 +1164,7 @@ packages: magic-string: 0.26.2 dev: true - /@vitejs/plugin-vue-jsx/2.0.0_vite@3.0.8+vue@3.2.37: + /@vitejs/plugin-vue-jsx/2.0.0_vite@3.0.8+vue@3.2.39: resolution: {integrity: sha512-WF9ApZ/ivyyW3volQfu0Td0KNPhcccYEaRNzNY1NxRLVJQLSX0nFqquv3e2g7MF74p1XZK4bGtDL2y5i5O5+1A==} engines: {node: '>=14.18.0'} peerDependencies: @@ -1184,12 +1176,12 @@ packages: '@babel/plugin-transform-typescript': 7.18.12_@babel+core@7.18.13 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.18.13 vite: 3.0.8 - vue: 3.2.37 + vue: 3.2.39 transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-vue/2.3.3_vite@3.0.8+vue@3.2.37: + /@vitejs/plugin-vue/2.3.3_vite@3.0.8+vue@3.2.39: resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} engines: {node: '>=12.0.0'} peerDependencies: @@ -1197,7 +1189,7 @@ packages: vue: ^3.2.25 dependencies: vite: 3.0.8 - vue: 3.2.37 + vue: 3.2.39 dev: true /@vitejs/plugin-vue/3.0.3_vite@3.0.8+vue@3.2.37: @@ -1226,9 +1218,9 @@ packages: dependencies: '@volar/code-gen': 0.34.17 '@volar/source-map': 0.34.17 - '@vue/compiler-core': 3.2.37 - '@vue/compiler-dom': 3.2.37 - '@vue/shared': 3.2.37 + '@vue/compiler-core': 3.2.39 + '@vue/compiler-dom': 3.2.39 + '@vue/shared': 3.2.39 dev: true /@volar/vue-typescript/0.34.17: @@ -1237,8 +1229,8 @@ packages: '@volar/code-gen': 0.34.17 '@volar/source-map': 0.34.17 '@volar/vue-code-gen': 0.34.17 - '@vue/compiler-sfc': 3.2.37 - '@vue/reactivity': 3.2.37 + '@vue/compiler-sfc': 3.2.39 + '@vue/reactivity': 3.2.39 dev: true /@vue/babel-helper-vue-transform-on/1.0.2: @@ -1252,7 +1244,7 @@ packages: '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.13 '@babel/template': 7.18.10 '@babel/traverse': 7.18.13 - '@babel/types': 7.18.7 + '@babel/types': 7.18.13 '@vue/babel-helper-vue-transform-on': 1.0.2 camelcase: 6.3.0 html-tags: 3.2.0 @@ -1269,12 +1261,28 @@ packages: '@vue/shared': 3.2.37 estree-walker: 2.0.2 source-map: 0.6.1 + dev: true + + /@vue/compiler-core/3.2.39: + resolution: {integrity: sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==} + dependencies: + '@babel/parser': 7.18.13 + '@vue/shared': 3.2.39 + estree-walker: 2.0.2 + source-map: 0.6.1 /@vue/compiler-dom/3.2.37: resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==} dependencies: '@vue/compiler-core': 3.2.37 '@vue/shared': 3.2.37 + dev: true + + /@vue/compiler-dom/3.2.39: + resolution: {integrity: sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==} + dependencies: + '@vue/compiler-core': 3.2.39 + '@vue/shared': 3.2.39 /@vue/compiler-sfc/3.2.37: resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} @@ -1289,12 +1297,34 @@ packages: magic-string: 0.25.7 postcss: 8.4.16 source-map: 0.6.1 + dev: true + + /@vue/compiler-sfc/3.2.39: + resolution: {integrity: sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==} + dependencies: + '@babel/parser': 7.18.13 + '@vue/compiler-core': 3.2.39 + '@vue/compiler-dom': 3.2.39 + '@vue/compiler-ssr': 3.2.39 + '@vue/reactivity-transform': 3.2.39 + '@vue/shared': 3.2.39 + estree-walker: 2.0.2 + magic-string: 0.25.7 + postcss: 8.4.16 + source-map: 0.6.1 /@vue/compiler-ssr/3.2.37: resolution: {integrity: sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==} dependencies: '@vue/compiler-dom': 3.2.37 '@vue/shared': 3.2.37 + dev: true + + /@vue/compiler-ssr/3.2.39: + resolution: {integrity: sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==} + dependencies: + '@vue/compiler-dom': 3.2.39 + '@vue/shared': 3.2.39 /@vue/devtools-api/6.2.1: resolution: {integrity: sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==} @@ -1308,17 +1338,40 @@ packages: '@vue/shared': 3.2.37 estree-walker: 2.0.2 magic-string: 0.25.7 + dev: true + + /@vue/reactivity-transform/3.2.39: + resolution: {integrity: sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==} + dependencies: + '@babel/parser': 7.18.13 + '@vue/compiler-core': 3.2.39 + '@vue/shared': 3.2.39 + estree-walker: 2.0.2 + magic-string: 0.25.7 /@vue/reactivity/3.2.37: resolution: {integrity: sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==} dependencies: '@vue/shared': 3.2.37 + dev: true + + /@vue/reactivity/3.2.39: + resolution: {integrity: sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==} + dependencies: + '@vue/shared': 3.2.39 /@vue/runtime-core/3.2.37: resolution: {integrity: sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==} dependencies: '@vue/reactivity': 3.2.37 '@vue/shared': 3.2.37 + dev: true + + /@vue/runtime-core/3.2.39: + resolution: {integrity: sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==} + dependencies: + '@vue/reactivity': 3.2.39 + '@vue/shared': 3.2.39 /@vue/runtime-dom/3.2.37: resolution: {integrity: sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==} @@ -1326,6 +1379,14 @@ packages: '@vue/runtime-core': 3.2.37 '@vue/shared': 3.2.37 csstype: 2.6.17 + dev: true + + /@vue/runtime-dom/3.2.39: + resolution: {integrity: sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==} + dependencies: + '@vue/runtime-core': 3.2.39 + '@vue/shared': 3.2.39 + csstype: 2.6.17 /@vue/server-renderer/3.2.37_vue@3.2.37: resolution: {integrity: sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==} @@ -1335,9 +1396,23 @@ packages: '@vue/compiler-ssr': 3.2.37 '@vue/shared': 3.2.37 vue: 3.2.37 + dev: true + + /@vue/server-renderer/3.2.39_vue@3.2.39: + resolution: {integrity: sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==} + peerDependencies: + vue: 3.2.39 + dependencies: + '@vue/compiler-ssr': 3.2.39 + '@vue/shared': 3.2.39 + vue: 3.2.39 /@vue/shared/3.2.37: resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} + dev: true + + /@vue/shared/3.2.39: + resolution: {integrity: sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==} /@vueuse/core/9.1.0: resolution: {integrity: sha512-BIroqvXEqt826aE9r3K5cox1zobuPuAzdYJ36kouC2TVhlXvFKIILgFVWrpp9HZPwB3aLzasmG3K87q7TSyXZg==} @@ -4985,6 +5060,16 @@ packages: '@vue/runtime-dom': 3.2.37 '@vue/server-renderer': 3.2.37_vue@3.2.37 '@vue/shared': 3.2.37 + dev: true + + /vue/3.2.39: + resolution: {integrity: sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==} + dependencies: + '@vue/compiler-dom': 3.2.39 + '@vue/compiler-sfc': 3.2.39 + '@vue/runtime-dom': 3.2.39 + '@vue/server-renderer': 3.2.39_vue@3.2.39 + '@vue/shared': 3.2.39 /w3c-hr-time/1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz} -- Gitee From 438a190d2e7530a233684c9ba54f4bd8514bab2e Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 14:27:15 +0800 Subject: [PATCH 17/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=868=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox8/index.ts | 24 +-- .../components/BorderBox8/src/BorderBox8.tsx | 141 ++++++++++++++++ .../components/BorderBox8/src/index.less | 19 +++ .../components/BorderBox8/src/index.vue | 153 ------------------ packages/docs/docs/Border/BorderBox8/demo.vue | 12 +- 5 files changed, 180 insertions(+), 169 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx create mode 100644 packages/datav-vue3/components/BorderBox8/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox8/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox8/index.ts b/packages/datav-vue3/components/BorderBox8/index.ts index f0402ac..ec47bb0 100644 --- a/packages/datav-vue3/components/BorderBox8/index.ts +++ b/packages/datav-vue3/components/BorderBox8/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox8 from './src/index.vue' - -export const BorderBox8Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox8', BorderBox8) - }, -} - -export { - BorderBox8, -} +import type { App, Plugin } from 'vue' +import BorderBox8 from './src/BorderBox8' + +export const BorderBox8Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox8', BorderBox8) + }, +} + +export { + BorderBox8, +} diff --git a/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx new file mode 100644 index 0000000..d973802 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx @@ -0,0 +1,141 @@ +import type { ExtractPropTypes } from 'vue' +import { defineComponent, renderSlot } from 'vue' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' +import './index.less' + +const borderBox8Props = { + ...borderBoxProps, + reverse: { + type: Boolean, + default: false, + }, + dur: { + type: Number, + default: 3, + }, +} + +export type BorderBox8Props = ExtractPropTypes + +export default defineComponent({ + props: borderBox8Props, + setup(props: BorderBox8Props) { + const id = uuid() + const borderBox8 = ref(null) + + const state = reactive({ + ref: 'border-box-8', + path: `border-box-8-path-${id}`, + gradient: `border-box-8-gradient-${id}`, + mask: `border-box-8-mask-${id}`, + + defaultColor: ['#235fa7', '#4fd2dd'], + + mergedColor: [], + }) + + const { width, height, initWH } = autoResize(borderBox8) + + const length = computed(() => { + return (width.value + height.value - 5) * 2 + }) + + const pathD = computed(() => { + if (props.reverse) + return `M 2.5, 2.5 L 2.5, ${height.value - 2.5} L ${width.value - 2.5}, ${height.value - 2.5} L ${width.value - 2.5}, 2.5 L 2.5, 2.5` + + return `M2.5, 2.5 L${width.value - 2.5}, 2.5 L${width.value - 2.5}, ${height.value - 2.5} L2.5, ${height.value - 2.5} L2.5, 2.5` + }) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + pathD, + length, + borderBox8, + } + }, + render() { + const { $slots, width, height, state, pathD, length, backgroundColor, dur } = this + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox8/src/index.less b/packages/datav-vue3/components/BorderBox8/src/index.less new file mode 100644 index 0000000..ecb218a --- /dev/null +++ b/packages/datav-vue3/components/BorderBox8/src/index.less @@ -0,0 +1,19 @@ +.dv-border-box-8 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + left: 0px; + top: 0px; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox8/src/index.vue b/packages/datav-vue3/components/BorderBox8/src/index.vue deleted file mode 100644 index 60c2217..0000000 --- a/packages/datav-vue3/components/BorderBox8/src/index.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox8/demo.vue b/packages/docs/docs/Border/BorderBox8/demo.vue index 6f38a51..93588ae 100644 --- a/packages/docs/docs/Border/BorderBox8/demo.vue +++ b/packages/docs/docs/Border/BorderBox8/demo.vue @@ -1,19 +1,23 @@ + + \ No newline at end of file -- Gitee From fd48dae77f8a7760574b0ae90768f92c0aaa729a Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 16:46:18 +0800 Subject: [PATCH 18/26] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0vitepress?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 3 +- packages/docs/package.json | 2 +- pnpm-lock.yaml | 125 +++++-------------------------------- 3 files changed, 19 insertions(+), 111 deletions(-) diff --git a/.npmrc b/.npmrc index bf2e764..54da594 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ -shamefully-hoist=true +shamefully-hoist=true +strict-peer-dependencies=false diff --git a/packages/docs/package.json b/packages/docs/package.json index 5e5c950..5ab00df 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -13,7 +13,7 @@ "devDependencies": { "unocss": "^0.45.8", "unplugin-auto-import": "^0.11.2", - "vitepress": "1.0.0-alpha.8" + "vitepress": "1.0.0-alpha.13" }, "dependencies": { "@kjgl77/datav-vue3": "workspace:*" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2095a0c..edb2339 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,13 +63,13 @@ importers: '@kjgl77/datav-vue3': workspace:* unocss: ^0.45.8 unplugin-auto-import: ^0.11.2 - vitepress: 1.0.0-alpha.8 + vitepress: 1.0.0-alpha.13 dependencies: '@kjgl77/datav-vue3': link:../datav-vue3 devDependencies: unocss: 0.45.8 unplugin-auto-import: 0.11.2 - vitepress: 1.0.0-alpha.8 + vitepress: 1.0.0-alpha.13 packages/example: specifiers: @@ -1192,7 +1192,7 @@ packages: vue: 3.2.39 dev: true - /@vitejs/plugin-vue/3.0.3_vite@3.0.8+vue@3.2.37: + /@vitejs/plugin-vue/3.0.3_vite@3.0.8+vue@3.2.39: resolution: {integrity: sha512-U4zNBlz9mg+TA+i+5QPc3N5lQvdUXENZLO2h0Wdzp56gI1MWhqJOv+6R+d4kOzoaSSq6TnGPBdZAXKOe4lXy6g==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1200,7 +1200,7 @@ packages: vue: ^3.2.25 dependencies: vite: 3.0.8 - vue: 3.2.37 + vue: 3.2.39 dev: true /@volar/code-gen/0.34.17: @@ -1254,15 +1254,6 @@ packages: - supports-color dev: true - /@vue/compiler-core/3.2.37: - resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==} - dependencies: - '@babel/parser': 7.18.13 - '@vue/shared': 3.2.37 - estree-walker: 2.0.2 - source-map: 0.6.1 - dev: true - /@vue/compiler-core/3.2.39: resolution: {integrity: sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==} dependencies: @@ -1271,34 +1262,12 @@ packages: estree-walker: 2.0.2 source-map: 0.6.1 - /@vue/compiler-dom/3.2.37: - resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==} - dependencies: - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 - dev: true - /@vue/compiler-dom/3.2.39: resolution: {integrity: sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==} dependencies: '@vue/compiler-core': 3.2.39 '@vue/shared': 3.2.39 - /@vue/compiler-sfc/3.2.37: - resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} - dependencies: - '@babel/parser': 7.18.13 - '@vue/compiler-core': 3.2.37 - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-ssr': 3.2.37 - '@vue/reactivity-transform': 3.2.37 - '@vue/shared': 3.2.37 - estree-walker: 2.0.2 - magic-string: 0.25.7 - postcss: 8.4.16 - source-map: 0.6.1 - dev: true - /@vue/compiler-sfc/3.2.39: resolution: {integrity: sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==} dependencies: @@ -1313,13 +1282,6 @@ packages: postcss: 8.4.16 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.37: - resolution: {integrity: sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==} - dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/shared': 3.2.37 - dev: true - /@vue/compiler-ssr/3.2.39: resolution: {integrity: sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==} dependencies: @@ -1330,16 +1292,6 @@ packages: resolution: {integrity: sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==} dev: true - /@vue/reactivity-transform/3.2.37: - resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} - dependencies: - '@babel/parser': 7.18.13 - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 - estree-walker: 2.0.2 - magic-string: 0.25.7 - dev: true - /@vue/reactivity-transform/3.2.39: resolution: {integrity: sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==} dependencies: @@ -1349,38 +1301,17 @@ packages: estree-walker: 2.0.2 magic-string: 0.25.7 - /@vue/reactivity/3.2.37: - resolution: {integrity: sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==} - dependencies: - '@vue/shared': 3.2.37 - dev: true - /@vue/reactivity/3.2.39: resolution: {integrity: sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==} dependencies: '@vue/shared': 3.2.39 - /@vue/runtime-core/3.2.37: - resolution: {integrity: sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==} - dependencies: - '@vue/reactivity': 3.2.37 - '@vue/shared': 3.2.37 - dev: true - /@vue/runtime-core/3.2.39: resolution: {integrity: sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==} dependencies: '@vue/reactivity': 3.2.39 '@vue/shared': 3.2.39 - /@vue/runtime-dom/3.2.37: - resolution: {integrity: sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==} - dependencies: - '@vue/runtime-core': 3.2.37 - '@vue/shared': 3.2.37 - csstype: 2.6.17 - dev: true - /@vue/runtime-dom/3.2.39: resolution: {integrity: sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==} dependencies: @@ -1388,16 +1319,6 @@ packages: '@vue/shared': 3.2.39 csstype: 2.6.17 - /@vue/server-renderer/3.2.37_vue@3.2.37: - resolution: {integrity: sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==} - peerDependencies: - vue: 3.2.37 - dependencies: - '@vue/compiler-ssr': 3.2.37 - '@vue/shared': 3.2.37 - vue: 3.2.37 - dev: true - /@vue/server-renderer/3.2.39_vue@3.2.39: resolution: {integrity: sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==} peerDependencies: @@ -1407,10 +1328,6 @@ packages: '@vue/shared': 3.2.39 vue: 3.2.39 - /@vue/shared/3.2.37: - resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} - dev: true - /@vue/shared/3.2.39: resolution: {integrity: sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==} @@ -1426,13 +1343,13 @@ packages: - vue dev: false - /@vueuse/core/9.1.0_vue@3.2.37: + /@vueuse/core/9.1.0_vue@3.2.39: resolution: {integrity: sha512-BIroqvXEqt826aE9r3K5cox1zobuPuAzdYJ36kouC2TVhlXvFKIILgFVWrpp9HZPwB3aLzasmG3K87q7TSyXZg==} dependencies: '@types/web-bluetooth': 0.0.15 '@vueuse/metadata': 9.1.0 - '@vueuse/shared': 9.1.0_vue@3.2.37 - vue-demi: 0.12.1_vue@3.2.37 + '@vueuse/shared': 9.1.0_vue@3.2.39 + vue-demi: 0.12.1_vue@3.2.39 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1450,10 +1367,10 @@ packages: - vue dev: false - /@vueuse/shared/9.1.0_vue@3.2.37: + /@vueuse/shared/9.1.0_vue@3.2.39: resolution: {integrity: sha512-pB/3njQu4tfJJ78ajELNda0yMG6lKfpToQW7Soe09CprF1k3QuyoNi1tBNvo75wBDJWD+LOnr+c4B5HZ39jY/Q==} dependencies: - vue-demi: 0.12.1_vue@3.2.37 + vue-demi: 0.12.1_vue@3.2.39 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -4930,19 +4847,19 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.8: - resolution: {integrity: sha512-kTRN5DCagvMqr9OjylSV9/waGg0IHrxL0hBVuJoz7ykleZq2qR02n5CaiFq5QrSB/VRBGqiVsFQzet9vJsXS8g==} + /vitepress/1.0.0-alpha.13: + resolution: {integrity: sha512-gCbKb+6o0g5wHt2yyqBPk7FcvrB+MfwGtg1JMS5p99GTQR87l3b7symCl8o1ecv7MDXwJ2mPB8ZrYNLnQAJxLQ==} hasBin: true dependencies: '@docsearch/css': 3.2.1 '@docsearch/js': 3.2.1 - '@vitejs/plugin-vue': 3.0.3_vite@3.0.8+vue@3.2.37 + '@vitejs/plugin-vue': 3.0.3_vite@3.0.8+vue@3.2.39 '@vue/devtools-api': 6.2.1 - '@vueuse/core': 9.1.0_vue@3.2.37 + '@vueuse/core': 9.1.0_vue@3.2.39 body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 vite: 3.0.8 - vue: 3.2.37 + vue: 3.2.39 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -5009,7 +4926,7 @@ packages: optional: true dev: false - /vue-demi/0.12.1_vue@3.2.37: + /vue-demi/0.12.1_vue@3.2.39: resolution: {integrity: sha512-QL3ny+wX8c6Xm1/EZylbgzdoDolye+VpCXRhI2hug9dJTP3OUJ3lmiKN3CsVV3mOJKwFi0nsstbgob0vG7aoIw==} engines: {node: '>=12'} hasBin: true @@ -5021,7 +4938,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.37 + vue: 3.2.39 dev: true /vue-eslint-parser/9.0.3_eslint@8.18.0: @@ -5052,16 +4969,6 @@ packages: typescript: 4.7.4 dev: true - /vue/3.2.37: - resolution: {integrity: sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==} - dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-sfc': 3.2.37 - '@vue/runtime-dom': 3.2.37 - '@vue/server-renderer': 3.2.37_vue@3.2.37 - '@vue/shared': 3.2.37 - dev: true - /vue/3.2.39: resolution: {integrity: sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==} dependencies: -- Gitee From 013e2d0c1b07b354cca10de9ca119e90ad676275 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Thu, 8 Sep 2022 16:46:53 +0800 Subject: [PATCH 19/26] =?UTF-8?q?fix:=20svg=20=E7=9A=84=20animateMotion=20?= =?UTF-8?q?ts=E7=B1=BB=E5=9E=8B=E6=8A=A5=E9=94=99=EF=BC=8C=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E6=8D=A2=E6=88=90h=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox8/src/BorderBox8.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx index d973802..c0fe3af 100644 --- a/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx +++ b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx @@ -1,5 +1,5 @@ import type { ExtractPropTypes } from 'vue' -import { defineComponent, renderSlot } from 'vue' +import { defineComponent, h, renderSlot } from 'vue' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' @@ -98,12 +98,20 @@ export default defineComponent({ - ”上不存在属性“path” */ + /* + /> */} + {h('animateMotion', { + dur: `${dur}s`, + path: pathD, + rotate: 'auto', + repeatCount: 'indefinite', + })} -- Gitee From f0f285a7956e6a88d4ca3c413b9512629503f5e3 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Fri, 9 Sep 2022 15:42:37 +0800 Subject: [PATCH 20/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=869=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav-vue3/components/BorderBox9/index.ts | 24 +-- .../components/BorderBox9/src/BorderBox9.tsx | 174 ++++++++++++++++ .../components/BorderBox9/src/index.less | 19 ++ .../components/BorderBox9/src/index.vue | 193 ------------------ packages/docs/docs/Border/BorderBox9/demo.vue | 8 +- 5 files changed, 211 insertions(+), 207 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox9/src/BorderBox9.tsx create mode 100644 packages/datav-vue3/components/BorderBox9/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox9/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox9/index.ts b/packages/datav-vue3/components/BorderBox9/index.ts index 0ee5bc6..15a97d1 100644 --- a/packages/datav-vue3/components/BorderBox9/index.ts +++ b/packages/datav-vue3/components/BorderBox9/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox9 from './src/index.vue' - -export const BorderBox9Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox9', BorderBox9) - }, -} - -export { - BorderBox9, -} +import type { App, Plugin } from 'vue' +import BorderBox9 from './src/BorderBox9' + +export const BorderBox9Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox9', BorderBox9) + }, +} + +export { + BorderBox9, +} diff --git a/packages/datav-vue3/components/BorderBox9/src/BorderBox9.tsx b/packages/datav-vue3/components/BorderBox9/src/BorderBox9.tsx new file mode 100644 index 0000000..0fd9aeb --- /dev/null +++ b/packages/datav-vue3/components/BorderBox9/src/BorderBox9.tsx @@ -0,0 +1,174 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const id = uuid() + const borderBox9 = ref(null) + + const { width, height, initWH } = autoResize(borderBox9) + + const state = reactive({ + gradientId: `border-box-9-gradient-${id}`, + maskId: `border-box-9-mask-${id}`, + + defaultColor: ['#11eefd', '#0078d2'], + + mergedColor: [], + }) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox9, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox9/src/index.less b/packages/datav-vue3/components/BorderBox9/src/index.less new file mode 100644 index 0000000..8601443 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox9/src/index.less @@ -0,0 +1,19 @@ +.dv-border-box-9 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + left: 0px; + top: 0px; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox9/src/index.vue b/packages/datav-vue3/components/BorderBox9/src/index.vue deleted file mode 100644 index 588bdeb..0000000 --- a/packages/datav-vue3/components/BorderBox9/src/index.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox9/demo.vue b/packages/docs/docs/Border/BorderBox9/demo.vue index 2b0be59..c6bd9df 100644 --- a/packages/docs/docs/Border/BorderBox9/demo.vue +++ b/packages/docs/docs/Border/BorderBox9/demo.vue @@ -1,9 +1,13 @@ + + -- Gitee From bda6f7ec71fbcbc109c72995dfba47ddefb08b37 Mon Sep 17 00:00:00 2001 From: vaemusic <745385015@qq.com> Date: Fri, 9 Sep 2022 16:22:55 +0800 Subject: [PATCH 21/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=8610=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox10/index.ts | 24 ++-- .../BorderBox10/src/BorderBox10.tsx | 78 +++++++++++++ .../components/BorderBox10/src/index.less | 33 ++++++ .../components/BorderBox10/src/index.vue | 109 ------------------ .../docs/docs/Border/BorderBox10/demo.vue | 8 +- 5 files changed, 129 insertions(+), 123 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx create mode 100644 packages/datav-vue3/components/BorderBox10/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox10/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox10/index.ts b/packages/datav-vue3/components/BorderBox10/index.ts index bf79464..15f7eb8 100644 --- a/packages/datav-vue3/components/BorderBox10/index.ts +++ b/packages/datav-vue3/components/BorderBox10/index.ts @@ -1,12 +1,12 @@ -import type { App, Plugin } from 'vue' -import BorderBox10 from './src/index.vue' - -export const BorderBox10Plugin: Plugin = { - install(app: App) { - app.component('DvBorderBox10', BorderBox10) - }, -} - -export { - BorderBox10, -} +import type { App, Plugin } from 'vue' +import BorderBox10 from './src/BorderBox10' + +export const BorderBox10Plugin: Plugin = { + install(app: App) { + app.component('DvBorderBox10', BorderBox10) + }, +} + +export { + BorderBox10, +} diff --git a/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx b/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx new file mode 100644 index 0000000..864538f --- /dev/null +++ b/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx @@ -0,0 +1,78 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox10 = ref(null) + + const { width, height, initWH } = autoResize(borderBox10) + + const state = reactive({ + border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'], + + defaultColor: ['#1d48c4', '#d3e1f8'], + + mergedColor: [], + }) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + initWH, + state, + borderBox10, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + { + state.border.map((item) => { + return ( + + + + ) + }) + } + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox10/src/index.less b/packages/datav-vue3/components/BorderBox10/src/index.less new file mode 100644 index 0000000..cb33cf2 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox10/src/index.less @@ -0,0 +1,33 @@ +.dv-border-box-10 { + position: relative; + width: 100%; + height: 100%; + border-radius: 6px; + + .dv-border-svg-container { + position: absolute; + display: block; + } + + .right-top { + right: 0px; + transform: rotateY(180deg); + } + + .left-bottom { + bottom: 0px; + transform: rotateX(180deg); + } + + .right-bottom { + right: 0px; + bottom: 0px; + transform: rotateX(180deg) rotateY(180deg); + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox10/src/index.vue b/packages/datav-vue3/components/BorderBox10/src/index.vue deleted file mode 100644 index a6ebe37..0000000 --- a/packages/datav-vue3/components/BorderBox10/src/index.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox10/demo.vue b/packages/docs/docs/Border/BorderBox10/demo.vue index 6bcb226..734cab3 100644 --- a/packages/docs/docs/Border/BorderBox10/demo.vue +++ b/packages/docs/docs/Border/BorderBox10/demo.vue @@ -1,9 +1,13 @@ + + -- Gitee From 32909d287c2bc6f5907c5e1d86c32ff0b1b807ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 17 Sep 2022 21:29:21 +0800 Subject: [PATCH 22/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=8613=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox13/index.ts | 2 +- .../BorderBox13/src/BorderBox13.tsx | 84 ++++++++++++++ .../components/BorderBox13/src/index.less | 19 ++++ .../components/BorderBox13/src/index.vue | 104 ------------------ .../docs/docs/Border/BorderBox13/demo.vue | 7 +- 5 files changed, 109 insertions(+), 107 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx create mode 100644 packages/datav-vue3/components/BorderBox13/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox13/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox13/index.ts b/packages/datav-vue3/components/BorderBox13/index.ts index 9f5905d..61016b5 100644 --- a/packages/datav-vue3/components/BorderBox13/index.ts +++ b/packages/datav-vue3/components/BorderBox13/index.ts @@ -1,5 +1,5 @@ import type { App, Plugin } from 'vue' -import BorderBox13 from './src/index.vue' +import BorderBox13 from './src/BorderBox13' export const BorderBox13Plugin: Plugin = { install(app: App) { diff --git a/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx b/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx new file mode 100644 index 0000000..5347528 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx @@ -0,0 +1,84 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const borderBox13 = ref(null) + const { width, height, initWH } = autoResize(borderBox13) + + const state = reactive({ + defaultColor: ['#6586ec', '#2cf7fe'], + + mergedColor: [], + }) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + state, + initWH, + borderBox13, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox13/src/index.less b/packages/datav-vue3/components/BorderBox13/src/index.less new file mode 100644 index 0000000..b957bfd --- /dev/null +++ b/packages/datav-vue3/components/BorderBox13/src/index.less @@ -0,0 +1,19 @@ +.dv-border-box-13 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox13/src/index.vue b/packages/datav-vue3/components/BorderBox13/src/index.vue deleted file mode 100644 index a82c4ea..0000000 --- a/packages/datav-vue3/components/BorderBox13/src/index.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox13/demo.vue b/packages/docs/docs/Border/BorderBox13/demo.vue index a35b611..2e5f0a3 100644 --- a/packages/docs/docs/Border/BorderBox13/demo.vue +++ b/packages/docs/docs/Border/BorderBox13/demo.vue @@ -1,9 +1,12 @@ + -- Gitee From 35f46f0968381c4e1f6158f3c3669cbc5f377f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 17 Sep 2022 21:46:19 +0800 Subject: [PATCH 23/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=8612=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox12/index.ts | 2 +- .../BorderBox12/src/BorderBox12.tsx | 141 ++++++++++++++++ .../components/BorderBox12/src/index.less | 19 +++ .../components/BorderBox12/src/index.vue | 158 ------------------ .../docs/docs/Border/BorderBox12/demo.vue | 7 +- 5 files changed, 166 insertions(+), 161 deletions(-) create mode 100644 packages/datav-vue3/components/BorderBox12/src/BorderBox12.tsx create mode 100644 packages/datav-vue3/components/BorderBox12/src/index.less delete mode 100644 packages/datav-vue3/components/BorderBox12/src/index.vue diff --git a/packages/datav-vue3/components/BorderBox12/index.ts b/packages/datav-vue3/components/BorderBox12/index.ts index 8c60e9d..d875503 100644 --- a/packages/datav-vue3/components/BorderBox12/index.ts +++ b/packages/datav-vue3/components/BorderBox12/index.ts @@ -1,5 +1,5 @@ import type { App, Plugin } from 'vue' -import BorderBox12 from './src/index.vue' +import BorderBox12 from './src/BorderBox12' export const BorderBox12Plugin: Plugin = { install(app: App) { diff --git a/packages/datav-vue3/components/BorderBox12/src/BorderBox12.tsx b/packages/datav-vue3/components/BorderBox12/src/BorderBox12.tsx new file mode 100644 index 0000000..ecee37e --- /dev/null +++ b/packages/datav-vue3/components/BorderBox12/src/BorderBox12.tsx @@ -0,0 +1,141 @@ +import { defineComponent, renderSlot } from 'vue' +import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' +import autoResize from 'packages/datav-vue3/utils/autoResize' +import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' +// @ts-expect-error: not ts version lib +import { fade } from '@jiaminghi/color' +import './index.less' + +export default defineComponent({ + props: borderBoxProps, + setup(props: BorderBoxProps) { + const id = uuid() + const borderBox12 = ref(null) + + const { width, height, initWH } = autoResize(borderBox12) + + const state = reactive({ + filterId: `borderr-box-12-filterId-${id}`, + + defaultColor: ['#2e6099', '#7ce7fd'], + + mergedColor: [], + }) + + watch(() => props.color, () => { + mergeColor() + }) + + onMounted(() => { + mergeColor() + }) + + function mergeColor() { + state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) + } + + return { + width, + height, + state, + initWH, + borderBox12, + } + }, + render() { + const { $slots, width, height, state, backgroundColor } = this + return ( +
+ + + + + + + + + + + + + + + + { + width && height + && + } + + + + + + + + + + +
+ {renderSlot($slots, 'default')} +
+
+ ) + }, +}) diff --git a/packages/datav-vue3/components/BorderBox12/src/index.less b/packages/datav-vue3/components/BorderBox12/src/index.less new file mode 100644 index 0000000..e80ca1d --- /dev/null +++ b/packages/datav-vue3/components/BorderBox12/src/index.less @@ -0,0 +1,19 @@ +.dv-border-box-12 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/datav-vue3/components/BorderBox12/src/index.vue b/packages/datav-vue3/components/BorderBox12/src/index.vue deleted file mode 100644 index 466421e..0000000 --- a/packages/datav-vue3/components/BorderBox12/src/index.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - - diff --git a/packages/docs/docs/Border/BorderBox12/demo.vue b/packages/docs/docs/Border/BorderBox12/demo.vue index f57df10..055fa61 100644 --- a/packages/docs/docs/Border/BorderBox12/demo.vue +++ b/packages/docs/docs/Border/BorderBox12/demo.vue @@ -1,9 +1,12 @@ + \ No newline at end of file -- Gitee From 25108596c073cc62cd1e7b1d1556d40ea7661256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 17 Sep 2022 22:00:45 +0800 Subject: [PATCH 24/26] =?UTF-8?q?refactor:=20=E8=BE=B9=E6=A1=8611=20tsx=20?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox11/index.ts | 2 +- .../src/{index.vue => BorderBox11.tsx} | 466 +++++++++--------- .../components/BorderBox11/src/index.less | 24 + .../docs/docs/Border/BorderBox11/demo.vue | 7 +- 4 files changed, 254 insertions(+), 245 deletions(-) rename packages/datav-vue3/components/BorderBox11/src/{index.vue => BorderBox11.tsx} (37%) create mode 100644 packages/datav-vue3/components/BorderBox11/src/index.less diff --git a/packages/datav-vue3/components/BorderBox11/index.ts b/packages/datav-vue3/components/BorderBox11/index.ts index 9793472..3edc2df 100644 --- a/packages/datav-vue3/components/BorderBox11/index.ts +++ b/packages/datav-vue3/components/BorderBox11/index.ts @@ -1,5 +1,5 @@ import type { App, Plugin } from 'vue' -import BorderBox11 from './src/index.vue' +import BorderBox11 from './src/BorderBox11' export const BorderBox11Plugin: Plugin = { install(app: App) { diff --git a/packages/datav-vue3/components/BorderBox11/src/index.vue b/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx similarity index 37% rename from packages/datav-vue3/components/BorderBox11/src/index.vue rename to packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx index 643572d..7000f97 100644 --- a/packages/datav-vue3/components/BorderBox11/src/index.vue +++ b/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx @@ -1,32 +1,93 @@ - - - - - diff --git a/packages/datav-vue3/components/BorderBox11/src/index.less b/packages/datav-vue3/components/BorderBox11/src/index.less new file mode 100644 index 0000000..96f26b2 --- /dev/null +++ b/packages/datav-vue3/components/BorderBox11/src/index.less @@ -0,0 +1,24 @@ +.dv-border-box-11 { + position: relative; + width: 100%; + height: 100%; + + .dv-border-svg-container { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + + & > polyline { + fill: none; + stroke-width: 1; + } + } + + .border-box-content { + position: relative; + width: 100%; + height: 100%; + } +} diff --git a/packages/docs/docs/Border/BorderBox11/demo.vue b/packages/docs/docs/Border/BorderBox11/demo.vue index 5e0c504..a8b3fd3 100644 --- a/packages/docs/docs/Border/BorderBox11/demo.vue +++ b/packages/docs/docs/Border/BorderBox11/demo.vue @@ -1,9 +1,12 @@ + -- Gitee From 7f54575d5aba1e9479d4a938112ab312e58a174e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sat, 17 Sep 2022 22:04:26 +0800 Subject: [PATCH 25/26] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/datav-vue3/utils/autoResize.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/datav-vue3/utils/autoResize.ts b/packages/datav-vue3/utils/autoResize.ts index 6908570..7124fcf 100644 --- a/packages/datav-vue3/utils/autoResize.ts +++ b/packages/datav-vue3/utils/autoResize.ts @@ -13,7 +13,6 @@ const autoResize = (dom: Ref, onResize?: () => void, afterAu const initWH = (resize = true) => { return new Promise((resolve) => { nextTick(() => { - console.log(dom) domHtml = dom.value width.value = dom.value ? dom.value.clientWidth : 0 height.value = dom.value ? dom.value.clientHeight : 0 -- Gitee From 77418fea0a05e893cac392443918dacbe850610f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A6=E5=B0=BD=E7=94=98=E6=9D=A5?= <745385015@qq.com> Date: Sun, 18 Sep 2022 00:24:44 +0800 Subject: [PATCH 26/26] =?UTF-8?q?refactor:=20=E6=8A=BD=E7=A6=BB=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=BB=84=E4=BB=B6=E7=9A=84=20mergedColor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BorderBox1/src/BorderBox1.tsx | 89 ++++++++----------- .../BorderBox10/src/BorderBox10.tsx | 35 +++----- .../BorderBox11/src/BorderBox11.tsx | 80 +++++++---------- .../BorderBox12/src/BorderBox12.tsx | 58 +++++------- .../BorderBox13/src/BorderBox13.tsx | 34 +++---- .../components/BorderBox2/src/BorderBox2.tsx | 37 +++----- .../components/BorderBox3/src/BorderBox3.tsx | 33 +++---- .../components/BorderBox4/src/BorderBox4.tsx | 46 ++++------ .../components/BorderBox5/src/BorderBox5.tsx | 38 +++----- .../components/BorderBox6/src/BorderBox6.tsx | 58 +++++------- .../components/BorderBox7/src/BorderBox7.tsx | 46 ++++------ .../components/BorderBox8/src/BorderBox8.tsx | 29 ++---- .../components/BorderBox9/src/BorderBox9.tsx | 32 +++---- .../datav-vue3/composables/useMergedColor.ts | 21 +++++ packages/datav-vue3/package.json | 4 +- packages/datav-vue3/utils/index.ts | 4 +- pnpm-lock.yaml | 18 ++++ 17 files changed, 267 insertions(+), 395 deletions(-) create mode 100644 packages/datav-vue3/composables/useMergedColor.ts diff --git a/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx index 0ee0c11..091b08b 100644 --- a/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx +++ b/packages/datav-vue3/components/BorderBox1/src/BorderBox1.tsx @@ -2,44 +2,31 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const border = ['left-top', 'right-top', 'left-bottom', 'right-bottom'] as const +const defaultColor = ['#4fd2dd', '#235fa7'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox1 = ref(null) - const state = reactive({ - border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'], - defaultColor: ['#4fd2dd', '#235fa7'], - mergedColor: [], - }) - - const mergeColor = () => { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) const { width, height, initWH } = autoResize(borderBox1) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - return { width, height, initWH, - state, + mergedColor, borderBox1, } }, render() { - const { backgroundColor, width, height, state, $slots } = this + const { backgroundColor, width, height, mergedColor, $slots } = this return (
@@ -55,43 +42,43 @@ export default defineComponent({ { - state.border.map((item) => { + border.map((item) => { return ( - - - - - - - - - - + + + + + + + + + + ) }) } -
- { renderSlot($slots, 'default') } -
+
+ {renderSlot($slots, 'default')} +
) }, diff --git a/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx b/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx index 864538f..21552c9 100644 --- a/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx +++ b/packages/datav-vue3/components/BorderBox10/src/BorderBox10.tsx @@ -2,9 +2,12 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const border = ['left-top', 'right-top', 'left-bottom', 'right-bottom'] as const +const defaultColor = ['#1d48c4', '#d3e1f8'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { @@ -12,38 +15,20 @@ export default defineComponent({ const { width, height, initWH } = autoResize(borderBox10) - const state = reactive({ - border: ['left-top', 'right-top', 'left-bottom', 'right-bottom'], - - defaultColor: ['#1d48c4', '#d3e1f8'], - - mergedColor: [], - }) - - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + mergedColor, borderBox10, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, mergedColor, backgroundColor } = this return ( -
+
{ - state.border.map((item) => { + border.map((item) => { return ( diff --git a/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx b/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx index 7000f97..e0aa2cf 100644 --- a/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx +++ b/packages/datav-vue3/components/BorderBox11/src/BorderBox11.tsx @@ -2,7 +2,8 @@ import type { ExtractPropTypes } from 'vue' import { defineComponent, renderSlot } from 'vue' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' +import { uuid } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' // @ts-expect-error: not ts version lib import { fade } from '@jiaminghi/color' import './index.less' @@ -21,6 +22,8 @@ const borderBox11Props = { export type BorderBox11Props = ExtractPropTypes +const defaultColor = ['#8aaafb', '#1f33a2'] + export default defineComponent({ props: borderBox11Props, setup(props: BorderBox11Props) { @@ -29,44 +32,29 @@ export default defineComponent({ const { width, height, initWH } = autoResize(borderBox11) - const state = reactive({ - filterId: `border-box-11-filterId-${id}`, - - defaultColor: ['#8aaafb', '#1f33a2'], - - mergedColor: [], - }) + const filterId = ref(`border-box-11-filterId-${id}`) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + filterId, + mergedColor, borderBox11, } }, render() { - const { $slots, width, height, state, backgroundColor, title, titleWidth } = this + const { $slots, width, height, filterId, mergedColor, backgroundColor, title, titleWidth } = this return (
- + - + @@ -85,8 +73,8 @@ export default defineComponent({ /> props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, - state, + filterId, + mergedColor, initWH, borderBox12, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, filterId, mergedColor, backgroundColor } = this return (
- + - + @@ -100,8 +88,8 @@ export default defineComponent({ stroke-width="2" fill="transparent" stroke-linecap="round" - filter={`url(#${state.filterId})`} - stroke={state.mergedColor[1]} + filter={`url(#${filterId})`} + stroke={mergedColor[1]} d={`M ${width - 20} 5 L ${width - 15} 5 Q ${width - 5} 5 ${width - 5} 15 L ${width - 5} 20`} /> @@ -109,8 +97,8 @@ export default defineComponent({ stroke-width="2" fill="transparent" stroke-linecap="round" - filter={`url(#${state.filterId})`} - stroke={state.mergedColor[1]} + filter={`url(#${filterId})`} + stroke={mergedColor[1]} d={` M ${width - 20} ${height - 5} L ${width - 15} ${height - 5} Q ${width - 5} ${height - 5} ${width - 5} ${height - 15} @@ -122,8 +110,8 @@ export default defineComponent({ stroke-width="2" fill="transparent" stroke-linecap="round" - filter={`url(#${state.filterId})`} - stroke={state.mergedColor[1]} + filter={`url(#${filterId})`} + stroke={mergedColor[1]} d={` M 20 ${height - 5} L 15 ${height - 5} Q 5 ${height - 5} 5 ${height - 15} diff --git a/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx b/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx index 5347528..e0963c3 100644 --- a/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx +++ b/packages/datav-vue3/components/BorderBox13/src/BorderBox13.tsx @@ -2,49 +2,35 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const defaultColor = ['#6586ec', '#2cf7fe'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox13 = ref(null) const { width, height, initWH } = autoResize(borderBox13) - const state = reactive({ - defaultColor: ['#6586ec', '#2cf7fe'], - - mergedColor: [], - }) - - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, - state, + mergedColor, initWH, borderBox13, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, mergedColor, backgroundColor } = this return (
diff --git a/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx b/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx index 3fdb578..9d04890 100644 --- a/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx +++ b/packages/datav-vue3/components/BorderBox2/src/BorderBox2.tsx @@ -2,43 +2,30 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const defaultColor = ['#fff', 'rgba(255, 255, 255, 0.6)'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox2 = ref(null) - const state = reactive({ - defaultColor: ['#fff', 'rgba(255, 255, 255, 0.6)'], - mergedColor: [], - }) - - const mergeColor = () => { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } - - watch(() => props.color, () => { - mergeColor() - }) + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) const { width, height, initWH } = autoResize(borderBox2) - onMounted(() => { - mergeColor() - }) - return { width, height, initWH, - state, + mergedColor, borderBox2, } }, render() { - const { $slots, backgroundColor, width, height, state } = this + const { $slots, backgroundColor, width, height, mergedColor } = this return (
@@ -49,17 +36,17 @@ export default defineComponent({ /> - - - - + + + +
diff --git a/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx b/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx index 274b082..0010568 100644 --- a/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx +++ b/packages/datav-vue3/components/BorderBox3/src/BorderBox3.tsx @@ -2,43 +2,30 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const defaultColor = ['#2862b7', '#2862b7'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox3 = ref(null) - const state = reactive({ - defaultColor: ['#2862b7', '#2862b7'], - - mergedColor: [], - }) - const { width, height, initWH } = autoResize(borderBox3) - watch(() => props.color, () => { - mergeColor() - }) + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } return { width, height, - state, + mergedColor, initWH, borderBox3, } }, render() { - const { $slots, width, height, backgroundColor, state } = this + const { $slots, width, height, backgroundColor, mergedColor } = this return (
@@ -50,22 +37,22 @@ export default defineComponent({ diff --git a/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx b/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx index e8fdb56..7f82998 100644 --- a/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx +++ b/packages/datav-vue3/components/BorderBox4/src/BorderBox4.tsx @@ -2,7 +2,7 @@ import type { ExtractPropTypes } from 'vue' import { defineComponent, renderSlot } from 'vue' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' const borderBox4Props = { @@ -15,41 +15,27 @@ const borderBox4Props = { export type BorderBox4Props = ExtractPropTypes +const defaultColor = ['red', 'rgba(0,0,255,0.8)'] + export default defineComponent({ props: borderBox4Props, setup(props: BorderBox4Props) { const borderBox4 = ref(null) - const state = reactive({ - defaultColor: ['red', 'rgba(0,0,255,0.8)'], - - mergedColor: [], - }) - const { width, height, initWH } = autoResize(borderBox4) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + mergedColor, borderBox4, } }, render() { - const { $slots, backgroundColor, reverse, width, height, state } = this + const { $slots, backgroundColor, reverse, width, height, mergedColor } = this return (
@@ -62,24 +48,24 @@ export default defineComponent({ - - - - - - - - + + + + + + + +
diff --git a/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx b/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx index b1423ba..c3bc5e4 100644 --- a/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx +++ b/packages/datav-vue3/components/BorderBox5/src/BorderBox5.tsx @@ -2,7 +2,7 @@ import type { ExtractPropTypes } from 'vue' import { defineComponent, renderSlot } from 'vue' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' const borderBox5Props = { @@ -15,41 +15,27 @@ const borderBox5Props = { export type BorderBox5Props = ExtractPropTypes +const defaultColor = ['rgba(255, 255, 255, 0.35)', 'rgba(255, 255, 255, 0.20)'] + export default defineComponent({ props: borderBox5Props, setup(props: BorderBox5Props) { const borderBox5 = ref(null) - const state = reactive({ - defaultColor: ['rgba(255, 255, 255, 0.35)', 'rgba(255, 255, 255, 0.20)'], - - mergedColor: [], - }) - const { width, height, initWH } = autoResize(borderBox5) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + mergedColor, borderBox5, } }, render() { - const { $slots, width, height, state, backgroundColor, reverse } = this + const { $slots, width, height, mergedColor, backgroundColor, reverse } = this return (
@@ -61,20 +47,20 @@ export default defineComponent({ - - - - + + + +
diff --git a/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx b/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx index a744449..07e3077 100644 --- a/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx +++ b/packages/datav-vue3/components/BorderBox6/src/BorderBox6.tsx @@ -2,44 +2,30 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const defaultColor = ['rgba(255, 255, 255, 0.35)', 'gray'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox6 = ref(null) - const state = reactive({ - defaultColor: ['rgba(255, 255, 255, 0.35)', 'gray'], - - mergedColor: [], - }) - const { width, height, initWH } = autoResize(borderBox6) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + mergedColor, borderBox6, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, mergedColor, backgroundColor } = this return (
@@ -49,22 +35,22 @@ export default defineComponent({ `} /> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
diff --git a/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx b/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx index ba49862..43d8680 100644 --- a/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx +++ b/packages/datav-vue3/components/BorderBox7/src/BorderBox7.tsx @@ -2,60 +2,46 @@ import { defineComponent, renderSlot } from 'vue' import type { BorderBoxProps } from 'packages/datav-vue3/types/BorderProps' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' +const defaultColor = ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)'] + export default defineComponent({ props: borderBoxProps, setup(props: BorderBoxProps) { const borderBox7 = ref(null) - const state = reactive({ - defaultColor: ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)'], - - mergedColor: [], - }) - const { width, height, initWH } = autoResize(borderBox7) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, - state, + mergedColor, borderBox7, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, mergedColor, backgroundColor } = this return (
- - - - - - - - - + + + + + + + + +
diff --git a/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx index c0fe3af..c3408bc 100644 --- a/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx +++ b/packages/datav-vue3/components/BorderBox8/src/BorderBox8.tsx @@ -2,7 +2,8 @@ import type { ExtractPropTypes } from 'vue' import { defineComponent, h, renderSlot } from 'vue' import { borderBoxProps } from 'packages/datav-vue3/types/BorderProps' import autoResize from 'packages/datav-vue3/utils/autoResize' -import { deepClone, deepMerge, uuid } from 'packages/datav-vue3/utils' +import { uuid } from 'packages/datav-vue3/utils' +import { useMergedColor } from 'packages/datav-vue3/composables/useMergedColor' import './index.less' const borderBox8Props = { @@ -19,6 +20,8 @@ const borderBox8Props = { export type BorderBox8Props = ExtractPropTypes +const defaultColor = ['#235fa7', '#4fd2dd'] + export default defineComponent({ props: borderBox8Props, setup(props: BorderBox8Props) { @@ -26,14 +29,9 @@ export default defineComponent({ const borderBox8 = ref(null) const state = reactive({ - ref: 'border-box-8', path: `border-box-8-path-${id}`, gradient: `border-box-8-gradient-${id}`, mask: `border-box-8-mask-${id}`, - - defaultColor: ['#235fa7', '#4fd2dd'], - - mergedColor: [], }) const { width, height, initWH } = autoResize(borderBox8) @@ -49,30 +47,21 @@ export default defineComponent({ return `M2.5, 2.5 L${width.value - 2.5}, 2.5 L${width.value - 2.5}, ${height.value - 2.5} L2.5, ${height.value - 2.5} L2.5, 2.5` }) - watch(() => props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() - }) - - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, state, + mergedColor, pathD, length, borderBox8, } }, render() { - const { $slots, width, height, state, pathD, length, backgroundColor, dur } = this + const { $slots, width, height, state, mergedColor, pathD, length, backgroundColor, dur } = this return (
@@ -119,13 +108,13 @@ export default defineComponent({ props.color, () => { - mergeColor() - }) - - onMounted(() => { - mergeColor() }) - function mergeColor() { - state.mergedColor = deepMerge(deepClone(state.defaultColor, true), props.color || []) - } + const mergedColor = useMergedColor(defaultColor, toRef(props, 'color')) return { width, height, initWH, state, + mergedColor, borderBox9, } }, render() { - const { $slots, width, height, state, backgroundColor } = this + const { $slots, width, height, state, mergedColor, backgroundColor } = this return (
@@ -65,19 +55,19 @@ export default defineComponent({ repeatCount="indefinite" /> - + - + ) { + let mergedColor = merge(defaultColors, colors.value) + + const stop = watchEffect(() => { + mergedColor = merge(defaultColors, colors.value) + }) + + onUnmounted(() => { + stop() + console.log('stop') + }) + + return mergedColor +} diff --git a/packages/datav-vue3/package.json b/packages/datav-vue3/package.json index f65a1f6..ccce518 100644 --- a/packages/datav-vue3/package.json +++ b/packages/datav-vue3/package.json @@ -38,10 +38,12 @@ "dependencies": { "@jiaminghi/c-render": "^0.4.3", "@jiaminghi/charts": "^0.2.18", - "@vueuse/core": "^9.1.0" + "@vueuse/core": "^9.1.0", + "lodash-es": "^4.17.21" }, "devDependencies": { "@jiaminghi/fs": "^0.1.1", + "@types/lodash-es": "^4.17.6", "less": "^4.1.3", "vite-plugin-dts": "^1.2.0", "vite-plugin-libcss": "^1.0.5" diff --git a/packages/datav-vue3/utils/index.ts b/packages/datav-vue3/utils/index.ts index 766118b..1d864a6 100644 --- a/packages/datav-vue3/utils/index.ts +++ b/packages/datav-vue3/utils/index.ts @@ -11,7 +11,7 @@ export function randomExtend(minNum: number, maxNum: number) { export function debounce(delay: number, callback: (...args: T[]) => void, vm: T) { let lastTime: NodeJS.Timeout - return function() { + return function () { clearTimeout(lastTime) lastTime = setTimeout(() => { callback.call(vm, ...arguments) @@ -126,7 +126,7 @@ export function deepClone(object: any, recursion: boolean) { const { parse, stringify } = JSON if (!recursion) return parse(stringify(object)) - const clonedObj: Record = object instanceof Array ? [] : {} + const clonedObj: Record = Array.isArray(object) ? [] : {} if (object && typeof object === 'object') { for (const key in object) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index edb2339..654814c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,16 +44,20 @@ importers: '@jiaminghi/c-render': ^0.4.3 '@jiaminghi/charts': ^0.2.18 '@jiaminghi/fs': ^0.1.1 + '@types/lodash-es': ^4.17.6 '@vueuse/core': ^9.1.0 less: ^4.1.3 + lodash-es: ^4.17.21 vite-plugin-dts: ^1.2.0 vite-plugin-libcss: ^1.0.5 dependencies: '@jiaminghi/c-render': 0.4.3 '@jiaminghi/charts': 0.2.18 '@vueuse/core': 9.1.0 + lodash-es: 4.17.21 devDependencies: '@jiaminghi/fs': 0.1.1 + '@types/lodash-es': 4.17.6 less: 4.1.3 vite-plugin-dts: 1.2.0 vite-plugin-libcss: 1.0.5 @@ -872,6 +876,16 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/lodash-es/4.17.6: + resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==} + dependencies: + '@types/lodash': 4.14.185 + dev: true + + /@types/lodash/4.14.185: + resolution: {integrity: sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==} + dev: true + /@types/mdast/3.0.10: resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} dependencies: @@ -3463,6 +3477,10 @@ packages: p-locate: 5.0.0 dev: true + /lodash-es/4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + dev: false + /lodash.get/4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true -- Gitee