{"id":9811,"date":"2022-09-09T14:07:14","date_gmt":"2022-09-09T06:07:14","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=9811"},"modified":"2023-11-08T09:26:10","modified_gmt":"2023-11-08T01:26:10","slug":"vue-2","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2022\/09\/09\/vue-2\/","title":{"rendered":"vue\u4e2d\u5f39\u7a97\u4e0e\u6309\u94ae\u95ee\u9898"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u4e00\u3001\u5f39\u7a97\u7ec4\u4ef6\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;el-dialog :title=\"dialogTitle\" :visible.sync=\"dialogVisible\" width=\"30%\" &gt;\n&lt;\/el-dialog&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>title\u8868\u793a\u5f39\u7a97\u6807\u9898\uff0c\u6b64\u503c\u53ef\u81ea\u5b9a\u4e49<\/li>\n\n\n\n<li>visible.sync\u8868\u793a\u662f\u5426\u5f00\u542f\u5f39\u7a97\uff0ctrue\u8868\u793a\u662f\uff0cfalse\u8868\u793a\u5426<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4ee3\u7801\u8868\u793a\u901a\u8fc7\u5728\u5f39\u7a97\u7ec4\u4ef6\u4e2d\u5d4c\u5957\u8868\u5355\uff0c\u70b9\u51fb\u6dfb\u52a0\u6309\u94ae\u51fa\u53d1\u5f39\u7a97\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;el-button type=\"primary\" icon=\"el-icon-circle-plus-outline\" @click=\"openadd()\"&gt;\u6dfb\u52a0&lt;\/el-button&gt;\n&lt;el-dialog :title=\"dialogTitle\" :visible.sync=\"dialogVisible\" width=\"30%\" &gt;\n      &lt;el-form ref=\"formFile\" :model=\"formFile\" :rules=\"rules\"  label-width=\"80px\"&gt;\n        &lt;el-form-item label=\"\u7cfb\u7edf\u7c7b\u578b\" prop=\"system_type\"&gt;\n          &lt;el-input v-model.number=\"formFile.system_type\" placeholder=\"\u8bf7\u8f93\u5165\u7cfb\u7edf\u7c7b\u578b\" clearable  \/&gt;\n        &lt;\/el-form-item&gt;\n        &lt;el-form-item label=\"IP\u5730\u5740\" prop=\"ip_address\"&gt;\n          &lt;el-input v-model=\"formFile.ip_address\" clearable placeholder=\"\u8bf7\u8f93\u5165IP\u5730\u5740\" \/&gt;\n        &lt;\/el-form-item&gt;\n\t&lt;el-form-item label=\"\u4e3b\u673a\u540d\" prop=\"hostname\"&gt;\n          &lt;el-input v-model=\"formFile.hostname\" placeholder=\"\u8bf7\u8f93\u5165\u4e3b\u673a\u540d\" clearable \/&gt;\n        &lt;\/el-form-item&gt;\n        &lt;el-form-item label=\"\u5907\u6ce8\" prop=\"remarks\"&gt;\n          &lt;el-input v-model=\"formFile.remarks\" placeholder=\"\u8bf7\u8f93\u5165\u5907\u6ce8\u4fe1\u606f\" clearable \/&gt;\n        &lt;\/el-form-item&gt;\n\t&lt;el-form-item label=\"\u521b\u5efa\u4eba\" prop=\"created\"&gt;\n          &lt;el-input v-model=\"formFile.created\" placeholder=\"\u8bf7\u8f93\u5165\u521b\u5efa\u4eba\" clearable \/&gt;\n        &lt;\/el-form-item&gt;\n      &lt;\/el-form&gt;\n      &lt;span slot=\"footer\" class=\"dialog-footer\"&gt;\n        &lt;el-button type=\"primary\" @click=\"cancel\"&gt;\u53d6 \u6d88&lt;\/el-button&gt;\n        &lt;el-button type=\"primary\" @click=\"Add\"&gt;\u786e \u5b9a&lt;\/el-button&gt;\n      &lt;\/span&gt;\n  &lt;\/el-dialog&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u8ff0\u4ee3\u7801\u53ef\u4ee5\u770b\u51fa\uff0c\u70b9\u51fb\u6dfb\u52a0\u540e\uff0c\u5b9e\u9645\u662f\u8c03\u7528openadd()\u89e6\u53d1\u4e8b\u4ef6\uff0c\u6253\u5f00\u5f39\u7a97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e8c\u3001\u8868\u683c\u7ec4\u4ef6\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u4f8b\u5b50\u4ee5\u5bc6\u7801\u672c\u5e73\u53f0\u4e3a\u4f8b\u5b50\uff0c\u8868\u683c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;el-table\n    :data=\"tableData\"\n    border\n    style=\"width: 100%,height:100%\"&gt;\n    &lt;el-table-column\n    type=\"selection\"\n    width=\"55\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"id\"\n      label=\"ID\"\n      width=\"100\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"system_type\"\n      label=\"system\"\n      width=\"150\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"ip_address\"\n      label=\"IP\u5730\u5740\"\n      width=\"250\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"hostname\"\n      label=\"\u4e3b\u673a\u540d\"\n      width=\"150\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"created\"\n      label=\"\u521b\u5efa\u4eba\"\n      width=\"150\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      prop=\"remarks\"\n      label=\"\u5907\u6ce8\"\n      align=\"center\"&gt;\n    &lt;\/el-table-column&gt;\n    &lt;el-table-column\n      fixed=\"right\"\n      label=\"\u64cd\u4f5c\"\n      width=\"300\"\n      align=\"center\"&gt;\n      &lt;template slot-scope=\"scope\"&gt;\n        &lt;el-button  type=\"primary\" size=\"small\" @click=\"handleClick('helloworld')\"&gt;\u67e5\u770b&lt;\/el-button&gt;\n        &lt;el-button type=\"primary\" size=\"small\" @click=\"openadd(scope.row)\"&gt;\u7f16\u8f91&lt;\/el-button&gt;\n        &lt;el-button type=\"primary\" size=\"small\" @click=\"handledelete(scope.row)\"&gt;\u5220\u9664&lt;\/el-button&gt;\n\t&lt;\/template&gt;\n      &lt;\/el-table-column&gt;\n  &lt;\/el-table&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>label\uff1a\u8868\u793a\u5b9a\u4e49\u8868\u683c\u4e2d\u7684\u5217\u540d\uff0c\u4e5f\u5c31\u662f\u9875\u9762\u663e\u793a\u7684\u540d\u5b57<\/li>\n\n\n\n<li>prop\uff1a\u8981\u4e0e\u540e\u53f0\u8fd4\u56de\u7684\u6570\u636e\u4e2d\u7684json\u6570\u636e\u7684key\u540d\u4e00\u6837\uff0c\u53ea\u6709\u4e00\u6837\u624d\u53ef\u4ee5\u83b7\u53d6key\u5bf9\u5e94\u7684\u503c<\/li>\n\n\n\n<li>scope.row\uff1a\u8868\u793a\u83b7\u53d6\u8868\u683c\u5f53\u524d\u884c\u7684\u6570\u636e\uff0c\u6ce8\u610f\u662f\u8868\u683c\u6570\u636e\uff0c\u4e0d\u662f\u8868\u5355<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u9875\u9762\u4e2d\u53ef\u4ee5\u770b\u5230\u6dfb\u52a0\u548c\u7f16\u8f91\u6309\u94ae\u5982\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"346\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/9-1.png\" alt=\"\" class=\"wp-image-9829\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/9-1.png 711w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/9-1-300x146.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/9-1-600x292.png 600w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"306\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/10.png\" alt=\"\" class=\"wp-image-9830\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/10.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/10-300x129.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/10-600x259.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u8bf4\u660e\uff1a\u8868\u683c\u4e2did\u5b57\u6bb5\u7684\u503c\u662f\u901a\u8fc7\u540e\u7aef\u63a5\u53e3\u4e2d\u5b9e\u65f6\u83b7\u53d6\u7684\u6570\u636e\u5e93\u7684id\u5b57\u6bb5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u3001\u4e0a\u9762\u70b9\u51fb\u6dfb\u52a0\u540e\uff0c\u5f39\u51fa\u8868\u5355\u5f39\u51fa\u8fdb\u884c\u6570\u636e\u65b0\u589e\uff0c\u70b9\u51fb\u7f16\u8f91\u540e\uff0c\u91cd\u65b0\u7f16\u8f91\u6570\u636e\uff0c\u90a3\u4e48\u5982\u4f55\u5b9e\u73b0\u70b9\u51fb\u6dfb\u52a0\u548c\u70b9\u51fb\u7f16\u8f91\u8c03\u7528\u540c\u4e00\u4e2a\u5f39\u7a97\uff0c\u7136\u540e\u70b9\u51fb\u5f39\u7a97\u786e\u5b9a\u6309\u94ae\u540e\u53c8\u8c03\u7528\u4e0d\u540c\u7684\u540e\u7aef\u63a5\u53e3\u5b9e\u73b0\u65b0\u589e\u548c\u4fee\u6539\u5462\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u9996\u5148\u5b9a\u4e49\u53d8\u91cf\uff0cifMaterialEdit\uff0cindexVar\uff0c\u5e76\u8bbe\u7f6e\u521d\u59cb\u503c\u4e3a0\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"198\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/11.png\" alt=\"\" class=\"wp-image-9832\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/11.png 710w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/11-300x84.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/11-600x167.png 600w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\uff1a\u4e3b\u8981\u901a\u8fc7ifMaterialEdit\u5b9e\u73b0\u7684\u8c03\u7528\u540c\u4e00\u4e2a\u5f39\u7a97\u5b9e\u73b0\u4e0d\u540c\u529f\u80fd\uff0c\u8bbe\u5b9a\u5f53\u6b64\u503c\u4e3a0\u7684\u65f6\u5019\u5b9e\u73b0\u7f16\u8f91\uff0c\u4e3a1 \u7684\u65f6\u5019\u5b9e\u73b0\u65b0\u589e\uff0cindexVar\u4e3b\u8981\u7528\u6765\u83b7\u53d6id\u4f20\u9012\u5230\u540e\u7aef\u63a5\u53e3\u5b9e\u73b0\u7f16\u8f91\u529f\u80fd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u70b9\u51fb\u6dfb\u52a0\u6216\u8005\u7f16\u8f91\u6309\u94ae\u540e\uff0c\u5c06\u8c03\u7528openadd()\u51fd\u6570\uff0c\u5728openadd()\u4e2d\u8fdb\u884c\u5224\u65ad\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"505\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/8-1.png\" alt=\"\" class=\"wp-image-9825\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/8-1.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/8-1-300x214.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/8-1-600x427.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0copenadd(row)\u4e2d\u7684row\u8868\u793a\u6570\u636e\uff0c\u70b9\u51fb\u6dfb\u52a0\u6ca1\u6709\u4f20\u9012row\uff0c\u4f46\u662f\u70b9\u51fb\u7f16\u8f91\u4f20\u9012\u4e86row\uff0c\u56e0\u6b64\u901a\u8fc7if(row)\u6765\u5224\u65ad\u662f\u5426\u5b58\u5728\u6570\u636e\uff0c\u5982\u679c\u5b58\u5728\uff0c\u90a3\u4e48\u6253\u5f00\u5f39\u7a97\u5e76\u8bbe\u7f6eifMaterialEdit=0\uff0cdialogTitle\u8868\u793a\u8bbe\u7f6e\u5f39\u7a97\u6807\u9898\u4e3a\u7f16\u8f91\uff0cformFile\u8868\u793a\u8bbe\u7f6e\u7f16\u8f91\u5f39\u7a97\u7684\u65f6\u5019\u663e\u793a\u5185\u5bb9\uff0c\u4e5f\u5c31\u662f\u672a\u7f16\u8f91\u4e4b\u524d\u7684\u5f53\u524d\u5185\u5bb9, row.system_type\u8868\u793a\u83b7\u53d6\u8868\u683c\u4e2d\u6bcf\u4e2a\u5b57\u6bb5\u7684\u5bf9\u5e94\u503c\uff0cindexVar\u83b7\u53d6\u7684\u662f\u8868\u683c\u4e2d\u7684id\u5b57\u6bb5\u7684\u503c\uff0celse \u8868\u793a\u5426\u5219\uff0c\u90a3\u4e48\u8c03\u7528\u65b0\u589e\u7684\u903b\u8f91\uff0c\u6253\u5f00\u5f39\u7a97\uff0c\u8bbe\u7f6e\u53d8\u91cf\u4e3a1\uff0c\u8bbe\u7f6e\u8868\u683c\u6807\u9898<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u70b9\u51fb\u6309\u94ae\u540e\u63d0\u793a\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"487\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/12.png\" alt=\"\" class=\"wp-image-9836\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/12.png 709w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/12-300x206.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/12-600x412.png 600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"499\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/13.png\" alt=\"\" class=\"wp-image-9838\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/13.png 708w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/13-300x211.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/13-600x423.png 600w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u70b9\u51fb\u786e\u5b9a\u6309\u94ae\u540e\uff0c\u8c03\u7528Add()\u51fd\u6570\uff0c\u6b64\u65f6\u5c31\u53ef\u4ee5\u6839\u636e\u8bbe\u7f6e\u7684ifMaterialEdit\u7684\u503c\u6765\u5224\u65ad\u6307\u5b9a\u903b\u8f91\u4e86\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"846\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/14.png\" alt=\"\" class=\"wp-image-9840\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/14.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/14-250x300.png 250w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/14-501x600.png 501w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u51fa\uff0c\u5f53ifMaterialEdit=1\u7684\u65f6\u5019\u8c03\u7528\u7684\u662f\u6dfb\u52a0\u7684\u903b\u8f91\uff0c\u901a\u8fc7this.formFile.system_type\u83b7\u53d6\u8868\u5355\u4e2d\u8f93\u5165\u7684\u6570\u636e\uff0c\u8c03\u7528addip()\u51fd\u6570\u5b9e\u73b0\u6dfb\u52a0\uff0c\u6dfb\u52a0\u540e\u901a\u8fc7this.reload()\u5237\u65b0\u9875\u9762\uff0c\u5f53ifMaterialEdit=0\u7684\u65f6\u5019\uff0c\u8c03\u7528\u7f16\u8f91\u903b\u8f91\uff0c\u540c\u6837\u83b7\u53d6\u8868\u5355\u4e2d\u5199\u5165\u7684\u6570\u636e\uff0c\u8c03\u7528editip()\u5b9e\u73b0\u7f16\u8f91\uff0c\u6ce8\u610f\uff0c\u6b64\u65f6editip()\u4e2d\u4e3a\u4e24\u4e2a\u53c2\u6570\uff0c\u7b2c\u4e00\u53c2\u6570\u8868\u793a\u8981\u5411\u63a5\u53e3\u4e2d\u4f20\u9012\u7684\u6570\u636efromData1\uff0cthis.indexVar\u8868\u793a\u83b7\u53d6\u7684\u8868\u683c\u4e2d\u5f53\u524d\u884c\u7684id\u4fe1\u606f(\u5df2\u8bbe\u7f6e\u53d8\u91cf\u5e76\u4e14\u5728openadd()\u4e2d\u8bbe\u7f6e\u4e86\u503c)\uff0c\u56e0\u4e3a\u540e\u7aef\u63a5\u53e3\u662f\u6839\u636eid\u7684\u503c\u6765\u4fee\u6539\u5bf9\u5e94\u6570\u636e\u5e93\u4e2d\u7684\u5185\u5bb9\uff0c\u56e0\u6b64\u8981\u5c06id\u7684\u503c\u4f20\u9012\u8fc7\u53bb<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u53e3\u51fd\u6570\u6240\u5728\u4f4d\u7f6e\u4e3a\uff1asrc\/api\/ip.js\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"713\" height=\"468\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/15.png\" alt=\"\" class=\"wp-image-9847\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/15.png 713w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/15-300x197.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/15-600x394.png 600w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\uff1a\u51fd\u6570\u9700\u8981\u5bfc\u5165\u624d\u53ef\u4f7f\u7528\uff0c\u5728script\u4e2d\u5bfc\u5165\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"169\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/16.png\" alt=\"\" class=\"wp-image-9849\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/16.png 710w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/16-300x71.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/09\/16-600x143.png 600w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u56fe\u4e2d\u7684import\u4e5f\u53ef\u4ee5\u4e00\u6b21\u6027\u53ef\u4ee5\u5bfc\u5165\u591a\u4e2a\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { addip,getip,editip,deleteip } from '@\/api\/ip'<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><strong>\u9644\u52a0\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">scope.$index\u8868\u793a\u8868\u683c\u5f53\u524d\u884c\u7684\u7d22\u5f15\uff0c\u4ece0\u5f00\u59cb\uff0c\u7b2c\u4e00\u884c\u7684\u7d22\u5f15\u4e3a0\uff0c\u4ee5\u6b64\u7c7b\u63a8<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">scope.row\u8868\u793a\u8868\u683c\u5f53\u524d\u884c\u7684\u6570\u636e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5f39\u7a97\u7ec4\u4ef6\uff1a \u4e0b\u9762\u4ee3\u7801\u8868\u793a\u901a\u8fc7\u5728\u5f39\u7a97\u7ec4\u4ef6\u4e2d\u5d4c\u5957\u8868\u5355\uff0c\u70b9\u51fb\u6dfb\u52a0\u6309\u94ae\u51fa\u53d1\u5f39\u7a97\uff0c\u5982\u4e0b\uff1a \u4ece\u4e0a\u8ff0\u4ee3\u7801\u53ef\u4ee5\u770b\u51fa\uff0c\u70b9\u51fb\u6dfb [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":9813,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155,23],"tags":[],"class_list":["post-9811","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue","category-rong"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=9811"}],"version-history":[{"count":31,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9811\/revisions"}],"predecessor-version":[{"id":15489,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9811\/revisions\/15489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/9813"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=9811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=9811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=9811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}