Skip to content

Commit

Permalink
feat: bump to 2.4.2 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ielgnaw committed Dec 31, 2021
1 parent cc22d37 commit 5111115
Show file tree
Hide file tree
Showing 25 changed files with 134 additions and 117 deletions.
9 changes: 9 additions & 0 deletions example/components/changelog/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

<div class="changelog-wrapper">

### 2.4.2 {page=#/changelog}
###### 2021.12.31

* **[fix]**:
- 修复 provide/inject 无默认值的问题
- 修复示例页面的一些小问题

---

### 2.4.1 {page=#/changelog}
###### 2021.12.30

Expand Down
3 changes: 2 additions & 1 deletion example/components/directives/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
data () {
return {
text: '点击测试'
text: '点击测试',
copyText: ''
}
},
methods: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bk-magic-vue",
"version": "2.4.1",
"version": "2.4.2",
"description": "基于蓝鲸 Magicbox 和 Vue 的前端组件库",
"main": "dist/bk-magic-vue.min.js",
"files": [
Expand Down
14 changes: 7 additions & 7 deletions src/components/affix/affix.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
</template>
<script>
/**
* bk-affix
* @module components/affix
* @desc 图钉组件
* @param offsetTop {number} 距离顶部的偏移量 默认为'0'
* @param offsetBottom {number} 距离底部的偏移量
*/
* bk-affix
* @module components/affix
* @desc 图钉组件
* @param offsetTop {number} 距离顶部的偏移量 默认为'0'
* @param offsetBottom {number} 距离底部的偏移量
*/
// 兼容浏览器,添加事件监听器
const on = (() => {
if (document.addEventListener) {
Expand Down Expand Up @@ -215,5 +215,5 @@ export default {
}
</script>
<style>
@import '../../ui/affix.css';
@import '../../ui/affix.css';
</style>
2 changes: 1 addition & 1 deletion src/components/alert/alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ export default {
}
</script>
<style lang='postcss'>
@import '../../ui/alert.css';
@import '../../ui/alert.css';
</style>
6 changes: 2 additions & 4 deletions src/components/back-top/back-top.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export default {
},
computed: {
positionStyle () {
return `right: ${this.right}px;
bottom: ${this.bottom}px;
z-index: ${this.zIndex}`
return `right: ${this.right}px; bottom: ${this.bottom}px; z-index: ${this.zIndex}`
}
},
watch: {
Expand Down Expand Up @@ -84,5 +82,5 @@ export default {
}
</script>
<style>
@import '../../ui/back-top.css';
@import '../../ui/back-top.css';
</style>
40 changes: 20 additions & 20 deletions src/components/big-tree/tree-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ export default class TreeNode {
}

/**
* 获取 uid
*/
* 获取 uid
*/
get uid () {
return `${this.tree.id}-node-${this.index}`
}

/**
* 获取 name
*/
* 获取 name
*/
get name () {
return this.data[this.tree.nodeOptions.nameKey]
}
Expand All @@ -87,15 +87,15 @@ export default class TreeNode {
}

/**
* 获取 vNode
*/
* 获取 vNode
*/
get vNode () {
return this._vNode
}

/**
* 获取 parents
*/
* 获取 parents
*/
get parents () {
if (!this.parent) {
return []
Expand All @@ -113,33 +113,33 @@ export default class TreeNode {
}

/**
* 是否是叶子节点
*/
* 是否是叶子节点
*/
get isLeaf () {
return !this.lazy && !this.loading && !this.children.length
}

/**
* 是否是 lazy
*
* @param {string} paramName paramDesc
*
* @return {string} returnDesc
*/
* 是否是 lazy
*
* @param {string} paramName paramDesc
*
* @return {string} returnDesc
*/
get lazy () {
return this.state.lazy && !this.children.length
}

/**
* 是否 loading
*/
* 是否 loading
*/
get loading () {
return this.state.loading
}

/**
* 是否有 checkbox
*/
* 是否有 checkbox
*/
get hasCheckbox () {
const showCheckbox = this.tree.showCheckbox
if (typeof showCheckbox === 'function') {
Expand Down
8 changes: 4 additions & 4 deletions src/components/big-tree/tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ export default {
default: 16
},
/**
* 树尺寸
* 可选项:normal/small
*/
* 树尺寸
* 可选项:normal/small
*/
size: {
type: String,
default: 'normal'
Expand Down Expand Up @@ -674,5 +674,5 @@ export default {
</script>

<style>
@import '../../ui/big-tree.css';
@import '../../ui/big-tree.css';
</style>
2 changes: 1 addition & 1 deletion src/components/breadcrumb/breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ export default {
}
</script>
<style>
@import "../../ui/breadcrumb.css";
@import "../../ui/breadcrumb.css";
</style>
42 changes: 21 additions & 21 deletions src/components/button/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@

<script>
/**
* bk-button
*
* @module components/button
* @desc 基础按钮
*
* @param theme {string} [type=default] - 显示类型,接受 default primary warning success danger
* @param hoverTheme {string} - moverhover 类型,接受 primary warning success danger,当设置了此属性时,`theme` 和 `text` 失效
* @param size {string} - 尺寸,接受 small normal large
* @param title {string} - 提示信息
* @param icon {string} - 显示左侧 icon,使用蓝鲸 icon
* @param iconRight {string} - 显示右侧 icon,使用蓝鲸 icon
* @param disabled {boolean} [disabled=false] - 禁用
* @param loading {boolean} [loading=true] - 加载中
* @param outline {boolean} [outline=true] - 显示反色按钮
* @param text {boolean} [text=true] - 配置文字按钮
*/
* bk-button
*
* @module components/button
* @desc 基础按钮
*
* @param theme {string} [type=default] - 显示类型,接受 default primary warning success danger
* @param hoverTheme {string} - moverhover 类型,接受 primary warning success danger,当设置了此属性时,`theme` 和 `text` 失效
* @param size {string} - 尺寸,接受 small normal large
* @param title {string} - 提示信息
* @param icon {string} - 显示左侧 icon,使用蓝鲸 icon
* @param iconRight {string} - 显示右侧 icon,使用蓝鲸 icon
* @param disabled {boolean} [disabled=false] - 禁用
* @param loading {boolean} [loading=true] - 加载中
* @param outline {boolean} [outline=true] - 显示反色按钮
* @param text {boolean} [text=true] - 配置文字按钮
*/
export default {
name: 'bk-button',
props: {
Expand Down Expand Up @@ -186,10 +186,10 @@ export default {
},
methods: {
/**
* 点击事件
*
* @param {Object} e 事件对象
*/
* 点击事件
*
* @param {Object} e 事件对象
*/
handleClick (e) {
if (!this.disabled && !this.loading) {
this.$emit('click', e)
Expand All @@ -200,5 +200,5 @@ export default {
}
</script>
<style>
@import '../../ui/button.css';
@import '../../ui/button.css';
</style>
2 changes: 1 addition & 1 deletion src/components/card/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,5 @@ export default {
}
</script>
<style lang='postcss'>
@import '../../ui/card.css';
@import '../../ui/card.css';
</style>
2 changes: 1 addition & 1 deletion src/components/cascade/cascade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -780,5 +780,5 @@ export default {
}
</script>
<style>
@import '../../ui/cascade.css';
@import '../../ui/cascade.css';
</style>
20 changes: 10 additions & 10 deletions src/components/checkbox/checkbox-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@

<script>
/**
* bk-checkbox-group
* @module components/checkbox
* @desc 单选框组合
* @param name {String} - 名称
* @example
<bk-checkbox
value="demo"
v-model="value">
</bk-checkbox>
*/
* bk-checkbox-group
* @module components/checkbox
* @desc 单选框组合
* @param name {String} - 名称
* @example
<bk-checkbox
value="demo"
v-model="value">
</bk-checkbox>
*/
import { getGroupName } from './checkbox-name.js'
export default {
Expand Down
11 changes: 9 additions & 2 deletions src/components/checkbox/checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ import { getCheckboxName } from './checkbox-name.js'
export default {
name: 'bk-checkbox',
mixins: [emitter],
inject: ['handleRemoveItem', 'handleAddItem'],
inject: {
handleRemoveItem: {
default: null
},
handleAddItem: {
default: null
}
},
props: {
value: {
type: [String, Number, Boolean],
Expand Down Expand Up @@ -223,5 +230,5 @@ export default {
</script>

<style>
@import '../../ui/checkbox.css';
@import '../../ui/checkbox.css';
</style>
2 changes: 1 addition & 1 deletion src/components/col/col.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ export default {
</script>

<style>
@import '../../ui/col.css';
@import '../../ui/col.css';
</style>
18 changes: 9 additions & 9 deletions src/components/collapse-item/collapse-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ export default {
inject: ['collapse'],
props: {
/**
* 是否使用自定义触发区域配置
* @value false 默认不使用,整行hover触发
* @value true 使用自定义区域,no-trigger为不触发的区域
*/
* 是否使用自定义触发区域配置
* @value false 默认不使用,整行hover触发
* @value true 使用自定义区域,no-trigger为不触发的区域
*/
customTriggerArea: {
type: Boolean,
default: false
Expand All @@ -99,10 +99,10 @@ export default {
},
/**
* collapse-item 的content初始时是否渲染
* @value none: 初始不渲染
* @value hidden: 初始渲染,但是dispaly: none
*/
* collapse-item 的content初始时是否渲染
* @value none: 初始不渲染
* @value hidden: 初始渲染,但是dispaly: none
*/
contentHiddenType: {
type: String,
default: 'none'
Expand Down Expand Up @@ -225,5 +225,5 @@ export default {
</script>

<style>
@import '../../ui/collapse-item.css';
@import '../../ui/collapse-item.css';
</style>
2 changes: 1 addition & 1 deletion src/components/collapse/collapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ export default {
</script>

<style>
@import '../../ui/collapse.css';
@import '../../ui/collapse.css';
</style>
Loading

0 comments on commit 5111115

Please sign in to comment.