nubomed-ui 2.0.32 → 2.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nubomed-ui might be problematic. Click here for more details.
- package/nubomed-ui.common.js +463 -473
- package/nubomed-ui.common.js.map +1 -1
- package/nubomed-ui.umd.js +469 -479
- package/nubomed-ui.umd.js.map +1 -1
- package/nubomed-ui.umd.min.js +1 -1
- package/nubomed-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
package/nubomed-ui.umd.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
-
module.exports = factory(require("
|
3
|
+
module.exports = factory(require("Vue"));
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
|
-
define([], factory);
|
5
|
+
define(["Vue"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["nubomed-ui"] = factory(require("
|
7
|
+
exports["nubomed-ui"] = factory(require("Vue"));
|
8
8
|
else
|
9
9
|
root["nubomed-ui"] = factory(root["Vue"]);
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function(
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__2508__) {
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
12
12
|
/******/ var __webpack_modules__ = ({
|
13
13
|
|
@@ -1143,26 +1143,7 @@ src.install = function (Vue) {
|
|
1143
1143
|
|
1144
1144
|
/***/ }),
|
1145
1145
|
|
1146
|
-
/***/
|
1147
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1148
|
-
|
1149
|
-
"use strict";
|
1150
|
-
__webpack_require__.r(__webpack_exports__);
|
1151
|
-
/* harmony import */ var _src_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5113);
|
1152
|
-
/*
|
1153
|
-
* @Author: chenghuan.dong
|
1154
|
-
* @Date: 2024-11-14 09:43:03
|
1155
|
-
* @LastEditTime: 2024-11-14 09:54:03
|
1156
|
-
* @LastEditors: chenghuan.dong
|
1157
|
-
* @Description:
|
1158
|
-
* @FilePath: \nubomed-ui\packages\components\NBNotify\index.js
|
1159
|
-
*/
|
1160
|
-
|
1161
|
-
/* harmony default export */ __webpack_exports__["default"] = (_src_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
1162
|
-
|
1163
|
-
/***/ }),
|
1164
|
-
|
1165
|
-
/***/ 5113:
|
1146
|
+
/***/ 5168:
|
1166
1147
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1167
1148
|
|
1168
1149
|
"use strict";
|
@@ -1171,203 +1152,90 @@ __webpack_require__.r(__webpack_exports__);
|
|
1171
1152
|
|
1172
1153
|
// EXPORTS
|
1173
1154
|
__webpack_require__.d(__webpack_exports__, {
|
1174
|
-
"default": function() { return /* binding */
|
1155
|
+
"default": function() { return /* binding */ NBPagination; }
|
1175
1156
|
});
|
1176
1157
|
|
1177
|
-
|
1178
|
-
var es_array_push = __webpack_require__(4114);
|
1179
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.constructor.js
|
1180
|
-
var esnext_iterator_constructor = __webpack_require__(8992);
|
1181
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
1182
|
-
var esnext_iterator_for_each = __webpack_require__(3949);
|
1183
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
1184
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
|
1185
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
1186
|
-
;// ./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/NBNotify/src/index.vue?vue&type=template&id=15e54efa&scoped=true
|
1158
|
+
;// ./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/NBPagination/src/index.vue?vue&type=template&id=1e725708&scoped=true
|
1187
1159
|
var render = function render() {
|
1188
1160
|
var _vm = this,
|
1189
1161
|
_c = _vm._self._c;
|
1190
|
-
return _c('
|
1191
|
-
|
1192
|
-
"name": "el-notification-fade"
|
1193
|
-
}
|
1194
|
-
}, [_c('div', {
|
1195
|
-
directives: [{
|
1196
|
-
name: "show",
|
1197
|
-
rawName: "v-show",
|
1198
|
-
value: _vm.visible,
|
1199
|
-
expression: "visible"
|
1200
|
-
}],
|
1201
|
-
class: ['el-notification', 'nb-notification'],
|
1202
|
-
style: _vm.positionStyle,
|
1162
|
+
return _c('el-pagination', {
|
1163
|
+
class: `nb-pagination el-pagination--${_vm.position}`,
|
1203
1164
|
attrs: {
|
1204
|
-
"
|
1165
|
+
"current-page": _vm.currentPage,
|
1166
|
+
"page-size": _vm.pageSize,
|
1167
|
+
"total": _vm.total,
|
1168
|
+
"layout": "prev, pager, next"
|
1205
1169
|
},
|
1206
1170
|
on: {
|
1207
|
-
"
|
1208
|
-
|
1171
|
+
"update:currentPage": function ($event) {
|
1172
|
+
_vm.currentPage = $event;
|
1209
1173
|
},
|
1210
|
-
"
|
1211
|
-
|
1174
|
+
"update:current-page": function ($event) {
|
1175
|
+
_vm.currentPage = $event;
|
1212
1176
|
},
|
1213
|
-
"
|
1214
|
-
}
|
1215
|
-
}, [_vm.type || _vm.iconClass ? _c('i', {
|
1216
|
-
staticClass: "el-notification__icon",
|
1217
|
-
class: [_vm.typeClass, _vm.iconClass]
|
1218
|
-
}) : _vm._e(), _c('div', {
|
1219
|
-
staticClass: "el-notification__group",
|
1220
|
-
class: {
|
1221
|
-
'is-with-icon': _vm.typeClass || _vm.iconClass
|
1222
|
-
}
|
1223
|
-
}, [_c('h2', {
|
1224
|
-
staticClass: "el-notification__title",
|
1225
|
-
domProps: {
|
1226
|
-
"textContent": _vm._s(_vm.title)
|
1227
|
-
}
|
1228
|
-
}), _c('div', {
|
1229
|
-
directives: [{
|
1230
|
-
name: "show",
|
1231
|
-
rawName: "v-show",
|
1232
|
-
value: _vm.message,
|
1233
|
-
expression: "message"
|
1234
|
-
}],
|
1235
|
-
staticClass: "el-notification__content"
|
1236
|
-
}, [_vm._t("default", function () {
|
1237
|
-
return [!_vm.dangerouslyUseHTMLString ? _c('p', [_vm._v(_vm._s(_vm.message))]) : _vm._e(), _c('p', {
|
1238
|
-
domProps: {
|
1239
|
-
"innerHTML": _vm._s(_vm.message)
|
1240
|
-
}
|
1241
|
-
})];
|
1242
|
-
})], 2), _vm.showClose ? _c('div', {
|
1243
|
-
staticClass: "el-notification__closeBtn el-icon-close",
|
1244
|
-
on: {
|
1245
|
-
"click": function ($event) {
|
1246
|
-
$event.stopPropagation();
|
1247
|
-
return _vm.close.apply(null, arguments);
|
1248
|
-
}
|
1177
|
+
"current-change": _vm.handleChangePage
|
1249
1178
|
}
|
1250
|
-
})
|
1179
|
+
});
|
1251
1180
|
};
|
1252
1181
|
var staticRenderFns = [];
|
1253
1182
|
|
1254
|
-
;// ./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/
|
1255
|
-
let typeMap = {
|
1256
|
-
success: 'success',
|
1257
|
-
info: 'info',
|
1258
|
-
warning: 'warning',
|
1259
|
-
error: 'error'
|
1260
|
-
};
|
1183
|
+
;// ./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/NBPagination/src/index.vue?vue&type=script&lang=js
|
1261
1184
|
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
1262
|
-
name: '
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
type: '',
|
1270
|
-
showClose: false,
|
1271
|
-
customClass: '',
|
1272
|
-
iconClass: '',
|
1273
|
-
onClose: null,
|
1274
|
-
onClick: null,
|
1275
|
-
closed: false,
|
1276
|
-
verticalOffset: 0,
|
1277
|
-
timer: null,
|
1278
|
-
dangerouslyUseHTMLString: true,
|
1279
|
-
position: 'top-right'
|
1280
|
-
};
|
1281
|
-
},
|
1282
|
-
computed: {
|
1283
|
-
typeClass() {
|
1284
|
-
return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : '';
|
1185
|
+
name: 'NBPagination',
|
1186
|
+
// 分页
|
1187
|
+
props: {
|
1188
|
+
// 当前页码
|
1189
|
+
pageNo: {
|
1190
|
+
type: Number,
|
1191
|
+
default: 0
|
1285
1192
|
},
|
1286
|
-
|
1287
|
-
|
1193
|
+
// 每页显示条目个数,默认8
|
1194
|
+
pageSize: {
|
1195
|
+
type: Number,
|
1196
|
+
default: 8
|
1288
1197
|
},
|
1289
|
-
|
1290
|
-
|
1198
|
+
// 总条数
|
1199
|
+
total: {
|
1200
|
+
type: Number,
|
1201
|
+
default: 0
|
1291
1202
|
},
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1203
|
+
// 显示位置
|
1204
|
+
position: {
|
1205
|
+
type: String,
|
1206
|
+
default: '',
|
1207
|
+
validator(value) {
|
1208
|
+
return ['', 'right', 'left', 'center'].includes(value);
|
1209
|
+
}
|
1296
1210
|
}
|
1297
1211
|
},
|
1212
|
+
data() {
|
1213
|
+
return {
|
1214
|
+
currentPage: this.pageNo
|
1215
|
+
};
|
1216
|
+
},
|
1298
1217
|
watch: {
|
1299
|
-
|
1300
|
-
|
1301
|
-
this.visible = false;
|
1302
|
-
this.$el.addEventListener('transitionend', this.destroyElement);
|
1303
|
-
}
|
1218
|
+
pageNo(val) {
|
1219
|
+
this.currentPage = val;
|
1304
1220
|
}
|
1305
1221
|
},
|
1222
|
+
beforeDestroy() {},
|
1306
1223
|
methods: {
|
1307
|
-
|
1308
|
-
|
1309
|
-
this.$
|
1310
|
-
this.$el.parentNode.removeChild(this.$el);
|
1311
|
-
},
|
1312
|
-
click() {
|
1313
|
-
if (typeof this.onClick === 'function') {
|
1314
|
-
this.onClick();
|
1315
|
-
}
|
1316
|
-
},
|
1317
|
-
close() {
|
1318
|
-
this.closed = true;
|
1319
|
-
if (typeof this.onClose === 'function') {
|
1320
|
-
this.onClose();
|
1321
|
-
}
|
1322
|
-
},
|
1323
|
-
clearTimer() {
|
1324
|
-
clearTimeout(this.timer);
|
1325
|
-
},
|
1326
|
-
startTimer() {
|
1327
|
-
if (this.duration > 0) {
|
1328
|
-
this.timer = setTimeout(() => {
|
1329
|
-
if (!this.closed) {
|
1330
|
-
this.close();
|
1331
|
-
}
|
1332
|
-
}, this.duration);
|
1333
|
-
}
|
1334
|
-
},
|
1335
|
-
keydown(e) {
|
1336
|
-
if (e.keyCode === 46 || e.keyCode === 8) {
|
1337
|
-
this.clearTimer(); // detele 取消倒计时
|
1338
|
-
} else if (e.keyCode === 27) {
|
1339
|
-
// esc关闭消息
|
1340
|
-
if (!this.closed) {
|
1341
|
-
this.close();
|
1342
|
-
}
|
1343
|
-
} else {
|
1344
|
-
this.startTimer(); // 恢复倒计时
|
1345
|
-
}
|
1346
|
-
}
|
1347
|
-
},
|
1348
|
-
mounted() {
|
1349
|
-
if (this.duration > 0) {
|
1350
|
-
this.timer = setTimeout(() => {
|
1351
|
-
if (!this.closed) {
|
1352
|
-
this.close();
|
1353
|
-
}
|
1354
|
-
}, this.duration);
|
1224
|
+
// 切换页码
|
1225
|
+
handleChangePage() {
|
1226
|
+
this.$emit('change', this.currentPage);
|
1355
1227
|
}
|
1356
|
-
document.addEventListener('keydown', this.keydown);
|
1357
|
-
},
|
1358
|
-
beforeDestroy() {
|
1359
|
-
document.removeEventListener('keydown', this.keydown);
|
1360
1228
|
}
|
1361
1229
|
});
|
1362
|
-
;// ./packages/components/
|
1363
|
-
/* harmony default export */ var
|
1364
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/
|
1365
|
-
var
|
1366
|
-
;// ./packages/components/
|
1230
|
+
;// ./packages/components/NBPagination/src/index.vue?vue&type=script&lang=js
|
1231
|
+
/* harmony default export */ var NBPagination_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
1232
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBPagination/src/index.vue?vue&type=style&index=0&id=1e725708&prod&lang=scss&scoped=true
|
1233
|
+
var srcvue_type_style_index_0_id_1e725708_prod_lang_scss_scoped_true = __webpack_require__(4136);
|
1234
|
+
;// ./packages/components/NBPagination/src/index.vue?vue&type=style&index=0&id=1e725708&prod&lang=scss&scoped=true
|
1367
1235
|
|
1368
1236
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
1369
1237
|
var componentNormalizer = __webpack_require__(1656);
|
1370
|
-
;// ./packages/components/
|
1238
|
+
;// ./packages/components/NBPagination/src/index.vue
|
1371
1239
|
|
1372
1240
|
|
1373
1241
|
|
@@ -1377,240 +1245,32 @@ var componentNormalizer = __webpack_require__(1656);
|
|
1377
1245
|
/* normalize component */
|
1378
1246
|
|
1379
1247
|
var component = (0,componentNormalizer/* default */.A)(
|
1380
|
-
|
1248
|
+
NBPagination_srcvue_type_script_lang_js,
|
1381
1249
|
render,
|
1382
1250
|
staticRenderFns,
|
1383
1251
|
false,
|
1384
1252
|
null,
|
1385
|
-
"
|
1253
|
+
"1e725708",
|
1386
1254
|
null
|
1387
1255
|
|
1388
1256
|
)
|
1389
1257
|
|
1390
1258
|
/* harmony default export */ var src = (component.exports);
|
1391
|
-
;// ./packages/components/
|
1259
|
+
;// ./packages/components/NBPagination/index.js
|
1392
1260
|
|
1261
|
+
src.install = function (Vue) {
|
1262
|
+
Vue.component(src.name, src);
|
1263
|
+
};
|
1264
|
+
/* harmony default export */ var NBPagination = (src);
|
1393
1265
|
|
1266
|
+
/***/ }),
|
1394
1267
|
|
1395
|
-
|
1396
|
-
|
1397
|
-
* @Date: 2024-11-14 09:44:58
|
1398
|
-
* @LastEditTime: 2024-11-14 10:06:12
|
1399
|
-
* @LastEditors: chenghuan.dong
|
1400
|
-
* @Description:
|
1401
|
-
* @FilePath: \nubomed-ui\packages\components\NBNotify\src\index.js
|
1402
|
-
*/
|
1268
|
+
/***/ 5749:
|
1269
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1403
1270
|
|
1404
|
-
|
1405
|
-
//
|
1406
|
-
|
1407
|
-
// import { isVNode } from '../../../utils/vdom'
|
1408
|
-
const NotificationConstructor = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend(src);
|
1409
|
-
let instance;
|
1410
|
-
let instances = [];
|
1411
|
-
let seed = 1;
|
1412
|
-
const Notification = function (options) {
|
1413
|
-
if ((external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$isServer) return;
|
1414
|
-
options = Object.assign({}, options);
|
1415
|
-
const userOnClose = options.onClose;
|
1416
|
-
const id = 'notification_' + seed++;
|
1417
|
-
const position = options.position || 'top-right';
|
1418
|
-
options.onClose = function () {
|
1419
|
-
Notification.close(id, userOnClose);
|
1420
|
-
};
|
1421
|
-
instance = new NotificationConstructor({
|
1422
|
-
data: options
|
1423
|
-
});
|
1424
|
-
instance.$slots.default = [options.message];
|
1425
|
-
options.message = 'REPLACED_BY_VNODE';
|
1426
|
-
instance.id = id;
|
1427
|
-
instance.$mount();
|
1428
|
-
document.body.appendChild(instance.$el);
|
1429
|
-
instance.visible = true;
|
1430
|
-
instance.dom = instance.$el;
|
1431
|
-
// instance.dom.style.zIndex = PopupManager.nextZIndex()
|
1432
|
-
|
1433
|
-
let verticalOffset = options.offset || 0;
|
1434
|
-
instances.filter(item => item.position === position).forEach(item => {
|
1435
|
-
verticalOffset += item.$el.offsetHeight + 16;
|
1436
|
-
});
|
1437
|
-
verticalOffset += 16;
|
1438
|
-
instance.verticalOffset = verticalOffset;
|
1439
|
-
instances.push(instance);
|
1440
|
-
return instance;
|
1441
|
-
};
|
1442
|
-
['success', 'warning', 'info', 'error'].forEach(type => {
|
1443
|
-
Notification[type] = options => {
|
1444
|
-
if (typeof options === 'string') {
|
1445
|
-
options = {
|
1446
|
-
message: options
|
1447
|
-
};
|
1448
|
-
}
|
1449
|
-
options.type = type;
|
1450
|
-
return Notification(options);
|
1451
|
-
};
|
1452
|
-
});
|
1453
|
-
Notification.close = function (id, userOnClose) {
|
1454
|
-
let index = -1;
|
1455
|
-
const len = instances.length;
|
1456
|
-
const instance = instances.filter((instance, i) => {
|
1457
|
-
if (instance.id === id) {
|
1458
|
-
index = i;
|
1459
|
-
return true;
|
1460
|
-
}
|
1461
|
-
return false;
|
1462
|
-
})[0];
|
1463
|
-
if (!instance) return;
|
1464
|
-
if (typeof userOnClose === 'function') {
|
1465
|
-
userOnClose(instance);
|
1466
|
-
}
|
1467
|
-
instances.splice(index, 1);
|
1468
|
-
if (len <= 1) return;
|
1469
|
-
const position = instance.position;
|
1470
|
-
const removedHeight = instance.dom.offsetHeight;
|
1471
|
-
for (let i = index; i < len - 1; i++) {
|
1472
|
-
if (instances[i].position === position) {
|
1473
|
-
instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
|
1474
|
-
}
|
1475
|
-
}
|
1476
|
-
};
|
1477
|
-
Notification.closeAll = function () {
|
1478
|
-
for (let i = instances.length - 1; i >= 0; i--) {
|
1479
|
-
instances[i].close();
|
1480
|
-
}
|
1481
|
-
};
|
1482
|
-
/* harmony default export */ var NBNotify_src = (Notification);
|
1483
|
-
|
1484
|
-
/***/ }),
|
1485
|
-
|
1486
|
-
/***/ 5168:
|
1487
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1488
|
-
|
1489
|
-
"use strict";
|
1490
|
-
// ESM COMPAT FLAG
|
1491
|
-
__webpack_require__.r(__webpack_exports__);
|
1492
|
-
|
1493
|
-
// EXPORTS
|
1494
|
-
__webpack_require__.d(__webpack_exports__, {
|
1495
|
-
"default": function() { return /* binding */ NBPagination; }
|
1496
|
-
});
|
1497
|
-
|
1498
|
-
;// ./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/NBPagination/src/index.vue?vue&type=template&id=1e725708&scoped=true
|
1499
|
-
var render = function render() {
|
1500
|
-
var _vm = this,
|
1501
|
-
_c = _vm._self._c;
|
1502
|
-
return _c('el-pagination', {
|
1503
|
-
class: `nb-pagination el-pagination--${_vm.position}`,
|
1504
|
-
attrs: {
|
1505
|
-
"current-page": _vm.currentPage,
|
1506
|
-
"page-size": _vm.pageSize,
|
1507
|
-
"total": _vm.total,
|
1508
|
-
"layout": "prev, pager, next"
|
1509
|
-
},
|
1510
|
-
on: {
|
1511
|
-
"update:currentPage": function ($event) {
|
1512
|
-
_vm.currentPage = $event;
|
1513
|
-
},
|
1514
|
-
"update:current-page": function ($event) {
|
1515
|
-
_vm.currentPage = $event;
|
1516
|
-
},
|
1517
|
-
"current-change": _vm.handleChangePage
|
1518
|
-
}
|
1519
|
-
});
|
1520
|
-
};
|
1521
|
-
var staticRenderFns = [];
|
1522
|
-
|
1523
|
-
;// ./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/NBPagination/src/index.vue?vue&type=script&lang=js
|
1524
|
-
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
1525
|
-
name: 'NBPagination',
|
1526
|
-
// 分页
|
1527
|
-
props: {
|
1528
|
-
// 当前页码
|
1529
|
-
pageNo: {
|
1530
|
-
type: Number,
|
1531
|
-
default: 0
|
1532
|
-
},
|
1533
|
-
// 每页显示条目个数,默认8
|
1534
|
-
pageSize: {
|
1535
|
-
type: Number,
|
1536
|
-
default: 8
|
1537
|
-
},
|
1538
|
-
// 总条数
|
1539
|
-
total: {
|
1540
|
-
type: Number,
|
1541
|
-
default: 0
|
1542
|
-
},
|
1543
|
-
// 显示位置
|
1544
|
-
position: {
|
1545
|
-
type: String,
|
1546
|
-
default: '',
|
1547
|
-
validator(value) {
|
1548
|
-
return ['', 'right', 'left', 'center'].includes(value);
|
1549
|
-
}
|
1550
|
-
}
|
1551
|
-
},
|
1552
|
-
data() {
|
1553
|
-
return {
|
1554
|
-
currentPage: this.pageNo
|
1555
|
-
};
|
1556
|
-
},
|
1557
|
-
watch: {
|
1558
|
-
pageNo(val) {
|
1559
|
-
this.currentPage = val;
|
1560
|
-
}
|
1561
|
-
},
|
1562
|
-
beforeDestroy() {},
|
1563
|
-
methods: {
|
1564
|
-
// 切换页码
|
1565
|
-
handleChangePage() {
|
1566
|
-
this.$emit('change', this.currentPage);
|
1567
|
-
}
|
1568
|
-
}
|
1569
|
-
});
|
1570
|
-
;// ./packages/components/NBPagination/src/index.vue?vue&type=script&lang=js
|
1571
|
-
/* harmony default export */ var NBPagination_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
1572
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBPagination/src/index.vue?vue&type=style&index=0&id=1e725708&prod&lang=scss&scoped=true
|
1573
|
-
var srcvue_type_style_index_0_id_1e725708_prod_lang_scss_scoped_true = __webpack_require__(4136);
|
1574
|
-
;// ./packages/components/NBPagination/src/index.vue?vue&type=style&index=0&id=1e725708&prod&lang=scss&scoped=true
|
1575
|
-
|
1576
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
1577
|
-
var componentNormalizer = __webpack_require__(1656);
|
1578
|
-
;// ./packages/components/NBPagination/src/index.vue
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
;
|
1583
|
-
|
1584
|
-
|
1585
|
-
/* normalize component */
|
1586
|
-
|
1587
|
-
var component = (0,componentNormalizer/* default */.A)(
|
1588
|
-
NBPagination_srcvue_type_script_lang_js,
|
1589
|
-
render,
|
1590
|
-
staticRenderFns,
|
1591
|
-
false,
|
1592
|
-
null,
|
1593
|
-
"1e725708",
|
1594
|
-
null
|
1595
|
-
|
1596
|
-
)
|
1597
|
-
|
1598
|
-
/* harmony default export */ var src = (component.exports);
|
1599
|
-
;// ./packages/components/NBPagination/index.js
|
1600
|
-
|
1601
|
-
src.install = function (Vue) {
|
1602
|
-
Vue.component(src.name, src);
|
1603
|
-
};
|
1604
|
-
/* harmony default export */ var NBPagination = (src);
|
1605
|
-
|
1606
|
-
/***/ }),
|
1607
|
-
|
1608
|
-
/***/ 5749:
|
1609
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1610
|
-
|
1611
|
-
"use strict";
|
1612
|
-
// ESM COMPAT FLAG
|
1613
|
-
__webpack_require__.r(__webpack_exports__);
|
1271
|
+
"use strict";
|
1272
|
+
// ESM COMPAT FLAG
|
1273
|
+
__webpack_require__.r(__webpack_exports__);
|
1614
1274
|
|
1615
1275
|
// EXPORTS
|
1616
1276
|
__webpack_require__.d(__webpack_exports__, {
|
@@ -2167,7 +1827,7 @@ webpackContext.id = 1603;
|
|
2167
1827
|
|
2168
1828
|
/***/ }),
|
2169
1829
|
|
2170
|
-
/***/
|
1830
|
+
/***/ 3798:
|
2171
1831
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2172
1832
|
|
2173
1833
|
var map = {
|
@@ -2176,8 +1836,6 @@ var map = {
|
|
2176
1836
|
"./NBFullDialog/index.js": 2064,
|
2177
1837
|
"./NBHeader/index.js": 1678,
|
2178
1838
|
"./NBIcon/index.js": 1343,
|
2179
|
-
"./NBNotify/index.js": 135,
|
2180
|
-
"./NBNotify/src/index.js": 5113,
|
2181
1839
|
"./NBPagination/index.js": 5168,
|
2182
1840
|
"./NBSummaryBar/index.js": 5749,
|
2183
1841
|
"./NBTag/index.js": 7996
|
@@ -2201,7 +1859,7 @@ webpackContext.keys = function webpackContextKeys() {
|
|
2201
1859
|
};
|
2202
1860
|
webpackContext.resolve = webpackContextResolve;
|
2203
1861
|
module.exports = webpackContext;
|
2204
|
-
webpackContext.id =
|
1862
|
+
webpackContext.id = 3798;
|
2205
1863
|
|
2206
1864
|
/***/ }),
|
2207
1865
|
|
@@ -2285,11 +1943,11 @@ module.exports = __webpack_require__.p + "fonts/iconfont.c068c01a.woff";
|
|
2285
1943
|
|
2286
1944
|
/***/ }),
|
2287
1945
|
|
2288
|
-
/***/
|
1946
|
+
/***/ 2508:
|
2289
1947
|
/***/ (function(module) {
|
2290
1948
|
|
2291
1949
|
"use strict";
|
2292
|
-
module.exports =
|
1950
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__2508__;
|
2293
1951
|
|
2294
1952
|
/***/ }),
|
2295
1953
|
|
@@ -4765,7 +4423,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
4765
4423
|
|
4766
4424
|
// EXPORTS
|
4767
4425
|
__webpack_require__.d(__webpack_exports__, {
|
4768
|
-
|
4426
|
+
components: function() { return /* reexport */ components; },
|
4427
|
+
"default": function() { return /* binding */ entry_lib; },
|
4428
|
+
i18n: function() { return /* reexport */ packages_i18n; },
|
4429
|
+
locale: function() { return /* reexport */ locale; }
|
4769
4430
|
});
|
4770
4431
|
|
4771
4432
|
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
@@ -4800,10 +4461,6 @@ var esnext_iterator_for_each = __webpack_require__(3949);
|
|
4800
4461
|
function camelToKebab(camelCaseStr) {
|
4801
4462
|
return camelCaseStr.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
4802
4463
|
}
|
4803
|
-
// EXTERNAL MODULE: ./packages/components/NBNotify/index.js
|
4804
|
-
var NBNotify = __webpack_require__(135);
|
4805
|
-
// EXTERNAL MODULE: ./packages/iconfont/iconfont.css
|
4806
|
-
var iconfont = __webpack_require__(3050);
|
4807
4464
|
;// ./locale/lang/zh-CN.js
|
4808
4465
|
/*
|
4809
4466
|
* @Author: chenghuan.dong
|
@@ -4927,63 +4584,396 @@ const i18n = function (fn) {
|
|
4927
4584
|
t,
|
4928
4585
|
i18n
|
4929
4586
|
});
|
4930
|
-
|
4931
|
-
|
4932
|
-
|
4933
|
-
|
4934
|
-
|
4935
|
-
|
4936
|
-
|
4937
|
-
|
4938
|
-
|
4939
|
-
|
4940
|
-
* @FilePath: \nubomed-ui\packages\index.js
|
4941
|
-
*/
|
4942
|
-
|
4943
|
-
|
4944
|
-
|
4945
|
-
|
4946
|
-
// 使用iconfont图标
|
4947
|
-
|
4948
|
-
|
4949
|
-
// 获取所有组件
|
4950
|
-
const components = [];
|
4951
|
-
const req = __webpack_require__(2162);
|
4952
|
-
req.keys().forEach(v => {
|
4953
|
-
components.push(req(v).default);
|
4954
|
-
});
|
4955
|
-
|
4956
|
-
const install = function (Vue, options = {}) {
|
4957
|
-
//设置多语言
|
4958
|
-
locale.use(options.locale);
|
4959
|
-
locale.i18n(options.i18n);
|
4960
|
-
|
4961
|
-
// 组件
|
4962
|
-
if (install.installed) return;
|
4963
|
-
components.forEach(component => {
|
4964
|
-
const name = 'nb-' + camelToKebab(component.name.slice(2));
|
4965
|
-
const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination']; //
|
4966
|
-
console.log((installNames.includes(name) ? '√ ' : '? ') + name);
|
4967
|
-
if (installNames.includes(name)) {
|
4968
|
-
Vue.component('nb-' + camelToKebab(component.name.slice(2)), component);
|
4587
|
+
// EXTERNAL MODULE: external "Vue"
|
4588
|
+
var external_Vue_ = __webpack_require__(2508);
|
4589
|
+
var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_);
|
4590
|
+
;// ./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/NBNotify/src/index.vue?vue&type=template&id=15e54efa&scoped=true
|
4591
|
+
var render = function render() {
|
4592
|
+
var _vm = this,
|
4593
|
+
_c = _vm._self._c;
|
4594
|
+
return _c('transition', {
|
4595
|
+
attrs: {
|
4596
|
+
"name": "el-notification-fade"
|
4969
4597
|
}
|
4970
|
-
}
|
4971
|
-
|
4972
|
-
|
4973
|
-
|
4974
|
-
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
4978
|
-
|
4979
|
-
|
4980
|
-
|
4981
|
-
|
4982
|
-
|
4983
|
-
|
4984
|
-
|
4985
|
-
|
4986
|
-
|
4598
|
+
}, [_c('div', {
|
4599
|
+
directives: [{
|
4600
|
+
name: "show",
|
4601
|
+
rawName: "v-show",
|
4602
|
+
value: _vm.visible,
|
4603
|
+
expression: "visible"
|
4604
|
+
}],
|
4605
|
+
class: ['el-notification', 'nb-notification'],
|
4606
|
+
style: _vm.positionStyle,
|
4607
|
+
attrs: {
|
4608
|
+
"role": "alert"
|
4609
|
+
},
|
4610
|
+
on: {
|
4611
|
+
"mouseenter": function ($event) {
|
4612
|
+
return _vm.clearTimer();
|
4613
|
+
},
|
4614
|
+
"mouseleave": function ($event) {
|
4615
|
+
return _vm.startTimer();
|
4616
|
+
},
|
4617
|
+
"click": _vm.click
|
4618
|
+
}
|
4619
|
+
}, [_vm.type || _vm.iconClass ? _c('i', {
|
4620
|
+
staticClass: "el-notification__icon",
|
4621
|
+
class: [_vm.typeClass, _vm.iconClass]
|
4622
|
+
}) : _vm._e(), _c('div', {
|
4623
|
+
staticClass: "el-notification__group",
|
4624
|
+
class: {
|
4625
|
+
'is-with-icon': _vm.typeClass || _vm.iconClass
|
4626
|
+
}
|
4627
|
+
}, [_c('h2', {
|
4628
|
+
staticClass: "el-notification__title",
|
4629
|
+
domProps: {
|
4630
|
+
"textContent": _vm._s(_vm.title)
|
4631
|
+
}
|
4632
|
+
}), _c('div', {
|
4633
|
+
directives: [{
|
4634
|
+
name: "show",
|
4635
|
+
rawName: "v-show",
|
4636
|
+
value: _vm.message,
|
4637
|
+
expression: "message"
|
4638
|
+
}],
|
4639
|
+
staticClass: "el-notification__content"
|
4640
|
+
}, [_vm._t("default", function () {
|
4641
|
+
return [!_vm.dangerouslyUseHTMLString ? _c('p', [_vm._v(_vm._s(_vm.message))]) : _vm._e(), _c('p', {
|
4642
|
+
domProps: {
|
4643
|
+
"innerHTML": _vm._s(_vm.message)
|
4644
|
+
}
|
4645
|
+
})];
|
4646
|
+
})], 2), _vm.showClose ? _c('div', {
|
4647
|
+
staticClass: "el-notification__closeBtn el-icon-close",
|
4648
|
+
on: {
|
4649
|
+
"click": function ($event) {
|
4650
|
+
$event.stopPropagation();
|
4651
|
+
return _vm.close.apply(null, arguments);
|
4652
|
+
}
|
4653
|
+
}
|
4654
|
+
}) : _vm._e()])])]);
|
4655
|
+
};
|
4656
|
+
var staticRenderFns = [];
|
4657
|
+
|
4658
|
+
;// ./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/NBNotify/src/index.vue?vue&type=script&lang=js
|
4659
|
+
let typeMap = {
|
4660
|
+
success: 'success',
|
4661
|
+
info: 'info',
|
4662
|
+
warning: 'warning',
|
4663
|
+
error: 'error'
|
4664
|
+
};
|
4665
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
4666
|
+
name: 'NBNotify',
|
4667
|
+
data() {
|
4668
|
+
return {
|
4669
|
+
visible: false,
|
4670
|
+
title: '',
|
4671
|
+
message: '',
|
4672
|
+
duration: 4500,
|
4673
|
+
type: '',
|
4674
|
+
showClose: false,
|
4675
|
+
customClass: '',
|
4676
|
+
iconClass: '',
|
4677
|
+
onClose: null,
|
4678
|
+
onClick: null,
|
4679
|
+
closed: false,
|
4680
|
+
verticalOffset: 0,
|
4681
|
+
timer: null,
|
4682
|
+
dangerouslyUseHTMLString: true,
|
4683
|
+
position: 'top-right'
|
4684
|
+
};
|
4685
|
+
},
|
4686
|
+
computed: {
|
4687
|
+
typeClass() {
|
4688
|
+
return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : '';
|
4689
|
+
},
|
4690
|
+
horizontalClass() {
|
4691
|
+
return this.position.indexOf('right') > -1 ? 'right' : 'left';
|
4692
|
+
},
|
4693
|
+
verticalProperty() {
|
4694
|
+
return /^top-/.test(this.position) ? 'top' : 'bottom';
|
4695
|
+
},
|
4696
|
+
positionStyle() {
|
4697
|
+
return {
|
4698
|
+
[this.verticalProperty]: `${this.verticalOffset}px`
|
4699
|
+
};
|
4700
|
+
}
|
4701
|
+
},
|
4702
|
+
watch: {
|
4703
|
+
closed(newVal) {
|
4704
|
+
if (newVal) {
|
4705
|
+
this.visible = false;
|
4706
|
+
this.$el.addEventListener('transitionend', this.destroyElement);
|
4707
|
+
}
|
4708
|
+
}
|
4709
|
+
},
|
4710
|
+
methods: {
|
4711
|
+
destroyElement() {
|
4712
|
+
this.$el.removeEventListener('transitionend', this.destroyElement);
|
4713
|
+
this.$destroy(true);
|
4714
|
+
this.$el.parentNode.removeChild(this.$el);
|
4715
|
+
},
|
4716
|
+
click() {
|
4717
|
+
if (typeof this.onClick === 'function') {
|
4718
|
+
this.onClick();
|
4719
|
+
}
|
4720
|
+
},
|
4721
|
+
close() {
|
4722
|
+
this.closed = true;
|
4723
|
+
if (typeof this.onClose === 'function') {
|
4724
|
+
this.onClose();
|
4725
|
+
}
|
4726
|
+
},
|
4727
|
+
clearTimer() {
|
4728
|
+
clearTimeout(this.timer);
|
4729
|
+
},
|
4730
|
+
startTimer() {
|
4731
|
+
if (this.duration > 0) {
|
4732
|
+
this.timer = setTimeout(() => {
|
4733
|
+
if (!this.closed) {
|
4734
|
+
this.close();
|
4735
|
+
}
|
4736
|
+
}, this.duration);
|
4737
|
+
}
|
4738
|
+
},
|
4739
|
+
keydown(e) {
|
4740
|
+
if (e.keyCode === 46 || e.keyCode === 8) {
|
4741
|
+
this.clearTimer(); // detele 取消倒计时
|
4742
|
+
} else if (e.keyCode === 27) {
|
4743
|
+
// esc关闭消息
|
4744
|
+
if (!this.closed) {
|
4745
|
+
this.close();
|
4746
|
+
}
|
4747
|
+
} else {
|
4748
|
+
this.startTimer(); // 恢复倒计时
|
4749
|
+
}
|
4750
|
+
}
|
4751
|
+
},
|
4752
|
+
mounted() {
|
4753
|
+
if (this.duration > 0) {
|
4754
|
+
this.timer = setTimeout(() => {
|
4755
|
+
if (!this.closed) {
|
4756
|
+
this.close();
|
4757
|
+
}
|
4758
|
+
}, this.duration);
|
4759
|
+
}
|
4760
|
+
document.addEventListener('keydown', this.keydown);
|
4761
|
+
},
|
4762
|
+
beforeDestroy() {
|
4763
|
+
document.removeEventListener('keydown', this.keydown);
|
4764
|
+
}
|
4765
|
+
});
|
4766
|
+
;// ./packages/components/NBNotify/src/index.vue?vue&type=script&lang=js
|
4767
|
+
/* harmony default export */ var NBNotify_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
4768
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/components/NBNotify/src/index.vue?vue&type=style&index=0&id=15e54efa&prod&lang=scss&scoped=true
|
4769
|
+
var srcvue_type_style_index_0_id_15e54efa_prod_lang_scss_scoped_true = __webpack_require__(8974);
|
4770
|
+
;// ./packages/components/NBNotify/src/index.vue?vue&type=style&index=0&id=15e54efa&prod&lang=scss&scoped=true
|
4771
|
+
|
4772
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
4773
|
+
var componentNormalizer = __webpack_require__(1656);
|
4774
|
+
;// ./packages/components/NBNotify/src/index.vue
|
4775
|
+
|
4776
|
+
|
4777
|
+
|
4778
|
+
;
|
4779
|
+
|
4780
|
+
|
4781
|
+
/* normalize component */
|
4782
|
+
|
4783
|
+
var component = (0,componentNormalizer/* default */.A)(
|
4784
|
+
NBNotify_srcvue_type_script_lang_js,
|
4785
|
+
render,
|
4786
|
+
staticRenderFns,
|
4787
|
+
false,
|
4788
|
+
null,
|
4789
|
+
"15e54efa",
|
4790
|
+
null
|
4791
|
+
|
4792
|
+
)
|
4793
|
+
|
4794
|
+
/* harmony default export */ var NBNotify_src = (component.exports);
|
4795
|
+
;// ./packages/components/NBNotify/src/notify.js
|
4796
|
+
|
4797
|
+
|
4798
|
+
|
4799
|
+
/*
|
4800
|
+
* @Author: chenghuan.dong
|
4801
|
+
* @Date: 2024-11-14 09:44:58
|
4802
|
+
* @LastEditTime: 2024-11-14 10:47:42
|
4803
|
+
* @LastEditors: chenghuan.dong
|
4804
|
+
* @Description:
|
4805
|
+
* @FilePath: \nubomed-ui\packages\components\NBNotify\src\notify.js
|
4806
|
+
*/
|
4807
|
+
|
4808
|
+
|
4809
|
+
// import merge from '../../../utils/merge'
|
4810
|
+
// import { PopupManager } from '../../../utils/popup'
|
4811
|
+
// import { isVNode } from '../../../utils/vdom'
|
4812
|
+
|
4813
|
+
let instance;
|
4814
|
+
let instances = [];
|
4815
|
+
let seed = 1;
|
4816
|
+
const Notification = function (options) {
|
4817
|
+
console.log('Vue', (external_Vue_default()));
|
4818
|
+
if (!(external_Vue_default())) {
|
4819
|
+
return;
|
4820
|
+
}
|
4821
|
+
if ((external_Vue_default()).prototype.$isServer) return;
|
4822
|
+
options = Object.assign({}, options);
|
4823
|
+
const userOnClose = options.onClose;
|
4824
|
+
const id = 'notification_' + seed++;
|
4825
|
+
const position = options.position || 'top-right';
|
4826
|
+
options.onClose = function () {
|
4827
|
+
Notification.close(id, userOnClose);
|
4828
|
+
};
|
4829
|
+
const NotificationConstructor = external_Vue_default().extend(NBNotify_src);
|
4830
|
+
instance = new NotificationConstructor({
|
4831
|
+
data: options
|
4832
|
+
});
|
4833
|
+
instance.$slots.default = [options.message];
|
4834
|
+
options.message = 'REPLACED_BY_VNODE';
|
4835
|
+
instance.id = id;
|
4836
|
+
instance.$mount();
|
4837
|
+
document.body.appendChild(instance.$el);
|
4838
|
+
instance.visible = true;
|
4839
|
+
instance.dom = instance.$el;
|
4840
|
+
// instance.dom.style.zIndex = PopupManager.nextZIndex()
|
4841
|
+
|
4842
|
+
let verticalOffset = options.offset || 0;
|
4843
|
+
instances.filter(item => item.position === position).forEach(item => {
|
4844
|
+
verticalOffset += item.$el.offsetHeight + 16;
|
4845
|
+
});
|
4846
|
+
verticalOffset += 16;
|
4847
|
+
instance.verticalOffset = verticalOffset;
|
4848
|
+
instances.push(instance);
|
4849
|
+
return instance;
|
4850
|
+
};
|
4851
|
+
['success', 'warning', 'info', 'error'].forEach(type => {
|
4852
|
+
Notification[type] = options => {
|
4853
|
+
if (typeof options === 'string') {
|
4854
|
+
options = {
|
4855
|
+
message: options
|
4856
|
+
};
|
4857
|
+
}
|
4858
|
+
options.type = type;
|
4859
|
+
return Notification(options);
|
4860
|
+
};
|
4861
|
+
});
|
4862
|
+
Notification.close = function (id, userOnClose) {
|
4863
|
+
let index = -1;
|
4864
|
+
const len = instances.length;
|
4865
|
+
const instance = instances.filter((instance, i) => {
|
4866
|
+
if (instance.id === id) {
|
4867
|
+
index = i;
|
4868
|
+
return true;
|
4869
|
+
}
|
4870
|
+
return false;
|
4871
|
+
})[0];
|
4872
|
+
if (!instance) return;
|
4873
|
+
if (typeof userOnClose === 'function') {
|
4874
|
+
userOnClose(instance);
|
4875
|
+
}
|
4876
|
+
instances.splice(index, 1);
|
4877
|
+
if (len <= 1) return;
|
4878
|
+
const position = instance.position;
|
4879
|
+
const removedHeight = instance.dom.offsetHeight;
|
4880
|
+
for (let i = index; i < len - 1; i++) {
|
4881
|
+
if (instances[i].position === position) {
|
4882
|
+
instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
|
4883
|
+
}
|
4884
|
+
}
|
4885
|
+
};
|
4886
|
+
Notification.closeAll = function () {
|
4887
|
+
for (let i = instances.length - 1; i >= 0; i--) {
|
4888
|
+
instances[i].close();
|
4889
|
+
}
|
4890
|
+
};
|
4891
|
+
/* harmony default export */ var notify = (Notification);
|
4892
|
+
// EXTERNAL MODULE: ./packages/iconfont/iconfont.css
|
4893
|
+
var iconfont = __webpack_require__(3050);
|
4894
|
+
;// ./packages/index.js
|
4895
|
+
|
4896
|
+
|
4897
|
+
|
4898
|
+
/*
|
4899
|
+
* @Author: chenghuan.dong
|
4900
|
+
* @Date: 2024-11-08 17:23:47
|
4901
|
+
* @LastEditTime: 2024-11-14 11:00:38
|
4902
|
+
* @LastEditors: chenghuan.dong
|
4903
|
+
* @Description: 主index.js导出全部组件
|
4904
|
+
* @FilePath: \nubomed-ui\packages\index.js
|
4905
|
+
*/
|
4906
|
+
|
4907
|
+
|
4908
|
+
|
4909
|
+
|
4910
|
+
|
4911
|
+
// 使用iconfont图标
|
4912
|
+
|
4913
|
+
|
4914
|
+
// 获取所有组件
|
4915
|
+
const components = [];
|
4916
|
+
const req = __webpack_require__(3798);
|
4917
|
+
req.keys().forEach(v => {
|
4918
|
+
components.push(req(v).default);
|
4919
|
+
});
|
4920
|
+
console.log('components', components);
|
4921
|
+
const install = function (Vue, options = {}) {
|
4922
|
+
//设置多语言
|
4923
|
+
locale.use(options.locale);
|
4924
|
+
locale.i18n(options.i18n);
|
4925
|
+
// 组件
|
4926
|
+
if (install.installed) return;
|
4927
|
+
components.forEach(component => {
|
4928
|
+
const name = 'nb-' + camelToKebab(component.name.slice(2));
|
4929
|
+
const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination']; //
|
4930
|
+
console.log((installNames.includes(name) ? '√ ' : '? ') + name);
|
4931
|
+
if (installNames.includes(name)) {
|
4932
|
+
Vue.component(name, component);
|
4933
|
+
}
|
4934
|
+
});
|
4935
|
+
Vue.prototype.$nbNotify = notify;
|
4936
|
+
};
|
4937
|
+
const packages_i18n = locale.i18n;
|
4938
|
+
const API = {
|
4939
|
+
install
|
4940
|
+
};
|
4941
|
+
/* harmony default export */ var packages_0 = (API);
|
4942
|
+
|
4943
|
+
|
4944
|
+
// const install = function (Vue, options = {}) {
|
4945
|
+
// //设置多语言
|
4946
|
+
// locale.use(options.locale)
|
4947
|
+
// locale.i18n(options.i18n)
|
4948
|
+
|
4949
|
+
// // 组件
|
4950
|
+
// if (install.installed) return
|
4951
|
+
// components.forEach((component) => {
|
4952
|
+
// const name = 'nb-' + camelToKebab(component.name.slice(2))
|
4953
|
+
// const installNames = ['nb-icon', 'nb-tag', 'nb-empty', 'nb-header', 'nb-summary-bar', 'nb-pagination'] //
|
4954
|
+
// console.log((installNames.includes(name) ? '√ ' : '? ') + name)
|
4955
|
+
|
4956
|
+
// if (installNames.includes(name)) {
|
4957
|
+
// Vue.component('nb-' + camelToKebab(component.name.slice(2)), component)
|
4958
|
+
// }
|
4959
|
+
// })
|
4960
|
+
|
4961
|
+
// // 全局
|
4962
|
+
// Vue.prototype.$nbNotify = nbNotify
|
4963
|
+
// }
|
4964
|
+
|
4965
|
+
// // if (typeof window !== 'undefined' && window.Vue) {
|
4966
|
+
// // install(window.Vue)
|
4967
|
+
// // }
|
4968
|
+
|
4969
|
+
// const i18n = locale.i18n
|
4970
|
+
|
4971
|
+
// export default {
|
4972
|
+
// install,
|
4973
|
+
// ...components,
|
4974
|
+
// locale,
|
4975
|
+
// i18n
|
4976
|
+
// }
|
4987
4977
|
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
4988
4978
|
|
4989
4979
|
|