text: (window.webpackJsonp=window.webpackJsonp||[]).push([[84],{537:function(t,s,a){"use strict";a.r(s);var r=a(52),n=Object(r.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"icon选择组件"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#icon选择组件"}},[t._v("#")]),t._v(" icon选择组件")]),t._v(" "),a("p",[t._v("示例地址：http://preview.d2-crud-plus.docmirror.cn/D2CrudPlusExample/index.html#/demo/form/icon")]),t._v(" "),a("h2",{attrs:{id:"_1-引入"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-引入"}},[t._v("#")]),t._v(" 1. 引入")]),t._v(" "),a("div",{staticClass:"language-javascript extra-class"},[a("pre",{pre:!0,attrs:{class:"language-javascript"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 先引入d2-crud,d2-crud-plus")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 参考 https://github.com/greper/d2-crud-plus/blob/master/packages/d2-crud-plus-example/src/business/install.js")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 然后引入树形组件")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" D2pIconSelector "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'d2p-extends'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 组件支持懒加载")]),t._v("\nVue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("D2pIconSelector"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"_2-crud"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-crud"}},[t._v("#")]),t._v(" 2. crud")]),t._v(" "),a("div",{staticClass:"language-javascript extra-class"},[a("pre",{pre:!0,attrs:{class:"language-javascript"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" crudOptions "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  columns"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      title"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'icon'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n      key"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'icon'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n      type"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'icon-selector'")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"_3-效果"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-效果"}},[t._v("#")]),t._v(" 3. 效果")]),t._v(" "),a("p",[t._v("http://preview.d2-crud-plus.docmirror.cn/D2CrudPlusExample/index.html#/demo/form/icon")]),t._v(" "),a("h2",{attrs:{id:"_4-组件文档"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-组件文档"}},[t._v("#")]),t._v(" 4. 组件文档")]),t._v(" "),a("p",[a("RouterLink",{attrs:{to:"/guide/components/d2p-icon-select.html"}},[t._v("d2-icon-select")])],1)])}),[],!1,null,null,null);s.default=n.exports}}]);