msg-switch
Advanced tools
+1
-1
| { | ||
| "name": "msg-switch", | ||
| "version": "0.5.1", | ||
| "version": "0.5.2", | ||
| "license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/PlanitarInc/msg-switch", |
+14
-6
@@ -88,3 +88,3 @@ # msg-switch [](https://travis-ci.org/PlanitarInc/msg-switch) [](https://badge.fury.io/js/msg-switch) [](https://www.npmjs.com/package/msg-switch) | ||
| <template slot-scope="{ ctx }"> | ||
| User {{ ctx.email }} was not found. | ||
| Resource {{ ctx.id }} was not found. | ||
| </template> | ||
@@ -110,7 +110,15 @@ </MsgCase> | ||
| // App.vue | ||
| <StdError :value="error.code"> | ||
| <MsgCase when="not_found">The document was not found.</MsgCase> | ||
| <MsgCase when="forbidden">You are not allowed to edit the document.</MsgCase> | ||
| <MsgCase when="dynamic">Message for error code missing in StdError.</MsgCase> | ||
| </StdError> | ||
| <StdErrorWithContext :value="error.code"> | ||
| <MsgCase when="not_found"> | ||
| <template slot-scope="{ ctx }"> | ||
| User {{ ctx.id }} was not found. | ||
| </template> | ||
| </MsgCase> | ||
| <MsgCase when="dynamic"> | ||
| <template slot-scope="{ ctx }"> | ||
| Message for error code missing in StdError: | ||
| <pre>{{ ctx.someDebugInfo }}</pre>. | ||
| </template> | ||
| </MsgCase> | ||
| </StdErrorWithContext> | ||
| ``` | ||
@@ -117,0 +125,0 @@ |
146439
0.08%162
5.19%