Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kus-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
kus-admin
Commits
221fb797
Commit
221fb797
authored
Jan 26, 2020
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experimental prop. for back compat until wip
parent
49ca24e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Store.js
src/core/data/store/Store.js
+11
-0
No files found.
src/core/data/store/Store.js
View file @
221fb797
...
...
@@ -9,6 +9,7 @@ const Store = function(cfg) {
};
Store
.
prototype
=
{
experimental
:
false
,
_set
:
function
(
keys
,
val
,
pointer
,
path
){
let
i
,
_i
;
let
key
=
keys
[
path
.
length
];
...
...
@@ -25,6 +26,13 @@ Store.prototype = {
}
},
set
:
function
(
key
,
val
)
{
if
(
!
this
.
experimental
)
if
(
this
.
_props
[
key
]
!==
val
){
this
.
_props
[
key
]
=
val
;
this
.
fire
(
'change'
,
key
,
val
);
this
.
fire
(
key
,
val
);
}
return
this
.
_set
(
typeof
key
===
'string'
?
key
.
split
(
'.'
)
:
key
,
val
,
...
...
@@ -33,6 +41,9 @@ Store.prototype = {
);
},
get
:
function
(
key
,
returnLastStore
)
{
if
(
!
this
.
experimental
)
return
this
.
_props
[
key
];
key
=
typeof
key
===
'string'
?
key
.
split
(
'.'
)
:
key
;
let
ref
=
this
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment