Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Five-菜鸟级
echarts
提交
1785081e
E
echarts
项目概览
Five-菜鸟级
/
echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1785081e
编写于
5月 07, 2020
作者:
1
100pah
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: clarify comments.
上级
95e9b271
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
25 deletion
+45
-25
src/model/Component.ts
src/model/Component.ts
+9
-5
src/model/Model.ts
src/model/Model.ts
+9
-5
src/model/Series.ts
src/model/Series.ts
+9
-5
src/view/Chart.ts
src/view/Chart.ts
+9
-5
src/view/Component.ts
src/view/Component.ts
+9
-5
未找到文件。
src/model/Component.ts
浏览文件 @
1785081e
...
...
@@ -47,11 +47,15 @@ const inner = makeInner<{
class
ComponentModel
<
Opt
extends
ComponentOption
=
ComponentOption
>
extends
Model
<
Opt
>
{
// [Caution]: for compat the previous "class extend"
// publich and protected fields must be initialized on
// prototype rather than in constructor. Otherwise the
// subclass overrided filed will be overwritten by this
// class. That is, they should not be initialized here.
// [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`,
// the class members must not be initialized in constructor or declaration place.
// Otherwise there is bad case:
// class A {xxx = 1;}
// enableClassExtend(A);
// class B extends A {}
// var C = B.extend({xxx: 5});
// var c = new C();
// console.log(c.xxx); // expect 5 but always 1.
/**
* @readonly
...
...
src/model/Model.ts
浏览文件 @
1785081e
...
...
@@ -46,11 +46,15 @@ type Value<Opt, R> = Opt extends Dictionary<any>
class
Model
<
Opt
extends
ModelOption
=
ModelOption
>
{
// TODO: TYPE use unkown insteadof any?
// [Caution]: for compat the previous "class extend"
// publich and protected fields must be initialized on
// prototype rather than in constructor. Otherwise the
// subclass overrided filed will be overwritten by this
// class. That is, they should not be initialized here.
// [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`,
// the class members must not be initialized in constructor or declaration place.
// Otherwise there is bad case:
// class A {xxx = 1;}
// enableClassExtend(A);
// class B extends A {}
// var C = B.extend({xxx: 5});
// var c = new C();
// console.log(c.xxx); // expect 5 but always 1.
/**
* @readOnly
...
...
src/model/Series.ts
浏览文件 @
1785081e
...
...
@@ -109,11 +109,15 @@ interface SeriesModel {
class
SeriesModel
<
Opt
extends
SeriesOption
=
SeriesOption
>
extends
ComponentModel
<
Opt
>
{
// [Caution]: for compat the previous "class extend"
// publich and protected fields must be initialized on
// prototype rather than in constructor. Otherwise the
// subclass overrided filed will be overwritten by this
// class. That is, they should not be initialized here.
// [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`,
// the class members must not be initialized in constructor or declaration place.
// Otherwise there is bad case:
// class A {xxx = 1;}
// enableClassExtend(A);
// class B extends A {}
// var C = B.extend({xxx: 5});
// var c = new C();
// console.log(c.xxx); // expect 5 but always 1.
// @readonly
type
:
string
;
...
...
src/view/Chart.ts
浏览文件 @
1785081e
...
...
@@ -95,11 +95,15 @@ interface ChartView {
}
class
ChartView
{
// [Caution]: for compat the previous "class extend"
// publich and protected fields must be initialized on
// prototype rather than in constructor. Otherwise the
// subclass overrided filed will be overwritten by this
// class. That is, they should not be initialized here.
// [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`,
// the class members must not be initialized in constructor or declaration place.
// Otherwise there is bad case:
// class A {xxx = 1;}
// enableClassExtend(A);
// class B extends A {}
// var C = B.extend({xxx: 5});
// var c = new C();
// console.log(c.xxx); // expect 5 but always 1.
// @readonly
type
:
string
;
...
...
src/view/Component.ts
浏览文件 @
1785081e
...
...
@@ -45,11 +45,15 @@ interface ComponentView {
class
ComponentView
{
// [Caution]: for compat the previous "class extend"
// publich and protected fields must be initialized on
// prototype rather than in constructor. Otherwise the
// subclass overrided filed will be overwritten by this
// class. That is, they should not be initialized here.
// [Caution]: Becuase this class or desecendants can be used as `XXX.extend(subProto)`,
// the class members must not be initialized in constructor or declaration place.
// Otherwise there is bad case:
// class A {xxx = 1;}
// enableClassExtend(A);
// class B extends A {}
// var C = B.extend({xxx: 5});
// var c = new C();
// console.log(c.xxx); // expect 5 but always 1.
readonly
group
:
ViewRootGroup
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录