Browse Source

update

pull/7/head
zsmj 2 years ago
parent
commit
20c922d2be
  1. 20
      .editorconfig
  2. 5
      .eslintignore
  3. 200
      .eslintrc
  4. 2
      .gitignore
  5. 2
      .npmrc
  6. 5
      .prettierignore
  7. 5
      .prettierrc
  8. 5
      .stylelintignore
  9. 7
      .stylelintrc
  10. 121
      Gruntfile.js
  11. 66
      README.md
  12. 24
      advance.html
  13. BIN
      assets/images/1x/logo.png
  14. BIN
      assets/images/2x/logo.png
  15. 1
      babel.config.js
  16. 36
      dist/bundle.css
  17. 286
      dist/bundle.js
  18. BIN
      dist/font/iconfont.eot
  19. 1002
      dist/font/iconfont.svg
  20. BIN
      dist/font/iconfont.ttf
  21. BIN
      dist/font/iconfont.woff
  22. BIN
      dist/images/1x/background/auto_color.png
  23. BIN
      dist/images/1x/background/line_conn.gif
  24. BIN
      dist/images/1x/background/marker.png
  25. BIN
      dist/images/1x/background/mask.png
  26. BIN
      dist/images/1x/background/trans_color.png
  27. BIN
      dist/images/1x/background/wheel.png
  28. BIN
      dist/images/1x/icon/check_box_active.png
  29. BIN
      dist/images/1x/icon/check_box_disable.png
  30. BIN
      dist/images/1x/icon/check_box_disable2.png
  31. BIN
      dist/images/1x/icon/check_box_normal.png
  32. BIN
      dist/images/1x/icon/dark/tree_collapse_1.png
  33. BIN
      dist/images/1x/icon/dark/tree_collapse_2.png
  34. BIN
      dist/images/1x/icon/dark/tree_collapse_3.png
  35. BIN
      dist/images/1x/icon/dark/tree_collapse_4.png
  36. BIN
      dist/images/1x/icon/dark/tree_expand_1.png
  37. BIN
      dist/images/1x/icon/dark/tree_expand_2.png
  38. BIN
      dist/images/1x/icon/dark/tree_expand_3.png
  39. BIN
      dist/images/1x/icon/dark/tree_expand_4.png
  40. BIN
      dist/images/1x/icon/dark/tree_vertical_line_1.png
  41. BIN
      dist/images/1x/icon/dark/tree_vertical_line_2.png
  42. BIN
      dist/images/1x/icon/dark/tree_vertical_line_3.png
  43. BIN
      dist/images/1x/icon/dark/tree_vertical_line_4.png
  44. BIN
      dist/images/1x/icon/dark/tree_vertical_line_5.png
  45. BIN
      dist/images/1x/icon/dots.png
  46. BIN
      dist/images/1x/icon/half_selected.png
  47. BIN
      dist/images/1x/icon/icon_down_arrow.png
  48. BIN
      dist/images/1x/icon/loading.gif
  49. BIN
      dist/images/1x/icon/push_down.png
  50. BIN
      dist/images/1x/icon/push_up.png
  51. BIN
      dist/images/1x/icon/radio_active.png
  52. BIN
      dist/images/1x/icon/radio_disable.png
  53. BIN
      dist/images/1x/icon/radio_disable2.png
  54. BIN
      dist/images/1x/icon/radio_normal.png
  55. BIN
      dist/images/1x/icon/slider_active.png
  56. BIN
      dist/images/1x/icon/slider_active_small.png
  57. BIN
      dist/images/1x/icon/slider_normal.png
  58. BIN
      dist/images/1x/icon/slider_normal_small.png
  59. BIN
      dist/images/1x/icon/tree_collapse_1.png
  60. BIN
      dist/images/1x/icon/tree_collapse_2.png
  61. BIN
      dist/images/1x/icon/tree_collapse_3.png
  62. BIN
      dist/images/1x/icon/tree_collapse_4.png
  63. BIN
      dist/images/1x/icon/tree_expand_1.png
  64. BIN
      dist/images/1x/icon/tree_expand_2.png
  65. BIN
      dist/images/1x/icon/tree_expand_3.png
  66. BIN
      dist/images/1x/icon/tree_expand_4.png
  67. BIN
      dist/images/1x/icon/tree_vertical_line_1.png
  68. BIN
      dist/images/1x/icon/tree_vertical_line_2.png
  69. BIN
      dist/images/1x/icon/tree_vertical_line_3.png
  70. BIN
      dist/images/1x/icon/tree_vertical_line_4.png
  71. BIN
      dist/images/1x/icon/tree_vertical_line_5.png
  72. BIN
      dist/images/2x/background/auto_color.png
  73. BIN
      dist/images/2x/background/line_conn.gif
  74. BIN
      dist/images/2x/background/marker.png
  75. BIN
      dist/images/2x/background/mask.png
  76. BIN
      dist/images/2x/background/trans_color.png
  77. BIN
      dist/images/2x/background/wheel.png
  78. BIN
      dist/images/2x/icon/check_box_active.png
  79. BIN
      dist/images/2x/icon/check_box_disable.png
  80. BIN
      dist/images/2x/icon/check_box_disable2.png
  81. BIN
      dist/images/2x/icon/check_box_normal.png
  82. BIN
      dist/images/2x/icon/dark/tree_collapse_1.png
  83. BIN
      dist/images/2x/icon/dark/tree_collapse_2.png
  84. BIN
      dist/images/2x/icon/dark/tree_collapse_3.png
  85. BIN
      dist/images/2x/icon/dark/tree_collapse_4.png
  86. BIN
      dist/images/2x/icon/dark/tree_expand_1.png
  87. BIN
      dist/images/2x/icon/dark/tree_expand_2.png
  88. BIN
      dist/images/2x/icon/dark/tree_expand_3.png
  89. BIN
      dist/images/2x/icon/dark/tree_expand_4.png
  90. BIN
      dist/images/2x/icon/dark/tree_vertical_line_1.png
  91. BIN
      dist/images/2x/icon/dark/tree_vertical_line_2.png
  92. BIN
      dist/images/2x/icon/dark/tree_vertical_line_3.png
  93. BIN
      dist/images/2x/icon/dark/tree_vertical_line_4.png
  94. BIN
      dist/images/2x/icon/dark/tree_vertical_line_5.png
  95. BIN
      dist/images/2x/icon/dots.png
  96. BIN
      dist/images/2x/icon/half_selected.png
  97. BIN
      dist/images/2x/icon/icon_down_arrow.png
  98. BIN
      dist/images/2x/icon/loading.gif
  99. BIN
      dist/images/2x/icon/push_down.png
  100. BIN
      dist/images/2x/icon/push_up.png
  101. Some files were not shown because too many files have changed in this diff Show More

