Browse Source

增加switch组件、修改面包屑组件

develop
zq 5 months ago
parent
commit
26f38a6aad
  1. 1
      examples/assets/addIcon.svg
  2. 1
      examples/assets/addIcon_light.svg
  3. 1
      examples/assets/bind_sites.svg
  4. 1
      examples/assets/form_linkActive.svg
  5. 1
      examples/assets/home-bread.svg
  6. 1
      examples/assets/prompt-icon-1.svg
  7. 1
      examples/assets/prompt-icon-2.svg
  8. 1
      examples/assets/prompt-icon-3.svg
  9. 1
      examples/assets/radio_checked.svg
  10. 1
      examples/assets/require.svg
  11. BIN
      examples/assets/separator.png
  12. BIN
      examples/assets/table_empty.png
  13. 47
      examples/package-lock.json
  14. 3
      examples/package.json
  15. 173
      examples/src/App.vue
  16. 287
      examples/src/a.vue
  17. 6
      examples/src/main.js
  18. 1
      examples/vue.config.js
  19. 97
      packages/Breadcrumb/src/index.vue
  20. 7
      packages/GuipSwitch/index.js
  21. 109
      packages/GuipSwitch/src/index.vue
  22. 10
      packages/SvgIcon/src/index.vue
  23. 25
      packages/SvgIcon1/src/index.vue
  24. 7
      packages/index.js
  25. 8
      packages/styles/common.scss
  26. 115
      packages/styles/component.scss

1
examples/assets/addIcon.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

1
examples/assets/addIcon_light.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

1
examples/assets/bind_sites.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_166_49091"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_166_49091)"><g><path d="M3.993058,2.326391373069763Q2.333333,3.986113373069763,2.333333,6.333333373069763Q2.333333,10.987083373069764,7.58354,15.187233373069763Q7.62755,15.222433373069762,7.67685,15.249733373069763Q7.72614,15.277133373069763,7.77933,15.295733373069764Q7.83251,15.314433373069763,7.88808,15.323833373069764Q7.94364,15.333333373069763,8,15.333333373069763Q8.05636,15.333333373069763,8.111930000000001,15.323833373069764Q8.16749,15.314433373069763,8.22067,15.295733373069764Q8.273859999999999,15.277133373069763,8.32315,15.249733373069763Q8.37245,15.222433373069762,8.41646,15.187233373069763Q13.6667,10.987083373069764,13.6667,6.333333373069763Q13.6667,3.986113373069763,12.00694,2.326391373069763Q10.34721,0.6666663730697632,8,0.6666663730697632Q5.65278,0.6666663730697632,3.993058,2.326391373069763ZM8,13.804833373069764Q3.666667,10.166283373069763,3.666667,6.333333373069763Q3.666667,4.538403373069763,4.9358699999999995,3.269203373069763Q6.20507,2.000000373069763,8,2.000000373069763Q9.79493,2.000000373069763,11.06413,3.269203373069763Q12.33333,4.538403373069763,12.33333,6.333333373069763Q12.33333,10.166293373069763,8,13.804833373069764Z" fill-rule="evenodd" fill="#8A9099" fill-opacity="1"/></g><g><path d="M6.114383,4.447716492279053Q5.333333,5.228765492279052,5.333333,6.333333492279053Q5.333333,7.437903492279053,6.114383,8.218953492279052Q6.895433,9.000003492279053,8,9.000003492279053Q9.104569999999999,9.000003492279053,9.88562,8.218953492279052Q10.66667,7.437903492279053,10.66667,6.333333492279053Q10.66667,5.228765492279052,9.88562,4.447716492279053Q9.104569999999999,3.666666492279053,8,3.666666492279053Q6.895432,3.666666492279053,6.114383,4.447716492279053ZM7.05719,7.276143492279052Q6.666667,6.885613492279052,6.666667,6.333333492279053Q6.666667,5.781053492279053,7.05719,5.390523492279053Q7.44772,5.000000492279053,8,5.000000492279053Q8.55228,5.000000492279053,8.94281,5.390523492279053Q9.33333,5.781053492279053,9.33333,6.333333492279053Q9.33333,6.885613492279052,8.94281,7.276143492279052Q8.55228,7.666663492279053,8,7.666663492279053Q7.44772,7.666663492279053,7.05719,7.276143492279052Z" fill-rule="evenodd" fill="#8A9099" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

1
examples/assets/form_linkActive.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.1 KiB

1
examples/assets/home-bread.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

1
examples/assets/prompt-icon-1.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_217_60685"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_217_60685)"><g><path d="M8,1C9.97933,1.052,11.6278,1.7368329999999998,12.9455,3.0545C14.2632,4.372170000000001,14.948,6.02067,15,8C14.948,9.97933,14.2632,11.6278,12.9455,12.9455C11.6278,14.2632,9.97933,14.948,8,15C6.02067,14.948,4.372170000000001,14.2632,3.0545,12.9455C1.7368329999999998,11.6278,1.052,9.97933,1,8C1.052,6.02067,1.7368329999999998,4.372170000000001,3.0545,3.0545C4.372170000000001,1.7368329999999998,6.02067,1.052,8,1C8,1,8,1,8,1C8,1,8,1,8,1ZM9.047,5.297C9.318,5.297,9.542,5.21633,9.719,5.055C9.896,4.89367,9.9845,4.6775,9.9845,4.406499999999999C9.9845,4.1355,9.896,3.91933,9.719,3.758C9.542,3.59667,9.32067,3.516,9.055,3.516C8.78933,3.516,8.568,3.59667,8.391,3.758C8.214,3.91933,8.125499999999999,4.1355,8.125499999999999,4.406499999999999C8.125499999999999,4.6775,8.214,4.89367,8.391,5.055C8.568,5.21633,8.78683,5.297,9.0475,5.297C9.0475,5.297,9.047,5.297,9.047,5.297C9.047,5.297,9.047,5.297,9.047,5.297ZM9.2345,10.922C9.2345,10.85933,9.23967,10.776,9.25,10.672C9.26033,10.568,9.26033,10.469,9.25,10.375C9.25,10.375,8.422,11.328,8.422,11.328C8.33867,11.4217,8.25267,11.4947,8.164,11.547C8.075330000000001,11.5993,7.99983,11.615,7.9375,11.594C7.84383,11.5523,7.80217,11.4793,7.8125,11.375C7.8125,11.375,9.1875,7.047,9.1875,7.047C9.2395,6.75533,9.19267,6.50533,9.047,6.297C8.90133,6.08867,8.667,5.96367,8.344000000000001,5.922C7.97933,5.93233,7.58083,6.086,7.1485,6.383C6.71617,6.68,6.3385,7.05767,6.0155,7.516C6.0155,7.516,6.0155,7.7505,6.0155,7.7505C6.00517,7.85483,6.00517,7.95383,6.0155,8.0475C6.0155,8.0475,6.8435,7.0945,6.8435,7.0945C6.92683,7.00083,7.01283,6.92783,7.1015,6.8755C7.19017,6.82317,7.2605,6.8075,7.3125,6.8285C7.41683,6.8805,7.45333,6.96383,7.422,7.0785C7.422,7.0785,6.0625,11.391,6.0625,11.391C5.9895,11.6513,6.026,11.8832,6.172,12.0865C6.318,12.2898,6.57317,12.4278,6.9375,12.5005C7.4585,12.4902,7.896,12.3392,8.25,12.0475C8.604,11.7558,8.93217,11.3808,9.2345,10.9225C9.2345,10.9225,9.2345,10.922,9.2345,10.922C9.2345,10.922,9.2345,10.922,9.2345,10.922Z" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

