mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
chore: init
This commit is contained in:
parent
889a06c315
commit
d6468c282c
15
packages/radio/__tests__/radio.spec.ts
Normal file
15
packages/radio/__tests__/radio.spec.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Radio from '../src/index.vue'
|
||||
|
||||
const AXIOM = 'Rem is the best girl'
|
||||
|
||||
describe('Radio.vue', () => {
|
||||
test('render test', () => {
|
||||
const wrapper = mount(Radio, {
|
||||
slots: {
|
||||
default: AXIOM,
|
||||
},
|
||||
})
|
||||
expect(wrapper.text()).toEqual(AXIOM)
|
||||
})
|
||||
})
|
6
packages/radio/doc/index.stories.ts
Normal file
6
packages/radio/doc/index.stories.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import ElRadio from '../index'
|
||||
|
||||
export default {
|
||||
title: 'Radio',
|
||||
}
|
||||
|
5
packages/radio/index.ts
Normal file
5
packages/radio/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { App } from 'vue'
|
||||
import Radio from './src/index.vue'
|
||||
export default (app: App): void => {
|
||||
app.component(Radio.name, Radio)
|
||||
}
|
12
packages/radio/package.json
Normal file
12
packages/radio/package.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "@element-plus/radio",
|
||||
"version": "0.0.0",
|
||||
"main": "dist/index.js",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0-rc.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/test-utils": "^2.0.0-beta.0"
|
||||
}
|
||||
}
|
17
packages/radio/src/index.vue
Normal file
17
packages/radio/src/index.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts'>
|
||||
import { defineComponent } from 'vue'
|
||||
export default defineComponent({
|
||||
name: 'ElRadio',
|
||||
props: { },
|
||||
setup(props) {
|
||||
// init here
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user