From 8752d9e2de0a7fe8ae12d13f71fd2306c1b17622 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Tue, 8 Sep 2020 14:01:30 +0800 Subject: [PATCH] fix: code smell --- src/_utils/cssr/index.js | 6 +++--- src/tooltip/src/styles/index.js | 11 ----------- src/tooltip/src/styles/themed-base.cssr.js | 6 ------ think.md | 12 +++++++----- 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 src/tooltip/src/styles/index.js delete mode 100644 src/tooltip/src/styles/themed-base.cssr.js diff --git a/src/_utils/cssr/index.js b/src/_utils/cssr/index.js index 447f7e550..15cb3cfb7 100644 --- a/src/_utils/cssr/index.js +++ b/src/_utils/cssr/index.js @@ -53,11 +53,11 @@ function cTB (selector, ...rest) { ]) } -function createKey (prefix, suffix) { +function createKey (keyPrefix, suffix) { if (suffix === 'default') { - return prefix + return keyPrefix } - return prefix + suffix.replace(/^[a-z]/, startChar => startChar.toUpperCase()) + return keyPrefix + suffix.replace(/^[a-z]/, startChar => startChar.toUpperCase()) } export { c, cTB, cB, cE, cM, cNotM, insideFormItem, insideModal, prefix, namespace, createKey, find } diff --git a/src/tooltip/src/styles/index.js b/src/tooltip/src/styles/index.js deleted file mode 100644 index 3b04bf0e9..000000000 --- a/src/tooltip/src/styles/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import themedBaseStyle from './themed-base.cssr.js' - -export default [ - { - key: 'syntheticTheme', - watch: [ - 'syntheticTheme' - ], - CNode: themedBaseStyle - } -] diff --git a/src/tooltip/src/styles/themed-base.cssr.js b/src/tooltip/src/styles/themed-base.cssr.js deleted file mode 100644 index 4424467cd..000000000 --- a/src/tooltip/src/styles/themed-base.cssr.js +++ /dev/null @@ -1,6 +0,0 @@ -import { c, cTB, cB, cE, cM, cNotM } from '../../../_utils/cssr' - -export default c([ - ({ props }) => { - } -]) diff --git a/think.md b/think.md index d1d23d988..7dea4ecf2 100644 --- a/think.md +++ b/think.md @@ -366,13 +366,13 @@ const naive = create({ 78. select add tag 79. dynamic input 还差英文文档 80. input 严格受控 -81. 搞明白 vue 的 scoped 和 普通的关系 -82. Form Item 不返回 true 的时候... 错误信息不会消失,这似乎不太合理? -83. Form Item 应该和 Input Group 也契合良好 +81. 搞明白 vue 的 scoped 和 普通的关系 +82. Form Item 不返回 true 的时候... 错误信息不会消失,这似乎不太合理? async-validator 的特性 +83. Form Item 应该和 Input Group 也契合良好 能用 84. Notification 主题切换需要工作良好 85. Notification 这个东西很特殊...感觉也没那么特殊 86. 文件上传的回调方式改成传对象 -87. 抵御外界 CSS 变化,比如 line-height 之类的 +87. 抵御外界 CSS 变化,比如 line-height 之类的,需要一个良好的测试机制 88. CSS Font 选择 对英文应该没有那么麻烦,走系统字体就好了,然而对中文又没什么好的解决方案,so 先这个样子,之后再琢磨琢磨 89. 把所有用 $slots 判断的地方都改成 $scopedSlots,[原因](https://vuejs.org/v2/api/#vm-scopedSlots) done 90. 调整默认状态下 button, input 的 icon 的颜色 @@ -391,9 +391,11 @@ const naive = create({ 103. input + icon 主题切换 transition 有问题!!! 104. auto-complete 自定义元素 demo 有问题 有 pendingData 的时候 preventDefault 105. markdown 渲染缺少空格,修正了 n-select single filterable 时 placeholder 的样式问题 caused by vue compiler `preserveWhitespace: false`, change it to `whitespace: 'condense'` -106. drawer 加上滚动条,以及 overflow auto 的样式 +106. drawer 加上滚动条,以及 overflow auto 的样式 107. 所有弹出的东西改成 body-style 108. size 切换的时候... transfer 动画问题 +109. 利用了公用组件的组件样式没办法特殊调教,比如 select 组件自身是没有命名空间的,这个想要单独定制就比较麻烦。先不出来怎么解决 +110. treemate 重构 cascader,异步 api 需要更改 ``` Done