chore: init

This commit is contained in:
zazzaz 2020-08-04 11:45:50 +08:00 committed by jeremywu
parent 889a06c315
commit d6468c282c
5 changed files with 55 additions and 0 deletions

View 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)
})
})

View File

@ -0,0 +1,6 @@
import ElRadio from '../index'
export default {
title: 'Radio',
}

5
packages/radio/index.ts Normal file
View 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)
}

View 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"
}
}

View 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>