From dcec7bb65217553966f556222f0a04b65a67fecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AF=9B=E7=91=9E?= Date: Sun, 28 Jun 2020 14:11:22 +0800 Subject: [PATCH] =?UTF-8?q?Chore:=20=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 44 +- src/components/hoc.ts | 20 +- src/utils/storage.ts | 2 +- yarn.lock | 2853 ++++++++++++++++++++--------------------- 4 files changed, 1451 insertions(+), 1468 deletions(-) diff --git a/package.json b/package.json index c40f8df..8976849 100644 --- a/package.json +++ b/package.json @@ -24,16 +24,16 @@ "luma.gl": "^7.3.2", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", - "pixi.js": "^5.2.4", - "pixi.js-legacy": "^5.2.4", + "pixi.js": "^5.3.0", + "pixi.js-legacy": "^5.3.0", "register-service-worker": "^1.7.1", "screenfull": "^5.0.2", - "three": "^0.117.1", + "three": "^0.118.3", "tinymce": "^5.3.2", "vue": "^2.6.11", "vue-class-component": "^7.2.3", - "vue-property-decorator": "^8.4.2", - "vue-router": "^3.3.2", + "vue-property-decorator": "^9.0.0", + "vue-router": "^3.3.4", "vuex": "^3.4.0", "vuex-class": "^0.3.2", "vuex-module-decorators": "^0.17.0", @@ -47,42 +47,42 @@ "@babel/plugin-proposal-private-methods": "^7.10.1", "@types/crypto-js": "3.1.47", "@types/d3": "^5.7.2", - "@types/echarts": "^4.6.1", - "@types/jest": "^26.0.0", + "@types/echarts": "^4.6.3", + "@types/jest": "^26.0.3", "@typescript-eslint/eslint-plugin": "^2.34.0", "@typescript-eslint/parser": "^2.34.0", - "@vue/cli-plugin-babel": "^4.4.1", - "@vue/cli-plugin-e2e-cypress": "^4.4.1", - "@vue/cli-plugin-eslint": "^4.4.1", - "@vue/cli-plugin-pwa": "^4.4.1", - "@vue/cli-plugin-router": "^4.4.1", - "@vue/cli-plugin-typescript": "^4.4.1", - "@vue/cli-plugin-unit-jest": "^4.4.1", - "@vue/cli-plugin-vuex": "^4.4.1", - "@vue/cli-service": "^4.4.1", + "@vue/cli-plugin-babel": "^4.4.6", + "@vue/cli-plugin-e2e-cypress": "^4.4.6", + "@vue/cli-plugin-eslint": "^4.4.6", + "@vue/cli-plugin-pwa": "^4.4.6", + "@vue/cli-plugin-router": "^4.4.6", + "@vue/cli-plugin-typescript": "^4.4.6", + "@vue/cli-plugin-unit-jest": "^4.4.6", + "@vue/cli-plugin-vuex": "^4.4.6", + "@vue/cli-service": "^4.4.6", "@vue/eslint-config-standard": "^5.1.2", "@vue/eslint-config-typescript": "^5.0.2", "@vue/test-utils": "^1.0.3", "alternate-css-extract-plugin": "^0.9.4", "compression-webpack-plugin": "^4.0.0", - "eslint": "^7.2.0", - "eslint-plugin-import": "^2.21.2", + "eslint": "^7.3.1", + "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "eslint-plugin-vue": "^6.2.2", "fibers": "^5.0.0", "hard-source-webpack-plugin": "^0.13.1", - "lint-staged": "^10.2.9", + "lint-staged": "^10.2.11", "postcss-preset-env": "^6.7.0", "regenerate": "^1.4.1", "regjsgen": "^0.5.2", "regjsparser": "^0.6.4", - "sass": "^1.26.8", + "sass": "^1.26.9", "sass-loader": "^8.0.2", - "stylelint": "^13.6.0", + "stylelint": "^13.6.1", "stylelint-config-scss-maorey": "^1.1.1", - "stylelint-webpack-plugin": "^2.0.0", + "stylelint-webpack-plugin": "^2.1.0", "typescript": "^3.9.5", "unicode-match-property-ecmascript": "^1.0.4", "unicode-match-property-value-ecmascript": "^1.2.0", diff --git a/src/components/hoc.ts b/src/components/hoc.ts index 0be060b..54f5986 100644 --- a/src/components/hoc.ts +++ b/src/components/hoc.ts @@ -23,7 +23,7 @@ export type filter = ( ) => string | Component | void /** 根据is属性选择组件 */ -const filterByIS: filter = context => context.props.is || context.data.attrs?.is +const filterByBe: filter = context => context.props.be || context.data.attrs?.be /** 获取选择器(函数式组件) * @param {IObject} components 组件字典 @@ -33,7 +33,7 @@ const filterByIS: filter = context => context.props.is || context.data.attrs?.is */ function getChooser( components?: IObject, - filter: filter = filterByIS + filter: filter = filterByBe ): Component { return { functional: true, @@ -53,7 +53,7 @@ function getChooser( const Chooser: Component = { functional: true, render(h, context) { - const { components, filter = filterByIS } = context.props as { + const { components, filter = filterByBe } = context.props as { components?: IObject filter?: filter } @@ -213,7 +213,7 @@ function getAsync( @@ -236,7 +236,7 @@ const Chooser = getChooser({ @Component({ components: { Chooser } }) export default class extends Vue { - get is() { + get be() { return 'B' } get type() { @@ -266,7 +266,7 @@ export default class extends Vue {} @@ -279,7 +279,7 @@ const Chooser = getChooser({ @Component({ components: { Chooser } }) export default class extends Vue { - get is() { + get be() { return 'A' } } @@ -295,7 +295,7 @@ export default Chooser // 异步加载的时候必须是default // SomeComponent.vue