nubomed-ui 2.0.23 → 2.0.24

Sign up to get free protection for your applications and to get access to all the features.
package/nubomed-ui.umd.js CHANGED
@@ -62879,6 +62879,283 @@ var index = (function () {
62879
62879
  /* harmony default export */ __webpack_exports__["default"] = (index);
62880
62880
 
62881
62881
 
62882
+ /***/ }),
62883
+
62884
+ /***/ 5977:
62885
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
62886
+
62887
+ "use strict";
62888
+ // ESM COMPAT FLAG
62889
+ __webpack_require__.r(__webpack_exports__);
62890
+
62891
+ // EXPORTS
62892
+ __webpack_require__.d(__webpack_exports__, {
62893
+ "default": function() { return /* binding */ NBDialog; }
62894
+ });
62895
+
62896
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBDialog/src/index.vue?vue&type=template&id=06a176b0&scoped=true
62897
+ var render = function render() {
62898
+ var _vm = this,
62899
+ _c = _vm._self._c;
62900
+ return _c('el-dialog', {
62901
+ attrs: {
62902
+ "visible": _vm.visible,
62903
+ "show-close": _vm.showClose,
62904
+ "close-on-click-modal": false,
62905
+ "close-on-press-escape": false,
62906
+ "center": _vm.center,
62907
+ "dialog-center": _vm.dialogCenter,
62908
+ "type": _vm.size,
62909
+ "title": _vm.$slots['title-right'] ? '' : _vm.title,
62910
+ "custom-class": _vm.dialogCustomClass,
62911
+ "before-close": _vm.handleClose,
62912
+ "append-to-body": "",
62913
+ "destroy-on-close": ""
62914
+ },
62915
+ on: {
62916
+ "closed": _vm.closedDialog
62917
+ }
62918
+ }, [_c('template', {
62919
+ slot: "title"
62920
+ }, [_vm._t("title"), _vm.$slots['title-right'] ? _c('div', {
62921
+ staticClass: "el-dialog__header--has-form"
62922
+ }, [_c('span', {
62923
+ staticClass: "el-dialog__title"
62924
+ }, [_vm._v(_vm._s(_vm.title))]), _c('div', {
62925
+ staticClass: "el-dialog__right"
62926
+ }, [_vm._t("title-right")], 2)]) : _vm._e()], 2), _vm._t("default"), _c('template', {
62927
+ slot: "footer"
62928
+ }, [_vm._t("footer", function () {
62929
+ return [_vm.showCancelButton ? _c('el-button', {
62930
+ on: {
62931
+ "click": _vm.handleCancel
62932
+ }
62933
+ }, [_vm._v(_vm._s(_vm.cancelButtonText)), _vm.cancelButtonTime > -1 ? [_vm._v("(" + _vm._s(_vm.cancelAutoTime) + "S)")] : _vm._e()], 2) : _vm._e(), _vm.showConfirmButton ? _c('el-button', {
62934
+ attrs: {
62935
+ "type": "primary",
62936
+ "plain": _vm.confirmButtonPlain
62937
+ },
62938
+ on: {
62939
+ "click": _vm.handleConfirm
62940
+ }
62941
+ }, [_vm._v(_vm._s(_vm.confirmButtonText)), _vm.confirmButtonTime > -1 ? [_vm._v("(" + _vm._s(_vm.confirmAutoTime) + "S)")] : _vm._e()], 2) : _vm._e()];
62942
+ })], 2)], 2);
62943
+ };
62944
+ var staticRenderFns = [];
62945
+
62946
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBDialog/src/index.vue?vue&type=script&lang=js
62947
+ /* harmony default export */ var srcvue_type_script_lang_js = ({
62948
+ name: 'NBDialog',
62949
+ // 使用v-model即可
62950
+ model: {
62951
+ prop: 'visible',
62952
+ event: 'update'
62953
+ },
62954
+ props: {
62955
+ // 是否显示弹框
62956
+ visible: {
62957
+ type: Boolean,
62958
+ default: false
62959
+ },
62960
+ // 大小:'' 表示自定义尺寸 / small / medium / large
62961
+ size: {
62962
+ type: String,
62963
+ default: '',
62964
+ validator(value) {
62965
+ return ['', 'small', 'medium', 'large'].includes(value);
62966
+ }
62967
+ },
62968
+ // 弹框标题
62969
+ title: {
62970
+ type: String,
62971
+ default: ''
62972
+ },
62973
+ // 是否显示关闭按钮
62974
+ showClose: {
62975
+ type: Boolean,
62976
+ default: false
62977
+ },
62978
+ // 是否居中显示
62979
+ center: {
62980
+ type: Boolean,
62981
+ default: false
62982
+ },
62983
+ // 弹框是否居中
62984
+ dialogCenter: {
62985
+ type: Boolean,
62986
+ default: true
62987
+ },
62988
+ // 自定义样式
62989
+ customClass: {
62990
+ type: String,
62991
+ default: ''
62992
+ },
62993
+ // 是否显示取消按钮
62994
+ showCancelButton: {
62995
+ type: Boolean,
62996
+ default: true
62997
+ },
62998
+ // 取消按钮的文本内容,默认取消
62999
+ cancelButtonText: {
63000
+ type: String,
63001
+ default: ''
63002
+ },
63003
+ // 取消按钮倒计时时间
63004
+ cancelButtonTime: {
63005
+ type: Number,
63006
+ default: -1
63007
+ },
63008
+ // 是否显示确定按钮
63009
+ showConfirmButton: {
63010
+ type: Boolean,
63011
+ default: true
63012
+ },
63013
+ // 确定按钮的文本内容,默认确定
63014
+ confirmButtonText: {
63015
+ type: String,
63016
+ default: ''
63017
+ },
63018
+ // 确定按钮倒计时时间
63019
+ confirmButtonTime: {
63020
+ type: Number,
63021
+ default: -1
63022
+ },
63023
+ // 内容是表单
63024
+ form: {
63025
+ type: Boolean,
63026
+ default: false
63027
+ }
63028
+ },
63029
+ data() {
63030
+ return {
63031
+ cancelAutoTimer: null,
63032
+ cancelAutoTime: this.cancelButtonTime,
63033
+ confirmAutoTimer: null,
63034
+ confirmAutoTime: this.confirmButtonTime
63035
+ };
63036
+ },
63037
+ computed: {
63038
+ // 如果只显示确定按钮,那么确定按钮plain显示镂空
63039
+ confirmButtonPlain() {
63040
+ if (!this.showCancelButton && this.showConfirmButton) {
63041
+ return true;
63042
+ }
63043
+ return false;
63044
+ },
63045
+ // 如果只显示确定按钮,那么确定按钮文字默认显示知道了
63046
+ confirmButtonDefaultText() {
63047
+ // if (!this.showCancelButton && this.showConfirmButton && !this.confirmButtonText) {
63048
+ // return this.$t('nbUI.known')
63049
+ // }
63050
+ // return this.confirmButtonText || this.$t('nbUI.confirm')
63051
+ return '';
63052
+ },
63053
+ // 表单自定义样式
63054
+ dialogCustomClass() {
63055
+ let cls = 'nb-dialog';
63056
+ if (this.form) {
63057
+ cls += ` nb-form-dialog`;
63058
+ }
63059
+ if (this.customClass) {
63060
+ cls += this.customClass;
63061
+ }
63062
+ return cls;
63063
+ }
63064
+ },
63065
+ watch: {
63066
+ visible(val) {
63067
+ if (val && this.cancelButtonTime > -1) {
63068
+ this.startCancelButtonAutoTimer();
63069
+ }
63070
+ if (val && this.confirmButtonTime > -1) {
63071
+ this.startConfirmButtonAutoTimer();
63072
+ }
63073
+ }
63074
+ },
63075
+ beforeDestroy() {
63076
+ clearInterval(this.cancelAutoTimer);
63077
+ clearInterval(this.confirmAutoTimer);
63078
+ },
63079
+ methods: {
63080
+ startCancelButtonAutoTimer() {
63081
+ clearInterval(this.cancelAutoTimer);
63082
+ this.cancelAutoTime = this.cancelButtonTime;
63083
+ this.cancelAutoTimer = setInterval(() => {
63084
+ this.cancelAutoTime--;
63085
+ if (this.cancelAutoTime <= 0) {
63086
+ clearInterval(this.cancelAutoTimer);
63087
+ this.handleCancel();
63088
+ }
63089
+ }, 1000);
63090
+ },
63091
+ startConfirmButtonAutoTimer() {
63092
+ clearInterval(this.confirmAutoTimer);
63093
+ this.confirmAutoTime = this.confirmButtonTime;
63094
+ this.confirmAutoTimer = setInterval(() => {
63095
+ this.confirmAutoTime--;
63096
+ if (this.confirmAutoTime <= 0) {
63097
+ clearInterval(this.confirmAutoTimer);
63098
+ this.handleConfirm();
63099
+ }
63100
+ }, 1000);
63101
+ },
63102
+ // 取消
63103
+ handleCancel() {
63104
+ if (!this.$listeners['cancel']) {
63105
+ this.$emit('update', false);
63106
+ }
63107
+ this.$emit('cancel');
63108
+ },
63109
+ // 确定
63110
+ handleConfirm() {
63111
+ if (!this.$listeners['confirm']) {
63112
+ this.$emit('update', false);
63113
+ }
63114
+ this.$emit('confirm');
63115
+ },
63116
+ // 点击右上角关闭按钮
63117
+ handleClose() {
63118
+ this.$emit('update', false);
63119
+ },
63120
+ // 关闭弹框
63121
+ closedDialog() {
63122
+ clearInterval(this.cancelAutoTimer);
63123
+ clearInterval(this.confirmAutoTimer);
63124
+ this.$emit('closed');
63125
+ }
63126
+ }
63127
+ });
63128
+ ;// ./packages/components/NBDialog/src/index.vue?vue&type=script&lang=js
63129
+ /* harmony default export */ var NBDialog_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
63130
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
63131
+ var componentNormalizer = __webpack_require__(1656);
63132
+ ;// ./packages/components/NBDialog/src/index.vue
63133
+
63134
+
63135
+
63136
+
63137
+
63138
+ /* normalize component */
63139
+ ;
63140
+ var component = (0,componentNormalizer/* default */.A)(
63141
+ NBDialog_srcvue_type_script_lang_js,
63142
+ render,
63143
+ staticRenderFns,
63144
+ false,
63145
+ null,
63146
+ "06a176b0",
63147
+ null
63148
+
63149
+ )
63150
+
63151
+ /* harmony default export */ var src = (component.exports);
63152
+ ;// ./packages/components/NBDialog/index.js
63153
+
63154
+ src.install = function (Vue) {
63155
+ Vue.component(src.name, src);
63156
+ };
63157
+ /* harmony default export */ var NBDialog = (src);
63158
+
62882
63159
  /***/ }),
