Merge pull request #165 from TuSimple/freestyle

This commit is contained in:
07akioni 2020-07-22 18:01:00 +08:00 committed by GitHub Enterprise
commit 051a026b9a
7 changed files with 31 additions and 16 deletions

View File

@ -1,8 +1,10 @@
# CHANGELOG
## PENDING
### Refactors
- Refactor `n-tag` styles
## 1.5.2 (2020-07-22)
### Fixes
- Fix the problem that `n-radio` can be focused.
- Fix the problem that `n-data-table`'s `max-height` style is broken. https://bugs.chromium.org/p/chromium/issues/detail?id=1107223
### Refactors
- Refactor `n-tag` styles.
## 1.5.1 (2020-07-20)
### Features

View File

@ -1,14 +1,16 @@
# CHANGELOG
## PENDING
## 1.5.2 (2020-07-22)
### Fixes
- 修正了 `n-radio` 无法聚焦的问题
- 修正了 `n-data-table``max-height` 样式失效的问题 https://bugs.chromium.org/p/chromium/issues/detail?id=1107223
### Refactors
- 重构了 `n-tag` 的样式
- 修正了 `n-data-table``max-height` 样式失效的问题 https://bugs.chromium.org/p/chromium/issues/detail?id=1107223
## 1.5.1 (2020-07-20)
### Features
- 为 `n-time-picker` 增加了 `disabled` 属性.
- 为 `n-time-picker` 增加了 `disabled` 属性
### Fixes
- 修正了 `n-radio`下的子元素无法获取焦点的问题
- 修正了 `n-radio` 下的子元素无法获取焦点的问题
## 1.5.0 (2020-07-09)
### Breaking Changes

View File

@ -83,7 +83,7 @@
</template>
<script>
import { version } from '../package.json'
import version from '../src/version'
import withapp from '../src/_mixins/withapp'
import { state, setMode } from './store'

View File

@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "1.5.1",
"version": "1.5.2",
"description": "A Vue UI Framework. Caring About Styles, Themed, Batteries Included, Not Rather Slow.",
"main": "lib/index.js",
"module": "es/index.js",
@ -10,11 +10,11 @@
"build:icon": "npm run clean && node build/buildIcon.js",
"build:js": "npm run clean && rollup -c",
"build:demo": "npm run build && npm run demo",
"build:doc": "npm run build && rm -rf build-doc/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js",
"build:doc": "npm run generate-version && npm run build && rm -rf build-doc/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js",
"build": "npm run clean && node build/buildStyle.js && node build/buildIcon.js && rollup -c",
"clean": "rm -rf lib && rm -rf es && rm -rf dist",
"demo": "cross-env NODE_ENV=production webpack-dev-server --config build/webpack.demo.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config build/webpack.dev.js",
"demo": "npm run generate-version && cross-env NODE_ENV=production webpack-dev-server --config build/webpack.demo.js",
"dev": "npm run generate-version && cross-env NODE_ENV=development webpack-dev-server --config build/webpack.dev.js",
"lint": "eslint --no-error-on-unmatched-pattern --fix \"src/**/*.{js,vue}\" \"test/**/*.{js,vue}\" \"build/**/*.{js,vue}\" \"demo/**/*.{js,vue}\" && stylelint \"src/_styles/**/*.scss\"",
"lint:js": "eslint --no-error-on-unmatched-pattern --fix \"src/**/*.{js,vue}\" \"test/**/*.{js,vue}\" \"build/**/*.{js,vue}\" \"demo/**/*.{js,vue}\"",
"lint:style": "stylelint \"src/_styles/**/*.scss\"",
@ -22,7 +22,8 @@
"release:doc:no-build": "node build-doc/generate-deploy-sh.js && sudo bash build-doc/deploy-doc.sh",
"release:package": "npm run build && npm publish",
"test": "cross-env NODE_ENV=test jest",
"init-cssr": "node scripts/create-cssr-scaffold.js"
"init-cssr": "node scripts/create-cssr-scaffold.js",
"generate-version": "node scripts/generate-version"
},
"author": "lecong.zhang",
"license": "MIT",

View File

@ -0,0 +1,6 @@
const version = require('../package.json').version
require('fs').writeFileSync(
require('path').resolve(__dirname, '..', 'src', 'version.js'),
`export default '${version}'\n`
)

View File

@ -75,10 +75,13 @@ export default {
handleKeyUpEnter () {
this.toggle()
},
handleMouseDown (e) {
handleMouseDown () {
if (this.syntheticDisabled) return
// e.preventDefault()
this.$refs.input.focus()
setTimeout(() => {
if (!this.$el.contains(document.activeElement)) {
this.$refs.input.focus()
}
}, 0)
},
handleClick (e) {
this.$emit('click', e)

1
src/version.js Normal file
View File

@ -0,0 +1 @@
export default '1.5.2'