nubomed-ui 2.0.23 → 2.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -62869,6 +62869,283 @@ var index = (function () {
62869
62869
  /* harmony default export */ __webpack_exports__["default"] = (index);
62870
62870
 
62871
62871
 
62872
+ /***/ }),
62873
+
62874
+ /***/ 5158:
62875
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
62876
+
62877
+ "use strict";
62878
+ // ESM COMPAT FLAG
62879
+ __webpack_require__.r(__webpack_exports__);
62880
+
62881
+ // EXPORTS
62882
+ __webpack_require__.d(__webpack_exports__, {
62883
+ "default": function() { return /* binding */ NBDialog; }
62884
+ });
62885
+
62886
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
62887
+ var render = function render() {
62888
+ var _vm = this,
62889
+ _c = _vm._self._c;
62890
+ return _c('el-dialog', {
62891
+ attrs: {
62892
+ "visible": _vm.visible,
62893
+ "show-close": _vm.showClose,
62894
+ "close-on-click-modal": false,
62895
+ "close-on-press-escape": false,
62896
+ "center": _vm.center,
62897
+ "dialog-center": _vm.dialogCenter,
62898
+ "type": _vm.size,
62899
+ "title": _vm.$slots['title-right'] ? '' : _vm.title,
62900
+ "custom-class": _vm.dialogCustomClass,
62901
+ "before-close": _vm.handleClose,
62902
+ "append-to-body": "",
62903
+ "destroy-on-close": ""
62904
+ },
62905
+ on: {
62906
+ "closed": _vm.closedDialog
62907
+ }
62908
+ }, [_c('template', {
62909
+ slot: "title"
62910
+ }, [_vm._t("title"), _vm.$slots['title-right'] ? _c('div', {
62911
+ staticClass: "el-dialog__header--has-form"
62912
+ }, [_c('span', {
62913
+ staticClass: "el-dialog__title"
62914
+ }, [_vm._v(_vm._s(_vm.title))]), _c('div', {
62915
+ staticClass: "el-dialog__right"
62916
+ }, [_vm._t("title-right")], 2)]) : _vm._e()], 2), _vm._t("default"), _c('template', {
62917
+ slot: "footer"
62918
+ }, [_vm._t("footer", function () {
62919
+ return [_vm.showCancelButton ? _c('el-button', {
62920
+ on: {
62921
+ "click": _vm.handleCancel
62922
+ }
62923
+ }, [_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', {
62924
+ attrs: {
62925
+ "type": "primary",
62926
+ "plain": _vm.confirmButtonPlain
62927
+ },
62928
+ on: {
62929
+ "click": _vm.handleConfirm
62930
+ }
62931
+ }, [_vm._v(_vm._s(_vm.confirmButtonText)), _vm.confirmButtonTime > -1 ? [_vm._v("(" + _vm._s(_vm.confirmAutoTime) + "S)")] : _vm._e()], 2) : _vm._e()];
62932
+ })], 2)], 2);
62933
+ };
62934
+ var staticRenderFns = [];
62935
+
62936
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
62937
+ /* harmony default export */ var srcvue_type_script_lang_js = ({
62938
+ name: 'NBDialog',
62939
+ // 使用v-model即可
62940
+ model: {
62941
+ prop: 'visible',
62942
+ event: 'update'
62943
+ },
62944
+ props: {
62945
+ // 是否显示弹框
62946
+ visible: {
62947
+ type: Boolean,
62948
+ default: false
62949
+ },
62950
+ // 大小:'' 表示自定义尺寸 / small / medium / large
62951
+ size: {
62952
+ type: String,
62953
+ default: '',
62954
+ validator(value) {
62955
+ return ['', 'small', 'medium', 'large'].includes(value);
62956
+ }
62957
+ },
62958
+ // 弹框标题
62959
+ title: {
62960
+ type: String,
62961
+ default: ''
62962
+ },
62963
+ // 是否显示关闭按钮
62964
+ showClose: {
62965
+ type: Boolean,
62966
+ default: false
62967
+ },
62968
+ // 是否居中显示
62969
+ center: {
62970
+ type: Boolean,
62971
+ default: false
62972
+ },
62973
+ // 弹框是否居中
62974
+ dialogCenter: {
62975
+ type: Boolean,
62976
+ default: true
62977
+ },
62978
+ // 自定义样式
62979
+ customClass: {
62980
+ type: String,
62981
+ default: ''
62982
+ },
62983
+ // 是否显示取消按钮
62984
+ showCancelButton: {
62985
+ type: Boolean,
62986
+ default: true
62987
+ },
62988
+ // 取消按钮的文本内容,默认取消
62989
+ cancelButtonText: {
62990
+ type: String,
62991
+ default: ''
62992
+ },
62993
+ // 取消按钮倒计时时间
62994
+ cancelButtonTime: {
62995
+ type: Number,
62996
+ default: -1
62997
+ },
62998
+ // 是否显示确定按钮
62999
+ showConfirmButton: {
63000
+ type: Boolean,
63001
+ default: true
63002
+ },
63003
+ // 确定按钮的文本内容,默认确定
63004
+ confirmButtonText: {
63005
+ type: String,
63006
+ default: ''
63007
+ },
63008
+ // 确定按钮倒计时时间
63009
+ confirmButtonTime: {
63010
+ type: Number,
63011
+ default: -1
63012
+ },
63013
+ // 内容是表单
63014
+ form: {
63015
+ type: Boolean,
63016
+ default: false
63017
+ }
63018
+ },
63019
+ data() {
63020
+ return {
63021
+ cancelAutoTimer: null,
63022
+ cancelAutoTime: this.cancelButtonTime,
63023
+ confirmAutoTimer: null,
63024
+ confirmAutoTime: this.confirmButtonTime
63025
+ };
63026
+ },
63027
+ computed: {
63028
+ // 如果只显示确定按钮,那么确定按钮plain显示镂空
63029
+ confirmButtonPlain() {
63030
+ if (!this.showCancelButton && this.showConfirmButton) {
63031
+ return true;
63032
+ }
63033
+ return false;
63034
+ },
63035
+ // 如果只显示确定按钮,那么确定按钮文字默认显示知道了
63036
+ confirmButtonDefaultText() {
63037
+ // if (!this.showCancelButton && this.showConfirmButton && !this.confirmButtonText) {
63038
+ // return this.$t('nbUI.known')
63039
+ // }
63040
+ // return this.confirmButtonText || this.$t('nbUI.confirm')
63041
+ return '';
63042
+ },
63043
+ // 表单自定义样式
63044
+ dialogCustomClass() {
63045
+ let cls = 'nb-dialog';
63046
+ if (this.form) {
63047
+ cls += ` nb-form-dialog`;
63048
+ }
63049
+ if (this.customClass) {
63050
+ cls += this.customClass;
63051
+ }
63052
+ return cls;
63053
+ }
63054
+ },
63055
+ watch: {
63056
+ visible(val) {
63057
+ if (val && this.cancelButtonTime > -1) {
63058
+ this.startCancelButtonAutoTimer();
63059
+ }
63060
+ if (val && this.confirmButtonTime > -1) {
63061
+ this.startConfirmButtonAutoTimer();
63062
+ }
63063
+ }
63064
+ },
63065
+ beforeDestroy() {
63066
+ clearInterval(this.cancelAutoTimer);
63067
+ clearInterval(this.confirmAutoTimer);
63068
+ },
63069
+ methods: {
63070
+ startCancelButtonAutoTimer() {
63071
+ clearInterval(this.cancelAutoTimer);
63072
+ this.cancelAutoTime = this.cancelButtonTime;
63073
+ this.cancelAutoTimer = setInterval(() => {
63074
+ this.cancelAutoTime--;
63075
+ if (this.cancelAutoTime <= 0) {
63076
+ clearInterval(this.cancelAutoTimer);
63077
+ this.handleCancel();
63078
+ }
63079
+ }, 1000);
63080
+ },
63081
+ startConfirmButtonAutoTimer() {
63082
+ clearInterval(this.confirmAutoTimer);
63083
+ this.confirmAutoTime = this.confirmButtonTime;
63084
+ this.confirmAutoTimer = setInterval(() => {
63085
+ this.confirmAutoTime--;
63086
+ if (this.confirmAutoTime <= 0) {
63087
+ clearInterval(this.confirmAutoTimer);
63088
+ this.handleConfirm();
63089
+ }
63090
+ }, 1000);
63091
+ },
63092
+ // 取消
63093
+ handleCancel() {
63094
+ if (!this.$listeners['cancel']) {
63095
+ this.$emit('update', false);
63096
+ }
63097
+ this.$emit('cancel');
63098
+ },
63099
+ // 确定
63100
+ handleConfirm() {
63101
+ if (!this.$listeners['confirm']) {
63102
+ this.$emit('update', false);
63103
+ }
63104
+ this.$emit('confirm');
63105
+ },
63106
+ // 点击右上角关闭按钮
63107
+ handleClose() {
63108
+ this.$emit('update', false);
63109
+ },
63110
+ // 关闭弹框
63111
+ closedDialog() {
63112
+ clearInterval(this.cancelAutoTimer);
63113
+ clearInterval(this.confirmAutoTimer);
63114
+ this.$emit('closed');
63115
+ }
63116
+ }
63117
+ });
63118
+ ;// ./packages/components/NBDialog/src/index.vue?vue&type=script&lang=js
63119
+ /* harmony default export */ var NBDialog_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
63120
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
63121
+ var componentNormalizer = __webpack_require__(1656);
63122
+ ;// ./packages/components/NBDialog/src/index.vue
63123
+
63124
+
63125
+
63126
+
63127
+
63128
+ /* normalize component */
63129
+ ;
63130
+ var component = (0,componentNormalizer/* default */.A)(
63131
+ NBDialog_srcvue_type_script_lang_js,
63132
+ render,
63133
+ staticRenderFns,
63134
+ false,
63135
+ null,
63136
+ "06a176b0",
63137
+ null
63138
+
63139
+ )
63140
+
63141
+ /* harmony default export */ var src = (component.exports);
63142
+ ;// ./packages/components/NBDialog/index.js
63143
+
63144
+ src.install = function (Vue) {
63145
+ Vue.component(src.name, src);
63146
+ };
63147
+ /* harmony default export */ var NBDialog = (src);
63148
+
62872
63149
  /***/ }),
