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