Skip to content

Commit

Permalink
feat: 0.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
theajack committed Nov 12, 2022
1 parent ba52198 commit 93b8376
Show file tree
Hide file tree
Showing 14 changed files with 242 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/eb-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
git add .
git commit -m "feat: Version ${{ steps.version.outputs.version }} Build"
npx lerna publish from-package --yes
npm run init:monorepo -- ${{ steps.version.outputs.version }}
npm run init:mono -- ${{ steps.version.outputs.version }}
git add .
git commit -m "feat: Version ${{ steps.version.outputs.version }} Publish"
git push origin master
Expand Down
2 changes: 1 addition & 1 deletion README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

### 🚀 [Alins](https://github.com/alinsjs/alins): `Al`l-`in`-j`s` web ui框架,无 jsx/template/vdom/css/html

**[English](https://github.com/alinsjs/alins/blob/master/README.md) | [文档](https://alinsjs.github.io/docs) | [更新日志](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [反馈错误/缺漏](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [留言板](https://theajack.github.io/message-board/?app=alins)**
**[English](https://github.com/alinsjs/alins/blob/master/README.md) | [文档](https://alinsjs.github.io/docs-cn) | [更新日志](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [反馈错误/缺漏](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [留言板](https://theajack.github.io/message-board/?app=alins)**

## 0 快速开始

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

**[中文](https://github.com/alinsjs/alins/blob/master/README.cn.md) | [Docs](https://alinsjs.github.io/docs) | [VersionLog](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [FeedBacl](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [MessageBoard](https://theajack.github.io/message-board/?app=alins)**

**Documentation is under development [alins/docs](https://github.com/alinsjs/docs)**

## 0 Quick Start

### 0.1 npm
Expand Down
2 changes: 0 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

**[中文](https://github.com/alinsjs/alins/blob/master/README.cn.md) | [Docs](https://alinsjs.github.io/docs) | [VersionLog](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [FeedBacl](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [MessageBoard](https://theajack.github.io/message-board/?app=alins)**

**Documentation is under development [alins/docs](https://github.com/alinsjs/docs)**

## 0 Quick Start

### 0.1 npm
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/controller/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface IShowController<K extends TControllerType = 'builder'> {
function setDisplay (children: DocumentFragment | HTMLElement | HTMLElement[], v: boolean) {
const s = v ? '' : 'none';
if (children instanceof DocumentFragment) {
children = [].slice.call(children);
children = [].slice.call(children.children);
}
children instanceof Array ?
children.forEach(item => {item.style.display = s;}) :
Expand Down
2 changes: 0 additions & 2 deletions packages/reactive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

**[中文](https://github.com/alinsjs/alins/blob/master/README.cn.md) | [Docs](https://alinsjs.github.io/docs) | [VersionLog](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [FeedBacl](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [MessageBoard](https://theajack.github.io/message-board/?app=alins)**

**Documentation is under development [alins/docs](https://github.com/alinsjs/docs)**

## 0 Quick Start

### 0.1 npm
Expand Down
2 changes: 0 additions & 2 deletions packages/style/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

**[中文](https://github.com/alinsjs/alins/blob/master/README.cn.md) | [Docs](https://alinsjs.github.io/docs) | [VersionLog](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [FeedBacl](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [MessageBoard](https://theajack.github.io/message-board/?app=alins)**

**Documentation is under development [alins/docs](https://github.com/alinsjs/docs)**

## 0 Quick Start

### 0.1 npm
Expand Down
2 changes: 0 additions & 2 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@

**[中文](https://github.com/alinsjs/alins/blob/master/README.cn.md) | [Docs](https://alinsjs.github.io/docs) | [VersionLog](https://github.com/alinsjs/alins/blob/master/helper/version.md) | [FeedBacl](https://github.com/alinsjs/alins/issues/new) | [Gitee](https://gitee.com/alinsjs/alins) | [MessageBoard](https://theajack.github.io/message-board/?app=alins)**

**Documentation is under development [alins/docs](https://github.com/alinsjs/docs)**

## 0 Quick Start

### 0.1 npm
Expand Down
34 changes: 7 additions & 27 deletions scripts/bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,16 @@
* @Date: 2022-11-05 12:19:34
* @Description: Coding something
* @LastEditors: chenzhongsheng
* @LastEditTime: 2022-11-12 13:51:02
* @LastEditTime: 2022-11-12 14:57:34
-->

fix: 对于arg传入函数出现的bug fix [done]
fix: object reactive subscrube [done]
fix: 数组重新赋值之后属性丢失,下标引用绑定丢失 [done]
input builder & moduelReturn 支持 mount [done]
feat: dom 支持直接使用 react数据作为textContent [done]
fix: comp和dom builder使用函数作为参数 [done]
## v0.0.12

fix: 修复 comp + show controller 初始渲染问题 [done]

fix: 对象赋不同的结构的值之后丢失

## v0.0.11
## TodoList

feat: comp 科里化 comp(Hello)() [done]
fix: 文本中 . [] # / 不显示 : / [] 字符串冲突问题 [done] 使用text方法
fix: alins-utils ts 声明文件问题 [done]
fix: subscribe return value; [done]
feat: atomStyle 新增 join 方法 [done]
fix: 事件声明 不起作用 [done]
feat: click.stop 简化写法 [done]
del: splitTwoPart 函数重复 [done]
fix: 修复兼容属性重复补全问题 [done]
feat: 1.声明提示优化 TType & {[prop: string]: any;} [done]
feat: 2. 通过重载支持string和枚举共存 [done]
fix: style 多数据绑定中绑定报错的问题 [done]
feat: model 支持通过识别 type=number来增加number修饰符 [done]
fix: 修复对象类型和computed组合使用时 闭包对象数值不更新问题 [done]

## v0.0.12 todo

for 大列表性能优化 考虑使用memo + shallowProxy
feat: for 大列表性能优化 考虑使用memo + shallowProxy
feat: 原子样式 组合样式 扩充
feat: 状态管理
223 changes: 112 additions & 111 deletions scripts/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,123 +5,124 @@
* @Date: 2022-07-11 17:17:54
* @Description: Coding something
*/
import './samples/computed-bug';
import './samples/bugs';
// import './samples/computed-bug';

import './samples/v0.0.11';
// import './samples/v0.0.11';

import {
mount, div, react, comp, button,
IReactItem, click, prop, css, style,
$, input, mounted, updated, created, removed, appended,
html, text
} from './alins';
import {Count, CountProps} from './samples/count';
import {For3} from './samples/for-3';
import {Parent, testLife} from './samples/hello-world';
import {StyleComp, StyleDemo} from './samples/style-comp';
import {todoList} from './samples/todo-list';
import {Style2, StyleAtom} from './samples/style-comp2';
import {Count2} from './samples/counter2';
import {renderObject} from './samples/render-obj';
import {Controller} from './samples/controller';
import {onlyUseStyle} from './samples/style-only';
import {Life} from './samples/life';
import {CompController} from './samples/comp-controller';
import {FuncBuilder} from './samples/func-as-builder';
import {htmlComp} from './samples/html';
import {initMount} from './samples/mount';
import {CompParent} from './samples/comp';
import './samples/slot-demo';
import './samples/react';
const num = $(20);
(window as any).numx = num;
const titleBg = $('#ddd');
css()(
['body', style({
backgroundColor: '#111',
color: '#fff'
}), $`transition: color 1s linear;marginLeft: ${num}px`, 'marginTop: 10px'],
['.title', style('marginLeft: 10px;'), style`
fontWeight: bold;
fontSize: ${num}px;
color: #f44;
marginTop: 10px;
marginBottom: 5px;
backgroundColor: ${titleBg};
`]
).mount();
// import {
// mount, div, react, comp, button,
// IReactItem, click, prop, css, style,
// $, input, mounted, updated, created, removed, appended,
// html, text
// } from './alins';
// import {Count, CountProps} from './samples/count';
// import {For3} from './samples/for-3';
// import {Parent, testLife} from './samples/hello-world';
// import {StyleComp, StyleDemo} from './samples/style-comp';
// import {todoList} from './samples/todo-list';
// import {Style2, StyleAtom} from './samples/style-comp2';
// import {Count2} from './samples/counter2';
// import {renderObject} from './samples/render-obj';
// import {Controller} from './samples/controller';
// import {onlyUseStyle} from './samples/style-only';
// import {Life} from './samples/life';
// import {CompController} from './samples/comp-controller';
// import {FuncBuilder} from './samples/func-as-builder';
// import {htmlComp} from './samples/html';
// import {initMount} from './samples/mount';
// import {CompParent} from './samples/comp';
// import './samples/slot-demo';
// import './samples/react';
// const num = $(20);
// (window as any).numx = num;
// const titleBg = $('#ddd');
// css()(
// ['body', style({
// backgroundColor: '#111',
// color: '#fff'
// }), $`transition: color 1s linear;marginLeft: ${num}px`, 'marginTop: 10px'],
// ['.title', style('marginLeft: 10px;'), style`
// fontWeight: bold;
// fontSize: ${num}px;
// color: #f44;
// marginTop: 10px;
// marginBottom: 5px;
// backgroundColor: ${titleBg};
// `]
// ).mount();

// const msg = $('xxxx');
// div(msg).mount();
// // const msg = $('xxxx');
// // div(msg).mount();


const list = $([1, 2, 3]);
const add = (item: IReactItem, e: Event) => {item.value++; console.log(e);};
const value = $(0);
const value1 = $(1);
const value2 = $(2);
const msg = $('Hello msg');
(window as any).valuex = value;
// const list = $([1, 2, 3]);
// const add = (item: IReactItem, e: Event) => {item.value++; console.log(e);};
// const value = $(0);
// const value1 = $(1);
// const value2 = $(2);
// const msg = $('Hello msg');
// (window as any).valuex = value;

mount(
div('title font-size:',
() => [
div('111111'),
div('111111222')
],
input.model(num, 'number')),
div(msg),
// () => div('111111'),
);
// mount(
// div('title font-size:',
// () => [
// div('111111'),
// div('111111222')
// ],
// input.model(num, 'number')),
// div(msg),
// // () => div('111111'),
// );

div.show(() => value.value === 0)('test controller mount').mount();
initMount();
// div.show(() => value.value === 0)('test controller mount').mount();
// initMount();

mount(
div('Hello World'),
div('title font-size:', input.model(num, 'number')),
div('title background:', input.model(titleBg)),
div('.title:comp Parent--------------'),
comp(CompParent),
() => div(111, text(':11/11.[1]')),
() => [div(222), div(333)],
comp(() => div(444)),
div('.title:comp HTML--------------'),
comp(htmlComp),
div('.title:comp Life--------------'),
comp(Life),
div('.title:comp CompController--------------'),
comp(CompController),
div('.title:style Demo--------'),
comp(StyleDemo),
div('.title:Count------------------'),
comp(Count),
div('.title:Count------------------'),
div(comp(renderObject)),
div('.title:todoList-----------'),
comp(todoList),
div('.title:Parent-----------'),
comp(Parent),
div('.title:For3-----------'),
comp(For3),
div('.title:Count-----------'),
comp(Count),
div('.title:Count2-----------'),
comp(Count2),
div('.title:FuncBuilder-----------'),
comp(FuncBuilder),
div('.title:testLife-----------'),
comp(testLife),
div('.title:StyleComp-----------'),
comp(StyleComp),
div('.title:StyleComp2----------'),
comp(Style2),
div('.title:StyleAtom----------'),
comp(StyleAtom),
div('.title:Controllers----------'),
comp(Controller),
div('.title:单独使用style----------'),
onlyUseStyle()
);
// mount(
// div('Hello World'),
// div('title font-size:', input.model(num, 'number')),
// div('title background:', input.model(titleBg)),
// div('.title:comp Parent--------------'),
// comp(CompParent),
// () => div(111, text(':11/11.[1]')),
// () => [div(222), div(333)],
// comp(() => div(444)),
// div('.title:comp HTML--------------'),
// comp(htmlComp),
// div('.title:comp Life--------------'),
// comp(Life),
// div('.title:comp CompController--------------'),
// comp(CompController),
// div('.title:style Demo--------'),
// comp(StyleDemo),
// div('.title:Count------------------'),
// comp(Count),
// div('.title:Count------------------'),
// div(comp(renderObject)),
// div('.title:todoList-----------'),
// comp(todoList),
// div('.title:Parent-----------'),
// comp(Parent),
// div('.title:For3-----------'),
// comp(For3),
// div('.title:Count-----------'),
// comp(Count),
// div('.title:Count2-----------'),
// comp(Count2),
// div('.title:FuncBuilder-----------'),
// comp(FuncBuilder),
// div('.title:testLife-----------'),
// comp(testLife),
// div('.title:StyleComp-----------'),
// comp(StyleComp),
// div('.title:StyleComp2----------'),
// comp(Style2),
// div('.title:StyleAtom----------'),
// comp(StyleAtom),
// div('.title:Controllers----------'),
// comp(Controller),
// div('.title:单独使用style----------'),
// onlyUseStyle()
// );

// dom 单独使用
// // dom 单独使用
22 changes: 22 additions & 0 deletions scripts/dev/samples/bugs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* @Author: chenzhongsheng
* @Date: 2022-11-12 09:21:14
* @Description: Coding something
* @LastEditors: chenzhongsheng
* @LastEditTime: 2022-11-12 14:49:35
*/


import {
mount, div, react, comp, button,
click, prop, css, style,
$, input, mounted, updated, created, removed, appended,
html, text, value, json
} from '../alins';

const num = $(-1);

div(
comp(() => div('comp show')).show(() => num.value > 0)(),
comp(() => div('comp show2')).if(() => num.value > 0)(),
).mount();
5 changes: 4 additions & 1 deletion scripts/dev/samples/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @Description: Coding something
*/

import {$, button, div, span, input, click} from '../alins';
import {$, button, div, span, input, click, comp} from '../alins';

export function Controller () {

Expand All @@ -20,6 +20,9 @@ export function Controller () {
.else($`/div:${num}`),
div('input----'),
input.model(num, 'number')(),
div('show----'),
div.show(() => num.value > 0)('show comp'),
comp(() => div('comp show')).show(() => num.value > 0)(),
div('if2----'),
span.if(() => num.value > 1)($`/div:if-${num}`)
.elif(() => num.value < 0)($`/div:elif-${num}`),
Expand Down

0 comments on commit 93b8376

Please sign in to comment.