refactor: 组件示例重构
Former-commit-id: 039dc1ce505489c4d1b360fd50771a10b5476227
This commit is contained in:
11
src/views/demo/editor.vue
Normal file
11
src/views/demo/editor.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- wangEditor富文本编辑器示例 -->
|
||||
<script setup lang="ts">
|
||||
import Editor from '@/components/WangEditor/index.vue';
|
||||
const value = ref('初始内容');
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<editor v-model="value" style="height: 600px" />
|
||||
</div>
|
||||
</template>
|
||||
11
src/views/demo/icon-selector.vue
Normal file
11
src/views/demo/icon-selector.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- 图标选择器 -->
|
||||
|
||||
<script setup lang="ts">
|
||||
const value = ref('edit');
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<icon-select v-model="value" width="400px" />
|
||||
</div>
|
||||
</template>
|
||||
26
src/views/demo/uploader.vue
Normal file
26
src/views/demo/uploader.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- 文件上传组件(单图+多图)示例 -->
|
||||
<script setup lang="ts">
|
||||
import SingleUpload from '@/components/Upload/SingleUpload.vue';
|
||||
import MultiUpload from '@/components/Upload/MultiUpload.vue';
|
||||
|
||||
const singlePicUrl = ref(
|
||||
'https://oss.youlai.tech/default/2022/11/20/18e206dae97b40329661537d1e433639.jpg'
|
||||
);
|
||||
|
||||
const multiPicUrls = ref([
|
||||
'https://oss.youlai.tech/default/2022/11/20/8af5567816094545b53e76b38ae9c974.webp',
|
||||
'https://oss.youlai.tech/default/2022/11/20/13dbfd7feaf848c2acec2b21675eb9d3.webp'
|
||||
]);
|
||||
</script>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form>
|
||||
<el-form-item label="单图上传">
|
||||
<single-upload v-model="singlePicUrl"></single-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="多图上传">
|
||||
<multi-upload v-model="multiPicUrls"></multi-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user