Skip to content

Commit

Permalink
Chore: 升级依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
毛瑞 committed Jun 28, 2020
1 parent 3ad7a53 commit dcec7bb
Show file tree
Hide file tree
Showing 4 changed files with 1,451 additions and 1,468 deletions.
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
20 changes: 10 additions & 10 deletions src/components/hoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Component>} components 组件字典
Expand All @@ -33,7 +33,7 @@ const filterByIS: filter = context => context.props.is || context.data.attrs?.is
*/
function getChooser(
components?: IObject<Component>,
filter: filter = filterByIS
filter: filter = filterByBe
): Component {
return {
functional: true,
Expand All @@ -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<Component>
filter?: filter
}
Expand Down Expand Up @@ -213,7 +213,7 @@ function getAsync(
<template>
<Transition name="fade">
<KeepAlive>
<Chooser :is="is" :type="type"/>
<Chooser :be="be" :type="type"/>
</KeepAlive>
</Transition>
</template>
Expand All @@ -236,7 +236,7 @@ const Chooser = getChooser({
@Component({ components: { Chooser } })
export default class extends Vue {
get is() {
get be() {
return 'B'
}
get type() {
Expand Down Expand Up @@ -266,7 +266,7 @@ export default class extends Vue {}
<template>
<Transition name="fade">
<KeepAlive>
<Chooser :is="is"/>
<Chooser :be="be"/>
</KeepAlive>
</Transition>
</template>
Expand All @@ -279,7 +279,7 @@ const Chooser = getChooser({
@Component({ components: { Chooser } })
export default class extends Vue {
get is() {
get be() {
return 'A'
}
}
Expand All @@ -295,7 +295,7 @@ export default Chooser // 异步加载的时候必须是default
// SomeComponent.vue
<template>
<AsyncComponent :is="is"/>
<AsyncComponent :be="be"/>
</template>
<script lang="ts">
Expand All @@ -306,12 +306,12 @@ export default Chooser // 异步加载的时候必须是default
},
})
export default class extends Vue {
get is() {
get be() {
return 'A'
}
}
</script>
*/
// 更多...

export { Chooser as default, filterByIS as filter, getChooser, getAsync }
export { Chooser as default, filterByBe as filter, getChooser, getAsync }
2 changes: 1 addition & 1 deletion src/utils/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ interface Setter {
/** 本地存储 */
const STORAGE = window.localStorage
const ALIVE = 100 * 1000 // 防可能的内存溢出
const SEPARATOR = String.fromCharCode(0)
const SEPARATOR = String.fromCharCode(9) // 0及控制字符等 IE 有问题
const REG_TIMESPAN = new RegExp(`^(\\d+)${SEPARATOR}([\\d\\D]+)$`)
let CACHE: IObject<{ k?: number; v?: any; e?: number | null } | 0> = {}
/** 本地存储 (localStorage 单例)
Expand Down
Loading

0 comments on commit dcec7bb

Please sign in to comment.