diff --git a/App.vue b/App.vue index 92f22dd56937ce5f0304d78aa2a96ef6504ad0b6..28684757af16fb540f9ce89e2f4afbda59c79b8c 100644 --- a/App.vue +++ b/App.vue @@ -1,15 +1,5 @@ diff --git a/pages/tools/copy/copy.vue b/pages/tools/copy/copy.vue new file mode 100644 index 0000000000000000000000000000000000000000..8fd6e3a1cf91d5e93178da86a24ef90632b7de83 --- /dev/null +++ b/pages/tools/copy/copy.vue @@ -0,0 +1,27 @@ + + + + + + diff --git a/pages/tools/storage/storage.vue b/pages/tools/storage/storage.vue new file mode 100644 index 0000000000000000000000000000000000000000..676c51c8c1fa1d7483acbadb1649579456a6eb0f --- /dev/null +++ b/pages/tools/storage/storage.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/styles/demo.scss b/styles/demo.scss index 3000d517cdde562922ec7ef5bd27fe272eaf0400..c16c944b361f3b8ad53026da761afab93a996518 100644 --- a/styles/demo.scss +++ b/styles/demo.scss @@ -7,16 +7,16 @@ text { /* start--演示页面使用的统一样式--start */ .c-demo { - padding: 25px 20px; + padding: 50rpx 40rpx; } .c-demo-wrap { - border-width: 1px; + border-width: 1rpx; border-color: #ddd; border-style: dashed; background-color: rgb(250, 250, 250); - padding: 20px 10px; - border-radius: 3px; + padding: 40rpx 20rpx; + border-radius: 6rpx; } .c-demo-area { @@ -25,19 +25,19 @@ text { .c-no-demo-here { color: $c-tips-color; - font-size: 13px; + font-size: 26rpx; } .c-demo-result-line { border-width: 1px; border-color: #ddd; border-style: dashed; - padding: 5px 20px; - margin-top: 30px; - border-radius: 5px; + padding: 10rpx 40rpx; + margin-top: 60rpx; + border-radius: 10rpx; background-color: rgb(240, 240, 240); color: $c-content-color; - font-size: 16px; + font-size: 30rpx; /* #ifndef APP-NVUE */ word-break: break-word; display: inline-block; @@ -49,45 +49,45 @@ text { .c-demo-title, .c-config-title { text-align: center; - font-size: 16px; + font-size: 32rpx; font-weight: bold; - margin-bottom: 20px; + margin-bottom: 40rpx; } .c-config-item { - margin-top: 25px; + margin-top: 50rpx; } .c-config-title { - margin-top: 20px; - padding-bottom: 5px; + margin-top: 40rpx; + padding-bottom: 10rpx; } .c-item-title { position: relative; - font-size: 15px; - padding-left: 8px; + font-size: 30rpx; + padding-left: 16rpx; line-height: 1; - margin-bottom: 11px; + margin-bottom: 22rpx; } .c-item-title:after { position: absolute; - width: 4px; - top: -1px; - height: 16px; + width: 8rpx; + top: -2rpx; + height: 32rpx; /* #ifndef APP-NVUE */ content: ''; /* #endif */ left: 0; - border-radius: 10px; + border-radius: 20rpx; background-color: $c-content-color; } .c-subsection{ - height: 25px; + height: 50rpx; background-color: rgb(238, 238, 239); - padding: 3px; - border-radius: 5px; + padding: 6rpx; + border-radius: 10rpx; } /* end--演示页面使用的统一样式--end */ \ No newline at end of file diff --git a/utils/common.js b/utils/common.js new file mode 100644 index 0000000000000000000000000000000000000000..590b1e89927ab25c47f57e6075c869692a0404a2 --- /dev/null +++ b/utils/common.js @@ -0,0 +1,59 @@ +const config = require('./config') + +export const $showToast = (title, _callback) => { + uni.showToast({ + title, + icon: 'none', + mask: true, + duration: 2000, + success: () => { + if (isFunction(_callback)) { + _callback() + } + } + }) +} + +export const $hideToast = () => { + uni.hideToast() +} + +export const $showModal = ({ + title = '提示', + content = '', + showCancel = true, + cancelText = '取消', + cancelColor = '#000000', + confirmText = '确定', + confirmColor = config['main_color'] +}, _callback) => { + uni.showModal({ + title, + content, + showCancel, + cancelText, + cancelColor, + confirmText, + confirmColor, + success: (res) => { + if (isFunction(_callback)) { + _callback(res) + } + } + }) +} + +export const $showLoading = (title) => { + uni.showLoading({ + title: title ? title : '加载中...', + mask: true + }) +} + +export const $hideLoading = () => { + uni.hideLoading() +} + +const isFunction = (obj) => { + return typeof obj === 'function' +} diff --git a/utils/config.js b/utils/config.js new file mode 100644 index 0000000000000000000000000000000000000000..41f0022719dce52e67b2c18c8f810ef84ab28707 --- /dev/null +++ b/utils/config.js @@ -0,0 +1,23 @@ +module.exports = { + project_cn: '绿豆糕组件库', + project_en: 'ldcake-uniapp', + main_color: '#2979ff', + sub_color: '#2979ff', + dev_env: 'pro', + pro: { + // #ifndef H5 + url: '', + // #endif + // #ifdef H5 + url: '/api', + // #endif + }, + dev: { + // #ifndef H5 + url: '', + // #endif + // #ifdef H5 + url: '/dapi', + // #endif + } +}