回答編集履歴

1

data-children属性(JSON)追加

2017/12/23 04:07

投稿

Tomak
Tomak

スコア1652

test CHANGED
@@ -305,3 +305,15 @@
305
305
  </select>
306
306
 
307
307
  ```
308
+
309
+
310
+
311
+ 実際のHTMLの`data-children`属性は下記のようになります。
312
+
313
+
314
+
315
+ ```json
316
+
317
+ {"48":{"id":48,"name":"介護","children":[{"id":439,"name":"ヘルパー","checked":false},{"id":440,"name":"介護士","checked":false},{"id":441,"name":"マネジャー","checked":false},{"id":442,"name":"生活相談","checked":false}]},"49":{"id":49,"name":"会計事務","children":[{"id":448,"name":"スタッフ","checked":false},{"id":449,"name":"内勤のみ","checked":false},{"id":450,"name":"巡回有り","checked":false},{"id":451,"name":"税理士","checked":false}]},"51":{"id":51,"name":"調理","children":[{"id":459,"name":"調理師","checked":false},{"id":460,"name":"栄養士","checked":false},{"id":461,"name":"調理補助","checked":false}]},"52":{"id":52,"name":"その他","children":[{"id":2120,"name":"管理","checked":false},{"id":527,"name":"一般事務","checked":false},{"id":530,"name":"営業","checked":false},{"id":463,"name":"技術者","checked":false}]}}
318
+
319
+ ```