Files
t/pages/editor/editor.vue
T
2025-03-12 20:11:03 +08:00

73 lines
1.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- 这块加个padding -->
<view style="padding-bottom: 100rpx;">
<uni-section class="mb-10" type="line" title="文章标题"></uni-section>
<uni-easyinput autoHeight v-model="value" placeholder="请输入内容"></uni-easyinput>
</uni-section>
<uni-section class="mb-10" type="line" title="文章封面"></uni-section>
<uni-file-picker limit="1" title="最多选择1张图片,作为文章封面"></uni-file-picker>
</uni-section>
<uni-section class="mb-10" type="line" title="文章简介"></uni-section>
<uni-easyinput autoHeight v-model="value" placeholder="请输入内容" type="textarea" style="margin: 30rpx;"></uni-easyinput>
</uni-section>
<uni-section class="mb-10 " type="line" title="文章内容"></uni-section>
<!-- 不要再编辑器上面写样式 ,在style里面写-->
<!-- /deep/.editor-container {
border: 3rpx solid #3555; border-radius: 20rpx;margin: 20rpx;
} -->
<cu-editor style=""></cu-editor>
</uni-section>
<!-- 要这个没用 -->
<!-- <view class="" style="margin-top:1000rpx;border: aliceblue solid 1rpx;">
</view> -->
</view>
</template>
<script>
import cuEditor from '@/components/cu-editor/cu-editor'
export default {
// 这块要注册组件
components: {
cuEditor
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
.example-body {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: flex-start;
/* align-items: flex-end; */
/* flex-wrap: wrap; */
padding: 10rpx;
}
.cu-editor-input:focus {
border-color: blue; /* 聚焦时的边框颜色 */
outline: none; /* 移除默认的聚焦轮廓 */
}
/deep/.editor-container {
border: 3rpx solid #3555; border-radius: 20rpx;margin: 20rpx;
}
</style>