Skip to content

keep-alive.js from Vue#20

Open
pavel-ignatovich wants to merge 1 commit intomasterfrom
js_vue_keep_alive.js
Open

keep-alive.js from Vue#20
pavel-ignatovich wants to merge 1 commit intomasterfrom
js_vue_keep_alive.js

Conversation

@pavel-ignatovich
Copy link
Copy Markdown

@pavel-ignatovich pavel-ignatovich added Demonstration JS Files in JavaScript labels Jan 12, 2020
Copy link
Copy Markdown

@monocodus monocodus Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is autogenerated code-style review, new suggestions: 5

Comment thread keep-alive.js
max: [String, Number]
},

created () {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
created () {
created() {

This comment was generated with the following checker: FixMyJS

Comment thread keep-alive.js
this.keys = []
},

destroyed () {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
destroyed () {
destroyed() {

This comment was generated with the following checker: FixMyJS

Comment thread keep-alive.js
}
},

mounted () {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mounted () {
mounted() {

This comment was generated with the following checker: FixMyJS

Comment thread keep-alive.js
})
},

render () {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
render () {
render() {

This comment was generated with the following checker: FixMyJS

Comment thread keep-alive.js
cache[key] = vnode
keys.push(key)
// prune oldest entry
if (this.max && keys.length > parseInt(this.max)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this.max && keys.length > parseInt(this.max)) {
if (this.max && keys.length > parseInt(this.max, 10)) {

This comment was generated with the following checker: FixMyJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Demonstration JS Files in JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant