From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 28 五月 2025 16:48:52 +0800 Subject: [PATCH] 初始化项目 --- uni_modules/wu-button/components/wu-button/props.js | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 158 insertions(+), 0 deletions(-) diff --git a/uni_modules/wu-button/components/wu-button/props.js b/uni_modules/wu-button/components/wu-button/props.js new file mode 100644 index 0000000..2694422 --- /dev/null +++ b/uni_modules/wu-button/components/wu-button/props.js @@ -0,0 +1,158 @@ +export default { + props: { + // 鏄惁缁嗚竟妗� + hairline: { + type: Boolean, + default: true + }, + // 鎸夐挳鐨勯缃牱寮忥紝info锛宲rimary锛宔rror锛寃arning锛宻uccess + type: { + type: String, + default: 'info' + }, + // 鎸夐挳灏哄锛宭arge锛宯ormal锛宻mall锛宮ini + size: { + type: String, + default: 'normal' + }, + // 鎸夐挳褰㈢姸锛宑ircle锛堜袱杈逛负鍗婂渾锛夛紝square锛堝甫鍦嗚锛� + shape: { + type: String, + default: 'square' + }, + // 鎸夐挳鏄惁闀傜┖ + plain: { + type: Boolean, + default: false + }, + // 鏄惁绂佹鐘舵�� + disabled: { + type: Boolean, + default: false + }, + // 鏄惁鍔犺浇涓� + loading: { + type: Boolean, + default: false + }, + // 鍔犺浇涓彁绀烘枃瀛� + loadingText: { + type: [String, Number], + default: '' + }, + // 鍔犺浇鐘舵�佸浘鏍囩被鍨� + loadingMode: { + type: String, + default: 'spinner' + }, + // 鍔犺浇鍥炬爣澶у皬 + loadingSize: { + type: [String, Number], + default: 14 + }, + // 寮�鏀捐兘鍔涳紝鍏蜂綋璇风湅uniapp绋冲畾鍏充簬button缁勪欢閮ㄥ垎璇存槑 + // https://uniapp.dcloud.io/component/button + openType: { + type: String, + default: '' + }, + // 鐢ㄤ簬 <form> 缁勪欢锛岀偣鍑诲垎鍒細瑙﹀彂 <form> 缁勪欢鐨� submit/reset 浜嬩欢 + // 鍙栧�间负submit锛堟彁浜よ〃鍗曪級锛宺eset锛堥噸缃〃鍗曪級 + formType: { + type: String, + default: '' + }, + // 鎵撳紑 APP 鏃讹紝鍚� APP 浼犻�掔殑鍙傛暟锛宱pen-type=launchApp鏃舵湁鏁� + // 鍙井淇″皬绋嬪簭銆丵Q灏忕▼搴忔湁鏁� + appParameter: { + type: String, + default: '' + }, + // 鎸囧畾鏄惁闃绘鏈妭鐐圭殑绁栧厛鑺傜偣鍑虹幇鐐瑰嚮鎬侊紝寰俊灏忕▼搴忔湁鏁� + hoverStopPropagation: { + type: Boolean, + default: true + }, + // 鎸囧畾杩斿洖鐢ㄦ埛淇℃伅鐨勮瑷�锛寊h_CN 绠�浣撲腑鏂囷紝zh_TW 绻佷綋涓枃锛宔n 鑻辨枃銆傚彧寰俊灏忕▼搴忔湁鏁� + lang: { + type: String, + default: 'en' + }, + // 浼氳瘽鏉ユ簮锛宱pen-type="contact"鏃舵湁鏁堛�傚彧寰俊灏忕▼搴忔湁鏁� + sessionFrom: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囨爣棰橈紝open-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠鏍囬锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessageTitle: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囩偣鍑昏烦杞皬绋嬪簭璺緞锛宱pen-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠鍒嗕韩璺緞锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessagePath: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囧浘鐗囷紝open-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠椤甸潰鎴浘锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessageImg: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず浼氳瘽鍐呮秷鎭崱鐗囷紝璁剧疆姝ゅ弬鏁颁负 true锛岀敤鎴疯繘鍏ュ鏈嶄細璇濅細鍦ㄥ彸涓嬭鏄剧ず"鍙兘瑕佸彂閫佺殑灏忕▼搴�"鎻愮ず锛� + // 鐢ㄦ埛鐐瑰嚮鍚庡彲浠ュ揩閫熷彂閫佸皬绋嬪簭娑堟伅锛宱pen-type="contact"鏃舵湁鏁� + showMessageCard: { + type: Boolean, + default: true + }, + // 棰濆浼犲弬鍙傛暟锛岀敤浜庡皬绋嬪簭鐨刣ata-xxx灞炴�э紝閫氳繃target.dataset.name鑾峰彇 + dataName: { + type: String, + default: '' + }, + // 鑺傛祦锛屼竴瀹氭椂闂村唴鍙兘瑙﹀彂涓�娆� + throttleTime: { + type: [String, Number], + default: 0 + }, + // 鎸変綇鍚庡涔呭嚭鐜扮偣鍑绘�侊紝鍗曚綅姣 + hoverStartTime: { + type: [String, Number], + default: 0 + }, + // 鎵嬫寚鏉惧紑鍚庣偣鍑绘�佷繚鐣欐椂闂达紝鍗曚綅姣 + hoverStayTime: { + type: [String, Number], + default: 200 + }, + // 鎸夐挳鏂囧瓧锛屼箣鎵�浠ラ�氳繃props浼犲叆锛屾槸鍥犱负slot浼犲叆鐨勮瘽 + // nvue涓棤娉曟帶鍒舵枃瀛楃殑鏍峰紡 + text: { + type: [String, Number], + default: '' + }, + // 鎸夐挳鍥炬爣 + icon: { + type: String, + default: '' + }, + // 鎸夐挳鍥炬爣棰滆壊 + iconColor: { + type: String, + default: '#000000' + }, + // 鎸夐挳棰滆壊锛屾敮鎸佷紶鍏inear-gradient娓愬彉鑹� + color: { + type: String, + default: '' + }, + // 鑷畾涔夋寜閽枃鏈牱寮� + customTextStyle: { + type: [Object,String], + default: ()=>{} + }, + ...uni.$w?.props?.button + } +} -- Gitblit v1.9.3