web-component-gallery 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "vue-library-ui组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
@@ -0,0 +1,9 @@
1
+ module.exports.postcss = {
2
+ rootValue: 14, // 基准字体大小,通常是 16 或 37.5
3
+ propList: ['*'], // 需要转换的属性,* 表示全部属性都转换
4
+ unitPrecision: 5, // 允许 REM 单位增长到的十进制数
5
+ selectorBlackList: [], // 忽略转换的选择器
6
+ replace: true, // 替换包含 `px` 的规则,而不是添加替换后的副本
7
+ mediaQuery: false, // 不允许在媒体查询中转换 `px`
8
+ minPixelValue: 0 // 设置要替换的最小像素值
9
+ }
@@ -0,0 +1,73 @@
1
+ import Cookies from 'js-cookie'
2
+
3
+ const local = {
4
+
5
+ set(key, value) {
6
+ localStorage.setItem(key, value)
7
+ },
8
+
9
+ setJson( key, value ){
10
+ localStorage.setItem(key, JSON.stringify( value ))
11
+ },
12
+
13
+ get( key ){
14
+ return localStorage.getItem(key)
15
+ },
16
+
17
+ getJson( key ){
18
+
19
+ const content = localStorage.getItem( key )
20
+
21
+ if( !content ) return null
22
+
23
+ return JSON.parse( content )
24
+ },
25
+
26
+ remove( key ){
27
+ localStorage.removeItem(key)
28
+ },
29
+
30
+ clear(){
31
+ localStorage.clear()
32
+ }
33
+ }
34
+
35
+ const cookies = {
36
+
37
+ set(key, value) {
38
+ Cookies.set(key, value)
39
+ },
40
+
41
+ setJson( key, value ){
42
+ Cookies.set(key, JSON.stringify( value ))
43
+ },
44
+
45
+ get( key ){
46
+ return Cookies.get(key)
47
+ },
48
+
49
+ getJson( key ){
50
+
51
+ const content = Cookies.get( key )
52
+
53
+ if( !content ) return null
54
+
55
+ return JSON.parse( content )
56
+ },
57
+
58
+ remove( key ){
59
+ Cookies.remove(key)
60
+ },
61
+
62
+ clear(){
63
+ const cookies = Cookies.get()
64
+ for (const cookieName in cookies) {
65
+ if (cookies.hasOwnProperty(cookieName)) Cookies.remove(cookieName)
66
+ }
67
+ }
68
+ }
69
+
70
+ export default {
71
+ local,
72
+ cookies
73
+ }
@@ -0,0 +1,9 @@
1
+ module.exports.postcss = {
2
+ rootValue: 14, // 基准字体大小,通常是 16 或 37.5
3
+ propList: ['*'], // 需要转换的属性,* 表示全部属性都转换
4
+ unitPrecision: 5, // 允许 REM 单位增长到的十进制数
5
+ selectorBlackList: [], // 忽略转换的选择器
6
+ replace: true, // 替换包含 `px` 的规则,而不是添加替换后的副本
7
+ mediaQuery: false, // 不允许在媒体查询中转换 `px`
8
+ minPixelValue: 0 // 设置要替换的最小像素值
9
+ }
@@ -0,0 +1,73 @@
1
+ import Cookies from 'js-cookie'
2
+
3
+ const local = {
4
+
5
+ set(key, value) {
6
+ localStorage.setItem(key, value)
7
+ },
8
+
9
+ setJson( key, value ){
10
+ localStorage.setItem(key, JSON.stringify( value ))
11
+ },
12
+
13
+ get( key ){
14
+ return localStorage.getItem(key)
15
+ },
16
+
17
+ getJson( key ){
18
+
19
+ const content = localStorage.getItem( key )
20
+
21
+ if( !content ) return null
22
+
23
+ return JSON.parse( content )
24
+ },
25
+
26
+ remove( key ){
27
+ localStorage.removeItem(key)
28
+ },
29
+
30
+ clear(){
31
+ localStorage.clear()
32
+ }
33
+ }
34
+
35
+ const cookies = {
36
+
37
+ set(key, value) {
38
+ Cookies.set(key, value)
39
+ },
40
+
41
+ setJson( key, value ){
42
+ Cookies.set(key, JSON.stringify( value ))
43
+ },
44
+
45
+ get( key ){
46
+ return Cookies.get(key)
47
+ },
48
+
49
+ getJson( key ){
50
+
51
+ const content = Cookies.get( key )
52
+
53
+ if( !content ) return null
54
+
55
+ return JSON.parse( content )
56
+ },
57
+
58
+ remove( key ){
59
+ Cookies.remove(key)
60
+ },
61
+
62
+ clear(){
63
+ const cookies = Cookies.get()
64
+ for (const cookieName in cookies) {
65
+ if (cookies.hasOwnProperty(cookieName)) Cookies.remove(cookieName)
66
+ }
67
+ }
68
+ }
69
+
70
+ export default {
71
+ local,
72
+ cookies
73
+ }