mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-24 11:05:17 +08:00
parent
c2341c72eb
commit
32f02bef0b
@ -4,7 +4,8 @@
|
||||
"main": "dist/index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mitt": "^2.1.0"
|
||||
"mitt": "^2.1.0",
|
||||
"@element-plus/utils": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0-rc.1"
|
||||
@ -12,4 +13,4 @@
|
||||
"devDependencies": {
|
||||
"@vue/test-utils": "^2.0.0-beta.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
:id="`el-collapse-head-${id}`"
|
||||
class="el-collapse-item__header"
|
||||
role="button"
|
||||
:tabindex="disabled ? undefined : 0"
|
||||
:tabindex="disabled ? -1 : 0"
|
||||
:class="{
|
||||
'focusing': focusing,
|
||||
'is-active': isActive
|
||||
@ -50,8 +50,8 @@
|
||||
<script lang='ts'>
|
||||
import { defineComponent, PropType, inject, computed, ref } from 'vue'
|
||||
import { CollapseProvider } from './collapse.vue'
|
||||
import { generateId } from '../../utils/util'
|
||||
import ElCollapseTransition from '../../transitions/collapse-transition.vue'
|
||||
import { generateId } from '@element-plus/utils/util'
|
||||
import ElCollapseTransition from '@element-plus/transition/collapse-transition/index.vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ElCollapseItem',
|
||||
@ -98,13 +98,13 @@ export default defineComponent({
|
||||
|
||||
const handleHeaderClick = () => {
|
||||
if(props.disabled) return
|
||||
collapseMitt && collapseMitt.emit('item-click', props.name)
|
||||
collapseMitt?.emit('item-click', props.name)
|
||||
focusing.value = false
|
||||
isClick.value = true
|
||||
}
|
||||
|
||||
const handleEnterClick = () => {
|
||||
collapseMitt && collapseMitt.emit('item-click', props.name)
|
||||
collapseMitt?.emit('item-click', props.name)
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -5,7 +5,7 @@
|
||||
</transition>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
import { addClass, removeClass } from '../utils/dom'
|
||||
import { addClass, removeClass } from '@element-plus/utils/dom'
|
||||
|
||||
export default {
|
||||
name: 'ElCollapseTransition',
|
15
packages/transition/package.json
Normal file
15
packages/transition/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@element-plus/transition",
|
||||
"version": "0.0.0",
|
||||
"main": "dist/index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@element-plus/utils": "^0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0-rc.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/test-utils": "^2.0.0-beta.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user