vuepress-theme-uniapp-official 1.4.11

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.
Files changed (63) hide show
  1. package/README.md +22 -0
  2. package/components/AlgoliaSearchBox.vue +130 -0
  3. package/components/DcloudSearchPage/components/Result.vue +160 -0
  4. package/components/DcloudSearchPage/components/Results.vue +66 -0
  5. package/components/DcloudSearchPage/components/pagination.vue +155 -0
  6. package/components/DcloudSearchPage/index.styl +183 -0
  7. package/components/DcloudSearchPage/index.vue +500 -0
  8. package/components/DcloudSearchPage/styles/ask.styl +272 -0
  9. package/components/DcloudSearchPage/styles/ext.styl +68 -0
  10. package/components/DcloudSearchPage/utils/Base64.js +134 -0
  11. package/components/DcloudSearchPage/utils/mock.js +434 -0
  12. package/components/DcloudSearchPage/utils/postDcloudServer.js +141 -0
  13. package/components/DcloudSearchPage/utils/searchClient.js +101 -0
  14. package/components/DcloudSearchPage/utils/searchUtils.js +52 -0
  15. package/components/Footer.vue +142 -0
  16. package/components/MainNavbarLink.vue +57 -0
  17. package/components/NavLink.vue +95 -0
  18. package/components/NavLinks.vue +173 -0
  19. package/components/Navbar.vue +322 -0
  20. package/components/NavbarLogo.vue +24 -0
  21. package/components/OutboundLink.vue +45 -0
  22. package/components/SearchBox/dist/match-query.dev.js +61 -0
  23. package/components/SearchBox/index.vue +337 -0
  24. package/components/SearchBox/match-query.js +51 -0
  25. package/components/SearchBox/search.svg +1 -0
  26. package/components/SidebarGroup.vue +141 -0
  27. package/components/SidebarLink.vue +152 -0
  28. package/components/SidebarLinks.vue +106 -0
  29. package/components/SiderBarBottom.vue +134 -0
  30. package/components/Sticker.vue +64 -0
  31. package/components/Toc-top.vue +95 -0
  32. package/components/Toc.vue +165 -0
  33. package/config/copy.js +7 -0
  34. package/config/footer.js +195 -0
  35. package/config/i18n/index.js +2 -0
  36. package/config/navbar.js +163 -0
  37. package/config/redirectRouter.js +120 -0
  38. package/config/searchPage.js +48 -0
  39. package/config/siderbar/index.js +8 -0
  40. package/config/siderbar/uni-app.js +210 -0
  41. package/config/siderbar/uniCloud.js +55 -0
  42. package/config/toc.js +5 -0
  43. package/enhanceApp.js +142 -0
  44. package/global-components/CodeSimulator.vue +211 -0
  45. package/global-components/icons.js +647 -0
  46. package/global-components/iconsLayouts.vue +117 -0
  47. package/global-components/uniIcon.vue +85 -0
  48. package/global-components/uniicons.css +656 -0
  49. package/global-components/uniicons.ttf +0 -0
  50. package/index.js +152 -0
  51. package/layouts/404.vue +22 -0
  52. package/layouts/Layout.vue +238 -0
  53. package/layouts/SimpleLayout.vue +18 -0
  54. package/mixin/navInject.js +21 -0
  55. package/mixin/navProvider.js +65 -0
  56. package/mixin/toc.js +36 -0
  57. package/package.json +50 -0
  58. package/styles/custom-block.styl +336 -0
  59. package/styles/footer.styl +248 -0
  60. package/styles/index.styl +197 -0
  61. package/styles/navbar.styl +293 -0
  62. package/styles/palette.styl +9 -0
  63. package/util/index.js +317 -0
