{"id":9683,"date":"2024-03-15T18:29:18","date_gmt":"2024-03-15T10:29:18","guid":{"rendered":"https:\/\/sdeno.com\/?p=9683"},"modified":"2024-03-20T17:49:09","modified_gmt":"2024-03-20T09:49:09","slug":"pinia%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=9683","title":{"rendered":"pinia\u7b14\u8bb0"},"content":{"rendered":"<p>pinia\u4e2daction\u652f\u6301\u540c\u6b65\u548c\u5f02\u6b65<br \/>\npinia\u4e2d\u53ea\u6709state\u3001getter\u3001action\uff0c\u629b\u5f03\u4e86Vuex\u4e2d\u7684Mutation<br \/>\npinia\u4e2d\u6bcf\u4e2astore\u90fd\u662f\u72ec\u7acb\u7684\uff0c\u4e92\u76f8\u4e0d\u5f71\u54cd<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">\u5b89\u88c5<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">npm install pinia -S<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5f15\u5165\uff0c\u7f16\u8f91main.js<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import { createPinia } from \"pinia\";\r\nconst pinia = createPinia();\r\n\r\nconst app = createApp(App);\r\napp.use(pinia);<\/pre>\n<p>&nbsp;<\/p>\n<article data-content=\"[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;VJUG-1710490301594&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;gI4u-1710490301592&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\u521b\u5efastore\u00a0\u00a0&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;nuhB-1710490312766&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;KZcN-1710490312765&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\\\\src\\\\store\\\\test.js&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]\">\n<div>\u521b\u5efastore<\/div>\n<div>\\src\\store\\test.js<\/div>\n<\/article>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import { defineStore } from 'pinia'\r\n\r\nexport const usersstore = defineStore('users', {\r\n    state: () =&gt; {\r\n        return {   \/\/state\u7684\u503c\u5b9a\u4e49\u4e00\u5b9a\u8981\u8fd9\u4e48\u5199\r\n            name: \"111\u5c0f\u732a\u8bfe\u5802\",\r\n            age: 25,\r\n            sex: \"\u7537\",\r\n        };\r\n    },\r\n    getters: {\r\n        getAddAge: (state) =&gt; {\r\n          return state.age + 100;\r\n        },\r\n    },\r\n    actions: {\r\n        saveName(name) {\r\n          this.name = name; \/\/\u4fee\u6539state\u7684name\u503c\r\n        },\r\n    },\r\n})<\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">state<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;div&gt;{{age}}&lt;\/div&gt;\r\n&lt;button @click=\"changebtn\"&gt;\u70b9\u51fb&lt;\/button&gt;\r\nimport {usersstore} from \"@\/store\/test\";\r\n\r\n\/\/\u8c03\u7528\uff1a\r\nvar {name,age,sex} = usersstore()\r\nvar age = ref(age)\r\n\r\n\r\n\/\/\u4fee\u6539\u6570\u636e\u4e0d\u54cd\u5e94\r\nvar changebtn = ()=&gt;{\r\n  usersstore().age=usersstore().age+1  \/\/\u6570\u636e\u4fee\u6539\u6210\u529f\uff0c\u4f46\u4e0d\u54cd\u5e94\r\n  console.log(usersstore())\r\n}\r\n\r\n\/\/\u63a8\u8350\uff0c\u4fee\u6539\u6570\u636e\u53ef\u4ee5\u54cd\u5e94\r\nimport {storeToRefs} from 'pinia'\r\nvar {name,age,sex} = storeToRefs(usersstore()) \/\/\u5728\u5916\u9762\u5305\u88f9\u4e00\u5c42storeToRefs\uff0c\r\nvar age = ref(age)\r\nusersstore().age=usersstore().age+1  \/\/\u6570\u636e\u4fee\u6539\u6210\u529f\uff0c\u540c\u65f6\u4e5f\u80fd\u54cd\u5e94\r\n\r\n\r\n\/\/\u6279\u91cf\u4fee\u6539\u6570\u636e\r\nvar changebtn = ()=&gt;{\r\n    usersstore().$patch({  \/\/\u7f3a\u70b9\u5c31\u662f\u4e0d\u9700\u8981\u4fee\u6539\u7684\u6570\u636e\u4e5f\u8981\u5199\u51fa\u6765\r\n      name: \"111\u5c0f\u732a\u8bfe\u5802\",\r\n      age: 29,\r\n      sex: \"\u7537\",\r\n    })\r\n    \r\n    usersstore().$patch((state) =&gt; { \/\/\u8fd9\u6837\u5c31\u53ef\u4ee5\u4fee\u6539\u53ea\u60f3\u6539\u7684\u90e8\u5206\u4e86\r\n      state.age=state.age+1\r\n      state.sex=\"\u5973\"\r\n    })\r\n    \r\n    usersstore().$state = { counter: 666, name: '\u5f20\u4e09' } \/\/\u66ff\u6362\u6574\u4e2astate\u6570\u636e         \r\n}\r\n\r\n\r\n\r\nvar changebtn = ()=&gt;{\r\n  usersstore().$reset(); \/\/\u91cd\u7f6e\u6240\u6709\u6570\u636e\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">getters<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">export const usersstore = defineStore('users', {\r\n    state: () =&gt; {\r\n        return {   \/\/state\u7684\u503c\u5b9a\u4e49\u4e00\u5b9a\u8981\u8fd9\u4e48\u5199\r\n            name: \"111\u5c0f\u732a\u8bfe\u5802\",\r\n            age: 25,\r\n            sex: \"\u7537\",\r\n        };\r\n    },\r\n    getters: {\r\n        getAddAge: (state) =&gt; { \/\/\u76f8\u5f53\u4e8e\u5728state\u65b0\u589e\u4e86\u4e00\u4e2agetAddAge\u53d8\u91cf\r\n          return state.age + 100;\r\n        },\r\n        getNameAndAge: (state) =&gt; {\r\n          return this.name + this.getAddAge; \/\/ \u8c03\u7528\u5176\u5b83getter\r\n        },\r\n    },\r\n})<\/pre>\n<p>&nbsp;<\/p>\n<p>\u63a5\u6536\u5916\u6765\u53c2\u6570<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">getters: {\r\n        getAddAge: (state) =&gt; { \/\/\u76f8\u5f53\u4e8e\u5728state\u65b0\u589e\u4e86\u4e00\u4e2agetAddAge\u53d8\u91cf\r\n          return (num) =&gt; state.age + num;\r\n        }\r\n},\r\n\r\n\u8c03\u7528\r\n{{ usersstore().getAddAge(2) }}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<article data-content=\"[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;fiNP-1710498002746&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;sA3G-1710498002744&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;actions&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#F33232&quot;}]}]}],&quot;state&quot;:{}}]\">\n<div><span style=\"color: #ff0000;\">actions<\/span><\/div>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">actions: {\r\n        saveName(name) {\r\n          this.name = name; \/\/\u4fee\u6539state\u7684name\u503c\r\n        },\r\n},<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/article>\n<p>\u8c03\u7528<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ \u8c03\u7528actions\u65b9\u6cd5\r\nconst saveName = () =&gt; {\r\n  usersstore().saveName(\"\u6211\u662f\u5c0f\u732a\");\r\n};<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<article data-content=\"[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;fl1Q-1697623894278&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;FbOh-1697623894276&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;createPinia\u00a0\u00a0\/\/\u521d\u59cb\u5316\u521b\u5efapinia&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;xYzV-1697623894894&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WanX-1697623894893&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;defineStore\u00a0\u00a0\/\/\u521b\u5efastore&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;FVJO-1697623895010&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;93cA-1697623895008&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;storeToRefs\u00a0\u00a0\/\/\u4fee\u6539store\u6570\u636e\u5b9e\u73b0\u6570\u636e\u54cd\u5e94&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;893h-1697623895125&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;8rEc-1697623895124&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;DcsG-1697624530217&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;oJCo-1697624530215&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;state&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#F33232&quot;}]},{&quot;text&quot;:&quot;\u00a0\u00a0\u00a0\/\/\u7406\u89e3\u6210data&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;rRqB-1697623895239&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;qioY-1697623895238&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;store.$reset();\u00a0\u00a0\/\/\u521d\u59cb\u5316\u6570\u636e&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;2kvO-1697623895348&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;dB26-1697623895347&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;store.$patch\u00a0\u00a0\/\/\u6279\u91cf\u4fee\u6539\u6570\u636e&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;z01o-1697623895487&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;iKek-1697623895485&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;store.$state\u00a0\u00a0\/\/\u76f4\u63a5\u66ff\u6362state\u6570\u636e&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;loCe-1697623895628&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;2d7y-1697623895627&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;GoZO-1697624729809&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;CYf1-1697624729807&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;getter&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#F33232&quot;}]},{&quot;text&quot;:&quot;\u00a0\u00a0\/\/\u7406\u89e3\u6210computed&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;BjhU-1710495007098&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;PBcF-1710495007096&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u7ed3\u679c\uff0c\u65e2\u7136\u5b83\u548cVue\u4e2d\u7684\u8ba1\u7b97\u5c5e\u6027\u7c7b\u4f3c\uff0c\u90a3\u4e48\u5b83\u80af\u5b9a\u4e5f\u662f\u4f1a\u88ab\u7f13\u5b58\u7684\uff0c\u5c31\u548ccomputed\u4e00\u6837\u3002&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;lCza-1697624729942&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;REYK-1697624729941&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;oDiB-1697623895756&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;0B9D-1697623895755&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;actions\u00a0&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;color&quot;,&quot;value&quot;:&quot;#F33232&quot;}]},{&quot;text&quot;:&quot;\u00a0\/\/\u7406\u89e3\u6210methods\u00a0\uff0c\u652f\u6301\u8c03\u7528\u540c\u6b65\u3001\u5f02\u6b65\u65b9\u6cd5&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]\">\n<div>createPinia \/\/\u521d\u59cb\u5316\u521b\u5efapinia<\/div>\n<div>defineStore \/\/\u521b\u5efastore<\/div>\n<div>storeToRefs \/\/\u4fee\u6539store\u6570\u636e\u5b9e\u73b0\u6570\u636e\u54cd\u5e94<\/div>\n<div><\/div>\n<div><span style=\"color: #ff0000;\">state<\/span> \/\/\u7406\u89e3\u6210data<\/div>\n<div>store.$reset(); \/\/\u521d\u59cb\u5316\u6570\u636e<\/div>\n<div>store.$patch \/\/\u6279\u91cf\u4fee\u6539\u6570\u636e<\/div>\n<div>store.$state \/\/\u76f4\u63a5\u66ff\u6362state\u6570\u636e<\/div>\n<div><\/div>\n<div><span style=\"color: #ff0000;\">getter<\/span> \/\/\u7406\u89e3\u6210computed<\/div>\n<div>\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u7ed3\u679c\uff0c\u65e2\u7136\u5b83\u548cVue\u4e2d\u7684\u8ba1\u7b97\u5c5e\u6027\u7c7b\u4f3c\uff0c\u90a3\u4e48\u5b83\u80af\u5b9a\u4e5f\u662f\u4f1a\u88ab\u7f13\u5b58\u7684\uff0c\u5c31\u548ccomputed\u4e00\u6837\u3002<\/div>\n<div><\/div>\n<div><span style=\"color: #ff0000;\">actions<\/span> \/\/\u7406\u89e3\u6210methods \uff0c\u652f\u6301\u8c03\u7528\u540c\u6b65\u3001\u5f02\u6b65\u65b9\u6cd5<\/div>\n<\/article>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">\u6570\u636e\u6301\u4e45\u5316<\/span><\/p>\n<p>\u4e5f\u5c31\u662fvuex\u628a\u6570\u636e\u5b58\u5230localStorage\u4e2d<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">npm i pinia-plugin-persistedstate -S<\/pre>\n<p>&nbsp;<\/p>\n<p>\\src\\store\\index.js<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import { createPinia } from \"pinia\";\r\nconst pinia = createPinia();\r\nimport piniaPluginPersistedstate from 'pinia-plugin-persistedstate'\r\n\r\n\r\npinia.use(piniaPluginPersistedstate)\r\n\r\nexport default pinia<\/pre>\n<p>&nbsp;<\/p>\n<p>\\src\\store\\user.js<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">.\r\n.\r\n.\r\nstate: () =&gt; {\r\n    return {\r\n        token: getToken(),\r\n        menus: [],\r\n    };\r\n},\r\ngetters: {\r\n  \r\n},\r\nactions: {\r\n   \r\n},\r\n\/\/ persist:true, \/\/\u5c06\u5168\u90e8\u6570\u636e\u7f13\u5b58\u5230localStorage\r\npersist: {\r\n    \/\/ \u81ea\u5b9a\u4e49\u5b57\u6bb5\u540d\r\n    key: 'mychannel',\r\n    \/\/ \u53ea\u662f\u5c06token\u5b57\u6bb5\u6301\u4e45\u5316\u5b58\u50a8\r\n    paths: ['token']\r\n}<\/pre>\n<figure class=\"mdx-lazyload-container\" style=\"max-width:775px\"><div style=\"padding-top:12.258064516129%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img width=\"775\" height=\"95\" class=\"alignnone size-full wp-image-9705 lazyload\" title=\"pinia\u7b14\u8bb0\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/sdeno.com\/wp-content\/uploads\/2024\/03\/QQ\u622a\u56fe20240320174822.png\" alt=\"https:\/\/sdeno.com\/wp-content\/uploads\/2024\/03\/QQ\u622a\u56fe20240320174822.png\" data-srcset=\"https:\/\/sdeno.com\/wp-content\/uploads\/2024\/03\/QQ\u622a\u56fe20240320174822.png 775w, https:\/\/sdeno.com\/wp-content\/uploads\/2024\/03\/QQ\u622a\u56fe20240320174822-300x37.png 300w, https:\/\/sdeno.com\/wp-content\/uploads\/2024\/03\/QQ\u622a\u56fe20240320174822-768x94.png 768w\" sizes=\"auto, (max-width: 775px) 100vw, 775px\"><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>https:\/\/zhuanlan.zhihu.com\/p\/533233367<\/p>\n","protected":false},"excerpt":{"rendered":"<p>pinia\u4e2daction\u652f\u6301\u540c\u6b65\u548c\u5f02\u6b65 pinia\u4e2d\u53ea\u6709state\u3001getter\u3001action\uff0c\u629b\u5f03\u4e86Vuex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9683","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/9683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9683"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/9683\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}