[solved] How to set accordion`s prop?

I want to set accordion`s prop. I test the follow code, but never works.

<f7-list accordion >
  <f7-list-item title="流程历史" v-bind:link="'/oa/activities/' + item.processInstanceId"></f7-list-item>
  <f7-list-item title="附件数据" v-bind:link="'/oa/attachments/' + item.id"></f7-list-item>
  <!--<f7-list-item title="业务审批" link="#" @click="popupOpened = true"></f7-list-item>-->
  <f7-list-item accordion-item  id="m2"  title="业务审批">

let $$ = that.Dom7;
$$("#m2").prop('opened', true) ;

let myaccordion = f7.get("#m2");
myaccordion.opened = true;

Could somebody help me?

Well, this is something new. How is that you are trying to set Vue properties with DOM methods? In vue it should be different:

    <something :opened="opened"></something>
    <f7-link @click="makeOpened">Make it opened</f7-link>
export default {
  data() {
    return {
      opened: false
  methods: {
    makeOpened() {
      this.opened = true;

thank u. According ur hint, I use the following code, and it was works well.

<f7-list-item accordion-item id="m2" :accordion-item-opened="true" title="业务审批"> ....

1 Like