ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    form-create 添加校验规则

    Sep 26, 202214 min read
    <template>
        <form-create :rule="rule" v-model="fApi" :option="options"/>
    </template>
    
    <script>
        export default {
            data(){
                return {
                    fApi:{},
                    options:{
                        onSubmit:(formData)=>{
                            alert(JSON.stringify(formData))
                        }
                    },
                    rule:[
                        {
                            type:'input',
                            field:'name',
                            title:'名称',
                            validate: [{type: 'string', required: true, message:'请输入名称'}]
                        }
                    ]
                }
                
            }
        }
    </script>
    

    相关文章

    JavaScript中,空数组的长度是多少?

    在JavaScript中,空数组[,,,,,]的长度为5,因为即使元素未赋值(均为undefined),它们仍被计入数组元素数量。

    convert a MOV file to an MP3 audio file using FFmpeg

    The command to convert a MOV file to an MP3 audio file using FFmpeg is `ffmpeg -i input.mov -vn -acodec libmp3lame -qscale:a 2 output.mp3`, which specifies input, disables video, sets audio codec and quality, and names the output file.

    Waiting for App Store Connect SPl analysis response...

    The AI language model cannot provide real-time updates or responses from specific parties; direct inquiries to the App Store Connect SPi analysis for a response.

    Canvas中的closePath()与lineTo()有什么不同?

    Canvas中的closePath()用于闭合路径并形成封闭图形,而lineTo()用于绘制从当前点到指定点的线段。

    微信笔记 容量 最大 2G

    微信收藏中的单个笔记最大为25兆,总容量限制为2G,超出此限制将无法收藏或发送。