@@ -0,0 +1,117 @@
1
+ <!-- fixed by mehaotian -->
2
+ <template>
3
+ <div class="icons-box">
4
+ <div class="icons-item" v-for="(item, index) in iconsList" :key="index" @click="onClipboard(item)">
5
+ <span class="icons-tip " :class="{ show: item.tipShow }">复制成功</span>
6
+ <span class="uni-icon" :class="['uniui-'+item.text]"></span>
7
+ <span class="icons-text">{{ item.text }}</span>
8
+ </div>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ import uniicons from './icons.js';
14
+ import Clipboard from 'clipboard';
15
+ export default {
16
+ name: 'iconsLayouts',
17
+ functional: false,
18
+ props: {},
19
+ data() {
20
+ return {
21
+ iconsList: []
22
+ };
23
+ },
24
+ created() {
25
+ uniicons.forEach(v=>{
26
+ this.iconsList.push({
27
+ icon: v.unicode,
28
+ text: v.font_class,
29
+ tipShow: false
30
+ });
31
+ })
32
+ },
33
+ methods: {
34
+ onClipboard(data) {
35
+ console.log(data);
36
+ let index = this.iconsList.findIndex((item)=> item.tipShow)
37
+ if(index !== -1){
38
+ this.iconsList[index].tipShow = false
39
+ }
40
+ const _this = this
41
+ let clipboard = new Clipboard('.icons-item', {
42
+ text: function() {
43
+ return data.text;
44
+ }
45
+ });
46
+ clipboard.on('success', e => {
47
+ data.tipShow = true
48
+ clearTimeout(_this.timer)
49
+ _this.timer = setTimeout(()=>{
50
+ data.tipShow = false
51
+ },1000)
52
+ // 释放内存
53
+ clipboard.destroy();
54
+ });
55
+ clipboard.on('error', e => {
56
+ clipboard.destroy();
57
+ });
58
+ }
59
+ }
60
+ };
61
+ </script>
62
+
63
+ <style lang="stylus" >
64
+ @import './uniicons.css'
65
+ @font-face
66
+ font-family uniicons
67
+ font-weight normal
68
+ font-style normal
69
+ src url('./uniicons.ttf') format('truetype')
70
+
71
+ .icons-box
72
+ display flex
73
+ flex-wrap wrap
74
+ width 100%
75
+ border-left 1px #eaecef solid
76
+ border-top 1px #eaecef solid
77
+ color #5e6d82
78
+ .icons-item
79
+ position relative
80
+ display flex
81
+ flex-direction column
82
+ align-items center
83
+ padding 25px 10px
84
+ width 16.66%
85
+ border-right 1px #eaecef solid
86
+ border-bottom 1px #eaecef solid
87
+ box-sizing border-box
88
+ -moz-user-select none /* 火狐 */
89
+ -webkit-user-select none /* webkit浏览器 */
90
+ -ms-user-select none /* IE10 */
91
+ -khtml-user-select none /* 早期浏览器 */
92
+ user-select none
93
+ .icons-tip
94
+ padding 2px 10px
95
+ position absolute
96
+ top 0
97
+ left 0
98
+ border-radius 5px
99
+ color #1AAD19
100
+ opacity 0
101
+ transition all 0.3s
102
+ font-size 14px
103
+ &.show
104
+ opacity 1
105
+ &:hover
106
+ background-color #F5F5F5
107
+ cursor pointer
108
+ .icons-text
109
+ text-align center
110
+ .uni-icon
111
+ font-family uniicons
112
+ font-size 35px
113
+ margin-bottom 10px
114
+ @media (max-width: $MQNarrow)
115
+ width 33.3%
116
+ padding 15px 0
117
+ </style>
@@ -0,0 +1,85 @@
1
+ <template>
2
+ <!-- :style="{ color: color, 'font-size': iconSize }" -->
3
+ <span
4
+ class="uni-icons"
5
+ :class="['uniui-' + type, customPrefix, customPrefix ? type : '']"
6
+ @click="_onClick"
7
+ ></span>
8
+ </template>
9
+
10
+ <script>
11
+ import icons from './icons.js';
12
+ const getVal = val => {
13
+ const reg = /^[0-9]*$/g;
14
+ return typeof val === 'number' || reg.test(val) ? val + 'px' : val;
15
+ };
16
+
17
+ /**
18
+ * Icons 图标
19
+ * @description 用于展示 icons 图标
20
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=28
21
+ * @property {Number} size 图标大小
22
+ * @property {String} type 图标图案,参考示例
23
+ * @property {String} color 图标颜色
24
+ * @property {String} customPrefix 自定义图标
25
+ * @event {Function} click 点击 Icon 触发事件
26
+ */
27
+ export default {
28
+ name: 'UniIcons',
29
+ emits: ['click'],
30
+ props: {
31
+ type: {
32
+ type: String,
33
+ default: '',
34
+ },
35
+ /* color: {
36
+ type: String,
37
+ default: '#333333',
38
+ },
39
+ size: {
40
+ type: [Number, String],
41
+ default: 16,
42
+ }, */
43
+ customPrefix: {
44
+ type: String,
45
+ default: '',
46
+ },
47
+ },
48
+ data() {
49
+ return {
50
+ icons: icons.glyphs,
51
+ };
52
+ },
53
+ /* computed: {
54
+ unicode() {
55
+ let code = this.icons.find(v => v.font_class === this.type);
56
+ if (code) {
57
+ return unescape(`%u${code.unicode}`);
58
+ }
59
+ return '';
60
+ },
61
+ iconSize() {
62
+ return getVal(this.size);
63
+ },
64
+ }, */
65
+ methods: {
66
+ _onClick() {
67
+ this.$emit('click');
68
+ },
69
+ },
70
+ };
71
+ </script>
72
+
73
+ <style>
74
+ @import './uniicons.css';
75
+ @font-face {
76
+ font-family: uniicons;
77
+ src: url('./uniicons.ttf') format('truetype');
78
+ }
79
+
80
+ .uni-icons {
81
+ font-family: uniicons;
82
+ text-decoration: none;
83
+ text-align: center;
84
+ }
85
+ </style>