Giter Club home page Giter Club logo

more-form-demo's People

Contributors

everlose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

more-form-demo's Issues

可以请教一个问题么

类似你这种情况的 不过是table的问题 我按照你的这个方式改了下 还是很卡
下面是App.vue的文件 替换一下就可以看到效果
不忙的话 可以麻烦你说一下如何解决么



主页
某表单页

    <main class="ct-wrap">
        <div class="ct">
            <el-table
                :data="tableData"
                height="480"
                style="width: 100%">
                <el-table-column
                    v-for="i in tableTh"
                    :key="i.prop"
                    :prop="i.prop"
                    :label="i.label"
                    width="180">
                    <template scope="scope">
                        <el-time-select
                            v-if="i.prop === 'data'"
                            v-model="scope.row.date"
                            :picker-options="{
                                start: '08:30',
                                step: '00:15',
                                end: '18:30'
                            }"
                            placeholder="选择时间">
                        </el-time-select>

                        <el-select v-if="i.prop === 'name'" v-model="scope.row.name" placeholder="请选择">
                            <el-option
                                v-for="item in options"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>

                        <el-input v-if="i.prop === 'address'" v-model="scope.row.address" placeholder="请输入内容"></el-input>
                    </template>    
                </el-table-column>
            </el-table>
        </div>
    </main>
</div>
<script> import Column from './Column.vue'; export default { name: 'app', data() { return { tableData: [{ date: '2016-05-02', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄' }, { date: '2016-05-04', name: '王小虎', address: '上海市普陀区金沙江路 1517 弄' }, { date: '2016-05-01', name: '王小虎', address: '上海市普陀区金沙江路 1519 弄' }, { date: '2016-05-03', name: '王小虎', address: '上海市普陀区金沙江路 1516 弄' }], tableTh: [ { label: '时间', prop: 'data' }, { label: '姓名', prop: 'name' }, { label: '地址', prop: 'address' }, { label: '时间', prop: 'data' }, { label: '姓名', prop: 'name' }, { label: '地址', prop: 'address' }, { label: '时间', prop: 'data' }, { label: '姓名', prop: 'name' }, { label: '地址', prop: 'address' }, ], options: [{ value: '选项1', label: '黄金糕' }, { value: '选项2', label: '双皮奶' }, { value: '选项3', label: '蚵仔煎' }, { value: '选项4', label: '龙须面' }, { value: '选项5', label: '北京烤鸭' }], } }, methods: {}, created () { for(let i = 0; i <= 200; i++) { this.tableData.push(this.tableData[0]) } }, components: { Column } } </script> <style> #app { font-family: 'Avenir', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; margin: 60px auto; } </style>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.