1
examples/assets/prompt-icon-2.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_354_94660/23_30613"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_354_94660/23_30613)"><g><path d="M8,1C9.97933,1.052,11.6278,1.7368329999999998,12.9455,3.0545C14.2632,4.372170000000001,14.948,6.02067,15,8C14.948,9.97933,14.2632,11.6278,12.9455,12.9455C11.6278,14.2632,9.97933,14.948,8,15C6.02067,14.948,4.372170000000001,14.2632,3.0545,12.9455C1.7368329999999998,11.6278,1.052,9.97933,1,8C1.052,6.02067,1.7368329999999998,4.372170000000001,3.0545,3.0545C4.372170000000001,1.7368329999999998,6.02067,1.052,8,1C8,1,8,1,8,1C8,1,8,1,8,1ZM9.047,5.297C9.318,5.297,9.542,5.21633,9.719,5.055C9.896,4.89367,9.9845,4.6775,9.9845,4.406499999999999C9.9845,4.1355,9.896,3.91933,9.719,3.758C9.542,3.59667,9.32067,3.516,9.055,3.516C8.78933,3.516,8.568,3.59667,8.391,3.758C8.214,3.91933,8.125499999999999,4.1355,8.125499999999999,4.406499999999999C8.125499999999999,4.6775,8.214,4.89367,8.391,5.055C8.568,5.21633,8.78683,5.297,9.0475,5.297C9.0475,5.297,9.047,5.297,9.047,5.297C9.047,5.297,9.047,5.297,9.047,5.297ZM9.2345,10.922C9.2345,10.85933,9.23967,10.776,9.25,10.672C9.26033,10.568,9.26033,10.469,9.25,10.375C9.25,10.375,8.422,11.328,8.422,11.328C8.33867,11.4217,8.25267,11.4947,8.164,11.547C8.075330000000001,11.5993,7.99983,11.615,7.9375,11.594C7.84383,11.5523,7.80217,11.4793,7.8125,11.375C7.8125,11.375,9.1875,7.047,9.1875,7.047C9.2395,6.75533,9.19267,6.50533,9.047,6.297C8.90133,6.08867,8.667,5.96367,8.344000000000001,5.922C7.97933,5.93233,7.58083,6.086,7.1485,6.383C6.71617,6.68,6.3385,7.05767,6.0155,7.516C6.0155,7.516,6.0155,7.7505,6.0155,7.7505C6.00517,7.85483,6.00517,7.95383,6.0155,8.0475C6.0155,8.0475,6.8435,7.0945,6.8435,7.0945C6.92683,7.00083,7.01283,6.92783,7.1015,6.8755C7.19017,6.82317,7.2605,6.8075,7.3125,6.8285C7.41683,6.8805,7.45333,6.96383,7.422,7.0785C7.422,7.0785,6.0625,11.391,6.0625,11.391C5.9895,11.6513,6.026,11.8832,6.172,12.0865C6.318,12.2898,6.57317,12.4278,6.9375,12.5005C7.4585,12.4902,7.896,12.3392,8.25,12.0475C8.604,11.7558,8.93217,11.3808,9.2345,10.9225C9.2345,10.9225,9.2345,10.922,9.2345,10.922C9.2345,10.922,9.2345,10.922,9.2345,10.922Z" fill="#FF8C00" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

