Skip to content

Commit 2c22f3f

Browse files
committed
2.9.0
1 parent 287e771 commit 2c22f3f

File tree

13 files changed

+1299
-1191
lines changed

13 files changed

+1299
-1191
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Using the component allows you to easily render https://adaptivecards.io/ in you
44

55
For more information about Adaptive Cards read this: https://docs.microsoft.com/en-us/adaptive-cards
66

7+
# Versioning changed!
8+
You might have noticed the version made a big jump, thats because we want to be inline with supported
9+
AdaptiveCards version which currently is 2.9.0
10+
711
# Installation
812

913
```
@@ -36,7 +40,6 @@ export default {
3640
<adaptive-card
3741
:card="card"
3842
:data="data"
39-
:cardUrl="cardUrl"
4043
:useTemplating="true"
4144
v-on:onActionClicked="onItemClick"
4245
/>
@@ -55,6 +58,11 @@ Read: https://docs.microsoft.com/en-us/adaptive-cards/templating/ for a guide ab
5558
Also: https://medium.com/@tim.cadenbach/why-templating-for-adaptive-cards-is-a-game-changer-1606de3226ed
5659
might help.
5760

61+
**NOTE:** Breaking Change!
62+
When using the most recent AdaptiveCards Templating package you have to update your templates.
63+
64+
Instead of using {$root.data} you now have to use ${$root.data}
65+
5866
__:useTemplating__
5967

6068
When passing in a template set to true

demo/App.vue

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,51 @@
1212
</a>
1313
</h1>
1414
<p>Adaptive Cards in Vue.js</p>
15+
<button @click="update">
16+
Add 1
17+
</button>
1518
<hr style="margin: 50px 0px;border: 1px solid #e3e3e3;">
1619
</div>
17-
<adaptive-card
18-
:card="card"
20+
{{ data.title }}
21+
<adaptive-cards
22+
:card="card"
1923
:data="data"
20-
:cardUrl="cardUrl"
21-
:useTemplating="true"
22-
v-on:onActionClicked="onItemClick"
24+
:use-templating="true"
25+
:host-config="config"
26+
@onActionClicked="onItemClick"
2327
/>
2428
</div>
2529
</div>
2630
</template>
2731

2832
<script>
29-
import SampleCard from '../src/assets/exampleCard.json';
30-
import SampleData from '../src/assets/exampleData.json';
33+
import SampleCard from '../src/assets/exampleCard.json'
34+
import SampleData from '../src/assets/exampleData.json'
35+
import HostConfig from '../src/assets/exampleHostConfig2.json'
3136
export default {
3237
name: 'App',
33-
components:[
34-
SampleCard,
35-
SampleData
36-
],
3738
data () {
3839
return {
3940
data: SampleData,
4041
card: SampleCard,
42+
config: HostConfig,
4143
cardUrl: 'https://templates.adaptivecards.io/teamwork.com/projects/task.json'
4244
}
4345
},
4446
methods: {
4547
onItemClick (event, item) {
46-
alert(event);
47-
alert(item);
48+
alert(event)
49+
alert(item)
50+
},
51+
update () {
52+
console.log('triggered!')
53+
this.data.title = 'Data Was changed!'
4854
}
4955
}
5056
}
5157
</script>
5258

53-
<style lang="scss">
54-
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600');
59+
<style lang="css">
5560
5661
body,
5762
html {

demo/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import Vue from 'vue'
22
import App from './App.vue'
33
import VueRouter from 'vue-router'
4-
import AdaptiveCard from '../src/index'
5-
4+
import AdaptiveCards from '../src/index'
65

76
Vue.use(VueRouter)
8-
Vue.use(AdaptiveCard)
7+
Vue.use(AdaptiveCards)
98
const router = new VueRouter({
109
routes: [
1110
{

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1.0">
66
<title>Adaptive Cards in Vue.js</title>
7-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
8-
</head>
7+
</head>
98
<body>
109
<div id="app"></div>
1110
<script src="./demo/dist/build.js"></script>

0 commit comments

Comments
 (0)