20
.editorconfig

@ -0,0 +1,20 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{js,ts,jsx,tsx}]
indent_size = 4
[*.{less,html,ejs}]
indent_size = 2
[*.json]
indent_size = 2
[tsconfig.json]
indent_size = 4

5
.eslintignore

@ -0,0 +1,5 @@
types
node_modules
dist
assets
docs

200
.eslintrc

@ -1,171 +1,47 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"node": true,
"es6": true,
"jest/globals": true
},
"plugins": ["jest", "react"],
"extends": ["plugin:@fui/typescript", "plugin:@fui/prettier"],
"parserOptions": {
"ecmaFeatures": {
"legacyDecorators": true,
"jsx": true
}
},
"rules": {
// 声明
"no-use-before-define": "error",
//禁止定义前使用
// 对象
"no-dupe-keys": "error",
// 禁止在对象字面量中出现重复的键
"quote-props": [
// 由于prettier和eslint一起使用需要关闭一些规则,但是prettier没有以下规则的配置,统一写在这里
// 对象字面量简写语法
"object-shorthand": ["error", "always"],
// 函数体在必要的时候使用大括号
"arrow-body-style": [
"error",
"as-needed"
],
// 对象属性只在需要的时候加引号
// 字符串
"quotes": [
"error",
"double",
"as-needed",
{
"allowTemplateLiterals": true
"requireReturnForObjectLiteral": true
}
],
// 字符串开头和结束使用双引号
"no-useless-concat": "error",
// 禁止没有必要的字符拼接
"no-useless-escape": "error",
// 禁用不必要的转义
// 函数
"no-dupe-args": "error",
// 禁止在 function 定义中出现重复的参数
"space-before-function-paren": "error",
// 函数括号前必须要有空格
// 变量
"no-undef": "error",
// 禁止使用未声明的变量
// 比较运算符 & 相等运算符
"eqeqeq": "error",
// 使用 === 和 !== 代替 == 和 !=
"no-unneeded-ternary": "error",
//禁止可以在有更简单的可替代的表达式时使用三元操作符
// 条件
"default-case": "error",
// 要求 Switch 语句中有 Default 分支
"no-else-return": "error",
// 回调使用用箭头函数
"prefer-arrow-callback": "error",
// 如果 if 块中包含了一个 return 语句,else 块就成了多余的了。可以将其内容移至块外
"no-else-return": "error",
"no-use-before-define": "off",
// 代码块
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
// 代码块左括号紧跟上一行结束
"curly": [
"error",
"multi-line"
],
// if、else if、else、for、while强制使用大括号,但允许在单行中省略大括号
// 注释
"spaced-comment": "error",
// 注释前有空格
// 空白
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
// 缩进控制4空格
"no-mixed-spaces-and-tabs": "error",
// 禁止使用 空格 和 tab 混合缩进
"space-before-blocks": [
"error",
"always"
],
// 语句块之前的需要有空格
"space-infix-ops": [
"error",
{
"int32Hint": false
}
],
// 要求中缀操作符周围有空格,设置 int32Hint 选项为 true (默认 false) 允许 a|0 不带空格
"no-trailing-spaces": [
"error",
{
"skipBlankLines": true
}
],
// 禁用行尾空格
"key-spacing": [
"error",
{
"afterColon": true
}
],
// 要求在对象字面量的冒号和值之间存在至少有一个空格
// 逗号
"comma-style": "error",
// 逗号必须放在行末
"comma-dangle": [
"error",
"never"
],
// 多行对象字面量中要求不要拖尾逗号
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
//在变量声明、数组字面量、对象字面量、函数参数 和 序列中禁止在逗号前使用空格,要求在逗号后使用一个或多个空格
// 分号
"semi": "error",
//不得省略语句结束的分号
"semi-spacing": [
"error",
{
"before": false,
"after": true
}
],
//禁止分号周围的空格
"no-extra-semi": "error",
// 禁用不必要的分号
// 类型转换
"no-extra-boolean-cast": "error",
// 禁止不必要的布尔类型转换
// 其他最佳实践或规范
"no-unexpected-multiline": "error",
// 禁止使用令人困惑的多行表达式
"no-unreachable": "error",
// 禁止在 return、throw、continue 和 break 语句后出现不可达代码
"valid-typeof": "error",
// 强制 typeof 表达式与有效的字符串进行比较
"no-new-wrappers": "error"
// 禁止通过 new 操作符使用 String、Number 和 Boolean
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error"
},
"globals": {
"window": true,
"BI": true,
"BICst": true,
"Data": true,
"Fix": true,
"module": true,
"describe": true,
"it": true,
"expect": true,
"Dec": true
}
}
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off",
"no-unused-vars": "off"
}
}
]
}

