From d1448cb0ef10f358bb7bddb4e1ec268515e0b787 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 11:46:57 +0800 Subject: [PATCH] 项目初始化 --- uni_modules/uview-ui/components/u-input/props.js | 182 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 182 insertions(+), 0 deletions(-) diff --git a/uni_modules/uview-ui/components/u-input/props.js b/uni_modules/uview-ui/components/u-input/props.js new file mode 100644 index 0000000..88917c3 --- /dev/null +++ b/uni_modules/uview-ui/components/u-input/props.js @@ -0,0 +1,182 @@ +export default { + props: { + // 杈撳叆鐨勫�� + value: { + type: [String, Number], + default: uni.$u.props.input.value + }, + // 杈撳叆妗嗙被鍨� + // number-鏁板瓧杈撳叆閿洏锛宎pp-vue涓嬪彲浠ヨ緭鍏ユ诞鐐规暟锛宎pp-nvue鍜屽皬绋嬪簭骞冲彴涓嬪彧鑳借緭鍏ユ暣鏁� + // idcard-韬唤璇佽緭鍏ラ敭鐩橈紝寰俊銆佹敮浠樺疂銆佺櫨搴︺�丵Q灏忕▼搴� + // digit-甯﹀皬鏁扮偣鐨勬暟瀛楅敭鐩橈紝App鐨刵vue椤甸潰銆佸井淇°�佹敮浠樺疂銆佺櫨搴︺�佸ご鏉°�丵Q灏忕▼搴� + // text-鏂囨湰杈撳叆閿洏 + type: { + type: String, + default: uni.$u.props.input.type + }, + // 濡傛灉 textarea 鏄湪涓�涓� position:fixed 鐨勫尯鍩燂紝闇�瑕佹樉绀烘寚瀹氬睘鎬� fixed 涓� true锛� + // 鍏煎鎬э細寰俊灏忕▼搴忋�佺櫨搴﹀皬绋嬪簭銆佸瓧鑺傝烦鍔ㄥ皬绋嬪簭銆丵Q灏忕▼搴� + fixed: { + type: Boolean, + default: uni.$u.props.input.fixed + }, + // 鏄惁绂佺敤杈撳叆妗� + disabled: { + type: Boolean, + default: uni.$u.props.input.disabled + }, + // 绂佺敤鐘舵�佹椂鐨勮儗鏅壊 + disabledColor: { + type: String, + default: uni.$u.props.input.disabledColor + }, + // 鏄惁鏄剧ず娓呴櫎鎺т欢 + clearable: { + type: Boolean, + default: uni.$u.props.input.clearable + }, + // 鏄惁瀵嗙爜绫诲瀷 + password: { + type: Boolean, + default: uni.$u.props.input.password + }, + // 鏈�澶ц緭鍏ラ暱搴︼紝璁剧疆涓� -1 鐨勬椂鍊欎笉闄愬埗鏈�澶ч暱搴� + maxlength: { + type: [String, Number], + default: uni.$u.props.input.maxlength + }, + // 杈撳叆妗嗕负绌烘椂鐨勫崰浣嶇 + placeholder: { + type: String, + default: uni.$u.props.input.placeholder + }, + // 鎸囧畾placeholder鐨勬牱寮忕被锛屾敞鎰忛〉闈㈡垨缁勪欢鐨剆tyle涓啓浜唖coped鏃讹紝闇�瑕佸湪绫诲悕鍓嶅啓/deep/ + placeholderClass: { + type: String, + default: uni.$u.props.input.placeholderClass + }, + // 鎸囧畾placeholder鐨勬牱寮� + placeholderStyle: { + type: [String, Object], + default: uni.$u.props.input.placeholderStyle + }, + // 鏄惁鏄剧ず杈撳叆瀛楁暟缁熻锛屽彧鍦� type ="text"鎴杢ype ="textarea"鏃舵湁鏁� + showWordLimit: { + type: Boolean, + default: uni.$u.props.input.showWordLimit + }, + // 璁剧疆鍙充笅瑙掓寜閽殑鏂囧瓧锛屾湁鏁堝�硷細send|search|next|go|done锛屽吋瀹规�ц瑙乽ni-app鏂囨。 + // https://uniapp.dcloud.io/component/input + // https://uniapp.dcloud.io/component/textarea + confirmType: { + type: String, + default: uni.$u.props.input.confirmType + }, + // 鐐瑰嚮閿洏鍙充笅瑙掓寜閽椂鏄惁淇濇寔閿洏涓嶆敹璧凤紝H5鏃犳晥 + confirmHold: { + type: Boolean, + default: uni.$u.props.input.confirmHold + }, + // focus鏃讹紝鐐瑰嚮椤甸潰鐨勬椂鍊欎笉鏀惰捣閿洏锛屽井淇″皬绋嬪簭鏈夋晥 + holdKeyboard: { + type: Boolean, + default: uni.$u.props.input.holdKeyboard + }, + // 鑷姩鑾峰彇鐒︾偣 + // 鍦� H5 骞冲彴鑳藉惁鑱氱劍浠ュ強杞敭鐩樻槸鍚﹁窡闅忓脊鍑猴紝鍙栧喅浜庡綋鍓嶆祻瑙堝櫒鏈韩鐨勫疄鐜般�俷vue 椤甸潰涓嶆敮鎸侊紝闇�浣跨敤缁勪欢鐨� focus()銆乥lur() 鏂规硶鎺у埗鐒︾偣 + focus: { + type: Boolean, + default: uni.$u.props.input.focus + }, + // 閿洏鏀惰捣鏃讹紝鏄惁鑷姩澶卞幓鐒︾偣锛岀洰鍓嶄粎App3.0.0+鏈夋晥 + autoBlur: { + type: Boolean, + default: uni.$u.props.input.autoBlur + }, + // 鏄惁鍘绘帀 iOS 涓嬬殑榛樿鍐呰竟璺濓紝浠呭井淇″皬绋嬪簭锛屼笖type=textarea鏃舵湁鏁� + disableDefaultPadding: { + type: Boolean, + default: uni.$u.props.input.disableDefaultPadding + }, + // 鎸囧畾focus鏃跺厜鏍囩殑浣嶇疆 + cursor: { + type: [String, Number], + default: uni.$u.props.input.cursor + }, + // 杈撳叆妗嗚仛鐒︽椂搴曢儴涓庨敭鐩樼殑璺濈 + cursorSpacing: { + type: [String, Number], + default: uni.$u.props.input.cursorSpacing + }, + // 鍏夋爣璧峰浣嶇疆锛岃嚜鍔ㄨ仛闆嗘椂鏈夋晥锛岄渶涓巗election-end鎼厤浣跨敤 + selectionStart: { + type: [String, Number], + default: uni.$u.props.input.selectionStart + }, + // 鍏夋爣缁撴潫浣嶇疆锛岃嚜鍔ㄨ仛闆嗘椂鏈夋晥锛岄渶涓巗election-start鎼厤浣跨敤 + selectionEnd: { + type: [String, Number], + default: uni.$u.props.input.selectionEnd + }, + // 閿洏寮硅捣鏃讹紝鏄惁鑷姩涓婃帹椤甸潰 + adjustPosition: { + type: Boolean, + default: uni.$u.props.input.adjustPosition + }, + // 杈撳叆妗嗗唴瀹瑰榻愭柟寮忥紝鍙�夊�间负锛歭eft|center|right + inputAlign: { + type: String, + default: uni.$u.props.input.inputAlign + }, + // 杈撳叆妗嗗瓧浣撶殑澶у皬 + fontSize: { + type: [String, Number], + default: uni.$u.props.input.fontSize + }, + // 杈撳叆妗嗗瓧浣撻鑹� + color: { + type: String, + default: uni.$u.props.input.color + }, + // 杈撳叆妗嗗墠缃浘鏍� + prefixIcon: { + type: String, + default: uni.$u.props.input.prefixIcon + }, + // 鍓嶇疆鍥炬爣鏍峰紡锛屽璞℃垨瀛楃涓� + prefixIconStyle: { + type: [String, Object], + default: uni.$u.props.input.prefixIconStyle + }, + // 杈撳叆妗嗗悗缃浘鏍� + suffixIcon: { + type: String, + default: uni.$u.props.input.suffixIcon + }, + // 鍚庣疆鍥炬爣鏍峰紡锛屽璞℃垨瀛楃涓� + suffixIconStyle: { + type: [String, Object], + default: uni.$u.props.input.suffixIconStyle + }, + // 杈规绫诲瀷锛宻urround-鍥涘懆杈规锛宐ottom-搴曢儴杈规锛宯one-鏃犺竟妗� + border: { + type: String, + default: uni.$u.props.input.border + }, + // 鏄惁鍙锛屼笌disabled涓嶅悓涔嬪鍦ㄤ簬disabled浼氱疆鐏扮粍浠讹紝鑰宺eadonly鍒欎笉浼� + readonly: { + type: Boolean, + default: uni.$u.props.input.readonly + }, + // 杈撳叆妗嗗舰鐘讹紝circle-鍦嗗舰锛宻quare-鏂瑰舰 + shape: { + type: String, + default: uni.$u.props.input.shape + }, + // 鐢ㄤ簬澶勭悊鎴栬�呰繃婊よ緭鍏ユ鍐呭鐨勬柟娉� + formatter: { + type: [Function, null], + default: uni.$u.props.input.formatter + } + } +} -- Gitblit v1.9.3