From 1c6b27d7412a0b10dee6f95ea461e68c5e9e4de7 Mon Sep 17 00:00:00 2001 From: Ice-Hazymoon Date: Mon, 23 Sep 2019 14:59:46 +0800 Subject: [PATCH] =?UTF-8?q?D:=E7=A7=BB=E9=99=A4toasted=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/FloatBtn.vue | 4 ++-- components/UI/nya-copy.vue | 4 ++-- pages/cdnjs.vue | 4 ++-- pages/china_colors.vue | 4 ++-- pages/links.vue | 1 - styles/main.scss | 12 ------------ 6 files changed, 8 insertions(+), 21 deletions(-) diff --git a/components/FloatBtn.vue b/components/FloatBtn.vue index bc065e11..1f6193c6 100644 --- a/components/FloatBtn.vue +++ b/components/FloatBtn.vue @@ -105,10 +105,10 @@ export default { let flag = favorites.indexOf(path).value(); if (flag === -1) { favorites.push(path).value(); - this.$toasted.show('收藏成功'); + this.$noty.success('收藏成功'); } else { favorites.pull(path).value(); - this.$toasted.show('取消收藏成功'); + this.$noty.success('取消收藏成功'); } this.$store.commit('SET_STORE', { key: 'setting.favorites', diff --git a/components/UI/nya-copy.vue b/components/UI/nya-copy.vue index 7318ea14..c051883a 100644 --- a/components/UI/nya-copy.vue +++ b/components/UI/nya-copy.vue @@ -21,10 +21,10 @@ export default { doCopy() { this.$copyText(this.copy).then( () => { - this.$toasted.show('复制成功'); + this.$noty.success('复制成功'); }, () => { - this.$toasted.show('复制失败,请手动选择复制'); + this.$noty.error('复制失败,请手动选择复制'); } ); } diff --git a/pages/cdnjs.vue b/pages/cdnjs.vue index 677cd07e..5aa2b7b4 100644 --- a/pages/cdnjs.vue +++ b/pages/cdnjs.vue @@ -254,10 +254,10 @@ export default { doCopy(text) { this.$copyText(text).then( () => { - this.$toasted.show('复制成功'); + this.$noty.success('复制成功'); }, () => { - this.$toasted.show('复制失败,请手动选择复制'); + this.$noty.error('复制失败,请手动选择复制'); } ); } diff --git a/pages/china_colors.vue b/pages/china_colors.vue index 41bd4c4e..601e96bd 100644 --- a/pages/china_colors.vue +++ b/pages/china_colors.vue @@ -79,10 +79,10 @@ export default { doCopy(color, text) { this.$copyText(color).then( () => { - this.$toasted.show(text); + this.$noty.success(text); }, () => { - this.$toasted.show('复制失败,请手动选择复制'); + this.$noty.error('复制失败,请手动选择复制'); } ); }, diff --git a/pages/links.vue b/pages/links.vue index 463b6152..ffe5ee94 100644 --- a/pages/links.vue +++ b/pages/links.vue @@ -134,7 +134,6 @@ export default { 'https://github.com/necolas/normalize.css/', 'https://www.npmjs.com/package/tinycolor2', 'https://github.com/hilongjw/vue-lazyload', - 'https://github.com/shakee93/vue-toasted', 'https://github.com/robinvdvleuten/vuex-persistedstate', 'https://github.com/m13253/JPEGreen' ] diff --git a/styles/main.scss b/styles/main.scss index 3f8d3686..eab3dfc6 100644 --- a/styles/main.scss +++ b/styles/main.scss @@ -148,18 +148,6 @@ hr { border-bottom: 1px dashed var(--border-color); } -// toasted -.toasted-container{ - top: 6% !important; - .miku-toasted{ - justify-content: center !important; - @media (max-width: 700px) { - padding: 5px 20px !important; - line-height: 1.3 !important; - } - } -} - // 滚动条 ::-webkit-scrollbar { width: 8px;