Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
D
default2
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yuri Bondarenko
default2
Commits
fd3d5ff7
Commit
fd3d5ff7
authored
Dec 05, 2018
by
Yuri Bondarenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8f88440b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
src/components/component/index.js
src/components/component/index.js
+48
-0
No files found.
src/components/component/index.js
0 → 100644
View file @
fd3d5ff7
/**
* Базовый компонент
*/
export
default
class
Component
{
/**
* Конструктор
*/
constructor
(
props
=
{}
){
/**
* Параметры компонента:
* scopeSelector - корневой селектор
* selectors - селекторы перерисовываемых данных
*/
this
.
props
=
{
scopeSelector
:
''
,
selectors
:
[]
};
// объединяем с переданными параметрами
Object
.
assign
(
this
.
props
,
props
);
// дефолтное состояние
this
.
state
=
{};
// отрисовываем
this
.
render
();
}
/**
* Установка состояния
*/
setState
(
state
=
{}
){
Object
.
assign
(
this
.
state
,
state
);
this
.
render
();
}
/**
* обновляем компонент
*/
render
(){
}
}
\ No newline at end of file
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