Skip to content

Commit b381d7d

Browse files
author
sunxiaoyu
committed
add api && modify png
1 parent 0011c8d commit b381d7d

8 files changed

Lines changed: 28 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "santd",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "san UI design",
55
"scripts": {
66
"start": "cross-env NODE_ENV=development node scripts/preview.js",

scripts/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async function deploy() {
4040

4141
spinner = ora('git clone santd');
4242
spinner.start();
43-
await execa('cp', ['../site/theme/static/img/logo.png', './site/favicon.png'], {cwd: `${output}`});
43+
await execa('cp', ['../site/theme/static/img/logo.svg', './site/favicon.png'], {cwd: `${output}`});
4444
// 3. 拷贝分支gh-pages代码到本地
4545
await execa('git', ['clone', '-b', 'gh-pages', 'git@github.com:ecomfe/santd.git'], {cwd: `${output}`});
4646
spinner.succeed();

site/theme/static/header.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
height: 32px;
4545
width: 32px;
4646
margin-right: 10px;
47-
background: url(./img/logo.png) center / cover no-repeat;
47+
background: url(./img/logo.svg) center / cover no-repeat;
4848
}
4949
.text {
5050
font-size: 18px;

site/theme/static/img/logo.png

-96.8 KB
Binary file not shown.

site/theme/static/img/logo.svg

Lines changed: 11 additions & 0 deletions
Loading

src/input/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,10 @@
6565
| 属性 | 说明 | 类型 | 默认值 |
6666
| --- | --- | --- | --- |
6767
| visibilityToggle | 是否显示切换按钮 | boolean | true |
68+
69+
### 方法
70+
71+
| 名称 | 说明 |
72+
| --- | --- |
73+
| blur() | 取消焦点 |
74+
| focus() | 获取焦点 |

src/input/base.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ export default san.defineComponent({
3838
this.fire('blur', inputValue);
3939
this.dispatch('UI:form-item-interact', {fieldValue: inputValue, type: 'blur', e});
4040
},
41+
focus() {
42+
this.ref('input').focus();
43+
},
44+
blur() {
45+
this.ref('input').blur();
46+
},
4147
template: `
4248
<input
4349
placeholder="{{placeholder}}"

src/select/Select.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ export default san.defineComponent({
773773
return;
774774
}
775775

776+
this.fire('input-keydown', e);
776777
// magic code
777778
const keyCode = e.keyCode;
778779
if ((modeConfig.multiple || modeConfig.tags) && !e.target.value && keyCode === KeyCode.BACKSPACE) {

0 commit comments

Comments
 (0)