Skip to content

Commit

Permalink
add api && modify png
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiaoyu committed Dec 10, 2020
1 parent 0011c8d commit b381d7d
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "santd",
"version": "0.3.5",
"version": "0.3.6",
"description": "san UI design",
"scripts": {
"start": "cross-env NODE_ENV=development node scripts/preview.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function deploy() {

spinner = ora('git clone santd');
spinner.start();
await execa('cp', ['../site/theme/static/img/logo.png', './site/favicon.png'], {cwd: `${output}`});
await execa('cp', ['../site/theme/static/img/logo.svg', './site/favicon.png'], {cwd: `${output}`});
// 3. 拷贝分支gh-pages代码到本地
await execa('git', ['clone', '-b', 'gh-pages', '[email protected]:ecomfe/santd.git'], {cwd: `${output}`});
spinner.succeed();
Expand Down
2 changes: 1 addition & 1 deletion site/theme/static/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
height: 32px;
width: 32px;
margin-right: 10px;
background: url(./img/logo.png) center / cover no-repeat;
background: url(./img/logo.svg) center / cover no-repeat;
}
.text {
font-size: 18px;
Expand Down
Binary file removed site/theme/static/img/logo.png
Binary file not shown.
11 changes: 11 additions & 0 deletions site/theme/static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@
| 属性 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| visibilityToggle | 是否显示切换按钮 | boolean | true |

### 方法

| 名称 | 说明 |
| --- | --- |
| blur() | 取消焦点 |
| focus() | 获取焦点 |
6 changes: 6 additions & 0 deletions src/input/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export default san.defineComponent({
this.fire('blur', inputValue);
this.dispatch('UI:form-item-interact', {fieldValue: inputValue, type: 'blur', e});
},
focus() {
this.ref('input').focus();
},
blur() {
this.ref('input').blur();
},
template: `
<input
placeholder="{{placeholder}}"
Expand Down
1 change: 1 addition & 0 deletions src/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ export default san.defineComponent({
return;
}

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

0 comments on commit b381d7d

Please sign in to comment.