62883
63160
 
62884
63161
  /***/ 6102:
@@ -64090,6 +64367,7 @@ webpackContext.id = 1603;
64090
64367
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
64091
64368
 
64092
64369
  var map = {
64370
+ "./NBDialog/index.js": 5977,
64093
64371
  "./NBEmpty/index.js": 6102,
64094
64372
  "./NBHeader/index.js": 1678,
64095
64373
  "./NBIcon/index.js": 1343,
@@ -66715,24 +66993,19 @@ var esnext_iterator_for_each = __webpack_require__(3949);
66715
66993
  function camelToKebab(camelCaseStr) {
66716
66994
  return camelCaseStr.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
66717
66995
  }
66718
- // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
66719
- var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
66720
- var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
66721
66996
  // EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
66722
66997
  var element_ui_common = __webpack_require__(1052);
66723
66998
  ;// ./packages/feedback/nb-notify.js
66724
66999
  /*
66725
67000
  * @Author: chenghuan.dong
66726
67001
  * @Date: 2024-11-12 17:58:53
66727
- * @LastEditTime: 2024-11-13 13:40:33
67002
+ * @LastEditTime: 2024-11-13 14:29:11
66728
67003
  * @LastEditors: chenghuan.dong
66729
67004
  * @Description: 对应样式styles/element-ui/notification.scss
66730
67005
  * @FilePath: \nubomed-ui\packages\feedback\nb-notify.js
66731
67006
  */
66732
67007
 
66733
67008
 
66734
-
66735
- external_commonjs_vue_commonjs2_vue_root_Vue_default().use(element_ui_common.Notification);
66736
67009
  const types = ['success', 'warning', 'error'];
66737
67010
 
66738
67011
  /**
@@ -66909,7 +67182,7 @@ const i18n = function (fn) {
66909
67182
  /*
66910
67183
  * @Author: chenghuan.dong
66911
67184
  * @Date: 2024-11-08 17:23:47
66912
- * @LastEditTime: 2024-11-13 13:38:10
67185
+ * @LastEditTime: 2024-11-13 14:19:30
66913
67186
  * @LastEditors: chenghuan.dong
66914
67187
  * @Description: 主index.js导出全部组件
66915
67188
  * @FilePath: \nubomed-ui\packages\index.js