byt-ui 0.0.10 → 0.0.12
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.
- package/README.md +2 -2
- package/lib/byt-ui.common.js +29 -50
- package/lib/byt-ui.umd.js +29 -50
- package/lib/byt-ui.umd.min.js +1 -1
- package/package.json +3 -1
- package/packages/common/index.js +6 -3
- package/packages/common/modules/store.js +18 -37
- package/packages/index.js +2 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Description:
|
|
3
3
|
* @Author: 王国火
|
|
4
4
|
* @Date: 2022-09-15 16:57:23
|
|
5
|
-
* @LastEditTime: 2022-10-
|
|
5
|
+
* @LastEditTime: 2022-10-25 10:01:51
|
|
6
6
|
* @LastEditors: 王国火
|
|
7
7
|
-->
|
|
8
8
|
# byt-ui
|
|
@@ -21,7 +21,7 @@ Vue.use(BytUI)
|
|
|
21
21
|
|
|
22
22
|
## 按需引入公用方法 也可全局使用this.$byt
|
|
23
23
|
```
|
|
24
|
-
import {
|
|
24
|
+
import {utils} from "byt-ui"
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## 组件调用示例
|
package/lib/byt-ui.common.js
CHANGED
|
@@ -85610,6 +85610,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85610
85610
|
/* harmony import */ var _website__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2411);
|
|
85611
85611
|
|
|
85612
85612
|
|
|
85613
|
+
/*
|
|
85614
|
+
* @Description:
|
|
85615
|
+
* @Author: 王国火
|
|
85616
|
+
* @Date: 2022-10-08 09:10:49
|
|
85617
|
+
* @LastEditTime: 2022-10-25 10:30:28
|
|
85618
|
+
* @LastEditors: 王国火
|
|
85619
|
+
*/
|
|
85620
|
+
|
|
85613
85621
|
//存储前缀 避免与同域的其它项目冲突
|
|
85614
85622
|
|
|
85615
85623
|
const keyName = _website__WEBPACK_IMPORTED_MODULE_2__["default"].key;
|
|
@@ -85617,18 +85625,11 @@ const keyName = _website__WEBPACK_IMPORTED_MODULE_2__["default"].key;
|
|
|
85617
85625
|
* 存储localStorage
|
|
85618
85626
|
*/
|
|
85619
85627
|
|
|
85620
|
-
const setStore = (
|
|
85621
|
-
|
|
85622
|
-
name
|
|
85623
|
-
} = params;
|
|
85624
|
-
const {
|
|
85625
|
-
content,
|
|
85626
|
-
type
|
|
85627
|
-
} = params;
|
|
85628
|
-
name = keyName + name;
|
|
85628
|
+
const setStore = (key, value, type = 0) => {
|
|
85629
|
+
const name = `${keyName}-${key}`;
|
|
85629
85630
|
const obj = {
|
|
85630
|
-
dataType: typeof
|
|
85631
|
-
content:
|
|
85631
|
+
dataType: typeof value,
|
|
85632
|
+
content: value,
|
|
85632
85633
|
type: type,
|
|
85633
85634
|
datetime: new Date().getTime()
|
|
85634
85635
|
};
|
|
@@ -85643,18 +85644,10 @@ const setStore = (params = {}) => {
|
|
|
85643
85644
|
* 获取localStorage
|
|
85644
85645
|
*/
|
|
85645
85646
|
|
|
85646
|
-
const getStore = (
|
|
85647
|
-
|
|
85648
|
-
|
|
85649
|
-
} = params;
|
|
85650
|
-
const {
|
|
85651
|
-
debug
|
|
85652
|
-
} = params;
|
|
85653
|
-
name = keyName + name;
|
|
85654
|
-
let obj = {};
|
|
85647
|
+
const getStore = (key, debug = false) => {
|
|
85648
|
+
const name = `${keyName}-${key}`;
|
|
85649
|
+
let obj = window.sessionStorage.getItem(name) || window.localStorage.getItem(name);
|
|
85655
85650
|
let content;
|
|
85656
|
-
obj = window.sessionStorage.getItem(name);
|
|
85657
|
-
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) obj = window.localStorage.getItem(name);
|
|
85658
85651
|
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return;
|
|
85659
85652
|
|
|
85660
85653
|
try {
|
|
@@ -85683,14 +85676,8 @@ const getStore = (params = {}) => {
|
|
|
85683
85676
|
* 删除localStorage
|
|
85684
85677
|
*/
|
|
85685
85678
|
|
|
85686
|
-
const removeStore = (
|
|
85687
|
-
|
|
85688
|
-
name
|
|
85689
|
-
} = params;
|
|
85690
|
-
const {
|
|
85691
|
-
type
|
|
85692
|
-
} = params;
|
|
85693
|
-
name = keyName + name;
|
|
85679
|
+
const removeStore = (key, type = 0) => {
|
|
85680
|
+
const name = `${keyName}-${key}`;
|
|
85694
85681
|
|
|
85695
85682
|
if (type) {
|
|
85696
85683
|
window.sessionStorage.removeItem(name);
|
|
@@ -85702,11 +85689,8 @@ const removeStore = (params = {}) => {
|
|
|
85702
85689
|
* 获取全部localStorage
|
|
85703
85690
|
*/
|
|
85704
85691
|
|
|
85705
|
-
const getAllStore = (
|
|
85692
|
+
const getAllStore = (type = 0) => {
|
|
85706
85693
|
const list = [];
|
|
85707
|
-
const {
|
|
85708
|
-
type
|
|
85709
|
-
} = params;
|
|
85710
85694
|
|
|
85711
85695
|
if (type) {
|
|
85712
85696
|
for (let i = 0; i <= window.sessionStorage.length; i++) {
|
|
@@ -85735,11 +85719,7 @@ const getAllStore = (params = {}) => {
|
|
|
85735
85719
|
* 清空全部localStorage
|
|
85736
85720
|
*/
|
|
85737
85721
|
|
|
85738
|
-
const clearStore = (
|
|
85739
|
-
const {
|
|
85740
|
-
type
|
|
85741
|
-
} = params;
|
|
85742
|
-
|
|
85722
|
+
const clearStore = (type = 0) => {
|
|
85743
85723
|
if (type) {
|
|
85744
85724
|
window.sessionStorage.clear();
|
|
85745
85725
|
} else {
|
|
@@ -127143,11 +127123,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127143
127123
|
|
|
127144
127124
|
// EXPORTS
|
|
127145
127125
|
__webpack_require__.d(__webpack_exports__, {
|
|
127146
|
-
"cookie": function() { return /* reexport */ cookie; },
|
|
127147
127126
|
"default": function() { return /* binding */ entry_lib; },
|
|
127148
|
-
"
|
|
127149
|
-
"validate": function() { return /* reexport */ validate; },
|
|
127150
|
-
"website": function() { return /* reexport */ website; }
|
|
127127
|
+
"utils": function() { return /* reexport */ utils; }
|
|
127151
127128
|
});
|
|
127152
127129
|
|
|
127153
127130
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -127947,7 +127924,7 @@ const components = [basic_view, form_view];
|
|
|
127947
127924
|
* @Description:
|
|
127948
127925
|
* @Author: 王国火
|
|
127949
127926
|
* @Date: 2022-09-19 10:17:14
|
|
127950
|
-
* @LastEditTime: 2022-10-
|
|
127927
|
+
* @LastEditTime: 2022-10-25 09:48:55
|
|
127951
127928
|
* @LastEditors: 王国火
|
|
127952
127929
|
*/
|
|
127953
127930
|
// 动态引入
|
|
@@ -127958,7 +127935,12 @@ const requireContext = __webpack_require__(26745);
|
|
|
127958
127935
|
requireContext.keys().map(key => {
|
|
127959
127936
|
const reg = /\w+/;
|
|
127960
127937
|
const k = key.match(reg)[0];
|
|
127961
|
-
|
|
127938
|
+
|
|
127939
|
+
if (requireContext(key).default) {
|
|
127940
|
+
conmmon[k] = requireContext(key).default;
|
|
127941
|
+
} else {
|
|
127942
|
+
conmmon = Object.assign(conmmon, requireContext(key));
|
|
127943
|
+
}
|
|
127962
127944
|
});
|
|
127963
127945
|
/* harmony default export */ var common = (conmmon);
|
|
127964
127946
|
// EXTERNAL MODULE: ./node_modules/xe-utils/index.js
|
|
@@ -127974,7 +127956,7 @@ var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_co
|
|
|
127974
127956
|
* @Description:
|
|
127975
127957
|
* @Author: 王国火
|
|
127976
127958
|
* @Date: 2022-09-15 17:02:55
|
|
127977
|
-
* @LastEditTime: 2022-10-
|
|
127959
|
+
* @LastEditTime: 2022-10-25 09:47:57
|
|
127978
127960
|
* @LastEditors: 王国火
|
|
127979
127961
|
*/
|
|
127980
127962
|
//通用组件
|
|
@@ -128010,10 +127992,7 @@ const install = function (Vue) {
|
|
|
128010
127992
|
...Cmps,
|
|
128011
127993
|
...common
|
|
128012
127994
|
});
|
|
128013
|
-
const
|
|
128014
|
-
const store = common.store;
|
|
128015
|
-
const validate = common.validate;
|
|
128016
|
-
const website = common.website;
|
|
127995
|
+
const utils = common;
|
|
128017
127996
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
128018
127997
|
|
|
128019
127998
|
|
package/lib/byt-ui.umd.js
CHANGED
|
@@ -85620,6 +85620,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85620
85620
|
/* harmony import */ var _website__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92502);
|
|
85621
85621
|
|
|
85622
85622
|
|
|
85623
|
+
/*
|
|
85624
|
+
* @Description:
|
|
85625
|
+
* @Author: 王国火
|
|
85626
|
+
* @Date: 2022-10-08 09:10:49
|
|
85627
|
+
* @LastEditTime: 2022-10-25 10:30:28
|
|
85628
|
+
* @LastEditors: 王国火
|
|
85629
|
+
*/
|
|
85630
|
+
|
|
85623
85631
|
//存储前缀 避免与同域的其它项目冲突
|
|
85624
85632
|
|
|
85625
85633
|
const keyName = _website__WEBPACK_IMPORTED_MODULE_2__["default"].key;
|
|
@@ -85627,18 +85635,11 @@ const keyName = _website__WEBPACK_IMPORTED_MODULE_2__["default"].key;
|
|
|
85627
85635
|
* 存储localStorage
|
|
85628
85636
|
*/
|
|
85629
85637
|
|
|
85630
|
-
const setStore = (
|
|
85631
|
-
|
|
85632
|
-
name
|
|
85633
|
-
} = params;
|
|
85634
|
-
const {
|
|
85635
|
-
content,
|
|
85636
|
-
type
|
|
85637
|
-
} = params;
|
|
85638
|
-
name = keyName + name;
|
|
85638
|
+
const setStore = (key, value, type = 0) => {
|
|
85639
|
+
const name = `${keyName}-${key}`;
|
|
85639
85640
|
const obj = {
|
|
85640
|
-
dataType: typeof
|
|
85641
|
-
content:
|
|
85641
|
+
dataType: typeof value,
|
|
85642
|
+
content: value,
|
|
85642
85643
|
type: type,
|
|
85643
85644
|
datetime: new Date().getTime()
|
|
85644
85645
|
};
|
|
@@ -85653,18 +85654,10 @@ const setStore = (params = {}) => {
|
|
|
85653
85654
|
* 获取localStorage
|
|
85654
85655
|
*/
|
|
85655
85656
|
|
|
85656
|
-
const getStore = (
|
|
85657
|
-
|
|
85658
|
-
|
|
85659
|
-
} = params;
|
|
85660
|
-
const {
|
|
85661
|
-
debug
|
|
85662
|
-
} = params;
|
|
85663
|
-
name = keyName + name;
|
|
85664
|
-
let obj = {};
|
|
85657
|
+
const getStore = (key, debug = false) => {
|
|
85658
|
+
const name = `${keyName}-${key}`;
|
|
85659
|
+
let obj = window.sessionStorage.getItem(name) || window.localStorage.getItem(name);
|
|
85665
85660
|
let content;
|
|
85666
|
-
obj = window.sessionStorage.getItem(name);
|
|
85667
|
-
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) obj = window.localStorage.getItem(name);
|
|
85668
85661
|
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return;
|
|
85669
85662
|
|
|
85670
85663
|
try {
|
|
@@ -85693,14 +85686,8 @@ const getStore = (params = {}) => {
|
|
|
85693
85686
|
* 删除localStorage
|
|
85694
85687
|
*/
|
|
85695
85688
|
|
|
85696
|
-
const removeStore = (
|
|
85697
|
-
|
|
85698
|
-
name
|
|
85699
|
-
} = params;
|
|
85700
|
-
const {
|
|
85701
|
-
type
|
|
85702
|
-
} = params;
|
|
85703
|
-
name = keyName + name;
|
|
85689
|
+
const removeStore = (key, type = 0) => {
|
|
85690
|
+
const name = `${keyName}-${key}`;
|
|
85704
85691
|
|
|
85705
85692
|
if (type) {
|
|
85706
85693
|
window.sessionStorage.removeItem(name);
|
|
@@ -85712,11 +85699,8 @@ const removeStore = (params = {}) => {
|
|
|
85712
85699
|
* 获取全部localStorage
|
|
85713
85700
|
*/
|
|
85714
85701
|
|
|
85715
|
-
const getAllStore = (
|
|
85702
|
+
const getAllStore = (type = 0) => {
|
|
85716
85703
|
const list = [];
|
|
85717
|
-
const {
|
|
85718
|
-
type
|
|
85719
|
-
} = params;
|
|
85720
85704
|
|
|
85721
85705
|
if (type) {
|
|
85722
85706
|
for (let i = 0; i <= window.sessionStorage.length; i++) {
|
|
@@ -85745,11 +85729,7 @@ const getAllStore = (params = {}) => {
|
|
|
85745
85729
|
* 清空全部localStorage
|
|
85746
85730
|
*/
|
|
85747
85731
|
|
|
85748
|
-
const clearStore = (
|
|
85749
|
-
const {
|
|
85750
|
-
type
|
|
85751
|
-
} = params;
|
|
85752
|
-
|
|
85732
|
+
const clearStore = (type = 0) => {
|
|
85753
85733
|
if (type) {
|
|
85754
85734
|
window.sessionStorage.clear();
|
|
85755
85735
|
} else {
|
|
@@ -127153,11 +127133,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127153
127133
|
|
|
127154
127134
|
// EXPORTS
|
|
127155
127135
|
__webpack_require__.d(__webpack_exports__, {
|
|
127156
|
-
"cookie": function() { return /* reexport */ cookie; },
|
|
127157
127136
|
"default": function() { return /* binding */ entry_lib; },
|
|
127158
|
-
"
|
|
127159
|
-
"validate": function() { return /* reexport */ validate; },
|
|
127160
|
-
"website": function() { return /* reexport */ website; }
|
|
127137
|
+
"utils": function() { return /* reexport */ utils; }
|
|
127161
127138
|
});
|
|
127162
127139
|
|
|
127163
127140
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -127957,7 +127934,7 @@ const components = [basic_view, form_view];
|
|
|
127957
127934
|
* @Description:
|
|
127958
127935
|
* @Author: 王国火
|
|
127959
127936
|
* @Date: 2022-09-19 10:17:14
|
|
127960
|
-
* @LastEditTime: 2022-10-
|
|
127937
|
+
* @LastEditTime: 2022-10-25 09:48:55
|
|
127961
127938
|
* @LastEditors: 王国火
|
|
127962
127939
|
*/
|
|
127963
127940
|
// 动态引入
|
|
@@ -127968,7 +127945,12 @@ const requireContext = __webpack_require__(26745);
|
|
|
127968
127945
|
requireContext.keys().map(key => {
|
|
127969
127946
|
const reg = /\w+/;
|
|
127970
127947
|
const k = key.match(reg)[0];
|
|
127971
|
-
|
|
127948
|
+
|
|
127949
|
+
if (requireContext(key).default) {
|
|
127950
|
+
conmmon[k] = requireContext(key).default;
|
|
127951
|
+
} else {
|
|
127952
|
+
conmmon = Object.assign(conmmon, requireContext(key));
|
|
127953
|
+
}
|
|
127972
127954
|
});
|
|
127973
127955
|
/* harmony default export */ var common = (conmmon);
|
|
127974
127956
|
// EXTERNAL MODULE: ./node_modules/xe-utils/index.js
|
|
@@ -127984,7 +127966,7 @@ var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_co
|
|
|
127984
127966
|
* @Description:
|
|
127985
127967
|
* @Author: 王国火
|
|
127986
127968
|
* @Date: 2022-09-15 17:02:55
|
|
127987
|
-
* @LastEditTime: 2022-10-
|
|
127969
|
+
* @LastEditTime: 2022-10-25 09:47:57
|
|
127988
127970
|
* @LastEditors: 王国火
|
|
127989
127971
|
*/
|
|
127990
127972
|
//通用组件
|
|
@@ -128020,10 +128002,7 @@ const install = function (Vue) {
|
|
|
128020
128002
|
...Cmps,
|
|
128021
128003
|
...common
|
|
128022
128004
|
});
|
|
128023
|
-
const
|
|
128024
|
-
const store = common.store;
|
|
128025
|
-
const validate = common.validate;
|
|
128026
|
-
const website = common.website;
|
|
128005
|
+
const utils = common;
|
|
128027
128006
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
128028
128007
|
|
|
128029
128008
|
|