-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee64630
commit c4018de
Showing
19 changed files
with
278 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<template> | ||
<div> | ||
<p> | ||
<vxe-checkbox v-model="demo1.value1" content="默认尺寸"></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value2" size="medium" content="中等尺寸"></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value3" size="small" content="小型尺寸"></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value4" size="mini" content="超小尺寸"></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value5" content="默认尺寸" indeterminate></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value6" size="medium" content="中等尺寸" indeterminate></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value7" size="small" content="小型尺寸" indeterminate></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value8" size="mini" content="超小尺寸" indeterminate></vxe-checkbox> | ||
</p> | ||
|
||
<p> | ||
<vxe-checkbox v-model="demo1.value9" content="复选1"></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value10" content="复选2" disabled></vxe-checkbox> | ||
<vxe-checkbox v-model="demo1.value11" content="自定义值" checked-value="1" unchecked-value="0"></vxe-checkbox> | ||
</p> | ||
|
||
<p> | ||
<vxe-checkbox-group v-model="demo1.value12"> | ||
<vxe-checkbox label="1" content="HTML"></vxe-checkbox> | ||
<vxe-checkbox label="2" content="CSS"></vxe-checkbox> | ||
<vxe-checkbox label="3" content="Javascript"></vxe-checkbox> | ||
<vxe-checkbox label="4" content="SASS"></vxe-checkbox> | ||
<vxe-checkbox label="5" content="LESS"></vxe-checkbox> | ||
</vxe-checkbox-group> | ||
<vxe-checkbox-group v-model="demo1.value12" :options="demo1.opts1" ></vxe-checkbox-group> | ||
</p> | ||
|
||
<p> | ||
<vxe-checkbox-group v-model="demo1.value20" :max="3"> | ||
<vxe-checkbox label="1" content="HTML"></vxe-checkbox> | ||
<vxe-checkbox label="2" content="CSS"></vxe-checkbox> | ||
<vxe-checkbox label="3" content="Javascript"></vxe-checkbox> | ||
<vxe-checkbox label="4" content="SASS"></vxe-checkbox> | ||
<vxe-checkbox label="5" content="LESS"></vxe-checkbox> | ||
</vxe-checkbox-group> | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { reactive } from 'vue' | ||
const demo1 = reactive({ | ||
value1: null, | ||
value2: null, | ||
value3: null, | ||
value4: null, | ||
value5: false, | ||
value6: false, | ||
value7: false, | ||
value8: false, | ||
value9: true, | ||
value10: true, | ||
value11: '1', | ||
value12: ['3'], | ||
value20: [], | ||
opts1: [ | ||
{ value: '1', label: 'HTML' }, | ||
{ value: '2', label: 'CSS' }, | ||
{ value: '3', label: 'Javascript' }, | ||
{ value: '4', label: 'SASS' }, | ||
{ value: '5', label: 'LESS' } | ||
] | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { App } from 'vue' | ||
import { VxeUI } from '@vxe-ui/core' | ||
import VxeCarouselItemComponent from './src/carousel-item' | ||
import { dynamicApp } from '../dynamics' | ||
|
||
export const VxeCarouselItem = Object.assign({}, VxeCarouselItemComponent, { | ||
install (app: App) { | ||
app.component(VxeCarouselItemComponent.name as string, VxeCarouselItemComponent) | ||
} | ||
}) | ||
|
||
dynamicApp.component(VxeCarouselItemComponent.name as string, VxeCarouselItemComponent) | ||
VxeUI.component(VxeCarouselItemComponent) | ||
|
||
export const CarouselItem = VxeCarouselItem | ||
export default VxeCarouselItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { defineComponent, ref, h, reactive, PropType } from 'vue' | ||
import XEUtils from 'xe-utils' | ||
|
||
import type { VxeCarouselItemPropTypes, CarouselItemReactData, CarouselItemPrivateRef, VxeCarouselItemPrivateComputed, VxeCarouselItemConstructor, VxeCarouselItemPrivateMethods } from '../../../types' | ||
|
||
export default defineComponent({ | ||
name: 'VxeCarouselItem', | ||
props: { | ||
name: String as PropType<VxeCarouselItemPropTypes.Name>, | ||
className: String as PropType<VxeCarouselItemPropTypes.ClassName>, | ||
url: String as PropType<VxeCarouselItemPropTypes.Url> | ||
}, | ||
emits: [], | ||
setup (props, context) { | ||
const { slots } = context | ||
|
||
const xID = XEUtils.uniqueId() | ||
|
||
const refElem = ref<HTMLDivElement>() | ||
|
||
const reactData = reactive<CarouselItemReactData>({ | ||
}) | ||
|
||
const refMaps: CarouselItemPrivateRef = { | ||
refElem | ||
} | ||
|
||
const computeMaps: VxeCarouselItemPrivateComputed = { | ||
} | ||
|
||
const $xeCarouselItem = { | ||
xID, | ||
props, | ||
context, | ||
reactData, | ||
|
||
getRefMaps: () => refMaps, | ||
getComputeMaps: () => computeMaps | ||
} as unknown as VxeCarouselItemConstructor & VxeCarouselItemPrivateMethods | ||
|
||
const renderVN = () => { | ||
const { className } = props | ||
const defaultSlot = slots.default | ||
return h('div', { | ||
ref: refElem, | ||
class: ['vxe-carousel-item', className || ''] | ||
}, defaultSlot ? defaultSlot({}) : []) | ||
} | ||
|
||
$xeCarouselItem.renderVN = renderVN | ||
|
||
return $xeCarouselItem | ||
}, | ||
render () { | ||
return this.renderVN() | ||
} | ||
}) |
Oops, something went wrong.