Vue 3 渲染后端返回的标签 | component 标签的使用 和 compile 的使用 作者: Chuwen 时间: 2022-05-13 分类: WEB开发 评论 ## 缘由 项目中有一个需求,需要动态渲染后端返回的 HTML,如下所示,下述的**每一个** `svg` 是后端动态返回的 ```html ``` 试过这样,但是不会渲染出来: ```html ``` ## 解决方案 通过浏览 Vue.js 文档,发现如下文章: - [渲染函数 - 模板编译](https://v3.cn.vuejs.org/guide/render-function.html#%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BB%84%E4%BB%B6 "模板编译") - [内置特殊元素 - component](https://staging-cn.vuejs.org/api/built-in-special-elements.html#component) - [在 Vue.js 中使用 Vue.compile](https://stackoverflow.com/questions/68981411/vue3-how-to-use-vue-compile-in-vue3) ### `` 是 Vue 内置特殊元素 > `` 和 `` 具有类似组件的特性,也是模板语法的一部分。它们并非真正的组件,同时在模板编译期间会被编译掉。因此,它们通常在模板中用小写字母书写。 所以,使用 ``、`Vue.compile` 就实现了我想要的功能 gist: https://gist.github.com/PrintNow/f9fec1890bd736593800564c45584c3b ```vue 实现效果 getSvg 输出结果: svg 输出结果: ```
Laravel 使用 Pipeline 实现 AOP(我不太清楚是否真属于 AOP 我也是一知半解,如有误请指正!) 作者: Chuwen 时间: 2022-05-05 分类: PHP 评论 ### 参考链接: 1. https://learnku.com/laravel/t/7543/pipeline-pipeline-design-paradigm-in-laravel 2. https://learnku.com/articles/44435 gist : https://gist.github.com/PrintNow/cbfe2db1b809bf72328a97ad9bd4449b --- ```php send($input) ->through([ RemoveBadWords::class, ReplaceWords::class, ]) ->then(function ($content) { return $content; }); echo "最终处理结果:$output"; ``` ## 运行结果 
PHPStorm 添加实时模版之 TODO 作者: Chuwen 时间: 2022-04-17 分类: 软件 评论 随手记录下   ``` // TODO: $user$ $date$ $time$ $todo$ ``` 
下载 c.gb688.cn 网站里的国家标准 pdf 作者: Chuwen 时间: 2022-03-31 分类: 神奇技巧 2 条评论 打开 Chrome 浏览器开发者工具  选择 Console / 控制台 选项卡,然后粘贴以下代码,然后按回车运行即可  ``` PDFViewerApplication.save() ```
使用 mysqldump 导出 MySQL 数据库每张表前 100 行数据 作者: Chuwen 时间: 2022-03-17 分类: MySQL 评论 命令如下: ```shell mysqldump --host=192.168.1.1 \ --user=nowtime_read \ --password=this_is_password \ nowtime \ --where="true limit 100" > nowtime_all.sql ```