first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.uni-popup-dialog{width:300px;border-radius:11px;background-color:#fff}.uni-dialog-title{display:flex;flex-direction:row;justify-content:center;padding-top:25px}.uni-dialog-title-text{font-size:16px;font-weight:500}.uni-dialog-content{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:20px}.uni-dialog-content-text{font-size:14px;color:#6c6c6c}.uni-dialog-button-group{display:flex;flex-direction:row;border-top-color:#f5f5f5;border-top-style:solid;border-top-width:1px}.uni-dialog-button{display:flex;flex:1;flex-direction:row;justify-content:center;align-items:center;height:45px}.uni-border-left{border-left-color:#f0f0f0;border-left-style:solid;border-left-width:1px}.uni-dialog-button-text{font-size:16px;color:#333}.uni-button-color{color:#007aff}.uni-dialog-input{flex:1;font-size:14px;border:1px #eee solid;height:40px;padding:0 10px;border-radius:5px;color:#555}.uni-popup__success{color:#4cd964}.uni-popup__warn{color:#f0ad4e}.uni-popup__error{color:#dd524d}.uni-popup__info{color:#909399}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="uni-popup-dialog"><view class="uni-dialog-title"><text class="{{('uni-dialog-title-text') + ' ' + b}}">{{a}}</text></view><view a:if="{{c}}" class="uni-dialog-content"><slot><text class="uni-dialog-content-text">{{d}}</text></slot></view><view a:else class="uni-dialog-content"><slot><input class="uni-dialog-input" maxlength="{{e}}" type="{{f}}" placeholder="{{g}}" focus="{{h}}" value="{{i}}" onInput="{{j}}"></input></slot></view><view class="uni-dialog-button-group"><view a:if="{{k}}" class="uni-dialog-button" onTap="{{m}}"><text class="uni-dialog-button-text">{{l}}</text></view><view class="{{('uni-dialog-button') + ' ' + o}}" onTap="{{p}}"><text class="uni-dialog-button-text uni-button-color">{{n}}</text></view></view></view>
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";const uni_modules_uniPopup_components_uniPopup_popup=require("../uni-popup/popup.js");const common_vendor=require("../../../../common/vendor.js");const uni_modules_uniPopup_components_uniPopup_i18n_index=require("../uni-popup/i18n/index.js");const{t:t}=common_vendor.initVueI18n(uni_modules_uniPopup_components_uniPopup_i18n_index.messages);const _sfc_main={name:"uniPopupDialog",mixins:[uni_modules_uniPopup_components_uniPopup_popup.popup],emits:["confirm","close","update:modelValue","input"],props:{inputType:{type:String,default:"text"},showClose:{type:Boolean,default:true},modelValue:{type:[Number,String],default:""},placeholder:{type:[String,Number],default:""},type:{type:String,default:"error"},mode:{type:String,default:"base"},title:{type:String,default:""},content:{type:String,default:""},beforeClose:{type:Boolean,default:false},cancelText:{type:String,default:""},confirmText:{type:String,default:""},maxlength:{type:Number,default:-1},focus:{type:Boolean,default:true}},data(){return{dialogType:"error",val:""}},computed:{okText(){return this.confirmText||t("uni-popup.ok")},closeText(){return this.cancelText||t("uni-popup.cancel")},placeholderText(){return this.placeholder||t("uni-popup.placeholder")},titleText(){return this.title||t("uni-popup.title")}},watch:{type(val){this.dialogType=val},mode(val){if(val==="input"){this.dialogType="info"}},value(val){if(this.maxlength!=-1&&this.mode==="input"){this.val=val.slice(0,this.maxlength)}else{this.val=val}},val(val){this.$emit("update:modelValue",val)}},created(){this.popup.disableMask();if(this.mode==="input"){this.dialogType="info";this.val=this.value;this.val=this.modelValue}else{this.dialogType=this.type}},methods:{onOk(){if(this.mode==="input"){this.$emit("confirm",this.val)}else{this.$emit("confirm")}if(this.beforeClose)return;this.popup.close()},closeDialog(){this.$emit("close");if(this.beforeClose)return;this.popup.close()},close(){this.popup.close()}}};function _sfc_render(_ctx,_cache,$props,$setup,$data,$options){return common_vendor.e({a:common_vendor.t($options.titleText),b:common_vendor.n("uni-popup__"+$data.dialogType),c:$props.mode==="base"},$props.mode==="base"?{d:common_vendor.t($props.content)}:{e:$props.maxlength,f:$props.inputType,g:$options.placeholderText,h:$props.focus,i:$data.val,j:common_vendor.o(($event=>$data.val=$event.detail.value))},{k:$props.showClose},$props.showClose?{l:common_vendor.t($options.closeText),m:common_vendor.o(((...args)=>$options.closeDialog&&$options.closeDialog(...args)))}:{},{n:common_vendor.t($options.okText),o:common_vendor.n($props.showClose?"uni-border-left":""),p:common_vendor.o(((...args)=>$options.onOk&&$options.onOk(...args)))})}const Component=common_vendor._export_sfc(_sfc_main,[["render",_sfc_render]]);my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/i18n/index.js
vendored
Normal file
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/i18n/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const en={"uni-popup.cancel":"cancel","uni-popup.ok":"ok","uni-popup.placeholder":"pleace enter","uni-popup.title":"Hint","uni-popup.shareTitle":"Share to"};const zhHans={"uni-popup.cancel":"取消","uni-popup.ok":"确定","uni-popup.placeholder":"请输入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"};const zhHant={"uni-popup.cancel":"取消","uni-popup.ok":"確定","uni-popup.placeholder":"請輸入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"};const messages={en:en,"zh-Hans":zhHans,"zh-Hant":zhHant};exports.messages=messages;
|
||||
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/popup.js
vendored
Normal file
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/popup.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const popup={data(){return{}},created(){this.popup=this.getParent()},methods:{getParent(name="uniPopup"){let parent=this.$parent;let parentName=parent.$options.name;while(parentName!==name){parent=parent.$parent;if(!parent)return false;parentName=parent.$options.name}return parent}}};exports.popup=popup;
|
||||
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.acss
vendored
Normal file
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.acss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.uni-popup{position:fixed;z-index:99}.uni-popup.top,.uni-popup.left,.uni-popup.right{top:0}.uni-popup .uni-popup__wrapper{display:block;position:relative}.uni-popup .uni-popup__wrapper.left,.uni-popup .uni-popup__wrapper.right{padding-top:0;flex:1}.fixforpc-z-index{z-index:999}.fixforpc-top{top:0}
|
||||
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.axml
vendored
Normal file
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view a:if="{{a}}" class="{{('uni-popup') + ' ' + k + ' ' + l}}"><view onTouchStart="{{j}}"><uni-transition a:if="{{b}}" key="1" onClick="{{c}}" u-i="2f4ad777-0" onVI="__l" u-p="{{d}}"/><uni-transition u-s="{{['d']}}" key="2" onClick="{{h}}" u-i="2f4ad777-1" onVI="__l" u-p="{{i}}"><view style="{{e}}" class="{{('uni-popup__wrapper') + ' ' + f}}" onTap="{{g}}"><slot/></view></uni-transition></view></view>
|
||||
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.js
vendored
Normal file
1
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.json
vendored
Normal file
7
unpackage/dist/build/mp-alipay/uni_modules/uni-popup/components/uni-popup/uni-popup.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"uni-transition": "../../../uni-transition/components/uni-transition/uni-transition"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user