1
examples/assets/prompt-icon-3.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_242_77707/23_30613"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_242_77707/23_30613)"><g><path d="M8,1C9.97933,1.052,11.6278,1.7368329999999998,12.9455,3.0545C14.2632,4.372170000000001,14.948,6.02067,15,8C14.948,9.97933,14.2632,11.6278,12.9455,12.9455C11.6278,14.2632,9.97933,14.948,8,15C6.02067,14.948,4.372170000000001,14.2632,3.0545,12.9455C1.7368329999999998,11.6278,1.052,9.97933,1,8C1.052,6.02067,1.7368329999999998,4.372170000000001,3.0545,3.0545C4.372170000000001,1.7368329999999998,6.02067,1.052,8,1C8,1,8,1,8,1C8,1,8,1,8,1ZM9.047,5.297C9.318,5.297,9.542,5.21633,9.719,5.055C9.896,4.89367,9.9845,4.6775,9.9845,4.406499999999999C9.9845,4.1355,9.896,3.91933,9.719,3.758C9.542,3.59667,9.32067,3.516,9.055,3.516C8.78933,3.516,8.568,3.59667,8.391,3.758C8.214,3.91933,8.125499999999999,4.1355,8.125499999999999,4.406499999999999C8.125499999999999,4.6775,8.214,4.89367,8.391,5.055C8.568,5.21633,8.78683,5.297,9.0475,5.297C9.0475,5.297,9.047,5.297,9.047,5.297C9.047,5.297,9.047,5.297,9.047,5.297ZM9.2345,10.922C9.2345,10.85933,9.23967,10.776,9.25,10.672C9.26033,10.568,9.26033,10.469,9.25,10.375C9.25,10.375,8.422,11.328,8.422,11.328C8.33867,11.4217,8.25267,11.4947,8.164,11.547C8.075330000000001,11.5993,7.99983,11.615,7.9375,11.594C7.84383,11.5523,7.80217,11.4793,7.8125,11.375C7.8125,11.375,9.1875,7.047,9.1875,7.047C9.2395,6.75533,9.19267,6.50533,9.047,6.297C8.90133,6.08867,8.667,5.96367,8.344000000000001,5.922C7.97933,5.93233,7.58083,6.086,7.1485,6.383C6.71617,6.68,6.3385,7.05767,6.0155,7.516C6.0155,7.516,6.0155,7.7505,6.0155,7.7505C6.00517,7.85483,6.00517,7.95383,6.0155,8.0475C6.0155,8.0475,6.8435,7.0945,6.8435,7.0945C6.92683,7.00083,7.01283,6.92783,7.1015,6.8755C7.19017,6.82317,7.2605,6.8075,7.3125,6.8285C7.41683,6.8805,7.45333,6.96383,7.422,7.0785C7.422,7.0785,6.0625,11.391,6.0625,11.391C5.9895,11.6513,6.026,11.8832,6.172,12.0865C6.318,12.2898,6.57317,12.4278,6.9375,12.5005C7.4585,12.4902,7.896,12.3392,8.25,12.0475C8.604,11.7558,8.93217,11.3808,9.2345,10.9225C9.2345,10.9225,9.2345,10.922,9.2345,10.922C9.2345,10.922,9.2345,10.922,9.2345,10.922Z" fill="#FF4D4F" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

1
examples/assets/radio_checked.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><g><g><rect x="0" y="0" width="14" height="14" rx="7" fill="#FFFFFF" fill-opacity="1"/><rect x="0.5" y="0.5" width="13" height="13" rx="6.5" fill-opacity="0" stroke-opacity="1" stroke="#006AFF" fill="none" stroke-width="1"/></g><g><rect x="2.380126953125" y="2.3798828125" width="9.239999771118164" height="9.239999771118164" rx="4.619999885559082" fill="#006AFF" fill-opacity="1"/><rect x="2.710126966238022" y="2.709882825613022" width="8.57999974489212" height="8.57999974489212" rx="4.28999987244606" fill-opacity="0" stroke-opacity="1" stroke="#006AFF" fill="none" stroke-width="0.6600000262260437"/></g></g></svg>

After

Width:  |  Height:  |  Size: 771 B

1
examples/assets/require.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="8" height="8" viewBox="0 0 8 8"><g><g><path d="M4.53619,3.49598C4.93756,3.30242,5.33495,3.10073,5.72813,2.89102C6.10411,2.68903,6.40809,2.53804,6.63208,2.44504C6.85606,2.35305,7.03205,2.30305,7.16805,2.30305C7.39203,2.30305,7.58402,2.37805,7.75201,2.53804C7.912,2.69803,8,2.89102,8,3.126C8,3.26099,7.96,3.40299,7.88001,3.54598C7.80001,3.68897,7.71202,3.78196,7.62402,3.82396C6.80007,4.16794,5.88012,4.41992,4.88817,4.57091C5.07216,4.7389,5.28815,4.97489,5.55214,5.26887C5.81612,5.56285,5.95211,5.71384,5.96811,5.73884C6.06411,5.88183,6.2001,6.05882,6.37609,6.26881C6.55208,6.4788,6.67207,6.63879,6.73607,6.75578C6.80007,6.87377,6.84006,7.01576,6.84006,7.18475C6.84107,7.39587,6.75753,7.5986,6.60808,7.74772C6.45193,7.91074,6.23371,7.99948,6.00811,7.9917C5.76812,7.9917,5.48814,7.78972,5.18416,7.39474C4.88017,7.00776,4.4802,6.29481,4.00022,5.26087C3.51225,6.18481,3.18427,6.80678,3.02428,7.10076C2.85629,7.39474,2.69629,7.62073,2.5443,7.77272C2.40703,7.91778,2.21605,7.99989,2.01633,7.9997C1.79003,8.00605,1.5728,7.91065,1.42436,7.73972C1.28036,7.59025,1.19759,7.39224,1.19238,7.18475C1.19238,6.99976,1.22438,6.86477,1.28837,6.77278C1.88034,5.93283,2.49631,5.19288,3.13627,4.57991C2.65244,4.50186,2.17205,4.40378,1.69635,4.28593C1.23363,4.16226,0.781541,4.00176,0.344425,3.80596C0.264429,3.76496,0.192433,3.67197,0.120437,3.52898C0.0420906,3.41216,0.00031659,3.27466,0.000443602,3.134C-0.00716869,2.91112,0.0835016,2.69615,0.24843,2.54604C0.397403,2.39297,0.602823,2.30798,0.816398,2.31105C0.96839,2.31105,1.16038,2.36105,1.39237,2.45404C1.62435,2.55404,1.91234,2.68903,2.27232,2.88202C2.6323,3.06701,3.03228,3.27699,3.48825,3.50398C3.40825,3.07601,3.33626,2.58804,3.28026,2.04207C3.22427,1.4961,3.20027,1.11813,3.20027,0.916139C3.20027,0.664155,3.27226,0.454168,3.42425,0.277179C3.5641,0.0976285,3.7807,-0.00510704,4.00822,0.000195663C4.24021,0.000195663,4.4322,0.09219,4.58419,0.269179C4.73618,0.454168,4.80818,0.689153,4.80818,0.983135C4.80818,1.06713,4.79218,1.22712,4.77618,1.46311C4.76018,1.70609,4.72018,1.99207,4.68018,2.32805C4.63219,2.67203,4.58419,3.05801,4.53619,3.49598Z" fill="#FF4D4F" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
examples/assets/separator.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

BIN
examples/assets/table_empty.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

47
examples/package-lock.json