2
.gitignore vendored

@ -47,5 +47,7 @@ crashlytics.properties
crashlytics-build.properties
/node_modules/
/dist
package-lock.json
yarn.lock

2
.npmrc

@ -0,0 +1,2 @@
registry=https://registry.npm.taobao.org
@fui:registry=https://npm.fineres.com/

5
.prettierignore

@ -0,0 +1,5 @@
types
node_modules
dist
assets
docs

5
.prettierrc

@ -0,0 +1,5 @@
{
"singleQuote": true,
"arrowParens": "avoid",
"printWidth": 160
}

5
.stylelintignore

@ -0,0 +1,5 @@
types
node_modules
dist
assets
docs

7
.stylelintrc

@ -0,0 +1,7 @@
{
"extends": ["stylelint-config-standard", "stylelint-prettier/recommended"],
"rules": {
"no-descending-specificity": null,
"selector-pseudo-element-colon-notation": "single"
}
}

121
Gruntfile.js

@ -1,121 +0,0 @@
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
concat: {
options: {
separator: ""
},
bundleJs: {
src: [
"src/modules/**/*.js",
"src/index.js"
],
dest: "dist/bundle.js"
},
bundleCss: {
src: ["src/css/**/*.css"],
dest: "dist/bundle.css"
}
},
less: {
main: {
expand: true,
cwd: "src/modules",
src: ["**/*.less"],
dest: "src/css/",
ext: ".css"
},
dev: {
options: {
compress: true,
yuicompress: false
}
}
},
uglify: {
options: {
banner:
"/*! <%= pkg.name %> <%= grunt.template.today(\"dd-mm-yyyy\") %> */\n"
},
dist: {
files: {
"dist/bundle.min.js": ["<%= concat.bundleJs.dest %>"]
}
}
},
cssmin: {
bundleCss: {
src: "<%= concat.bundleCss.dest %>",
dest: "dist/bundle.min.css"
}
},
jshint: {
files: ["src/**/*.js"],
options: {
globals: {
$: true,
jQuery: true,
console: true,
module: true,
document: true
},
browser: true,
expr: true
}
},
watch: {
scripts: {
files: ["src/**/*.js", "src/**/*.less"],
tasks: ["less", "concat"],
options: {
spanw: true,
interrupt: true
}
},
livereload: {
options: {
livereload: "<%= connect.options.livereload %>"
},
files: ["src/**/*.js", "src/**/*.less"]
}
},
connect: {
options: {
port: 9000,
open: true,
livereload: 35799,
// Change this to '0.0.0.0' to access the server from outside
hostname: "localhost"
},
server: {
options: {
port: 9009,
base: "./"
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.registerTask("default", [
"jshint",
"less",
"concat",
"connect",
"watch"
]);
grunt.registerTask("min", ["less", "concat", "uglify", "cssmin"]);
};

66
README.md

@ -1,11 +1,63 @@
# FineUI-Start
# README
## 安装运行
`git clone --recursive https://git.fanruan.com/dailer/FineUI-Start.git`
## 准备工作
`npm install`
### 克隆仓库
`npm run grunt`
```shell
git clone https://code.fineres.com/scm/fui/fineui-starter.git
```
## 示例效果
![](./screenshorts/todolist.gif)
### 安装依赖
```shell
# 账户:public
# 密码:fr123456
# 邮箱:任意
npm adduser --registry https://npm.fineres.com
npm install
```
### 安装扩展
以 VSCode 为例,为保证代码规范和格式统一,请安装`ESLint`、`stylelint`、`Prettier`、`EditorConfig`扩展,以使相关配置文件生效。
## 开发工作
### 项目基础配置
布局配置请见`src/modules/app/layout/layout.constant.ts`。
样式配置请见`src/less/`,譬如`src/less/lib/constant`中的`@color-app-primary`表示项目的主色。
### 项目调试、打包与测试
```shell
# 调试
npm run start
# 打包
npm run build
# 测试
npm run test
```
### 项目规范和格式检查
```shell
# 代码规范
npm run eslint
npm run eslint:fix
# 样式规范
npm run stylelint
npm run stylelint:fix
# 代码格式
npm run prettier
```
## 效果预览
![页面截图](./screenshots/demo.jpeg)

24
advance.html

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<!--核心css文件,自带font、图片等,使用的是fineui资源-->
<link rel="stylesheet" type="text/css" href="node_modules/fineui/dist/core.css" />
<!-- 下面是不包含normalize.css的css -->
<!-- <link rel="stylesheet" type="text/css" href="node_modules/fineui/dist/2.0/fineui_without_normalize.css" /> -->
<!-- 这里定义的是本地资源路径,如有需要修改可以复制出来替换其中路径,并在此处加载替换后的css -->
<link rel="stylesheet" type="text/css" href="node_modules/fineui/dist/resource.css" />
<!--个人代码样式-->
<link rel="stylesheet" type="text/css" href="./dist/bundle.css"/>
</head>
<body>
<div id="wrapper"></div>
<!--核心js-->
<script src="node_modules/fineui/dist/core.js"></script>
<!-- 这里定义的是本地一些配置项,比如国际化,如有需要修改可以复制出来替换其中配置,并在此处加载替换后的js -->
<script src="node_modules/fineui/dist/resource.js"></script>
<!--个人代码js-->
<script src="./dist/bundle.js"></script>
</body>
</html>

BIN
assets/images/1x/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/images/2x/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

1
babel.config.js

@ -0,0 +1 @@
module.exports = require('@fui/babel-preset-fineui').configs.base;

36
dist/bundle.css vendored

@ -1,36 +0,0 @@
/**
列表项的less,其中用到了部分FineUI提供的字号,颜色常量,还有border-radius,box-shadow方法等.请选择性使用.不强制要求
*/
.my-todolist-header {
background-color: #3d4d66;
}
.my-todolist-header .my-todolist-title {
font-size: 22px;
color: #FFF;
}
.my-todolist-header .my-todolist-header-editor {
background-color: #FFF;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/**
列表项的less,其中用到了部分FineUI提供的字号,颜色常量,还有border-radius方法等.请选择性使用.不强制要求
*/
.my-todolist-list .my-todolist-list-text {
font-size: 16px;
font-weight: bold;
}
.my-todolist-list .my-todolist-list-count-container {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
background-color: #3d4d66;
color: #ffffff;
}
/**
列表项的less,其中用到了部分FineUI提供的字号,颜色常量,还有border-radius,box-shadow方法等.请选择性使用.不强制要求
*/
.my-todolist-background {
background-color: #f7f8fa;
}

286
dist/bundle.js vendored

@ -1,286 +0,0 @@
!(function() {
/**
* 顶部组件,提供输入框添加todo项目
* 布局: bi.horizontal_auto 实现水平居中. bi.left_right_vertical_adapt 实现标题是输入框的靠左靠右垂直居中
*/
var ToDoListHeader = BI.inherit(BI.Widget, {
props: {
// 指定组件的className
baseCls: "my-todolist-header"
},
render: function() {
var self = this, o = this.options;
return {
type: "bi.horizontal_auto", // 水平居中布局
items: [
{
el: {
type: "bi.left_right_vertical_adapt", // 左右垂直居中布局
width: 600,
height: o.height,
items: {
left: [
{
el: {
type: "bi.label",
cls: "my-todolist-title",
text: "FineUI ToDoList",
height: o.height
}
}
],
right: [
{
el: {
type: "bi.editor",
ref: function(_ref) {
self.editor = _ref;
},
allowBlank: true,
cls: "my-todolist-header-editor",
watermark: "添加ToDo",
width: 300,
height: 24,
listeners: [
{ // 监听bi.editor 组件的"EVENT_ENTER"事件(即敲回车),触发事件ToDoListHeader.EVENT_ADD事件并将输入框值置空
eventName: "EVENT_ENTER",
action: function() {
// 注意:在这里this指向的是bi.editor的实例.通过bi.editor的getValue()方法获取输入框输入值.
self.fireEvent(ToDoListHeader.EVENT_ADD, this.getValue());
self.editor.setValue("");
}
}
]
}
}
]
}
}
}
]
};
}
});
ToDoListHeader.EVENT_ADD = "EVENT_ADD";
BI.shortcut("my.todolist.header", ToDoListHeader);
})();!(function() {
/**
* todo项列表
*
*/
var List = BI.inherit(BI.Widget, {
props: {
// 指定组件的className
baseCls: "my-todolist-list",
text: "正在进行"
},
render: function() {
var self = this, o = this.options;
return {
type: "bi.vertical",
items: [
{
el: {
type: "bi.vertical_adapt",
height: 40,
items: [
{
type: "bi.label",
cls: "my-todolist-list-text",
textAlign: "left",
text: o.text,
width: 580
}, {
type: "bi.center_adapt",
cls: "my-todolist-list-count-container",
width: 20,
height: 20,
items: [
{
el: {
type: "bi.label",
ref: function(_ref) {
self.count = _ref;
},
text: "0"
}
}
]
}
]
}
}, { // 用bi.vertical布局作为列表项的容器.
type: "bi.vertical",
vgap: 10,
ref: function(_ref) {
self.list = _ref;
},
items: this._createItems(o.items)
}
]
};
},
_createItems: function(items) {
var self = this;
return BI.map(items, function(index, item) {
return BI.extend(item, {
type: "bi.multi_select_item", // 节点采用复选节点展示
selected: item.done, // 已完成的todo项置为选中状态
disabled: item.done, // 已完成的todo项置为灰化状态
listeners: [
{ // 为每个todo项添加"EVENT_CHANGE"事件监听,触发组件自身"EVENT_CHANGE"事件
eventName: "EVENT_CHANGE",
action: function(v) {
self.fireEvent("EVENT_CHANGE", v);
}
}
]
});
});
},
_setCount: function(count) {
this.count.setText(count);
},
populate: function(items) {
this.list.populate(this._createItems(items));
this._setCount(items.length);
}
});
BI.shortcut("my.todolist.list", List);
})();!(function() {
/**
* todolist 组件
*/
var ToDoList = BI.inherit(BI.Widget, {
props: {
baseCls: "fine-to-do-list"
},
// 生命周期函数,在组件创建前
beforeCreate: function() {
// 初始化存储数据
this.list = localStorage.getItem("fine-todolist") ? JSON.parse(localStorage.getItem("fine-todolist")) : [];
},
render: function() {
var self = this, o = this.options;
return {
type: "bi.vtape", // vtape布局,顶部高度固定,下部分列表占满高度
items: [
{
el: {
type: "my.todolist.header", // 顶部组件
listeners: [
{ // 监听组件的EVENT_ADD事件,新建todo项
eventName: "EVENT_ADD",
action: function(v) {
self.addToDo(v);
}
}
],
height: 40
},
height: 40
}, {
type: "bi.horizontal_auto", // 水平居中布局
cls: "my-todolist-background", // 添加className
items: [
{
el: {
type: "my.todolist.list", // need todo项列表
ref: function(_ref) {
self.todolist = _ref;
},
items: this._getNeedTodoList(),
text: "正在进行",
listeners: [
{ // 监听EVENT_CHANGE事件,完成某一项todo
eventName: "EVENT_CHANGE",
action: function(v) {
self.finishTodo(v);
}
}
],
width: 600
}
}, {
el: {
type: "my.todolist.list", // 已经完成的todo项列表
text: "已经完成",
items: this._getAlreadyDoneList(),
ref: function(_ref) {
self.donelist = _ref;
},
width: 600
}
}
]
}
]
};
},
_updateLocalStorage: function() {
localStorage.setItem("fine-todolist", JSON.stringify(this.list));
},
_getNeedTodoList: function() {
return BI.filter(this.list, function(index, item) {
return !item.done;
});
},
_getAlreadyDoneList: function() {
return BI.filter(this.list, function(index, item) {
return item.done;
});
},
/**
* 添加todo项
* @param text todo项的内容
*/
addToDo: function(text) {
this.list.push({
value: BI.UUID(),
text: text,
done: false
});
this.todolist.populate(this._getNeedTodoList());
this._updateLocalStorage();
},
/**
* 完成某一项todo
* @param v todo项的value
*/
finishTodo: function(v) {
BI.some(this.list, function(index, item) {
if (item.value === v) {
item.done = true;
}
});
this.todolist.populate(this._getNeedTodoList());
this.donelist.populate(this._getAlreadyDoneList());
this._updateLocalStorage();
}
});
BI.shortcut("my.todolist", ToDoList);
})();
!(function () {
// 将todolist组件挂载到#wrapper上.
BI.createWidget({
type: "my.todolist",
element: "#wrapper"
});
})();

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

1002
dist/font/iconfont.svg vendored

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 215 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/images/1x/background/auto_color.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 B

BIN
dist/images/1x/background/line_conn.gif vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 B

BIN
dist/images/1x/background/marker.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

BIN
dist/images/1x/background/mask.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
dist/images/1x/background/trans_color.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

BIN
dist/images/1x/background/wheel.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
dist/images/1x/icon/check_box_active.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

BIN
dist/images/1x/icon/check_box_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

BIN
dist/images/1x/icon/check_box_disable2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

BIN
dist/images/1x/icon/check_box_normal.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

BIN
dist/images/1x/icon/dark/tree_collapse_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

BIN
dist/images/1x/icon/dark/tree_collapse_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

BIN
dist/images/1x/icon/dark/tree_collapse_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

BIN
dist/images/1x/icon/dark/tree_collapse_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

BIN
dist/images/1x/icon/dark/tree_expand_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

BIN
dist/images/1x/icon/dark/tree_expand_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

BIN
dist/images/1x/icon/dark/tree_expand_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

BIN
dist/images/1x/icon/dark/tree_expand_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

BIN
dist/images/1x/icon/dark/tree_vertical_line_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

BIN
dist/images/1x/icon/dark/tree_vertical_line_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

BIN
dist/images/1x/icon/dark/tree_vertical_line_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

BIN
dist/images/1x/icon/dark/tree_vertical_line_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

BIN
dist/images/1x/icon/dark/tree_vertical_line_5.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

BIN
dist/images/1x/icon/dots.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
dist/images/1x/icon/half_selected.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
dist/images/1x/icon/icon_down_arrow.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

BIN
dist/images/1x/icon/loading.gif vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/images/1x/icon/push_down.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

BIN
dist/images/1x/icon/push_up.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

BIN
dist/images/1x/icon/radio_active.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

BIN
dist/images/1x/icon/radio_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

BIN
dist/images/1x/icon/radio_disable2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

BIN
dist/images/1x/icon/radio_normal.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

BIN
dist/images/1x/icon/slider_active.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

BIN
dist/images/1x/icon/slider_active_small.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

BIN
dist/images/1x/icon/slider_normal.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

BIN
dist/images/1x/icon/slider_normal_small.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

BIN
dist/images/1x/icon/tree_collapse_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

BIN
dist/images/1x/icon/tree_collapse_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

BIN
dist/images/1x/icon/tree_collapse_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

BIN
dist/images/1x/icon/tree_collapse_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

BIN
dist/images/1x/icon/tree_expand_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

BIN
dist/images/1x/icon/tree_expand_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

BIN
dist/images/1x/icon/tree_expand_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

BIN
dist/images/1x/icon/tree_expand_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

BIN
dist/images/1x/icon/tree_vertical_line_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

BIN
dist/images/1x/icon/tree_vertical_line_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

BIN
dist/images/1x/icon/tree_vertical_line_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

BIN
dist/images/1x/icon/tree_vertical_line_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

BIN
dist/images/1x/icon/tree_vertical_line_5.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

BIN
dist/images/2x/background/auto_color.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

BIN
dist/images/2x/background/line_conn.gif vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 B

BIN
dist/images/2x/background/marker.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

BIN
dist/images/2x/background/mask.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
dist/images/2x/background/trans_color.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

BIN
dist/images/2x/background/wheel.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
dist/images/2x/icon/check_box_active.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

BIN
dist/images/2x/icon/check_box_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

BIN
dist/images/2x/icon/check_box_disable2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

BIN
dist/images/2x/icon/check_box_normal.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

BIN
dist/images/2x/icon/dark/tree_collapse_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

BIN
dist/images/2x/icon/dark/tree_collapse_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

BIN
dist/images/2x/icon/dark/tree_collapse_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

BIN
dist/images/2x/icon/dark/tree_collapse_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

BIN
dist/images/2x/icon/dark/tree_expand_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

BIN
dist/images/2x/icon/dark/tree_expand_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

BIN
dist/images/2x/icon/dark/tree_expand_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

BIN
dist/images/2x/icon/dark/tree_expand_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

BIN
dist/images/2x/icon/dark/tree_vertical_line_1.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

BIN
dist/images/2x/icon/dark/tree_vertical_line_2.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

BIN
dist/images/2x/icon/dark/tree_vertical_line_3.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

BIN
dist/images/2x/icon/dark/tree_vertical_line_4.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

BIN
dist/images/2x/icon/dark/tree_vertical_line_5.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

BIN
dist/images/2x/icon/dots.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

BIN
dist/images/2x/icon/half_selected.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

BIN
dist/images/2x/icon/icon_down_arrow.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

BIN
dist/images/2x/icon/loading.gif vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/images/2x/icon/push_down.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

BIN
dist/images/2x/icon/push_up.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save