Skip to content

Commit 7ffe392

Browse files
authored
release: 9.0.0 (#162)
1 parent 4858196 commit 7ffe392

File tree

6 files changed

+46
-40
lines changed

6 files changed

+46
-40
lines changed

CHANGELOG.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
## [8.0.1](https://github.com/cipchk/ngx-weui/compare/8.0.0...8.0.1) (2019-09-11)
1+
# [9.0.0](https://github.com/cipchk/ngx-weui/compare/8.0.0...9.0.0) (2020-06-28)
22

3+
`9.0.0` 主要是同步更新 WeUI 的 `2.3` 以上版本(受限于 [#858](https://github.com/Tencent/weui/issues/858) 可能与官网看到的暗黑主题色有出入),新增 `dark` 模式。
34

5+
更多关于样子优化细节,请参考 WeUI 的 [变更日志](https://github.com/Tencent/weui/edit/master/CHANGELOG.md)
46

5-
# [8.0.0](https://github.com/cipchk/ngx-weui/compare/7.1.0-rc.2...8.0.0) (2019-05-31)
7+
### 暗黑模式
68

9+
默认为暗黑系(不清楚 TX 怎么想的),可在 `body` 添加属性 `data-weui-theme` 来控制,值为`light``dark`,例如:
710

8-
9-
# [7.1.0](https://github.com/cipchk/ngx-weui/compare/7.1.0-rc.2...7.1.0) (2019-05-29)
10-
11-
12-
13-
# [7.1.0-rc.2](https://github.com/cipchk/ngx-weui/compare/7.1.0-rc.1...7.1.0-rc.2) (2019-05-14)
14-
11+
```html
12+
<body data-weui-theme="light">
13+
```
1514

1615
### Bug Fixes
1716

18-
* fix invalid service ([#142](https://github.com/cipchk/ngx-weui/issues/142)) ([a95da21](https://github.com/cipchk/ngx-weui/commit/a95da21))
19-
17+
* 修复多列选择器在 `2.3` 下的适配
18+
* 修复上传组件 `FileItem.index` 始终为 `0`
19+
* 修复日期组件选择后出现 `Cannot read property 'target' of undefined`
20+
* 修复滚动加载组件未重置滚动位置,导致重复加载数据
21+
* 修复滚动加载设置完全完毕依然持续 `loadin` 效果
2022

23+
### Breaking Changes
2124

25+
* **weui-button** 移除 `plain` 属性,可直接使用默认来代替

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ NGX-WEUI
2020

2121
## Version
2222

23-
- WeUI 1.x using `7.0.x`
24-
- WeUI 2.x using `8.0.x` & Angular 8
23+
- WeUI `1.x` using `7.0.x`
24+
- WeUI `<= 2.2` using `8.x` & Angular 8
25+
- WeUI `>= 2.3` using `9.x` & Angular 9, Support dark & light theme
2526

2627
## Table of Contents
2728

components/schematics/shell/index.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { addPackageToPackageJson } from '../utils/package';
77
import { Schema } from './schema';
88
import { addThemeToAppStyles } from './theming';
99

10-
export default function(options: Schema): Rule {
10+
export default function (options: Schema): Rule {
1111
return chain([
1212
options && options.skipPackageJson ? noop() : addWeUIToPackageJson(),
1313
addThemeToAppStyles(options),
@@ -31,7 +31,7 @@ function addWeUIRootConfig(options: Schema) {
3131
const workspace = getWorkspace(host);
3232
const project = getProjectFromWorkspace(workspace, options.project);
3333

34-
addModuleImportToRootModule(host, 'WeUiModule', 'ngx-weui', project);
34+
addModuleImportToRootModule(host, 'ButtonModule', 'ngx-weui/button', project);
3535

3636
return host;
3737
};
@@ -50,19 +50,16 @@ function addAnimationRootConfig(options: Schema) {
5050
}
5151

5252
const appHTML = `<div style="text-align:center; padding: 8px;">
53-
<h1>
54-
ngx-weui
55-
</h1>
56-
<p>
57-
ngx-weui 是 WeUI 的 Angular 版本,
58-
WeUI
59-
是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。
60-
</p>
61-
<p>
62-
</p>
63-
<div style="margin-top: 16px;">
64-
<button weui-button>Button</button>
65-
</div>
53+
<h1>
54+
NGX-WEUI
55+
</h1>
56+
<p>
57+
<a href="https://github.com/weui/weui" target="_blank">WeUI</a> for angular,
58+
A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.
59+
</p>
60+
<div style="margin-top: 16px;">
61+
<button weui-button>Button</button>
62+
</div>
6663
</div>
6764
`;
6865

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-weui",
3-
"version": "8.0.1",
3+
"version": "9.0.0",
44
"description": "WeUI for angular",
55
"repository": {
66
"type": "git",

scripts/build/generate-css.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ function compileLess(content, savePath, min) {
99
const plugins = [];
1010
if (min) {
1111
const cleanCSSPlugin = new LessPluginCleanCSS({
12-
advanced: true
12+
advanced: true,
1313
});
1414
plugins.push(cleanCSSPlugin);
1515
}
1616
return less.render
1717
.call(less, content, {
18-
plugins
18+
plugins,
1919
})
20-
.then(({
21-
css
22-
}) => {
20+
.then(({ css }) => {
2321
fs.writeFileSync(savePath, css);
2422
resolve();
2523
})
26-
.catch(err => reject(err));
24+
.catch(err => {
25+
console.error(err);
26+
reject(err);
27+
});
2728
});
2829
}
2930

@@ -35,14 +36,17 @@ let componentsStyleContent = '@import "./style/theme.less";\n';
3536
fse.copySync(`${sourcePath}/style`, `${targetPath}/style`);
3637
targetFolder.forEach(dir => {
3738
if (fs.existsSync(`${sourcePath}/${dir}/style/index.less`)) {
38-
componentsStyleContent += `@import "./${dir}/style/index.less";\n`
39+
componentsStyleContent += `@import "./${dir}/style/index.less";\n`;
3940
fse.copySync(`${sourcePath}/${dir}/style`, `${targetPath}/${dir}/style`);
4041
}
41-
})
42+
});
4243

4344
const savePath = path.resolve(__dirname, '../../publish/');
4445
fs.writeFileSync(path.join(savePath, 'index.less'), componentsStyleContent);
4546

46-
const lessContent = `@import "${savePath}/index.less";`;
47+
const lessContent = `
48+
@import "${path.join(__dirname, '../../node_modules/weui/src/style/base/variable/color.less')}";
49+
@import "${savePath}/index.less";
50+
`;
4751
compileLess(lessContent, path.join(savePath, 'index.css'), false).then().catch();
48-
compileLess(lessContent, path.join(savePath, 'index.min.css'), true).then().catch();
52+
compileLess(lessContent, path.join(savePath, 'index.min.css'), true).then().catch();

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="shortcut icon" href="./favicon.ico" />
99
</head>
1010

11-
<body ontouchstart data-weui-theme="light">
11+
<body ontouchstart>
1212
<app-root>
1313
<div style="position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; font-size: 12px;">
1414
Loading...

0 commit comments

Comments
 (0)