BuptStEve / vuepress-plugin-demo-code

📝 Demo and code plugin for vuepress
https://buptsteve.github.io/vuepress-plugin-demo-code/
MIT License
124 stars 28 forks source link

可以把复制代码的功能加上吗? #19

Closed sorrowjojo closed 4 years ago

sorrowjojo commented 4 years ago

可以加个一键复制代码的功能吗?

BuptStEve commented 4 years ago

参考这个 issue:https://github.com/vuejs/vuepress/issues/1823

1.安装

npm i @dovyp/vuepress-plugin-clipboard-copy

2.配置

// .vuepress/config.js
{
  ...
  plugins: [
    ['@dovyp/vuepress-plugin-clipboard-copy', true],
  ]
  ...
}

3.搞定

image

至于直接集成进来我要考虑下...

sorrowjojo commented 4 years ago

嗯啊,谢谢,搞定了。 另外,你们这个支持扩展吗?我想在你这个的功能上修改一些东西,比如样式,结构和脚本等,当然只是简单的调整, 目前是在node_modules里面直接修改,但是其他人无法更新,后续维护也麻烦,有什么更好的办法吗?

------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:30 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19)

参考这个 issue:vuejs/vuepress#1823

1.安装 npm i @dovyp/vuepress-plugin-clipboard-copy

2.配置 // .vuepress/config.js { ... plugins: [ ['@dovyp/vuepress-plugin-clipboard-copy'], ] ... }

3.搞定

至于直接集成进来我要考虑下...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BuptStEve commented 4 years ago

fork 一份儿,然后自己发包? 或者再详细说下具体需求...

嗯啊,谢谢,搞定了。 另外,你们这个支持扩展吗?我想在你这个的功能上修改一些东西,比如样式,结构和脚本等,当然只是简单的调整, 目前是在node_modules里面直接修改,但是其他人无法更新,后续维护也麻烦,有什么更好的办法吗? ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:30 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 参考这个 issue:vuejs/vuepress#1823 1.安装 npm i @dovyp/vuepress-plugin-clipboard-copy 2.配置 // .vuepress/config.js { ... plugins: [ ['@dovyp/vuepress-plugin-clipboard-copy'], ] ... } 3.搞定 至于直接集成进来我要考虑下... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sorrowjojo commented 4 years ago

不用自己发包哦,简单的说,就是我想修改

这些文件,但是这些文件都在node_modules目录里,它不纳入git管理,无法直接同步到其他人

------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:58 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19)

fork 一份儿,然后自己发包? 或者再详细说下具体需求...

嗯啊,谢谢,搞定了。 另外,你们这个支持扩展吗?我想在你这个的功能上修改一些东西,比如样式,结构和脚本等,当然只是简单的调整, 目前是在node_modules里面直接修改,但是其他人无法更新,后续维护也麻烦,有什么更好的办法吗? … ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:30 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 参考这个 issue:vuejs/vuepress#1823 1.安装 npm i @dovyp/vuepress-plugin-clipboard-copy 2.配置 // .vuepress/config.js { ... plugins: [ ['@dovyp/vuepress-plugin-clipboard-copy'], ] ... } 3.搞定 至于直接集成进来我要考虑下... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BuptStEve commented 4 years ago

所以说你具体想改啥嘛...? DemoAndCode.vue

不用自己发包哦,简单的说,就是我想修改 这些文件,但是这些文件都在node_modules目录里,它不纳入git管理,无法直接同步到其他人 ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:58 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) fork 一份儿,然后自己发包? 或者再详细说下具体需求... 嗯啊,谢谢,搞定了。 另外,你们这个支持扩展吗?我想在你这个的功能上修改一些东西,比如样式,结构和脚本等,当然只是简单的调整, 目前是在node_modules里面直接修改,但是其他人无法更新,后续维护也麻烦,有什么更好的办法吗? … ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:30 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 参考这个 issue:vuejs/vuepress#1823 1.安装 npm i @dovyp/vuepress-plugin-clipboard-copy 2.配置 // .vuepress/config.js { ... plugins: [ ['@dovyp/vuepress-plugin-clipboard-copy'], ] ... } 3.搞定 至于直接集成进来我要考虑下... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sorrowjojo commented 4 years ago

哈哈,是啊,你的样式太丑了,样式我可以直接在我项目里面复制一个来改没问题,但是可能结构得调整一下

比如嵌套个结构啥的,而且那些图标也想换一下