@ -8,6 +8,7 @@
"name": "examples",
"version": "1.0.0",
"dependencies": {
"@zhicheng1012/zhicheng-components": "^1.0.18",
"core-js": "^3.40.0",
"element-ui": "^2.15.14",
"my-components": "file:../",
@ -29,9 +30,10 @@
},
"..": {
"name": "@zhicheng1012/zhicheng-components",
"version": "1.0.17",
"version": "1.0.18",
"license": "MIT",
"dependencies": {
"async-validator": "^1.11.5",
"core-js": "^3.40.0"
},
"devDependencies": {
@ -45,7 +47,7 @@
"sass-loader": "^8.0.2",
"style-loader": "~2.0.0",
"url-loader": "^4.1.1",
"vue": "^2.6.14",
"vue": "2.6.14",
"vue-loader": "^15.9.8",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "2.6.14",
@ -3215,6 +3217,28 @@
"resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
},
"node_modules/@zhicheng1012/zhicheng-components": {
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.18.tgz",
"integrity": "sha512-bBbonkmlYC3JgPq0fCI8xJxG5NyhGiBjzl2hTADlPy3g/GySDtHFGITQPJUYtjT5RXdw13BHiFSEPv1R2XrArg==",
"dependencies": {
"async-validator": "^1.11.5",
"core-js": "^3.40.0"
},
"engines": {
"node": ">=12.0.0 <=16.x",
"npm": ">=6.0.0"
},
"peerDependencies": {
"element-ui": "2.15.14",
"vue": "2.6.14"
}
},
"node_modules/@zhicheng1012/zhicheng-components/node_modules/async-validator": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.12.2.tgz",
"integrity": "sha512-57EETfCPFiB7M4QscvQzWSGNsmtkjjzZv318SK1CBlstk+hycV72ocjriMOOM48HjvmoAoJGpJNjC7Z76RlnZA=="
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@ -19453,6 +19477,22 @@
"resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
},
"@zhicheng1012/zhicheng-components": {
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.18.tgz",
"integrity": "sha512-bBbonkmlYC3JgPq0fCI8xJxG5NyhGiBjzl2hTADlPy3g/GySDtHFGITQPJUYtjT5RXdw13BHiFSEPv1R2XrArg==",
"requires": {
"async-validator": "^1.11.5",
"core-js": "^3.40.0"
},
"dependencies": {
"async-validator": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.12.2.tgz",
"integrity": "sha512-57EETfCPFiB7M4QscvQzWSGNsmtkjjzZv318SK1CBlstk+hycV72ocjriMOOM48HjvmoAoJGpJNjC7Z76RlnZA=="
}
}
},
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@ -25048,6 +25088,7 @@
"my-components": {
"version": "file:..",
"requires": {
"async-validator": "^1.11.5",
"babel-eslint": "~10.1.0",
"core-js": "^3.40.0",
"css-loader": "~5.2.7",
@ -25059,7 +25100,7 @@
"sass-loader": "^8.0.2",
"style-loader": "~2.0.0",
"url-loader": "^4.1.1",
"vue": "^2.6.14",
"vue": "2.6.14",
"vue-loader": "^15.9.8",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "2.6.14",

3
examples/package.json

@ -9,10 +9,11 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@zhicheng1012/zhicheng-components": "^1.0.18",
"core-js": "^3.40.0",
"element-ui": "^2.15.14",
"my-components": "file:../",
"vue": "2.6.14",
"element-ui": "^2.15.14",
"vue-loader": "^17.4.2"
},
"devDependencies": {

173
examples/src/App.vue

@ -1,7 +1,7 @@
<template>
<div id="app" class="demo-container">
<el-form :model="form" :rules="rules" class="el-row demo-ruleForm" ref="formRef">
<Breadcrumb />
<section class="demo-section">
<h2>页面提示框集合</h2>
<PromptText text='这是一个提示框' :type="1" />
@ -12,18 +12,20 @@
<p class="flex">
<a href="https://e.360.cn/static/zhihui/login/?rdurl=https%3A%2F%2Fe.360.cn%2F" class="flex"
target="_blank">
<img src="~@assets/form_linkActive.svg" alt="">前往登陆</a>登录360智慧平台
<img src="../assets/form_linkActive.svg" alt="">前往登陆</a>登录360智慧平台
<!-- <img src="~@assets/form_linkActive.svg" alt="">前往登陆</a>登录360智慧平台 -->
</p>
</template>
<template #desc>
<p class="mt12 flex">
1. <a href="https://e.360.cn/static/zhihui/login/?rdurl=https%3A%2F%2Fe.360.cn%2F" class="flex"
target="_blank">
<img src="~@assets/form_linkActive.svg" alt="">前往登陆</a>登录360智慧平台
<img src="../assets/form_linkActive.svg" alt="">前往登陆</a>登录360智慧平台
</p>
<p class="mt10 flex">
2. <a href="https://dianjing.e.360.cn/ocpc/list" class="flex" target="_blank">
<img src="~@assets/form_linkActive.svg" alt="">前往ocpc设置页</a>点击添加OCPC投放包按钮注意转换类型只能选择订单其他的根据表单提示填写
<img src="../assets/form_linkActive.svg"
alt="">前往ocpc设置页</a>点击添加OCPC投放包按钮注意转换类型只能选择订单其他的根据表单提示填写
</p>
</template>
</PromptText>
@ -147,84 +149,111 @@
<h2>下拉展开组件集合</h2>
<div class="ele-item">
<label for="">下拉框</label>
<SvgIcon1 :iconPath="require(`@assets/home-bread.svg`)" defaultColor="#8A9099" :size="16"
activeColor="#006AFF" />
<GuipSelect width="600px" v-model="form.card" clearable label="卡片" :default-value="form.card"
@change="selectChangeTest" prop="card" :options="options" valueKey="id1" labelKey="id2"
:extraItem="{ label: '全部', value: '99999' }" />
</div>
</section>
<section class="demo-section">
<h2>表格(表头自定义自定义渲染固定列)</h2>
<GuipButton type="primary" @click="toggleAllSelection">全选按钮</GuipButton>
<GuipTable :tableData="tableData2" ref="multipleTable" @selectChange="handleSelectionChange"
:multiple="true" autoColumn="true" :loading="tableLoading" :border="true">
<!-- <template slot="header"> -->
<el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column>
<el-table-column prop="created_at" label="时间" width="200">
<template slot-scope="scope">
<div class="flex cell_render">
<GuipToolTip content="文字居中">
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{
scope.row.payment
==
'0' ? '文字居中' : '文字居中' }}</span>
</GuipToolTip>
<GuipToolTip content="图标居中">
<svg-icon :size="16" :path="require('@assets/home-bread.svg')"
:color="'#8A9099'" :hoverColor="'#006AFF'" />
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="unit_num" label="数量" width="180">
<template slot-scope="scope">
<GuipToolTip content="单元格局中">
<div class="flex">
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{
scope.row.payment
==
'0' ? '单元格局中' : '单元格局中' }}</span>
<svg-icon :size="16" :path="require('@assets/home-bread.svg')"
:color="'#8A9099'" :hoverColor="'#006AFF'" />
</div>
</GuipToolTip>
</template>
</el-table-column>
<el-table-column prop="name2" label="姓名" width="150"></el-table-column>
<el-table-column prop="price" label="价格" width="150">
<template slot-scope="scope">
<span @click="handlePriceClick(scope.row)">{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="地址1" width="150"> </el-table-column>
<el-table-column prop="address" label="地址2" width="250"> </el-table-column>
<el-table-column prop="address" label="地址3" width="150"> </el-table-column>
<el-table-column prop="address1" label="地址测试" width="100"></el-table-column>
<el-table-column prop="price" label="价格" width="300">
<template slot-scope="scope">
<GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card"
prop="card" :options="options" defaultValue="选项1" />
</template>
</el-table-column>
<el-table-column label="操作(固定右)" width="200" fixed="right">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick(scope.row)" type="text">查看</el-button>
<el-button type="text">编辑</el-button>
</div>
</template>
</el-table-column>
</GuipTable>
<GuipTable :tableData="tableData2" ref="multipleTable" @selectChange="handleSelectionChange" :multiple="true"
autoColumn="true" :loading="tableLoading" :border="true">
<!-- <template slot="header"> -->
<el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column>
<el-table-column prop="created_at" label="时间" width="200">
<template slot-scope="scope">
<div class="flex cell_render">
<GuipToolTip content="文字居中">
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{
scope.row.payment
==
'0' ? '文字居中' : '文字居中' }}</span>
</GuipToolTip>
<GuipToolTip content="图标居中">
<svg-icon :size="16" :path="require('../assets/home-bread.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="unit_num" label="数量" width="180">
<template slot-scope="scope">
<GuipToolTip content="单元格局中">
<div class="flex">
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">{{
scope.row.payment
==
'0' ? '单元格局中' : '单元格局中' }}</span>
<svg-icon :size="16" :path="require('../assets/home-bread.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</div>
</GuipToolTip>
</template>
</el-table-column>
<el-table-column prop="name2" label="姓名" width="150"></el-table-column>
<el-table-column prop="price" label="价格" width="150">
<template slot-scope="scope">
<span @click="handlePriceClick(scope.row)">{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="地址1" width="150"> </el-table-column>
<el-table-column prop="address" label="地址2" width="250"> </el-table-column>
<el-table-column prop="address" label="地址3" width="150"> </el-table-column>
<el-table-column prop="address1" label="地址测试" width="100"></el-table-column>
<el-table-column prop="price" label="价格" width="300">
<template slot-scope="scope">
<GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card" prop="card"
:options="options" defaultValue="选项1" />
</template>
</el-table-column>
<el-table-column label="操作(固定右)" width="200" fixed="right">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick(scope.row)" type="text">查看</el-button>
<el-button type="text">编辑</el-button>
</div>
</template>
</el-table-column>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" :total="total">
</el-pagination>
</section>
<section class="demo-section">
<h2>开关组件</h2>
<GuipSwitch v-model="form.switchValue3" activeText="默认类型boolean" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch>
<GuipSwitch v-model="switchValue" float="right" activeText="文案在右,默认左侧" inactiveText="关闭"
@change="onSwitchChange">
</GuipSwitch>
<GuipSwitch v-model="switchValue1" :active-value="1" :inactive-value="0" activeText="number"
@change="onSwitchChange">
</GuipSwitch>
<GuipSwitch v-model="form.switchValue2" active-value="0" inactive-value="1" activeText="string"
@change="onSwitchChange">
</GuipSwitch>
</section>
<section class="demo-section">
<h2>开关组件</h2>
<SvgIcon1 :iconPath="require(`../assets/home-bread.svg`)" defaultColor="#8A9099" :size="16"
activeColor="#006AFF" />
<svg-icon :size="16" :path="require('../assets/home-bread.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
<GuipToolTip placement="bottom" effect="light" content="点击进入编辑">
<SvgIcon1 :iconPath="require(`../assets/home-bread.svg`)" defaultColor="#8A9099" :size="16"
activeColor="#006AFF" />
</GuipToolTip>
</section>
</el-form>
@ -308,6 +337,8 @@ export default {
form: {
username: '',
language: '',
switchValue3: true,
switchValue2: '0',
domain_set: '',
domainSuffix: '11',
domainSuffix1: '.chachongz.com',
@ -565,7 +596,7 @@ export default {
}],
}
},
components:{
components: {
},
created() {
console.log('当前组件注册情况:', this.$options.components)

287
examples/src/a.vue

@ -0,0 +1,287 @@
<template>
<transition :name="customize ? '' : 'menu-collapse'">
<el-menu v-if="!customize" class="el-menu-vertical-demo custom-menu" @open="handleOpen"
:default-active="currentMenuItem?.index"
@close="handleClose" @select="handleSelect" :collapse="isCollapse" :collapse-transition="true"
>
<div style="height: 100%;padding: 0 0 20px;box-sizing: border-box;">
<div class="menu-top">
<span v-show="!isCollapse">
导航
</span>
<GuipToolTip :content="isCollapse ? '展开' : '收起'">
<img v-if="!isCollapse" class="point" src="../assets/menu-close.svg" @click="changeMenuStatus(true)" alt="">
<img v-else class="point" src="../assets/menu-open.svg" @click="changeMenuStatus(false)" alt="">
</GuipToolTip>
</div>
<template v-for="item in menuData" >
<el-submenu v-if="item.children" :key="item.index" :index="item.index">
<template slot="title">
<SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099"
activeColor="#006AFF" :isActive="item.index == currentMenuItem?.index?.substring(0,1) && isCollapse" />
<span class="title_text" >{{ item.title }}</span>
</template>
<el-menu-item style="padding: 0 22px 0 32px;" v-for="subItem in item.children" :key="subItem.index"
:index="subItem.index" @click="handleSelect(subItem.index, [item.index, subItem.index], subItem)">
{{ subItem.title }}
</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="item.index" :key="item.index" @click="handleSelect(item.index, [item.index], item)">
<div class="flex">
<SvgIcon1 :iconPath="require(`@/assets/menu/${item.icon}.svg`)" defaultColor="#8A9099"
activeColor="#006AFF" :isActive="item.index == currentMenuItem?.index" />
<span class="title_text" slot="title">{{ item.title }}</span>
</div>
</el-menu-item>
</template>
</div>
</el-menu>
<SetLeftMenu v-else :menuList="menuData"/>
</transition>
</template>
<script>
import SetLeftMenu from '@/components/SetLeftMenu.vue'
import SvgIcon1 from '@/components/SvgIcon1.vue';
import GuipToolTip from '@/components/GuipToolTip.vue';
export default {
name: 'SliderMenu',
components: {
SvgIcon1,
GuipToolTip,
SetLeftMenu
},
props: {
menuData: {
type: Array,
default: () => []
},
customize:{
type:Boolean,
default:false
}
},
data() {
return {
isCollapse: false,
routerList: [],
currentMenuItem:'',
currentMenuParent:''
};
},
watch: {
"$route.path"() {
if(this.customize)return
this.updateCurrentMenu();
},
},
methods: {
changeMenuStatus(flag) {
this.isCollapse = flag;
},
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
// handleSelect(index,indexPath) {
// this.activeMenu = index;
// console.log(index,indexPath, '---index');
// // menu path
// const allItems = this.menuData.flatMap(menu => menu.children);
// const targetItem = allItems.find(item => item.index === index);
// if (targetItem && this.$route.path !== targetItem.path) {
// this.$router.push(targetItem.path);
// }
// },
handleSelect(index, indexPath, menuItem) {
if (menuItem.path && this.$route.path !== menuItem.path) {
this.$router.push(menuItem.path);
}
},
updateCurrentMenu() {
const result = this.findMenuItemByPath(this.menuData, this.$route.path);
this.currentMenuItem = result?.item;
},
findMenuItemByPath(menuItems, targetPath, parent = null) {
for (const item of menuItems) {
if (item.path === targetPath) return { item, parent };
if (item.children?.length) {
const found = this.findMenuItemByPath(item.children, targetPath, item);
if (found) return found;
}
}
return null;
},
},
mounted() {
// console.log(this.$route.path,'this.$route.path----');
// const allItems = this.menuData.flatMap(menu =>menu.children ? menu.children?.map(child => ({ ...child, parentIndex: menu.index })) : menu.children);
// console.log(allItems,'=====');
// const current = allItems.find(item => item.path === this.$route.path);
// this.activeMenu = current ? current.index : '';
// this.defaultOpeneds = current ? [current.parentIndex] : [];
// this.routerList = this.$router.options.router;//
// console.log(this.$route.path, this.$router.options.router, 'this.$route.path===');
// //
// this.activeMenu = this.$route.path;
this.updateCurrentMenu();
}
}
</script>
<style lang="scss" scoped>
.menu-collapse-leave-active,
.menu-collapse-enter-active {
transition: all 0.5s;
}
.menu-collapse-enter,
.menu-collapse-leave-to {
opacity: 0;
transform: translateX(-30px);
}
.el-menu--vertical {
.el-menu-item {
height: 40px;
line-height: 40px;
}
.el-menu-item.is-active {
font-weight: bold;
}
}
.title_img {
width: 16px;
margin-right: 4px;
}
.title_text {
margin-left: 4px;
font-size: 14px;
font-weight: bold;
display: block;
}
.el-menu--collapse .title_text {
display: none;
}
.el-menu--collapse ::v-deep .el-submenu__icon-arrow {
display: none;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 158px;
min-width: 158px;
min-height: calc(100vh - 62px);
overflow-y: auto;
}
.el-menu-item {
padding: 0 22px;
font-size: 14px;
}
.menu-top {
background: #FFFFFF;
box-sizing: border-box;
/* middle/middle_line_1 */
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: #DFE2E6;
padding: 15px 0px;
margin: 0 22px;
display: flex;
font-size: 14px;
color: #1E2226;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
justify-content: space-between;
align-items: center;
img {
width: 14px;
height: 14px;
}
}
::v-deep .el-submenu {
// width: 16px;
font-size: 12px;
}
::v-deep .el-submenu .el-menu-item {
min-width: 138px;
width: 100%;
}
::v-deep .el-submenu__title {
display: flex;
align-items: center;
justify-content: flex-start;
}
::v-deep .el-submenu__title:hover {
background-color: transparent;
// cursor: not-allowed;
}
::v-deep .el-submenu__title .el-submenu__icon-arrow.el-icon-arrow-down {
// display: none;
}
::v-deep .el-submenu .el-menu-item {
padding: 0 22px;
display: flex;
justify-content: flex-start;
}
::v-deep .el-submenu .el-menu-item {
height: 36px;
}
::v-deep.el-submenu .el-menu-item {
height: 36px;
line-height: 36px;
color: #8A9099;
letter-spacing: 0.08em;
}
::v-deep .el-menu-item:hover {
background: #F6F7FA;
}
::v-deep .el-menu-item.is-active {
color: #006AFF;
font-weight: bold;
}
// .el-submenu .el-menu {
// transition: all 0.3s ease;
// }
// .el-menu--collapse .el-submenu > .el-menu {
// display: block !important;
// overflow: hidden;
// transition: all 0.3s ease;
// opacity: 0;
// height: 0;
// transform: translateY(-10px);
// }
// .el-menu--collapse .el-submenu.is-opened > .el-menu {
// opacity: 0;
// height: 0;
// }
</style>

6
examples/src/main.js

@ -1,7 +1,11 @@
import Vue from 'vue/dist/vue.esm.js' // 必须用完整版
import App from './App.vue'
import ElementUI from 'element-ui';
// import ZhichengUI from '@zhicheng1012/zhicheng-components'
import 'element-ui/lib/theme-chalk/index.css' // 如果依赖Element
// import '@zhicheng1012/zhicheng-components/dist/css/zhicheng-components.css';
import MyComponents from '../../packages' // 本地引用组件库
// main.js
import 'core-js/stable'
@ -10,6 +14,8 @@ import 'core-js/stable'
Vue.use(MyComponents)
Vue.use(ElementUI);
// Vue.use(ZhichengUI)
Vue.config.productionTip = false
new Vue({
render: h => h(App)

1
examples/vue.config.js

@ -13,6 +13,7 @@ module.exports = {
alias: {
// 别名
'@assets': path.resolve(__dirname, '../packages/assets')
// '@': path.resolve(__dirname, './assets')
}
}
}

97
packages/Breadcrumb/src/index.vue

@ -10,8 +10,8 @@
>
<template v-if="index !== breadcrumbs.length - 1">
<router-link to="/" v-if="item.title == '首页'">
<!-- <SvgIcon1 :iconPath="require(`../../assets/home-bread.svg`)" defaultColor="#8A9099" :size="16" activeColor="#006AFF"/> -->
<img class="home-icon" src="../../assets/home-bread.svg" alt="">
<SvgIcon1 :iconPath="require(`../../assets/home-bread.svg`)" defaultColor="#8A9099" :size="16" activeColor="#006AFF"/>
<!-- <img class="home-icon" src="../../assets/home-bread.svg" alt=""> -->
</router-link>
<router-link v-else :to="item.path">{{ item.title }}</router-link>
<img class="separator" src="../../assets/separator.png" alt="">
@ -37,50 +37,67 @@ export default {
},
computed: {
breadcrumbs() {
if (this.$route.meta.hideBreadcrumb) return [];
// if (this.$route.meta.hideBreadcrumb) return [];
const crumbs = [];
let currentRoute = this.$route;
const crumbs = [
{
path:{
path:'/',
query:{uid: "2300"},
params:{}
},
title:'首页'
},
{
path:{
path: "/agent/siteList",
query:{uid: "2300"},
params:{}
},
title:"站点列表"
},
];
// let currentRoute = this.$route;
//
while (currentRoute) {
//
// const matchedRoute = this.$router.options.routes.find(
// r => r.name === currentRoute.name
// );
// //
// while (currentRoute) {
// //
// // const matchedRoute = this.$router.options.routes.find(
// // r => r.name === currentRoute.name
// // );
//
const routeWithParams = {
path: currentRoute.path,
query: currentRoute.query,
params: currentRoute.params
};
// //
// const routeWithParams = {
// path: currentRoute.path,
// query: currentRoute.query,
// params: currentRoute.params
// };
crumbs.unshift({
path: routeWithParams,
title: this.getTitle(currentRoute)
});
// crumbs.unshift({
// path: routeWithParams,
// title: this.getTitle(currentRoute)
// });
// meta.breadcrumbParent
if (currentRoute.meta.breadcrumbParent) {
currentRoute = this.$router.options.routes.find(
r => r.name === currentRoute.meta.breadcrumbParent
);
// // meta.breadcrumbParent
// if (currentRoute.meta.breadcrumbParent) {
// currentRoute = this.$router.options.routes.find(
// r => r.name === currentRoute.meta.breadcrumbParent
// );
// $route
if (currentRoute) {
currentRoute = {
...currentRoute,
path: currentRoute.path,
query: this.$route.query, //
params: this.$route.params, //
meta: currentRoute.meta || {}
};
}
} else {
currentRoute = null;
}
}
// // $route
// if (currentRoute) {
// currentRoute = {
// ...currentRoute,
// path: currentRoute.path,
// query: this.$route.query, //
// params: this.$route.params, //
// meta: currentRoute.meta || {}
// };
// }
// } else {
// currentRoute = null;
// }
// }
return crumbs;
},

7
packages/GuipSwitch/index.js

@ -0,0 +1,7 @@
import GuipSwitch from './src/index.vue'
GuipSwitch.install = function(Vue) {
Vue.component(GuipSwitch.name || 'GuipSwitch', GuipSwitch)
}
export default GuipSwitch

109
packages/GuipSwitch/src/index.vue

@ -0,0 +1,109 @@
<template>
<el-form-item :prop="prop" :label="label" :rules="rules">
<div class="guip_switchWrap">
<span :class="['switchDesc', { 'fl': float == 'left' }, { 'fr': float == 'right' }]"
v-if="activeText || inactiveText">
{{ internalValue === activeValue ? activeText : inactiveText
}}</span>
<el-switch v-model="internalValue" :active-color="activeColor" :inactive-color="inactiveColor"
v-bind="$attrs" :disabled="disabled" :active-value="activeValue" :inactive-value="inactiveValue"
@change="handleChange">
<!-- 自定义开启时的图标 -->
<template #active-icon>
</template>
<!-- 自定义关闭时的图标 -->
<template #inactive-icon>
</template>
</el-switch>
</div>
</el-form-item>
</template>
<script>
export default {
name: 'GuipSwitch',
inheritAttrs: false,
props: {
// modelValue: { type: [Boolean, String, Number], default: undefined },
value: { type: [Boolean, String, Number], default: undefined },
prop: String,
label: String,
rules: Array,
labelWidth: String,
activeText: {
type: String,
default: '',
},
inactiveText: {
type: String,
default: '',
},
activeValue: {
type: [Boolean, String, Number],
default: true,
},
inactiveValue: {
type: [Boolean, String, Number],
default: false,
},
activeColor: {
type: String,
default: '#00C261',
},
inactiveColor: {
type: String,
default: '#BABDC2',
},
float: {
type: String,
default: 'left',
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
internalValue: this.value,
errorMsg: ''
}
},
computed: {
// internalValue: {
// get() {
// return this.modelValue !== undefined ? this.modelValue : this.value
// },
// set(val) {
// this.$emit('update:modelValue', val)
// this.$emit('input', val)
// }
// }
},
watch: {
value(newVal) {
this.internalValue = newVal
},
// modelValue(newVal) {
// this.internalValue = newVal
// },
},
methods: {
handleChange(val) {
// this.$emit('update:modelValue', val)
this.$emit('input', val)
this.$emit('change', val)
this.validateField()
},
validateField() {
if (this.prop && this.$parent.validateField) {
this.$parent.validateField(this.prop, (error) => {
this.errorMsg = error || ''
})
}
}
}
}
</script>

10
packages/SvgIcon/src/index.vue

@ -1,6 +1,6 @@
<template>
<div
class="svg-icon-wrapper"
class="guip-svg-icon-wrapper"
:style="{ width: size + 'px', height: size + 'px' }"
@click="handleClick"
@mouseenter="isHovered = true"
@ -85,7 +85,7 @@ export default {
</script>
<style scoped>
.svg-icon-wrapper {
/* .svg-icon-wrapper1 {
display: inline-flex;
align-items: center;
justify-content: center;
@ -93,7 +93,7 @@ export default {
transition: all 0.3s;
}
.svg-icon-wrapper:hover {
.svg-icon-wrapper1:hover {
opacity: 0.8;
}
@ -111,7 +111,7 @@ export default {
color: var(--icon-hover-color);
}
.svg-icon-wrapper[disabled] {
.svg-icon-wrapper1[disabled] {
cursor: not-allowed;
opacity: 0.5;
}
@ -122,5 +122,5 @@ export default {
.svg-icon >>> circle {
fill: currentColor;
}
} */
</style>

25
packages/SvgIcon1/src/index.vue

@ -1,5 +1,5 @@
<template>
<div class="guip-svg-icon-wrapper" :style="wrapperStyle" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave">
<div class="guip-svg-icon-wrapper1" :style="wrapperStyle" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave">
<div class="svg-icon" v-html="svgContent" :style="{
'--icon-color': (hoverEffect || isActive) ? activeColor : defaultColor,
'--icon-hover-color': activeColor
@ -143,4 +143,25 @@ export default {
this.loadSvg()
}
}
</script>
</script>
<style scoped>
/* .svg-icon {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: var(--icon-color);
transition: color 0.3s;
}
.svg-icon:hover {
color: var(--icon-hover-color);
}
.svg-icon {
display: inline-flex;
} */
</style>

7
packages/index.js

@ -10,6 +10,7 @@ import Breadcrumb from './Breadcrumb';
import SvgIcon1 from './SvgIcon1';
import SvgIcon from './SvgIcon';
import GuipTable from './GuipTable';
import GuipSwitch from './GuipSwitch';
import GuipTooltip from './GuipToolTip';
import 'core-js/stable'
import 'element-ui/lib/theme-chalk/index.css'; // 如果依赖Element
@ -30,7 +31,8 @@ const components = [
SvgIcon1,
SvgIcon,
GuipTable,
GuipTooltip
GuipTooltip,
GuipSwitch
]
const install = function (Vue) {
@ -56,5 +58,6 @@ export default {
SvgIcon1,
SvgIcon,
GuipTable,
GuipTooltip
GuipTooltip,
GuipSwitch
}

8
packages/styles/common.scss

@ -827,7 +827,7 @@ body {
overflow: hidden;
text-overflow: ellipsis;
}
.el-table .svg-icon-wrapper{
.el-table .guip-svg-icon-wrapper{
width: 12px !important;
height: 12px !important;
}
@ -877,7 +877,7 @@ body {
white-space: normal;
max-width: none;
}
.svg-icon-wrapper{
.guip-svg-icon-wrapper{
// width: 12px !important;
// height: 12px !important;
}
@ -952,13 +952,13 @@ body {
}
// 表格行内小图标 默认隐藏
.el-table .svg-icon-wrapper{
.el-table .guip-svg-icon-wrapper{
display: none !important;
margin-left: 8px;
}
//划过时 显示
.el-table__row:hover{
.svg-icon-wrapper{
.guip-svg-icon-wrapper{
margin-left: 8px;
display: block !important;
}

115
packages/styles/component.scss

@ -168,8 +168,8 @@
}
}
// 图标组件
.guip-svg-icon-wrapper {
// 图标组件 svgicon1
.guip-svg-icon-wrapper1 {
cursor: pointer;
.svg-icon {
@ -192,35 +192,108 @@
}
// .guip-svg-icon-wrapper .svg-icon>>>svg {
// 图标组件 svgicon
.guip-svg-icon-wrapper {
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s;
.svg-icon {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: var(--icon-color);
transition: color 0.3s;
}
.svg-icon:hover {
color: var(--icon-hover-color);
}
}
.guip-svg-icon-wrapper .svg-icon ::v-deep path {
fill: currentColor;
}
.guip-svg-icon-wrapper .svg-icon ::v-deep circle {
fill: currentColor;
}
.guip-svg-icon-wrapper:hover {
opacity: 0.8;
}
.guip-svg-icon-wrapper[disabled] {
cursor: not-allowed;
opacity: 0.5;
}
// .guip-svg-icon-wrapper .svg-icon ::v-deep svg {
// fill: currentColor;
// }
// 表格组件
.guip-table{
.guip-table {
.custom-empty {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.empty-image {
width: 160px;
height: 160px;
width: 160px;
height: 160px;
}
.empty-text {
color: #626573;
letter-spacing: 0.08em;
height: 18px;
line-height: 18px;
color: #626573;
letter-spacing: 0.08em;
height: 18px;
line-height: 18px;
}
.el-empty{
padding: 0;
.el-empty {
padding: 0;
}
}
.guip-table ::v-deep .el-empty__description{
}
.guip-table ::v-deep .el-empty__description {
line-height: 20px;
margin-top: 0;
}
}
// switch组件
.guip_switchWrap {
.fl {
float: left;
margin-right: 12px;
}
.fr {
float: right;
margin-left: 12px;
}
.switchDesc {
font-size: 12px;
font-weight: normal;
line-height: 20px;
letter-spacing: 0.08em;
font-variation-settings: "opsz"auto;
/* text/text_3 */
color: #626573;
display: inline-block;
}
.error-msg {
color: #f56c6c;
font-size: 12px;
margin-left: 10px;
}
}
Loading…
Cancel
Save