类别:程序开发

日期:2020-02-27 浏览:1941 评论:0

Avalon.js操作

<!DOCTYPE html>
    <html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="dist/avalon.js"></script>
        <script>
            var vm = avalon.define({
                $id: 'test',
                aaa: "111",
                aa: {ddd:1},
                selected: '1'
                arr: [{value:'1', text:'aaa'},{value:'2', text:'bbb'}]
                
            })          
            </script>
    </head>
    <body ms-controller="test">
        <select ms-duplex="@selected">
            <option ms-for="el in @arr" ms-attr="{value:el.value}">{{el.text}}</option>
        </select>
    </body>
    </html>
              <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>病例步骤名</th>
                                        <th>步骤分值权重</th>
                                        <th>描述</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-item="CaseStepWeightingData">
                                        <td>{{item.CaseNum}}</td>
                                        <td>{{item.OperationStepName}}</td>
                                        <td>{{item.CaseScoreWeight}}</td>
                                        <td>{{item.CaseDesc}}</td>
                                        <td><a style="color: #428bca" ms-click="EditCaseStep(item)">编辑</a>
                                            <a style="color: red; margin-left: 5px" ms-click="DelCaseStepWeighting(item)">删除</a>
                                            <a style="color: red; margin-left: 5px" ms-href="'/View/ViewForm/BLGL/'+item.StepFormCode+'.aspx?BzId='+item.CaseStepWeightingId+'&baseID='+item.CaseBaseInfoId">编辑步骤</a>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                    <tr>
                                        <th style="width: 100px">
                                            <input type="text" class="form-control" ms-duplex="CaseStepWeighting.CaseNum" /></th>
                                        <th>
                                                // ms-duplex="tempmodel.CaseStepWeighting.CaseOperationStepCode"
                                            <select id="selBZ" class="form-control" ms-duplex="@tempmodel.CaseStepWeighting.CaseOperationStepCode">
                                                <option ms-repeat-item="StepData" ms-attr-value="item.CaseOperationStepCode">{{item.OperationStepName}}</option>
                                                <option ms-if="StepData.size()==0" value="">无未添加步骤记录</option>
                                            </select></th>
                                        <th>
                                            <input type="text" class="form-control" ms-duplex="CaseStepWeighting.CaseScoreWeight" /></th>
                                        <th>
                                            <input type="text" class="form-control" ms-duplex="CaseStepWeighting.CaseDesc" /></th>
                                        <th>
                                            <input type="button" class="btn btn-sm btn-warning" value="添加步骤权重" ms-click="SaveCaseStepWeighting()" /></th>
                                    </tr>
                                </tfoot>
                            </table>


本文标题:Avalon.js对Select选择框的操作
本文链接:https://vtzw.com/post/41.html
作者授权:除特别说明外,本文由 零一 原创编译并授权 零一的世界 刊载发布。
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。
 您阅读本篇文章共花了: 

 可能感兴趣的文章

评论区

发表评论 / 取消回复

必填

选填

选填

◎欢迎讨论,请在这里发表您的看法及观点。