要在text或者label上显示手型图标

本文介绍如何使用 Flash MX 中的 Label 控件实现点击交互效果,通过设置 useHandCursor、buttonMode 和 mouseChildren 属性来改善用户体验。
mx:Label text="click me"
     useHandCursor="true"    
     buttonMode="true"    
     mouseChildren="false"/>  

 

<!DOCTYPE html> <html lang="zh" xmlns:th="http://www.thymeleaf.org" > <head> <th:block th:include="include :: header('新增空间信息')" /> <th:block th:include="include :: datetimepicker-css" /> </head> <body class="white-bg"> <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-temp-add"> <input name="positionId" type="hidden" id="positionId" /> <input name="managementDeptId" type="hidden" id="managementDeptId"/> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label is-required" th:text="#{task.space.categoryName}+':'">类别名称:</label> <div class="col-sm-2"> <input name="categoryName" class="form-control" type="text" maxlength="50" required> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.positionName}+':'">存放地点:</label> <div class="col-sm-2"> <div class="input-group"> <input name="positionName" class="form-control" type="text" onclick="selectPosition()" id="positionName" th:placeholder="#{asset.warehouse.selectPlace}" required readonly> <span class="input-group-addon"><i class="fa fa-search"></i></span> </div> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.position2}+':'">存放地点2:</label> <div class="col-sm-2"> <select class="area form-control m-b" data-first-title="选择二级存放地点" name="position2" id="position2" required> <option value="">请选择</option> <option th:each="position : ${position2List}" lay-search="" th:value="${position.name}" th:text="${position.name}">存放地点 </option> </select> </div> </div> </div> <hr> <div class="form-group"> <div id="element1" class="row"> <label class="col-sm-2 control-label is-required" th:text="#{task.space.position3}+':'">存放地点3:</label> <div class="col-sm-2"> <select class="area form-control m-b" data-first-title="选择三级存放地点" name="position3" id="position3" required> <option value="">请选择</option> <option th:each="position : ${position3List}" lay-search="" th:value="${position.name}" th:text="${position.name}">存放地点 </option> </select> </div> <label class="col-sm-2 control-label" th:text="#{task.space.position4}+':'">存放地点4:</label> <div class="col-sm-2"> <input name="position4" class="form-control" type="text" maxlength="25" th:placeholder="#{task.space.placeholderPosition4}"> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.purpose}+':'">用途:</label> <div class="col-sm-2"> <input name="purpose" class="form-control" type="text" maxlength="50" required> </div> </div> </div> <hr> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label is-required" th:text="#{task.space.spatialProperties}+':'">空间性质:</label> <div class="col-sm-2"> <select name="spatialProperties" class="form-control m-b" th:with="type=${@dict.getType('spatial_properties')}"> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </select> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.spatialState}+':'">空间状态:</label> <div class="col-sm-2"> <select name="spatialState" class="form-control m-b" th:with="type=${@dict.getType('spatial_state')}"> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </select> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.spaceNumber}+':'">空间编号:</label> <div class="col-sm-2"> <input name="spaceNumber" class="form-control" type="text" maxlength="50" required> </div> </div> </div> <hr> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label is-required" th:text="#{task.space.usingUnit}+':'">使用单位:</label> <div class="col-sm-2"> <input name="usingUnit" class="form-control" type="text" maxlength="50" required> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.addressName}+':'">地点名称:</label> <div class="col-sm-2"> <input name="addressName" class="form-control" type="text" maxlength="50" required> </div> <label class="col-sm-2 control-label is-required" th:text="#{asset.currency.managementDept}+':'">管理部门:</label> <div class="col-sm-2"> <div class="input-group"> <input name="managementDeptName" class="form-control" type="text" onclick="selectDeptTree1()" id="managementDept" th:placeholder="#{asset.warehouse.selectDept}" required readonly> <span class="input-group-addon"><i class="fa fa-search"></i></span> </div> </div> </div> </div> <hr> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label is-required" th:text="#{task.space.area}+':'">面积(㎡):</label> <div class="col-sm-2"> <input name="area" class="form-control" type="number" required> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.usingUnitPerson}+':'">使用单位责任人:</label> <div class="col-sm-2"> <input name="usingUnitPerson" class="form-control" type="text" required> </div> <label class="col-sm-2 control-label is-required" th:text="#{task.space.phoneNumber}+':'">联系方式:</label> <div class="col-sm-2"> <input name="phoneNumber" class="form-control" type="text" required> </div> </div> </div> <hr> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label" th:text="#{task.space.rent}+':'">租金:</label> <div class="col-sm-2"> <input name="rent" class="form-control" type="number"> </div> <label class="col-sm-2 control-label" th:text="#{task.space.leaseTerm}+':'">租赁时间:</label> <div class="col-sm-2"> <div class="input-group date"> <input name="leaseTerm" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> </div> </div> <label class="col-sm-2 control-label" th:text="#{task.space.expirationTime}+':'">到期时间:</label> <div class="col-sm-2"> <div class="input-group date"> <input name="expirationTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> </div> </div> </div> </div> <hr> <div class="form-group"> <div class="row"> <label class="col-sm-2 control-label" th:text="#{task.space.remark}+':'">备注:</label> <div class="col-sm-2"> <input name="remark" class="form-control" type="text" maxlength="100"> </div> </div> </div> <hr> </form> </div> <th:block th:include="include :: footer" /> <th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: common-js" /> <script th:inline="javascript"> var prefix = ctx + "asset/space"; var positionPrefix = ctx + "asset/escrowPosition"; var commonPrefix = ctx + "asset/common"; var count = 0; $("#form-temp-add").validate({ focusCleanup: true }); function submitHandler() { if ($.validate.form()) { var data = $("#form-temp-add").serializeArray(); $.operate.save(prefix + "/add", data); } } $("input[name='leaseTerm']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", autoclose: true, endDate: new Date() }); $("input[name='expirationTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", autoclose: true }); /* 入库资产清单-新增-选择存放地点 */ function selectPosition() { $.modal.open("选择存放地点", positionPrefix + "/positionLayer", null, null,function(index, layero) { var iframeWin = layero.find('iframe')[0]; // 执行提交方法 if (iframeWin.contentWindow.submitHandler(index, layero)) { // frame页提交成功,校验位置是否合法 // validatePositionValidate() return true; } else { console.log('错误执行!!!!') return false } }); } /* 入库资产清单-新增管理部门-选择部门树 */ function selectDeptTree1() { var treeId = $("#managementDeptId").val(); var deptId = $.common.isEmpty(treeId) ? "0" : $("#managementDeptId").val(); var url = ctx + "asset/common/selectDeptTree/" + deptId; var options = { title: '选择部门', width: "380", url: url, callBack: doSubmit1 }; $.modal.openOptions(options); } function doSubmit1(index, layero){ var tree = layero.find("iframe")[0].contentWindow.$._tree; var body = layer.getChildFrame('body', index); $("#managementDeptId").val(body.find('#treeId').val()); $("#managementDept").val(body.find('#treeName').val()); var deptId = body.find('#treeId').val(); layer.close(index); } </script> </body> </html> 这个页面中 <label class="col-sm-2 control-label" th:text="#{task.space.leaseTerm}+':'">租赁时间:</label> <div class="col-sm-2"> <div class="input-group date"> <input name="leaseTerm" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> </div> </div> <label class="col-sm-2 control-label" th:text="#{task.space.expirationTime}+':'">到期时间:</label> <div class="col-sm-2"> <div class="input-group date"> <input name="expirationTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> </div> </div> 使用了时间相关的组件,现在有一个需求,需要能清空选中的时间
最新发布
11-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值