Skip to content

Commit

Permalink
fix: 打包失败
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Oct 28, 2024
1 parent d57b5b2 commit a910867
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 64 deletions.
14 changes: 6 additions & 8 deletions .vitepress/components/preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ const isOpen = ref<boolean>(false)
class="not-prose relative w-full overflow-x-auto"
>
<div class="flex w-full p-4 pb-10">
<client-only>
<slot v-if="codeFiles.length > 0"></slot>
<div v-else class="text-sm">
<span class="rounded-sm">
出错了,找不到演示文件路径
</span>
</div>
</client-only>
<slot v-if="codeFiles.length > 0"></slot>
<div v-else class="text-sm">
<span class="rounded-sm">
出错了,找不到演示文件路径
</span>
</div>
</div>
<div class="relative min-h-42px w-full">
<el-button
Expand Down
56 changes: 0 additions & 56 deletions docs/zh/front/component/ma-form.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,3 @@
# MaForm

`2.0` 相比,`3.0` 的更加自由高效,几乎接近原生写法,同时配合 `tsx``jsx` 语法,事半功倍。

## 开始

### useForm 方式

<div class="mt-5 shadow-lg">
<ma-form ref="form" :items="[
{ label: '用户名', prop: 'username', render: 'input' },
{ label: '昵称', prop: 'nickname', render: 'input' },
]" />
</div>

::: details 查看代码
```vue
<script setup lang="tsx">
import { type MaFormExpose, useForm } from '@mineadmin/form'
useForm('form').then((form: MaFormExpose) => {
form.setItems([
{ label: '用户名', prop: 'username', render: 'input' },
{ label: '昵称', prop: 'nickname', render: 'input' },
])
})
</script>
<template>
<ma-form ref="form" />
</template>
```
:::

### 传统方式
<div style="margin-top: 20px;">
<ma-form ref="form" :items="[
{ label: '用户名', prop: 'username', render: 'input' },
{ label: '昵称', prop: 'nickname', render: 'input' },
]" />
</div>

::: details 查看代码
```vue
<script setup lang="tsx">
import { type MaFormExpose, useForm } from '@mineadmin/form'
const form = ref<MaFormExpose>()
const items = reactive([
{ label: '用户名', prop: 'username', render: 'input' },
{ label: '昵称', prop: 'nickname', render: 'input' },
])
</script>
<template>
<ma-form ref="form" :items="items" />
</template>
```
:::

0 comments on commit a910867

Please sign in to comment.