62873
63150
 
62874
63151
  /***/ 1946:
@@ -64080,6 +64357,7 @@ webpackContext.id = 1603;
64080
64357
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
64081
64358
 
64082
64359
  var map = {
64360
+ "./NBDialog/index.js": 5158,
64083
64361
  "./NBEmpty/index.js": 1946,
64084
64362
  "./NBHeader/index.js": 9812,
64085
64363
  "./NBIcon/index.js": 5963,
@@ -66714,7 +66992,7 @@ var element_ui_common = __webpack_require__(1052);
66714
66992
  /*
66715
66993
  * @Author: chenghuan.dong
66716
66994
  * @Date: 2024-11-12 17:58:53
66717
- * @LastEditTime: 2024-11-13 13:40:33
66995
+ * @LastEditTime: 2024-11-13 14:24:41
66718
66996
  * @LastEditors: chenghuan.dong
66719
66997
  * @Description: 对应样式styles/element-ui/notification.scss
66720
66998
  * @FilePath: \nubomed-ui\packages\feedback\nb-notify.js
@@ -66723,7 +67001,6 @@ var element_ui_common = __webpack_require__(1052);
66723
67001
 
66724
67002
 
66725
67003
  external_commonjs_vue_commonjs2_vue_root_Vue_default().use(element_ui_common.Notification);
66726
- const types = ['success', 'warning', 'error'];
66727
67004
 
66728
67005
  /**
66729
67006
  * @param {string} obj.type 图标类型, 可选值: success warning error
@@ -66752,6 +67029,7 @@ function nbNotify(obj) {
66752
67029
  }
66753
67030
 
66754
67031
  // 可直接通过$notify[type]的形式调用
67032
+ const types = ['success', 'warning', 'error'];
66755
67033
  types.forEach(type => {
66756
67034
  nbNotify[type] = obj => {
66757
67035
  if (typeof obj === 'string') {
@@ -66899,7 +67177,7 @@ const i18n = function (fn) {
66899
67177
  /*
66900
67178
  * @Author: chenghuan.dong
66901
67179
  * @Date: 2024-11-08 17:23:47
66902
- * @LastEditTime: 2024-11-13 13:38:10
67180
+ * @LastEditTime: 2024-11-13 14:19:30
66903
67181
  * @LastEditors: chenghuan.dong
66904
67182
  * @Description: 主index.js导出全部组件
66905
67183
  * @FilePath: \nubomed-ui\packages\index.js