------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 05:15 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19)

所以说你具体想改啥嘛...? DemoAndCode.vue?

不用自己发包哦,简单的说,就是我想修改 这些文件,但是这些文件都在node_modules目录里,它不纳入git管理,无法直接同步到其他人 … ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:58 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) fork 一份儿,然后自己发包? 或者再详细说下具体需求... 嗯啊,谢谢,搞定了。 另外,你们这个支持扩展吗?我想在你这个的功能上修改一些东西,比如样式,结构和脚本等,当然只是简单的调整, 目前是在node_modules里面直接修改,但是其他人无法更新,后续维护也麻烦,有什么更好的办法吗? … ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Wed, Nov 27, 2019 04:30 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 参考这个 issue:vuejs/vuepress#1823 1.安装 npm i @dovyp/vuepress-plugin-clipboard-copy 2.配置 // .vuepress/config.js { ... plugins: [ ['@dovyp/vuepress-plugin-clipboard-copy'], ] ... } 3.搞定 至于直接集成进来我要考虑下... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BuptStEve commented 4 years ago

试试这个版本 v0.5.0-0

npm i vuepress-plugin-demo-code@next
sorrowjojo commented 4 years ago

重新安装了这个版本,跟之前的版本有啥区别吗? 咋修改呀

------------------ 原始邮件 ------------------ 发件人: "StEve Young"<notifications@github.com>; 发送时间: 2019年11月27日(星期三) 晚上8:51 收件人: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; 抄送: "善良滴壞蛋"<sorrowjojo@vip.qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19)

试试这个版本 v0.5.0-0 npm i vuepress-plugin-demo-code@next

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BuptStEve commented 4 years ago

code-copy

重新安装了这个版本,跟之前的版本有啥区别吗? 咋修改呀 ------------------ 原始邮件 ------------------ 发件人: "StEve Young"<notifications@github.com>; 发送时间: 2019年11月27日(星期三) 晚上8:51 收件人: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; 抄送: "善良滴壞蛋"<sorrowjojo@vip.qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 试试这个版本 v0.5.0-0 npm i vuepress-plugin-demo-code@next — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sorrowjojo commented 4 years ago

你可能理解错我的意思了。。。 我不是说让你帮我改一下复制代码的样式,我是想自己来改整个项目的样式来符合我们设计师的风格, 需要改到这里面的结构

比如要改成下面这样(举个栗子)

ps:而且试了你给的npm i vuepress-plugin-demo-code@next,并不像你动图显示的那样的效果哈

------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Thu, Nov 28, 2019 02:16 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19)

重新安装了这个版本,跟之前的版本有啥区别吗? 咋修改呀 … ------------------ 原始邮件 ------------------ 发件人: "StEve Young"<notifications@github.com>; 发送时间: 2019年11月27日(星期三) 晚上8:51 收件人: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; 抄送: "善良滴壞蛋"<sorrowjojo@vip.qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 试试这个版本 v0.5.0-0 npm i vuepress-plugin-demo-code@next — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BuptStEve commented 4 years ago

这个 issue 讨论的不就是复制代码么? 自定义样式不在讨论范围...

你可能理解错我的意思了。。。 我不是说让你帮我改一下复制代码的样式,我是想自己来改整个项目的样式来符合我们设计师的风格, 需要改到这里面的结构 比如要改成下面这样(举个栗子) ps:而且试了你给的npm i vuepress-plugin-demo-code@next,并不像你动图显示的那样的效果哈 ------------------ Original ------------------ From: "StEve Young"<notifications@github.com>; Date: Thu, Nov 28, 2019 02:16 PM To: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; Cc: "善良滴壞蛋"<sorrowjojo@vip.qq.com>;"Author"<author@noreply.github.com>; Subject: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 重新安装了这个版本,跟之前的版本有啥区别吗? 咋修改呀 … ------------------ 原始邮件 ------------------ 发件人: "StEve Young"<notifications@github.com>; 发送时间: 2019年11月27日(星期三) 晚上8:51 收件人: "BuptStEve/vuepress-plugin-demo-code"<vuepress-plugin-demo-code@noreply.github.com>; 抄送: "善良滴壞蛋"<sorrowjojo@vip.qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [BuptStEve/vuepress-plugin-demo-code] 可以把复制代码的功能加上吗? (#19) 试试这个版本 v0.5.0-0 npm i vuepress-plugin-demo-code@next — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.